diff mbox

[Linaro-uefi] Platforms/AMD/AmdStyxLib: remove lowest gigabyte from 1:1 mapping

Message ID 1462810024-24619-1-git-send-email-ard.biesheuvel@linaro.org
State New
Headers show

Commit Message

Ard Biesheuvel May 9, 2016, 4:07 p.m. UTC
The physical region [0x0, 0x4000_0000) is not used on Seattle for
non-secure devices or memory, and inadvertent accesses in this region
(e.g., NULL pointer dereferences) seem to be causing SErrors.

So leave the region unmapped: this does not fix the issues causing the
SErrors, but the aborts will at least be synchronous.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platforms/AMD/Styx/Library/AmdStyxLib/StyxMem.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/Platforms/AMD/Styx/Library/AmdStyxLib/StyxMem.c b/Platforms/AMD/Styx/Library/AmdStyxLib/StyxMem.c
index 9202e38864d4..dc45b68c3ce8 100644
--- a/Platforms/AMD/Styx/Library/AmdStyxLib/StyxMem.c
+++ b/Platforms/AMD/Styx/Library/AmdStyxLib/StyxMem.c
@@ -93,10 +93,10 @@  ArmPlatformGetVirtualMemoryMap (
   DEBUG ((EFI_D_ERROR, " Memory Map\n------------------------------------------------------------------------\n"));
   DEBUG ((EFI_D_ERROR, "Description                    :        START       -        END         [        SIZE        ]    {              ATTR             }\n"));
 
-  // 0x00_0000_0000 - 0x7F_FFFF_FFFF: Mapped I/O space
-  VirtualMemoryTable[Index].PhysicalBase   = 0x0000000000ULL;
-  VirtualMemoryTable[Index].VirtualBase    = 0x0000000000ULL;
-  VirtualMemoryTable[Index].Length         = 0x8000000000ULL;
+  // 0x00_4000_0000 - 0x7F_FFFF_FFFF: Mapped I/O space
+  VirtualMemoryTable[Index].PhysicalBase   = 0x0040000000ULL;
+  VirtualMemoryTable[Index].VirtualBase    = 0x0040000000ULL;
+  VirtualMemoryTable[Index].Length         = 0x7FC0000000ULL;
   VirtualMemoryTable[Index].Attributes     = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE;
   LOG_MEM ("I/O Space                      : 0x%016lx - 0x%016lx [ 0x%016lx ]    { %a }\n");