diff options
author | Girish K S <ks.giri@samsung.com> | 2013-08-19 13:49:09 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-08-19 13:49:09 +0000 |
commit | 6a343fac2c0607004a7634ce6d47cfbd37685fd8 (patch) | |
tree | d826e157ab6cd3a67cee5efb90e8660edfbc9f20 /ArmPkg/Drivers/CpuDxe | |
parent | 6675a21f141ce144a9e7ff39128b2a625eab80c9 (diff) | |
download | edk2-platforms-6a343fac2c0607004a7634ce6d47cfbd37685fd8.tar.xz |
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
Diffstat (limited to 'ArmPkg/Drivers/CpuDxe')
-rw-r--r-- | ArmPkg/Drivers/CpuDxe/AArch64/Exception.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/AArch64/Exception.c b/ArmPkg/Drivers/CpuDxe/AArch64/Exception.c index 1aac6a5a91..0cd80bb722 100644 --- a/ArmPkg/Drivers/CpuDxe/AArch64/Exception.c +++ b/ArmPkg/Drivers/CpuDxe/AArch64/Exception.c @@ -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;
}
|