diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.c b/ArmPkg/Drivers/CpuDxe/CpuDxe.c index f109a8e0cf..191eb1c20b 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.c +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.c @@ -317,7 +317,7 @@ CpuDxeInitialize ( EFI_EVENT IdleLoopEvent; EFI_HANDLE CpuHandle; - InitializeExceptions (&mCpu); + InitializeExceptions (); InitializeDma (&mCpu); diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.h b/ArmPkg/Drivers/CpuDxe/CpuDxe.h index c6613b939a..80d53e3577 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.h +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.h @@ -99,7 +99,7 @@ CpuSetMemoryAttributes ( EFI_STATUS InitializeExceptions ( - IN EFI_CPU_ARCH_PROTOCOL *Cpu + VOID ); EFI_STATUS diff --git a/ArmPkg/Drivers/CpuDxe/Exception.c b/ArmPkg/Drivers/CpuDxe/Exception.c index 441f92d502..bd27f24994 100644 --- a/ArmPkg/Drivers/CpuDxe/Exception.c +++ b/ArmPkg/Drivers/CpuDxe/Exception.c @@ -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; } /**