summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Drivers/CpuDxe
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Drivers/CpuDxe')
-rw-r--r--ArmPkg/Drivers/CpuDxe/Exception.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/Exception.c b/ArmPkg/Drivers/CpuDxe/Exception.c
index 2f7e1b637f..55a7132193 100644
--- a/ArmPkg/Drivers/CpuDxe/Exception.c
+++ b/ArmPkg/Drivers/CpuDxe/Exception.c
@@ -206,10 +206,13 @@ InitializeExceptions (
//Note: On ARM processor with the Security Extension, the Vector Table can be located anywhere in the memory.
// The Vector Base Address Register defines the location
- ArmWriteVBar(PcdGet32(PcdCpuVectorBaseAddress));
+ ArmWriteVBar (PcdGet32(PcdCpuVectorBaseAddress));
} else {
+ // The Vector table must be 32-byte aligned
+ ASSERT(((UINT32)ExceptionHandlersStart & ((1 << 5)-1)) == 0);
+
// We do not copy the Exception Table at PcdGet32(PcdCpuVectorBaseAddress). We just set Vector Base Address to point into CpuDxe code.
- ArmWriteVBar((UINT32)ExceptionHandlersStart);
+ ArmWriteVBar ((UINT32)ExceptionHandlersStart);
}
if (FiqEnabled) {