Revision: 15850
          http://sourceforge.net/p/edk2/code/15850
Author:   oliviermartin
Date:     2014-08-20 17:57:34 +0000 (Wed, 20 Aug 2014)
Log Message:
-----------
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 <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.S
    trunk/edk2/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.asm

Modified: trunk/edk2/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.S
===================================================================
--- trunk/edk2/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.S    2014-08-20 
11:38:45 UTC (rev 15849)
+++ trunk/edk2/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.S    2014-08-20 
17:57:34 UTC (rev 15850)
@@ -38,8 +38,10 @@
   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):

Modified: trunk/edk2/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.asm
===================================================================
--- trunk/edk2/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.asm  2014-08-20 
11:38:45 UTC (rev 15849)
+++ trunk/edk2/ArmPkg/Library/ArmLib/ArmV7/ArmLibSupportV7.asm  2014-08-20 
17:57:34 UTC (rev 15850)
@@ -37,8 +37,10 @@
   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

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to