mirror of https://github.com/acidanthera/audk.git
ArmPkg/CpuDxe: AArch64: Fix wrong comparison of exception type
During the interrupt registration comparison is made against max value of exception types for ARMV7, but in the common handling function the check is made against max value of exceptions types for ARMV8. This can lead to undefined behaviour during registration of interrupts. This patch modifies the registration function to handle only AArch64 exceptions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Girish K S <ks.giri@samsung.com> Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14561 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
6675a21f14
commit
6a343fac2c
|
@ -38,8 +38,8 @@ AsmCommonExceptionEntry (
|
|||
);
|
||||
|
||||
|
||||
EFI_EXCEPTION_CALLBACK gExceptionHandlers[MAX_ARM_EXCEPTION + 1];
|
||||
EFI_EXCEPTION_CALLBACK gDebuggerExceptionHandlers[MAX_ARM_EXCEPTION + 1];
|
||||
EFI_EXCEPTION_CALLBACK gExceptionHandlers[MAX_AARCH64_EXCEPTION + 1];
|
||||
EFI_EXCEPTION_CALLBACK gDebuggerExceptionHandlers[MAX_AARCH64_EXCEPTION + 1];
|
||||
|
||||
|
||||
|
||||
|
@ -69,7 +69,7 @@ RegisterInterruptHandler (
|
|||
IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler
|
||||
)
|
||||
{
|
||||
if (InterruptType > MAX_ARM_EXCEPTION) {
|
||||
if (InterruptType > MAX_AARCH64_EXCEPTION) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue