Added FIQ interrupt primatives. Update exception handler to disable/reenable FIQ when updating in case debug agent library is using FIQ.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10197 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -178,17 +178,24 @@ InitializeExceptions (
|
||||
UINTN Offset;
|
||||
UINTN Length;
|
||||
UINTN Index;
|
||||
BOOLEAN Enabled;
|
||||
BOOLEAN IrqEnabled;
|
||||
BOOLEAN FiqEnabled;
|
||||
EFI_PHYSICAL_ADDRESS Base;
|
||||
UINT32 *VectorBase;
|
||||
|
||||
//
|
||||
// Disable interrupts
|
||||
//
|
||||
Cpu->GetInterruptState (Cpu, &Enabled);
|
||||
Cpu->GetInterruptState (Cpu, &IrqEnabled);
|
||||
Cpu->DisableInterrupt (Cpu);
|
||||
|
||||
|
||||
//
|
||||
// EFI does not use the FIQ, but a debugger might so we must disable
|
||||
// as we take over the exception vectors.
|
||||
//
|
||||
FiqEnabled = ArmGetFiqState ();
|
||||
ArmDisableFiq ();
|
||||
|
||||
//
|
||||
// Copy an implementation of the ARM exception vectors to PcdCpuVectorBaseAddress.
|
||||
//
|
||||
@@ -236,7 +243,11 @@ InitializeExceptions (
|
||||
// Flush Caches since we updated executable stuff
|
||||
InvalidateInstructionCacheRange ((VOID *)PcdGet32(PcdCpuVectorBaseAddress), Length);
|
||||
|
||||
if (Enabled) {
|
||||
if (FiqEnabled) {
|
||||
ArmEnableFiq ();
|
||||
}
|
||||
|
||||
if (IrqEnabled) {
|
||||
//
|
||||
// Restore interrupt state
|
||||
//
|
||||
|
Reference in New Issue
Block a user