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
This commit is contained in:
oliviermartin
2011-06-03 09:25:01 +00:00
parent e7f7105ba0
commit f0fef790ff
4 changed files with 63 additions and 1 deletions

View File

@@ -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
//