From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id EEE20780091 for ; Tue, 21 Nov 2023 02:34:58 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=WGvUrWGGnPTpJ740rxZgfsLhozyA5kl+Fjt3Vbb4xII=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1700534097; v=1; b=ayBbXY/2iGY+hmyBkIr7lb6Yhq4vTVebHItEDRYgAoVcw9fj8/ZpxQKeA35OJlq7t7Er6F5i et7XPWqTAvPQCecdlJkrDPPMS155zZzRhBf6XtGAARXh0j1uDBPWLGGq/UF6/R0VjspWfvDQEIk lAtui/Qkb6YxaEVtnE33iVVI= X-Received: by 127.0.0.2 with SMTP id 4b7gYY7687511xBERdLaRFHH; Mon, 20 Nov 2023 18:34:57 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web10.26472.1700534087473501873 for ; Mon, 20 Nov 2023 18:34:56 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="10417309" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="10417309" X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Nov 2023 18:34:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="716395845" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="716395845" X-Received: from shwdeopenlab813.ccr.corp.intel.com ([10.239.55.230]) by orsmga003.jf.intel.com with ESMTP; 20 Nov 2023 18:34:49 -0800 From: "Yuanhao Xie" To: devel@edk2.groups.io Cc: xieyuanh , Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann Subject: [edk2-devel] [Patch V7 2/2] UefiCpuPkg/MpInitLib: Update the comments of _CPU_MP_DATA. Date: Tue, 21 Nov 2023 10:34:39 +0800 Message-Id: <20231121023439.2383-3-yuanhao.xie@intel.com> In-Reply-To: <20231121023439.2383-1-yuanhao.xie@intel.com> References: <20231121023439.2383-1-yuanhao.xie@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,yuanhao.xie@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: LzlBjSdP52TnH6jjwt2w3GXqx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="ayBbXY/2"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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 Cc: Laszlo Ersek lersek@redhat.com Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann --- UefiCpuPkg/Library/MpInitLib/MpEqu.inc | 2 ++ UefiCpuPkg/Library/MpInitLib/MpLib.h | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpEqu.inc b/UefiCpuPkg/Library/Mp= InitLib/MpEqu.inc index 72af196513..317e627b58 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpEqu.inc +++ b/UefiCpuPkg/Library/MpInitLib/MpEqu.inc @@ -67,6 +67,8 @@ endstruc =0D ;=0D ; Equivalent NASM structure of MP_CPU_EXCHANGE_INFO=0D +; Assembly routines should refrain from directly interacting with=0D +; the internal details of CPU_MP_DATA.=0D ;=0D struc MP_CPU_EXCHANGE_INFO=0D .StackStart: CTYPE_UINTN 1=0D diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h b/UefiCpuPkg/Library/MpIn= itLib/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=0D // This structure is required to be packed because fixed field offsets=0D // into this structure are used in assembly code in this module=0D +// Assembly routines should refrain from directly interacting with=0D +// the internal details of CPU_MP_DATA.=0D //=0D typedef struct {=0D UINTN StackStart;=0D @@ -239,17 +241,16 @@ typedef struct { #pragma pack()=0D =0D //=0D -// CPU MP Data save in memory=0D +// CPU MP Data save in memory, and intended for use in C code.=0D +// There are some duplicated fields, such as XD status, between=0D +// CpuMpData and ExchangeInfo. These duplications in CpuMpData=0D +// are present to avoid to be direct accessed and comprehended=0D +// in assembly code.=0D //=0D struct _CPU_MP_DATA {=0D UINT64 CpuInfoInHob;=0D UINT32 CpuCount;=0D UINT32 BspNumber;=0D - //=0D - // The above fields data will be passed from PEI to DXE=0D - // Please make sure the fields offset same in the different=0D - // architecture.=0D - //=0D SPIN_LOCK MpLock;=0D UINTN Buffer;=0D UINTN CpuApStackSize;=0D --=20 2.39.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111506): https://edk2.groups.io/g/devel/message/111506 Mute This Topic: https://groups.io/mt/102721665/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-