mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
ArmPkg/CpuDxe: Remove rudimentary vector handoff logic
There is some fossilized code in the CpuDxe driver startup code that permits a vector table to be inherited from the PEI stage, but this code is essentially dead on ARM platforms, given that the VectorInfo argument passed to InitializeCpuExceptionHandlers() is ignored, and no code appears to exist that would result in the gEfiVectorHandoffTableGuid configuration table ever being populated. Also, due to prior refactoring, the code that disables and re-enables IRQs and FIQs is completely pointless, and can simply be removed. That, in turn, allows the CPU arch protocol parameter to be dropped from the prototype of InitializeExceptions(). Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
parent
e5b56d6ef9
commit
0422dd0669
@ -317,7 +317,7 @@ CpuDxeInitialize (
|
||||
EFI_EVENT IdleLoopEvent;
|
||||
EFI_HANDLE CpuHandle;
|
||||
|
||||
InitializeExceptions (&mCpu);
|
||||
InitializeExceptions ();
|
||||
|
||||
InitializeDma (&mCpu);
|
||||
|
||||
|
@ -99,7 +99,7 @@ CpuSetMemoryAttributes (
|
||||
|
||||
EFI_STATUS
|
||||
InitializeExceptions (
|
||||
IN EFI_CPU_ARCH_PROTOCOL *Cpu
|
||||
VOID
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
|
@ -13,49 +13,11 @@
|
||||
|
||||
EFI_STATUS
|
||||
InitializeExceptions (
|
||||
IN EFI_CPU_ARCH_PROTOCOL *Cpu
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_VECTOR_HANDOFF_INFO *VectorInfoList;
|
||||
EFI_VECTOR_HANDOFF_INFO *VectorInfo;
|
||||
BOOLEAN IrqEnabled;
|
||||
BOOLEAN FiqEnabled;
|
||||
|
||||
VectorInfo = (EFI_VECTOR_HANDOFF_INFO *)NULL;
|
||||
Status = EfiGetSystemConfigurationTable (&gEfiVectorHandoffTableGuid, (VOID **)&VectorInfoList);
|
||||
if ((Status == EFI_SUCCESS) && (VectorInfoList != NULL)) {
|
||||
VectorInfo = VectorInfoList;
|
||||
}
|
||||
|
||||
// initialize the CpuExceptionHandlerLib so we take over the exception vector table from the DXE Core
|
||||
InitializeCpuExceptionHandlers (VectorInfo);
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
//
|
||||
// Disable interrupts
|
||||
//
|
||||
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 ();
|
||||
|
||||
if (FiqEnabled) {
|
||||
ArmEnableFiq ();
|
||||
}
|
||||
|
||||
if (IrqEnabled) {
|
||||
//
|
||||
// Restore interrupt state
|
||||
//
|
||||
Status = Cpu->EnableInterrupt (Cpu);
|
||||
}
|
||||
InitializeCpuExceptionHandlers (NULL);
|
||||
|
||||
//
|
||||
// On a DEBUG build, unmask SErrors so they are delivered right away rather
|
||||
@ -66,7 +28,7 @@ InitializeExceptions (
|
||||
ArmEnableAsynchronousAbort ();
|
||||
);
|
||||
|
||||
return Status;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user