diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-08-20 17:57:34 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-08-20 17:57:34 +0000 |
commit | 5a539eb53651074bc376271a94dbc23b171745c6 (patch) | |
tree | cc737d524740c6dc4336a62927328cdc625af566 /ArmPkg | |
parent | febad023bfa78ed41e5d932f44e96a0f6c7b360a (diff) | |
download | edk2-5a539eb53651074bc376271a94dbc23b171745c6.tar.gz edk2-5a539eb53651074bc376271a94dbc23b171745c6.tar.bz2 edk2-5a539eb53651074bc376271a94dbc23b171745c6.zip |
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 <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15850 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg')
-rw-r--r-- | ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.S | 6 | ||||
-rw-r--r-- | ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.asm | 6 |
2 files changed, 8 insertions, 4 deletions
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
|