From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 466BC7803DE for ; Tue, 28 May 2024 09:44:16 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Kl4xweGgKp9tIyoms8714xlwTvEsXJOKyTZC5ncHSBA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Thread-Index:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding:Content-Language; s=20240206; t=1716889456; v=1; b=AUYjlXZ4KWswXnZYq6fpvPpFclj/2SawxYNu+aGgfct+i9yThzgeQwlP8AcFyO+4cfd3QeUW 4S4u5tqxmzyFll8KIOqIL0o9YzjSK0MaTnrcGv+iX0tfPEKxHz7x+buIg1vZClBhCAJrLONDAYi 6uUHbDUeDaJ1tflyIbKtu1WmcI2v7vVwDHpZ6dilW5OFvG5xEHgcJGcurbjSGBdUiBtGGVaQLZE ERf7jLT3Z7C0+tOG2c/lIzNW2dPDNQrmwM5JnO7SbO4LCvTsLNxc0+k8NVqjzDfnBo8+dWZQ6L5 ofY+slKySZnYufVsyccNP8hl9n/YYAo8fqXSB8jfsWi+A== X-Received: by 127.0.0.2 with SMTP id 7ATeYY7687511xWcAphefOHX; Tue, 28 May 2024 02:44:14 -0700 X-Received: from cxsh.intel-email.com (cxsh.intel-email.com [121.46.250.151]) by mx.groups.io with SMTP id smtpd.web10.18084.1716889453930462033 for ; Tue, 28 May 2024 02:44:14 -0700 X-Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 51FD9DDA804 for ; Tue, 28 May 2024 17:44:12 +0800 (CST) X-Received: from localhost (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 4D94ADDA7FE for ; Tue, 28 May 2024 17:44:12 +0800 (CST) X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by cxsh.intel-email.com (Postfix) with SMTP id 85302DDA7A0 for ; Tue, 28 May 2024 17:44:09 +0800 (CST) X-Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP(SSL) for ; Tue, 28 May 2024 17:44:06 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming via groups.io" To: "'Zhihao Li'" , Cc: "'Chasel Chiu'" , "'Nate DeSimone'" , "'Duggapu Chinni B'" , "'Chen Gang C'" References: <20240429032001.6657-1-zhihao.li@intel.com> In-Reply-To: <20240429032001.6657-1-zhihao.li@intel.com> Subject: =?UTF-8?B?W2VkazItZGV2ZWxdIOWbnuWkjTogW1BBVENIIHYxIDEvMl0gTWRlTW9kdWxlUGtnL0NvcmUvUGVpOiBJbnN0YWxsIE1pZ3JhdGVUZW1wUmFtUHBp?= Date: Tue, 28 May 2024 17:44:08 +0800 Message-ID: <00d401dab0e3$968a1ef0$c39e5cd0$@byosoft.com.cn> MIME-Version: 1.0 Thread-Index: AQEWmBJrNQu4hLldKbkjEgORZ47PJrM0ld/w 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 Resent-Date: Tue, 28 May 2024 02:44:14 -0700 Resent-From: gaoliming@byosoft.com.cn Reply-To: devel@edk2.groups.io,gaoliming@byosoft.com.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: dK2EeX6ysfkbasI86inV32XCx7686176AA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=AUYjlXZ4; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Zhihao: Could you explain the situation that FSP-T/M is not migrated by PeiCore?= =20 Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Zhihao Li > =B7=A2=CB=CD=CA=B1=BC=E4: 2024=C4=EA4=D4=C229=C8=D5 11:20 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: Chasel Chiu ; Nate DeSimone > ; Duggapu Chinni B > ; Chen Gang C ; Liming > Gao > =D6=F7=CC=E2: [PATCH v1 1/2] MdeModulePkg/Core/Pei: Install MigrateTempRa= mPpi >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4716 >=20 > Migrate FSP-T/M binary from temporary RAM to permanent RAM before NEM > tear down. Tcg module will use permanent address of FSP-T/M for > measurement. > 1. PeiCore installs mMigrateTempRamPpi if > PcdMigrateTemporaryRamFirmwareVolumes is True > 2. FspmWrapperPeim migrate FspT/M binary to permanent > memory and build MigatedFvInfoHob > 3. TCG notification checks MigatedFvInfoHob and transmits > DRAM address for measurement >=20 > Cc: Chasel Chiu > Cc: Nate DeSimone > Cc: Duggapu Chinni B > Cc: Chen Gang C > Cc: Liming Gao >=20 > Signed-off-by: Zhihao Li > --- > MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 10 ++++++++- > MdeModulePkg/Core/Pei/PeiMain.h | 3 ++- > MdeModulePkg/Core/Pei/PeiMain.inf | 3 ++- > MdeModulePkg/Include/Guid/MigratedFvInfo.h | 4 ++-- > MdeModulePkg/Include/Ppi/MigrateTempRam.h | 23 > ++++++++++++++++++++ > MdeModulePkg/MdeModulePkg.dec | 5 ++++- > 6 files changed, 42 insertions(+), 6 deletions(-) >=20 > diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c > b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c > index bf1719d7941a..0e3d9a843816 100644 > --- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c > +++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c > @@ -1,7 +1,7 @@ > /** @file > Pei Core Main Entry Point >=20 > -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> +Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -13,6 +13,11 @@ EFI_PEI_PPI_DESCRIPTOR mMemoryDiscoveredPpi =3D { > &gEfiPeiMemoryDiscoveredPpiGuid, > NULL > }; > +EFI_PEI_PPI_DESCRIPTOR mMigrateTempRamPpi =3D { > + (EFI_PEI_PPI_DESCRIPTOR_PPI | > EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), > + &gEdkiiPeiMigrateTempRamPpiGuid, > + NULL > +}; >=20 > /// > /// Pei service instance > @@ -449,6 +454,9 @@ PeiCore ( > // > EvacuateTempRam (&PrivateData, SecCoreData); >=20 > + Status =3D PeiServicesInstallPpi (&mMigrateTempRamPpi); > + ASSERT_EFI_ERROR (Status); > + > DEBUG ((DEBUG_VERBOSE, "PPI lists after temporary RAM > evacuation:\n")); > DumpPpiList (&PrivateData); > } > diff --git a/MdeModulePkg/Core/Pei/PeiMain.h > b/MdeModulePkg/Core/Pei/PeiMain.h > index 46b6c23014a3..8df0c2d561f7 100644 > --- a/MdeModulePkg/Core/Pei/PeiMain.h > +++ b/MdeModulePkg/Core/Pei/PeiMain.h > @@ -1,7 +1,7 @@ > /** @file > Definition of Pei Core Structures and Services >=20 > -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> +Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > #include > #include > +#include > #include > #include > #include > diff --git a/MdeModulePkg/Core/Pei/PeiMain.inf > b/MdeModulePkg/Core/Pei/PeiMain.inf > index 893bdc052798..4e545ddab2ab 100644 > --- a/MdeModulePkg/Core/Pei/PeiMain.inf > +++ b/MdeModulePkg/Core/Pei/PeiMain.inf > @@ -6,7 +6,7 @@ > # 2) Dispatch PEIM from discovered FV. > # 3) Handoff control to DxeIpl to load DXE core and enter DXE phase. > # > -# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> +# Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
> # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -101,6 +101,7 @@ > gEfiPeiReset2PpiGuid ## > SOMETIMES_CONSUMES > gEfiSecHobDataPpiGuid ## > SOMETIMES_CONSUMES > gEfiPeiCoreFvLocationPpiGuid ## > SOMETIMES_CONSUMES > + gEdkiiPeiMigrateTempRamPpiGuid ## PRODUCES >=20 > [Pcd] > gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeiStackSize > ## CONSUMES > diff --git a/MdeModulePkg/Include/Guid/MigratedFvInfo.h > b/MdeModulePkg/Include/Guid/MigratedFvInfo.h > index 1c8b0dfefc49..255e278235b1 100644 > --- a/MdeModulePkg/Include/Guid/MigratedFvInfo.h > +++ b/MdeModulePkg/Include/Guid/MigratedFvInfo.h > @@ -1,7 +1,7 @@ > /** @file > Migrated FV information >=20 > -Copyright (c) 2020, Intel Corporation. All rights reserved.
> +Copyright (c) 2020 - 2024, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -50,7 +50,7 @@ typedef struct { >=20 > typedef struct { > UINT32 FvOrgBase; // original FV address > - UINT32 FvNewBase; // new FV address > + UINT32 FvNewBase; // new FV address, 0 means rebased data > is not copied > UINT32 FvDataBase; // original FV data, 0 means raw data is not > copied > UINT32 FvLength; // Fv Length > } EDKII_MIGRATED_FV_INFO; > diff --git a/MdeModulePkg/Include/Ppi/MigrateTempRam.h > b/MdeModulePkg/Include/Ppi/MigrateTempRam.h > new file mode 100644 > index 000000000000..9bbb55d5cf86 > --- /dev/null > +++ b/MdeModulePkg/Include/Ppi/MigrateTempRam.h > @@ -0,0 +1,23 @@ > +/** @file > + This file declares Migrate Temporary Memory PPI. > + > + This PPI is published by the PEI Foundation when temporary RAM needs t= o > evacuate. > + Its purpose is to be used as a signal for other PEIMs who can register for a > + notification on its installation. > + > + Copyright (c) 2024, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef PEI_MIGRATE_TEMP_RAM_PPI_H_ > +#define PEI_MIGRATE_TEMP_RAM_PPI_H_ > + > +#define EFI_PEI_MIGRATE_TEMP_RAM_PPI_GUID \ > + { \ > + 0xc79dc53b, 0xafcd, 0x4a6a, {0xad, 0x94, 0xa7, 0x6a, 0x3f, 0xa9, 0xe9, > 0xc2 } \ > + } > + > +extern EFI_GUID gEdkiiPeiMigrateTempRamPpiGuid; > + > +#endif > diff --git a/MdeModulePkg/MdeModulePkg.dec > b/MdeModulePkg/MdeModulePkg.dec > index 3a239a1687ea..43e92c68ca20 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -4,7 +4,7 @@ > # and libraries instances, which are used for those modules. > # > # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. > -# Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
> +# Copyright (c) 2007 - 2024, Intel Corporation. All rights reserved.
> # Copyright (c) 2016, Linaro Ltd. All rights reserved.
> # (C) Copyright 2016 - 2019 Hewlett Packard Enterprise Development LP > # Copyright (c) 2017, AMD Incorporated. All rights reserved.
> @@ -546,6 +546,9 @@ > ## Include/Ppi/MemoryAttribute.h > gEdkiiMemoryAttributePpiGuid =3D { 0x1be840de, 0x2d92, > 0x41ec, { 0xb6, 0xd3, 0x19, 0x64, 0x13, 0x50, 0x51, 0xfb } } >=20 > + ## Include/Ppi/MigrateTempRam.h > + gEdkiiPeiMigrateTempRamPpiGuid =3D { 0xc79dc53b, 0xafcd, > 0x4a6a, { 0xad, 0x94, 0xa7, 0x6a, 0x3f, 0xa9, 0xe9, 0xc2 } } > + > [Protocols] > ## Load File protocol provides capability to load and unload EFI image into > memory and execute it. > # Include/Protocol/LoadPe32Image.h > -- > 2.44.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119298): https://edk2.groups.io/g/devel/message/119298 Mute This Topic: https://groups.io/mt/106345603/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-