]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/MpInitLib: Fix typo and clean up the code
authorJeff Fan <jeff.fan@intel.com>
Fri, 29 Jul 2016 13:08:01 +0000 (21:08 +0800)
committerJeff Fan <jeff.fan@intel.com>
Wed, 17 Aug 2016 11:58:37 +0000 (19:58 +0800)
1. Rename NumApsExecutingLoction to NumApsExecutingLocation
2. Update some comments in NASM files.
3. Remove PeiCpuMpData from MP_CPU_EXCHANGE_INFO.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Michael Kinney <michael.d.kinney@intel.com>
UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc
UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
UefiCpuPkg/Library/MpInitLib/MpLib.h
UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc
UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm

index 773eab3a4dc194c72ff6a60c66a50ab5b4f222b5..015396af80b67e91abf73d9b290a04bad867dd01 100644 (file)
@@ -33,7 +33,7 @@ GdtrLocation                  equ        LockLocation + 10h
 IdtrLocation                  equ        LockLocation + 16h\r
 BufferStartLocation           equ        LockLocation + 1Ch\r
 ModeOffsetLocation            equ        LockLocation + 20h\r
-NumApsExecutingLoction        equ        LockLocation + 24h\r
+NumApsExecutingLocation       equ        LockLocation + 24h\r
 CodeSegmentLocation           equ        LockLocation + 28h\r
 DataSegmentLocation           equ        LockLocation + 2Ch\r
 \r
index 0852a5bc848cfe00d4d108666620224d3d8e39c2..7050413c5af39680bdb42d0751824b0f6295b6a0 100644 (file)
@@ -71,8 +71,8 @@ o32 lidt       [cs:si]
     xor        ax,  ax\r
     mov        ds,  ax\r
 \r
-    mov        eax, cr0                        ;Get control register 0\r
-    or         eax, 000000003h                 ;Set PE bit (bit #0) & MP\r
+    mov        eax, cr0                        ; Get control register 0\r
+    or         eax, 000000003h                 ; Set PE bit (bit #0) & MP\r
     mov        cr0, eax\r
 \r
     jmp        0:strict dword 0                ; far jump to protected mode\r
@@ -95,7 +95,7 @@ TestLock:
     jz         TestLock\r
 \r
     mov        edi, esi\r
-    add        edi, NumApsExecutingLoction\r
+    add        edi, NumApsExecutingLocation\r
     inc        dword [edi]\r
     mov        ebx, [edi]\r
 \r
@@ -133,9 +133,9 @@ CProcedureInvoke:
     add        edi, ApProcedureLocation\r
     mov        eax, [edi]\r
 \r
-    call       eax               ; invoke C function\r
+    call       eax               ; Invoke C function\r
 \r
-    jmp        $                 ; never reach here\r
+    jmp        $                 ; Never reach here\r
 RendezvousFunnelProcEnd:\r
 \r
 ;-------------------------------------------------------------------------------------\r
index 0453c22d5cf5eb02663fe71b0dab74c35012cf40..92d1dd9f6ac66505fc2ddd1da9cef38db378db18 100644 (file)
@@ -56,7 +56,6 @@ typedef struct {
   UINTN                 CodeSegment;\r
   UINTN                 DataSegment;\r
   UINTN                 Cr3;\r
-  PEI_CPU_MP_DATA       *PeiCpuMpData;\r
 } MP_CPU_EXCHANGE_INFO;\r
 \r
 #pragma pack()\r
index 00f57ce54952b7574d339ef1f280bf677d030a01..5aac212449a23f16cb93e39575e6d92b33827201 100644 (file)
@@ -33,7 +33,7 @@ GdtrLocation                  equ        LockLocation + 20h
 IdtrLocation                  equ        LockLocation + 2Ah\r
 BufferStartLocation           equ        LockLocation + 34h\r
 ModeOffsetLocation            equ        LockLocation + 3Ch\r
-NumApsExecutingLoction        equ        LockLocation + 44h\r
+NumApsExecutingLocation       equ        LockLocation + 44h\r
 CodeSegmentLocation           equ        LockLocation + 4Ch\r
 DataSegmentLocation           equ        LockLocation + 54h\r
 Cr3Location                   equ        LockLocation + 5Ch\r
index f19c75f91397db3b2653708b0009dc6807227f80..848992ca4484293e1e17ecf7d713ec87facd529e 100644 (file)
@@ -57,7 +57,7 @@ BITS 16
     mov        di,  CodeSegmentLocation\r
     mov        edx, [di]\r
     mov        di,  ax\r
-    sub        di,  02h  \r
+    sub        di,  02h\r
     mov        [di],dx                         ; Patch long mode CS\r
     sub        di,  04h\r
     add        eax, ebx\r
@@ -117,7 +117,7 @@ TestLock:
     jz         TestLock\r
 \r
     mov        edi, esi\r
-    add        edi, NumApsExecutingLoction\r
+    add        edi, NumApsExecutingLocation\r
     inc        dword [edi]\r
     mov        ebx, [edi]\r
 \r
@@ -138,8 +138,8 @@ Releaselock:
     xchg       qword [edi], rax\r
 \r
 CProcedureInvoke:\r
-    push       rbp               ; push BIST data at top of AP stack\r
-    xor        rbp, rbp          ; clear ebp for call stack trace\r
+    push       rbp               ; Push BIST data at top of AP stack\r
+    xor        rbp, rbp          ; Clear ebp for call stack trace\r
     push       rbp\r
     mov        rbp, rsp\r
 \r
@@ -157,9 +157,9 @@ CProcedureInvoke:
     mov        rax, qword [edi]\r
 \r
     sub        rsp, 20h\r
-    call       rax               ; invoke C function\r
+    call       rax               ; Invoke C function\r
     add        rsp, 20h\r
-    jmp        $\r
+    jmp        $                 ; Should never reach here\r
 \r
 RendezvousFunnelProcEnd:\r
 \r
@@ -176,7 +176,7 @@ ASM_PFX(AsmGetAddressMap):
 \r
 ;-------------------------------------------------------------------------------------\r
 ;AsmExchangeRole procedure follows. This procedure executed by current BSP, that is\r
-;about to become an AP. It switches it'stack with the current AP.\r
+;about to become an AP. It switches itstack with the current AP.\r
 ;AsmExchangeRole (IN   CPU_EXCHANGE_INFO    *MyInfo, IN   CPU_EXCHANGE_INFO    *OthersInfo);\r
 ;-------------------------------------------------------------------------------------\r
 global ASM_PFX(AsmExchangeRole)\r