summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Drivers/CpuDxe
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-03 09:25:01 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-03 09:25:01 +0000
commitf0fef790ff6a55997035af8727cc2f3fbd39afbf (patch)
tree67519f2d8577e116c7213bc893ddc5e9198ddecd /ArmPkg/Drivers/CpuDxe
parente7f7105ba0d231bf3176a2b7f1d82cf9cead5e34 (diff)
downloadedk2-f0fef790ff6a55997035af8727cc2f3fbd39afbf.tar.gz
edk2-f0fef790ff6a55997035af8727cc2f3fbd39afbf.tar.bz2
edk2-f0fef790ff6a55997035af8727cc2f3fbd39afbf.zip
ArmPkg: Introduce ArmSetLowVectors/ArmSetHighVectors functions
These functions set/clear the SCTLR.V bit that controls the location of the Vector Table. This commit also forces the SCTLR.V to be clear when the VBAR register is set. Note: The original fix has been proposed by Eugene Cohen (HP). git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11739 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Drivers/CpuDxe')
-rw-r--r--ArmPkg/Drivers/CpuDxe/Exception.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/Exception.c b/ArmPkg/Drivers/CpuDxe/Exception.c
index 17e463f97b..659b7137e1 100644
--- a/ArmPkg/Drivers/CpuDxe/Exception.c
+++ b/ArmPkg/Drivers/CpuDxe/Exception.c
@@ -149,6 +149,14 @@ InitializeExceptions (
//
Length = (UINTN)ExceptionHandlersEnd - (UINTN)ExceptionHandlersStart;
+ // Check if the exception vector is in the low address
+ if (PcdGet32 (PcdCpuVectorBaseAddress) == 0x0) {
+ // Set SCTLR.V to 0 to enable VBAR to be used
+ ArmSetLowVectors ();
+ } else {
+ ArmSetHighVectors ();
+ }
+
//
// Reserve space for the exception handlers
//