diff options
author | xieyuanh <yuanhao.xie@intel.com> | 2023-11-20 12:09:14 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-11-27 05:21:45 +0000 |
commit | 33e31c289cc7b417f110d6da70dc8224443d32d3 (patch) | |
tree | 7b193117aaedb474d89cf9c831fffecbb91da2e9 /UefiCpuPkg/Library | |
parent | cb3f41a9378822a0bcf0febf898af254b4994b8d (diff) | |
download | edk2-33e31c289cc7b417f110d6da70dc8224443d32d3.tar.gz edk2-33e31c289cc7b417f110d6da70dc8224443d32d3.tar.bz2 edk2-33e31c289cc7b417f110d6da70dc8224443d32d3.zip |
UefiCpuPkg/MpInitLib: Update the comments of _CPU_MP_DATA.
No functional changes in this patch.
Updates the comments of _CPU_MP_DATA to delcared that duplications in
CpuMpData are present to avoid to be direct accessed and comprehended
in assembly code. CpuMpData: Intended for use in C code while
ExchangeInfo are used in assembly code in this module.
This patch deletes the unnecessary comments in CpuMpData, since
CpuMpData is no longer responsible for passing information from PEI to
DXE.
Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
Cc: Laszlo Ersek lersek@redhat.com
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'UefiCpuPkg/Library')
-rw-r--r-- | UefiCpuPkg/Library/MpInitLib/MpEqu.inc | 2 | ||||
-rw-r--r-- | UefiCpuPkg/Library/MpInitLib/MpLib.h | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/UefiCpuPkg/Library/MpInitLib/MpEqu.inc b/UefiCpuPkg/Library/MpInitLib/MpEqu.inc index 72af196513..317e627b58 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpEqu.inc +++ b/UefiCpuPkg/Library/MpInitLib/MpEqu.inc @@ -67,6 +67,8 @@ endstruc ;
; Equivalent NASM structure of MP_CPU_EXCHANGE_INFO
+; Assembly routines should refrain from directly interacting with
+; the internal details of CPU_MP_DATA.
;
struc MP_CPU_EXCHANGE_INFO
.StackStart: CTYPE_UINTN 1
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h b/UefiCpuPkg/Library/MpInitLib/MpLib.h index af296f6ac0..a96a6389c1 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.h +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h @@ -203,6 +203,8 @@ typedef struct _CPU_MP_DATA CPU_MP_DATA; // MP CPU exchange information for AP reset code
// This structure is required to be packed because fixed field offsets
// into this structure are used in assembly code in this module
+// Assembly routines should refrain from directly interacting with
+// the internal details of CPU_MP_DATA.
//
typedef struct {
UINTN StackStart;
@@ -239,17 +241,16 @@ typedef struct { #pragma pack()
//
-// CPU MP Data save in memory
+// CPU MP Data save in memory, and intended for use in C code.
+// There are some duplicated fields, such as XD status, between
+// CpuMpData and ExchangeInfo. These duplications in CpuMpData
+// are present to avoid to be direct accessed and comprehended
+// in assembly code.
//
struct _CPU_MP_DATA {
UINT64 CpuInfoInHob;
UINT32 CpuCount;
UINT32 BspNumber;
- //
- // The above fields data will be passed from PEI to DXE
- // Please make sure the fields offset same in the different
- // architecture.
- //
SPIN_LOCK MpLock;
UINTN Buffer;
UINTN CpuApStackSize;
|