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.g...@samsung.com>
---
changes in v1:
                Added the contributor Agreement tag

 ArmPkg/Drivers/CpuDxe/AArch64/Exception.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ArmPkg/Drivers/CpuDxe/AArch64/Exception.c 
b/ArmPkg/Drivers/CpuDxe/AArch64/Exception.c
index 1aac6a5..2f3837c 100644
--- a/ArmPkg/Drivers/CpuDxe/AArch64/Exception.c
+++ b/ArmPkg/Drivers/CpuDxe/AArch64/Exception.c
@@ -69,7 +69,7 @@ RegisterInterruptHandler (
   IN EFI_CPU_INTERRUPT_HANDLER      InterruptHandler
   )
 {
-  if (InterruptType > MAX_ARM_EXCEPTION) {
+  if (InterruptType > MAX_AARCH64_EXCEPTION) {
     return EFI_UNSUPPORTED;
   }
 
-- 
1.7.5.4


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to