From 5a539eb53651074bc376271a94dbc23b171745c6 Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Wed, 20 Aug 2014 17:57:34 +0000 Subject: ArmPkg/ArmLib/ArmV7: Fixed ArmIsMpCore() The function was not returning the expected value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15850 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.S | 6 ++++-- ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.asm | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'ArmPkg/Library') diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.S b/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.S index 333827a992..b94239f785 100644 --- a/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.S +++ b/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.S @@ -38,8 +38,10 @@ ASM_PFX(ArmIsMpCore): mrc p15,0,R0,c0,c0,5 // Get Multiprocessing extension (bit31) & U bit (bit30) and R0, R0, #0xC0000000 - // if bit30 == 0 then the processor is part of a multiprocessor system) - and R0, R0, #0x80000000 + // if (bit31 == 1) && (bit30 == 0) then the processor is part of a multiprocessor system + cmp R0, #0x80000000 + moveq R0, #1 + movne R0, #0 bx LR ASM_PFX(ArmEnableAsynchronousAbort): diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.asm b/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.asm index d60d4ed213..82daa3ce16 100644 --- a/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.asm +++ b/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.asm @@ -37,8 +37,10 @@ ArmIsMpCore mrc p15,0,R0,c0,c0,5 // Get Multiprocessing extension (bit31) & U bit (bit30) and R0, R0, #0xC0000000 - // if bit30 == 0 then the processor is part of a multiprocessor system) - and R0, R0, #0x80000000 + // if (bit31 == 1) && (bit30 == 0) then the processor is part of a multiprocessor system + cmp R0, #0x80000000 + moveq R0, #1 + movne R0, #0 bx LR ArmEnableAsynchronousAbort -- cgit v1.2.3