]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/MpInitLib: Remove unused Lock from MP_CPU_EXCHANGE_INFO
authorRay Ni <ray.ni@intel.com>
Tue, 9 Feb 2021 14:10:22 +0000 (22:10 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 8 Mar 2021 02:22:37 +0000 (02:22 +0000)
The Lock is no longer needed since "LOCK XADD" was used in
MpFuncs.nasm for ApIndex atomic increment.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
UefiCpuPkg/Library/MpInitLib/MpEqu.inc
UefiCpuPkg/Library/MpInitLib/MpLib.c
UefiCpuPkg/Library/MpInitLib/MpLib.h
UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm

index 4363ad9a18f97731aef8045dc29bc47177ea5ff8..7bd24156704f5216d25194356b8e7f8bbfa69ffe 100644 (file)
@@ -121,10 +121,6 @@ SkipEnableExecuteDisable:
     lock inc   dword [edi]\r
 \r
     ; AP init\r
-    mov        edi, esi\r
-    add        edi, MP_CPU_EXCHANGE_INFO_FIELD (Lock)\r
-    mov        eax, NotVacantFlag\r
-\r
     mov        edi, esi\r
     add        edi, MP_CPU_EXCHANGE_INFO_FIELD (ApIndex)\r
     mov        ebx, 1\r
index 46c2b5c11608f7ecf6e9195096f93744e4378da6..2e9368a374a4b5f3ea2137a2b2638b9278374a91 100644 (file)
@@ -13,9 +13,6 @@
 ;-------------------------------------------------------------------------------\r
 %include "Nasm.inc"\r
 \r
-VacantFlag                    equ        00h\r
-NotVacantFlag                 equ        0ffh\r
-\r
 CPU_SWITCH_STATE_IDLE         equ        0\r
 CPU_SWITCH_STATE_STORED       equ        1\r
 CPU_SWITCH_STATE_LOADED       equ        2\r
@@ -72,7 +69,6 @@ endstruc
 ; Equivalent NASM structure of MP_CPU_EXCHANGE_INFO\r
 ;\r
 struc MP_CPU_EXCHANGE_INFO\r
-  .Lock:                         CTYPE_UINTN 1\r
   .StackStart:                   CTYPE_UINTN 1\r
   .StackSize:                    CTYPE_UINTN 1\r
   .CFunction:                    CTYPE_UINTN 1\r
index 2568986d8c20c80a1ab88b2825910f93eb353b9c..5040053dad07eeab563c566056b50f3c424ad937 100644 (file)
@@ -1006,7 +1006,6 @@ FillExchangeInfoData (
   IA32_CR4                         Cr4;\r
 \r
   ExchangeInfo                  = CpuMpData->MpCpuExchangeInfo;\r
-  ExchangeInfo->Lock            = 0;\r
   ExchangeInfo->StackStart      = CpuMpData->Buffer;\r
   ExchangeInfo->StackSize       = CpuMpData->CpuApStackSize;\r
   ExchangeInfo->BufferStart     = CpuMpData->WakeupBuffer;\r
index 02652eaae126ecffea8262ed0956383d81915f2e..0bd60388b10a7a4b70851d3d5f9bb93ee7a5a6b5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common header file for MP Initialize Library.\r
 \r
-  Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.<BR>\r
   Copyright (c) 2020, AMD Inc. All rights reserved.<BR>\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
@@ -190,7 +190,6 @@ typedef struct _CPU_MP_DATA  CPU_MP_DATA;
 // into this structure are used in assembly code in this module\r
 //\r
 typedef struct {\r
-  UINTN                 Lock;\r
   UINTN                 StackStart;\r
   UINTN                 StackSize;\r
   UINTN                 CFunction;\r
index db297f5cca72f39f3d2389c8b8c146cca9654f5d..50df802d1fca4318c312118d0b4c9637f123f94a 100644 (file)
@@ -157,10 +157,6 @@ LongModeStart:
     lock inc   dword [edi]\r
 \r
     ; AP init\r
-    mov        edi, esi\r
-    add        edi, MP_CPU_EXCHANGE_INFO_FIELD (Lock)\r
-    mov        rax, NotVacantFlag\r
-\r
     mov        edi, esi\r
     add        edi, MP_CPU_EXCHANGE_INFO_FIELD (ApIndex)\r
     mov        ebx, 1\r