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 3229E940FD7 for ; Fri, 19 Apr 2024 03:47:20 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=v37SVNO2AaM1P179gSsIR4DEg8vBM7ziiN1LUvq8ijY=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1713498439; v=1; b=uvqVCcsze8zI3N/qxkHDSFAgTi/ZCMOaI6bOLWX8etTviXIBdxK2z3DsulMdfHy29HkdtVV9 sFfXpO3M/l5Bp0BePLw9g1uXkpBdt1SF95isvjqGiTToZtOmy9bncGYWUYPSCqQSPCLATZBgJQq 1YbVL9wAg1sAJMb8pIY24tvTfLXbQfENoZT/1yZQDzX9M2hOTPEebojGUN8FUnAfYdZuqgMGS7N e2yohsfvoEp0x/N1Z+T+gmRmiIymJgsPdQEDYCixNHKVbUBiyPDAxvGJHjcblm9A19h+eKp9L4f 9VkDPFMxXmekDakSAc+UIa75OBGCvWzjEozZE8oB0yaag== X-Received: by 127.0.0.2 with SMTP id KL5hYY7687511xQUolW0MfYG; Thu, 18 Apr 2024 20:47:19 -0700 X-Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.81]) by mx.groups.io with SMTP id smtpd.web11.12098.1713498438315176638 for ; Thu, 18 Apr 2024 20:47:18 -0700 X-Received: from LV8PR12MB9452.namprd12.prod.outlook.com (2603:10b6:408:200::8) by DS0PR12MB6389.namprd12.prod.outlook.com (2603:10b6:8:cf::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.39; Fri, 19 Apr 2024 03:47:15 +0000 X-Received: from LV8PR12MB9452.namprd12.prod.outlook.com ([fe80::e006:4173:de2c:aca0]) by LV8PR12MB9452.namprd12.prod.outlook.com ([fe80::e006:4173:de2c:aca0%5]) with mapi id 15.20.7409.042; Fri, 19 Apr 2024 03:47:15 +0000 From: "Chang, Abner via groups.io" To: "Ni, Ray" , "Wu, Jiaxin" , "devel@edk2.groups.io" CC: "Zeng, Star" , Gerd Hoffmann , "Kumar, Rahul R" , "Dong, Guo" , "Rhodes, Sean" , "Lu, James" , "Guo, Gua" , Ard Biesheuvel , "Yao, Jiewen" , "Attar, AbdulLateef (Abdul Lateef)" , "Lendacky, Thomas" Subject: Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib Thread-Topic: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib Thread-Index: AQHakV2GkVjeKzZueEqpL2F3/efgwrFtqtmAgAFHVDCAAAOH3w== Date: Fri, 19 Apr 2024 03:47:15 +0000 Message-ID: References: <17C74D78B0B952AD.15491@groups.io> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=True;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2024-04-19T03:46:53.2068797Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard x-ms-publictraffictype: Email x-ms-traffictypediagnostic: LV8PR12MB9452:EE_|DS0PR12MB6389:EE_ x-ms-office365-filtering-correlation-id: 9725655b-6d87-401f-4fae-08dc6023676a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 9W2+lH9KsD0Rc8cu6cdPEnbv4+R8b3+JoWBR3wSLMVkBtW40v7mlzLTFI64P6mv+0oL+lDpJFRT0T4HKCfF3Gsr/RHutuLlNWqG+uy06byMWA8f1AqeWo2AnJAXLxD8zrNJi7nYPtI811zqnFXS0zxcFZ+bkzIHfLQ3gaiK0l/lareiYK0uFHFC8ja1zPFtXKO1uHg4PdsGSZiYnyx+/53EdjGPIokEhDqecxgZFq38db3gmjt2PUW86Bj5n3+U1Ccj6zOzIV976VHYVyY/dR8ipjMUQRJJp0MdOEfK1717aR6cHN4pg/TxnpVT/bKHEN/KD/ziaJGofMuCPjkQLZr3z5J4WErtgvFiRWLK8aYMDwjpOfkVyB5Zh6gSd2jNzdVRuWmkNP20HYJpJa2fStTCZOa3opsFxLcvR4sGB+cW7hnzhFsYMYVhYTf+LEbpFZwiFZpiIsJ3K6c1IM2+2ssqSpP6WM+XWUy9NjhbGtkuTATj0m5gnXjkAPoTr21ZpgIFxZ/4kDY913ufMZjzE8xSq+1hiBzvIZD+2BEvt1PhS9tm7KAlsKmwgAa0EkoXN96BbvkxzA6O63pxwlmE7QQs6qnqtZCF7rkrgWO0X+i5qo0ah7YoLD9e2EGDIVdsOBFWn5n299D1mTyuwIp5z+DtcAkwsZQ5w4l9CoOMcHpXSxmfrr7XEECVuivM/Y63w9QRei/F9ljwAytDzCoP7DyUkGqxfbW4YAwYRwyEtdzE= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2uEoq3nd7BBIaKA1qAcQroVQYGwPd24wCH4iSyZpgs3SkqXBTgHdzzamGm7r?= =?us-ascii?Q?raaNNMfhkwMMvPz8xDpK3cXAWdYd8GjgyfLjNIPm6XuiWAhEjvtZK6ue7ZOX?= =?us-ascii?Q?+1kG7IF8q3Ih2fodMwZD0JZR9loSr6QKZAa4XSbG6meI7BBDkjrvAHwJ8wK3?= =?us-ascii?Q?/6zNn5RkChwgIZ2E2c4hmHp6uu4mhfF81M8MTcWgzxN5A7qFnbyn6mZBIGga?= =?us-ascii?Q?twjwFUf+qvbL9ob7k1IXk3rBMBp5W5GPkANKwVDfnMQl5J9E6qNAvBwe+2B9?= =?us-ascii?Q?YguX3KZUCSp9YICpSGppD7tbCu0O8xqmL9YNAfApsufD+dSo/e/gcIfgVvds?= =?us-ascii?Q?siaqtbEP5upzt63TIq8roEN00IfThjlILXmvJwUgg26mVKNr1kdycaJOi0qg?= =?us-ascii?Q?9EC6ghzsdv1J4RXVHP668fuXnk/yKGFyR/X9B2MXOpzbmerArbwD72ehW9IP?= =?us-ascii?Q?g245TIjSytTjM4QTKutbFRIjP1OEiB7V/pPCvtxuBSB9wJ6EMrS4JRANL3Jl?= =?us-ascii?Q?9ktEHJzakzOqc1e4aheCmwNpJ+wOxnKZzXLB10XYq2Eb/uElKhDSDV07xmWI?= =?us-ascii?Q?Q9dCg5MLCn6efNEeOLsCUsuYijcLMOgtETSSln+1649efJjzx+nZS4coDI9r?= =?us-ascii?Q?ONd5JA+AX17UWT7AUjLvPlBMQwaql7Eqv5QX53Cap3XqQUukonJ63mWiweTq?= =?us-ascii?Q?lkFlj499mFAq+8LLGV1Q6p2O+8aalsf+8G3kuQUiE1PxZVXGSpTGyvOEfgO5?= =?us-ascii?Q?Ys1TKO63azN1LaSPaEP5Yemixr2pond41GmoxFBHdtKqfoFm9XkL83zsTR2h?= =?us-ascii?Q?lBUrrc1kRGgdHuQQCY6588FoI5c3EBzdE+s/vf10sE7UCW8f4Z1YjIXj3D2V?= =?us-ascii?Q?BhVWDciMaPirX6hkxuUlAqcJfzzIPW30szR8hhNvcIzMjG8EmXbHg5gZiIhg?= =?us-ascii?Q?XGE5Gz4dF8hcdGKWbCO2QqlgvridA/6BYKinaByZoZ1a+xd3d9tJkA1Tq08S?= =?us-ascii?Q?16ppotzTaBigVz+yJ1bFcDOpWzoI2iLmOVSyK2je79VcLqw1duvMxqw4t+fU?= =?us-ascii?Q?kZeYdBzsjVhKB6bJn14bjZjKdCOrA/1yRScGFhl3r7GS4XdrG9Ax4ygqSW77?= =?us-ascii?Q?pHHCQV0zroF1Jb9z9ftCCga/FyuN0z9fNE1DqMi951gpa/i1YOqlB6NAhkPQ?= =?us-ascii?Q?dLVma2XzihlbpSVNuuDE//0bpl/LlOQfqA+9Y4M4Ao40TXxVVWjZ6XIjeIlA?= =?us-ascii?Q?RfoSEKFEDbOqojQN7WNTsEuO/eL2jd8GMJL1AgccpW592LBt74GKdvUpQGIW?= =?us-ascii?Q?YhZnAW4wFi5On30gwG2KJ0tMxpkvXbO1an+qKx9Lev9nERHwSDQbLWfY5wmQ?= =?us-ascii?Q?nvscrPdIlerVi6FEy0IXHNCnlCDuIbiyDOt/i1Z+yDes43M6z+JDPs30ZUD5?= =?us-ascii?Q?HYdJdb84qPs3RgzaCfouhahcuqRSSW51IDQCIt8QMrd/HwFT2sImwOYJryyo?= =?us-ascii?Q?DCNu0oKMmzKfc665dSTMyc6Ly/vd3rVldpMQcKcgfvWL+Fq0xRonGtB7D1Yp?= =?us-ascii?Q?8AgX5OMKTEi7sA0kJv/twDlkkGeFRypJbTkN/xC4?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9452.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9725655b-6d87-401f-4fae-08dc6023676a X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2024 03:47:15.4297 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4MpdDKHVQAYzyzuZ7n6pahgY3U2ysQt8u0XGb1/0paVAWg6wkadqFUwAoVNUTylQxcvvT4gHFT+ytbE14Gg/4w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6389 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: Thu, 18 Apr 2024 20:47:18 -0700 Resent-From: abner.chang@amd.com Reply-To: devel@edk2.groups.io,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: K0sZu8GadSCnh76woSlAAvVix7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_LV8PR12MB9452B45871B8B0D74EA2F281EA0D2LV8PR12MB9452namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=uvqVCcsz; 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 --_000_LV8PR12MB9452B45871B8B0D74EA2F281EA0D2LV8PR12MB9452namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Right, Abdul's RB is sufficient! Thanks Abner ________________________________ From: Ni, Ray Sent: Friday, April 19, 2024 11:35:17 AM To: Wu, Jiaxin ; devel@edk2.groups.io Cc: Zeng, Star ; Gerd Hoffmann ; Ku= mar, Rahul R ; Dong, Guo ; Rho= des, Sean ; Lu, James ; Guo, Gua= ; Ard Biesheuvel ; Yao, Jiew= en ; Attar, AbdulLateef (Abdul Lateef) ; Chang, Abner ; Lendacky, Thomas Subject: Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib Caution: This message originated from an External Source. Use proper cautio= n when opening attachments, clicking links, or responding. Jiaxin, I see Abdul from AMD has given R-B. I assume that's sufficient for merging = this patch. Thanks, Ray ________________________________ From: Wu, Jiaxin Sent: Thursday, April 18, 2024 16:03 To: devel@edk2.groups.io ; Wu, Jiaxin Cc: Ni, Ray ; Zeng, Star ; Gerd Hoff= mann ; Kumar, Rahul R ; Dong, G= uo ; Rhodes, Sean ; Lu, James ; Guo, Gua ; Ard Biesheuvel ; Yao, Jiewen ; Abdul Lateef Attar <= AbdulLateef.Attar@amd.com>; Abner Chang ; Tom Lendacky= Subject: RE: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib Hi Tom & Abner, Could you help check & review AMD related patch? > UefiCpuPkg/SmmRelocationLib: Add library instance for AMD Thanks, Jiaxin > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Wu, > Jiaxin > Sent: Thursday, April 18, 2024 2:56 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Zeng, Star ; Gerd > Hoffmann ; Kumar, Rahul R ; > Dong, Guo ; Rhodes, Sean ; > Lu, James ; Guo, Gua ; Ard > Biesheuvel ; Yao, Jiewen > ; Abdul Lateef Attar ; > Abner Chang ; Tom Lendacky > > Subject: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib > > PR: https://github.com/tianocore/edk2/pull/5546 > > Intel plans to separate the smbase relocation logic from > PiSmmCpuDxeSmm driver, and the related behavior will be > moved to the new interface defined by the SmmRelocationLib > class. > > The SmmRelocationLib class provides the SmmRelocationInit() > interface for platform to do the smbase relocation, which > shall provide below 2 functionalities: > 1. Relocate smbases for each processor. > 2. Create the gSmmBaseHobGuid HOB. > > With SmmRelocationLib, PiSmmCpuDxeSmm driver (which runs at > a later phase) can be simplfied as below for SMM init: > 1. Consume the gSmmBaseHobGuid HOB for the relocated smbases > for each Processor. > 2. Execute the early SMM Init. > > Cc: Ray Ni > Cc: Zeng Star > Cc: Gerd Hoffmann > Cc: Rahul Kumar > Cc: Guo Dong > Cc: Sean Rhodes > Cc: James Lu > Cc: Gua Guo > Cc: Ard Biesheuvel > Cc: Jiewen Yao > Cc: Abdul Lateef Attar > Cc: Abner Chang > Cc: Tom Lendacky > Signed-off-by: Jiaxin Wu > > Jiaxin Wu (13): > UefiCpuPkg: Add SmmRelocationLib class > UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library instance > UefiCpuPkg/SmmRelocationLib: Rename global variables > UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allocation > UefiCpuPkg/SmmRelocationLib: Remove unnecessary global variable > UefiCpuPkg/SmmRelocationLib: Add library instance for AMD > OvmfPkg/SmmRelocationLib: Add library instance for OVMF > OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid > OvmfPkg: Refine SmmAccess implementation > OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is done or not > OvmfPkg/PlatformPei: Relocate SmBases in PEI phase > UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLib > UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic > > OvmfPkg/AmdSev/AmdSevX64.dsc | 1 + > OvmfPkg/CloudHv/CloudHvX64.dsc | 1 + > OvmfPkg/Library/PlatformInitLib/MemDetect.c | 104 ++-- > .../Library/PlatformInitLib/PlatformInitLib.inf | 6 +- > .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 33 +- > .../Library/SmmRelocationLib}/Ia32/Semaphore.c | 13 +- > .../Library/SmmRelocationLib}/Ia32/SmmInit.nasm | 83 +++- > .../SmmRelocationLib/InternalSmmRelocationLib.h | 127 +++++ > .../Library/SmmRelocationLib/SmmRelocationLib.c | 549 > +++++++++++++++++++++ > .../Library/SmmRelocationLib/SmmRelocationLib.inf | 60 +++ > .../SmmRelocationLib/SmramSaveStateConfig.c | 100 ++++ > .../Library/SmmRelocationLib}/X64/Semaphore.c | 13 +- > .../Library/SmmRelocationLib}/X64/SmmInit.nasm | 85 +++- > OvmfPkg/Microvm/MicrovmX64.dsc | 1 + > OvmfPkg/OvmfPkgIa32.dsc | 1 + > OvmfPkg/OvmfPkgIa32X64.dsc | 1 + > OvmfPkg/OvmfPkgX64.dsc | 1 + > OvmfPkg/PlatformPei/Platform.c | 3 + > OvmfPkg/PlatformPei/Platform.h | 5 + > OvmfPkg/PlatformPei/PlatformPei.inf | 5 +- > OvmfPkg/PlatformPei/SmmRelocation.c | 80 +++ > OvmfPkg/SmmAccess/SmmAccess2Dxe.c | 4 +- > OvmfPkg/SmmAccess/SmmAccess2Dxe.inf | 5 + > OvmfPkg/SmmAccess/SmmAccessPei.c | 88 +--- > OvmfPkg/SmmAccess/SmmAccessPei.inf | 7 +- > OvmfPkg/SmmAccess/SmramInternal.c | 73 +-- > OvmfPkg/SmmAccess/SmramInternal.h | 18 +- > UefiCpuPkg/Include/Library/SmmRelocationLib.h | 42 ++ > .../SmmRelocationLib/AmdSmmRelocationLib.inf | 60 +++ > .../SmmRelocationLib/AmdSmramSaveStateConfig.c | 125 +++++ > .../SmmRelocationLib}/Ia32/Semaphore.c | 13 +- > .../SmmRelocationLib}/Ia32/SmmInit.nasm | 83 +++- > .../SmmRelocationLib/InternalSmmRelocationLib.h | 127 +++++ > .../Library/SmmRelocationLib/SmmRelocationLib.c | 549 > +++++++++++++++++++++ > .../Library/SmmRelocationLib/SmmRelocationLib.inf | 61 +++ > .../SmmRelocationLib/SmramSaveStateConfig.c | 136 +++++ > .../SmmRelocationLib}/X64/Semaphore.c | 13 +- > .../SmmRelocationLib}/X64/SmmInit.nasm | 85 +++- > UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 21 +- > UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 10 +- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 331 ++----------- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 103 +--- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 4 - > UefiCpuPkg/PiSmmCpuDxeSmm/SmmMpPerf.h | 2 +- > UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 69 --- > UefiCpuPkg/UefiCpuPkg.dec | 3 + > UefiCpuPkg/UefiCpuPkg.dsc | 2 + > UefiPayloadPkg/UefiPayloadPkg.dsc | 2 + > 48 files changed, 2514 insertions(+), 794 deletions(-) > copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> > OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%) > copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> > OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%) > create mode 100644 > OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h > create mode 100644 > OvmfPkg/Library/SmmRelocationLib/SmmRelocationLib.c > create mode 100644 > OvmfPkg/Library/SmmRelocationLib/SmmRelocationLib.inf > create mode 100644 > OvmfPkg/Library/SmmRelocationLib/SmramSaveStateConfig.c > copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> > OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%) > copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D> > OvmfPkg/Library/SmmRelocationLib}/X64/SmmInit.nasm (59%) > create mode 100644 OvmfPkg/PlatformPei/SmmRelocation.c > create mode 100644 UefiCpuPkg/Include/Library/SmmRelocationLib.h > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/AmdSmmRelocationLib.inf > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/AmdSmramSaveStateConfig.c > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> > Library/SmmRelocationLib}/Ia32/Semaphore.c (71%) > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> > Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%) > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.c > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.inf > create mode 100644 > UefiCpuPkg/Library/SmmRelocationLib/SmramSaveStateConfig.c > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> > Library/SmmRelocationLib}/X64/Semaphore.c (78%) > rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D> > Library/SmmRelocationLib}/X64/SmmInit.nasm (59%) > > -- > 2.16.2.windows.1 > > > >=20 > -=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 (#118004): https://edk2.groups.io/g/devel/message/118004 Mute This Topic: https://groups.io/mt/105593568/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- --_000_LV8PR12MB9452B45871B8B0D74EA2F281EA0D2LV8PR12MB9452namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

[AMD Official Use Only - General]


Right, Abdul's RB is sufficient!


Thanks
Abner

From: Ni, Ray <ray.ni@in= tel.com>
Sent: Friday, April 19, 2024 11:35:17 AM
To: Wu, Jiaxin <jiaxin.wu@intel.com>; devel@edk2.groups.io <= ;devel@edk2.groups.io>
Cc: Zeng, Star <star.zeng@intel.com>; Gerd Hoffmann <kraxel= @redhat.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo = <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu,= James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen <jiewen.yao@i= ntel.com>; Attar, AbdulLateef (Abdul Lateef) <AbdulLateef.Attar@amd.c= om>; Chang, Abner <Abner.Chang@amd.com>; Lendacky, Thomas <Thom= as.Lendacky@amd.com>
Subject: Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib
 
C= aution: This message originated from an External Source. Use proper = caution when opening attachments, clicking links, or responding.

Jiaxin,
I see Abdul from AMD has given R-B. I assume that's sufficient for merging = this patch.

Thanks,
Ray

From: Wu, Jiaxin <jiax= in.wu@intel.com>
Sent: Thursday, April 18, 2024 16:03
To: devel@edk2.groups.io <devel@edk2.groups.io>; Wu, Jiaxin &l= t;jiaxin.wu@intel.com>
Cc: Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel= .com>; Gerd Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul= .r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean = <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kernel.or= g>; Yao, Jiewen <jiewen.yao@intel.com>; Abdul Lateef Attar <Abd= ulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; Tom Le= ndacky <thomas.lendacky@amd.com>
Subject: RE: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib
 
Hi Tom & Abner,

Could you help check & review AMD related patch?
 >   UefiCpuPkg/SmmRelocationLib: Add library instance fo= r AMD

Thanks,
Jiaxin

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of W= u,
> Jiaxin
> Sent: Thursday, April 18, 2024 2:56 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel.c= om>; Gerd
> Hoffmann <kraxel@redhat.com>; Kumar, Rahul R <rahul.r.kumar@i= ntel.com>;
> Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.s= ystems>;
> Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com&g= t;; Ard
> Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen
> <jiewen.yao@intel.com>; Abdul Lateef Attar <AbdulLateef.Attar= @amd.com>;
> Abner Chang <abner.chang@amd.com>; Tom Lendacky
> <thomas.lendacky@amd.com>
> Subject: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib
>
> PR: https://gi= thub.com/tianocore/edk2/pull/5546
>
> Intel plans to separate the smbase relocation logic from
> PiSmmCpuDxeSmm driver, and the related behavior will be
> moved to the new interface defined by the SmmRelocationLib
> class.
>
> The SmmRelocationLib class provides the SmmRelocationInit()
> interface for platform to do the smbase relocation, which
> shall provide below 2 functionalities:
> 1. Relocate smbases for each processor.
> 2. Create the gSmmBaseHobGuid HOB.
>
> With SmmRelocationLib, PiSmmCpuDxeSmm driver (which runs at
> a later phase) can be simplfied as below for SMM init:
> 1. Consume the gSmmBaseHobGuid HOB for the relocated smbases
> for each Processor.
> 2. Execute the early SMM Init.
>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Zeng Star <star.zeng@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rahul Kumar <rahul1.kumar@intel.com>
> Cc: Guo Dong <guo.dong@intel.com>
> Cc: Sean Rhodes <sean@starlabs.systems>
> Cc: James Lu <james.lu@intel.com>
> Cc: Gua Guo <gua.guo@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
>
> Jiaxin Wu (13):
>   UefiCpuPkg: Add SmmRelocationLib class
>   UefiCpuPkg/SmmRelocationLib: Add SmmRelocationLib library = instance
>   UefiCpuPkg/SmmRelocationLib: Rename global variables
>   UefiCpuPkg/SmmRelocationLib: Avoid unnecessary memory allo= cation
>   UefiCpuPkg/SmmRelocationLib: Remove unnecessary global var= iable
>   UefiCpuPkg/SmmRelocationLib: Add library instance for AMD<= br> >   OvmfPkg/SmmRelocationLib: Add library instance for OVMF >   OvmfPkg/PlatformInitLib: Create gEfiSmmSmramMemoryGuid
>   OvmfPkg: Refine SmmAccess implementation
>   OvmfPkg/SmmCpuFeaturesLib: Check Smbase Relocation is done= or not
>   OvmfPkg/PlatformPei: Relocate SmBases in PEI phase
>   UefiPayloadPkg/UefiPayloadPkg.dsc: Include SmmRelocationLi= b
>   UefiCpuPkg/PiSmmCpuDxeSmm: Remove SmBases relocation logic=
>
>  OvmfPkg/AmdSev/AmdSevX64.dsc      =             &nb= sp;    |   1 +
>  OvmfPkg/CloudHv/CloudHvX64.dsc     &nbs= p;            &= nbsp;  |   1 +
>  OvmfPkg/Library/PlatformInitLib/MemDetect.c   &nb= sp;    | 104 ++--
>  .../Library/PlatformInitLib/PlatformInitLib.inf   = ; |   6 +-
>  .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c  |  = 33 +-
>  .../Library/SmmRelocationLib}/Ia32/Semaphore.c   =   |  13 +-
>  .../Library/SmmRelocationLib}/Ia32/SmmInit.nasm   = ; |  83 +++-
>  .../SmmRelocationLib/InternalSmmRelocationLib.h   = ; | 127 +++++
>  .../Library/SmmRelocationLib/SmmRelocationLib.c   = ; | 549
> +++++++++++++++++++++
>  .../Library/SmmRelocationLib/SmmRelocationLib.inf  |  = 60 +++
>  .../SmmRelocationLib/SmramSaveStateConfig.c   &nb= sp;    | 100 ++++
>  .../Library/SmmRelocationLib}/X64/Semaphore.c   &= nbsp;  |  13 +-
>  .../Library/SmmRelocationLib}/X64/SmmInit.nasm   =   |  85 +++-
>  OvmfPkg/Microvm/MicrovmX64.dsc     &nbs= p;            &= nbsp;  |   1 +
>  OvmfPkg/OvmfPkgIa32.dsc       = ;            &n= bsp;        |   1 +
>  OvmfPkg/OvmfPkgIa32X64.dsc      &n= bsp;            = ;      |   1 +
>  OvmfPkg/OvmfPkgX64.dsc       =             &nb= sp;         |   1 +
>  OvmfPkg/PlatformPei/Platform.c     &nbs= p;            &= nbsp;  |   3 +
>  OvmfPkg/PlatformPei/Platform.h     &nbs= p;            &= nbsp;  |   5 +
>  OvmfPkg/PlatformPei/PlatformPei.inf     = ;           |  = 5 +-
>  OvmfPkg/PlatformPei/SmmRelocation.c     = ;           |  80 ++= +
>  OvmfPkg/SmmAccess/SmmAccess2Dxe.c     &= nbsp;            |&n= bsp;  4 +-
>  OvmfPkg/SmmAccess/SmmAccess2Dxe.inf     = ;           |  = 5 +
>  OvmfPkg/SmmAccess/SmmAccessPei.c     &n= bsp;            = ; |  88 +---
>  OvmfPkg/SmmAccess/SmmAccessPei.inf     =             | &= nbsp; 7 +-
>  OvmfPkg/SmmAccess/SmramInternal.c     &= nbsp;            |&n= bsp; 73 +--
>  OvmfPkg/SmmAccess/SmramInternal.h     &= nbsp;            |&n= bsp; 18 +-
>  UefiCpuPkg/Include/Library/SmmRelocationLib.h   &= nbsp;  |  42 ++
>  .../SmmRelocationLib/AmdSmmRelocationLib.inf   &n= bsp;   |  60 +++
>  .../SmmRelocationLib/AmdSmramSaveStateConfig.c   =   | 125 +++++
>  .../SmmRelocationLib}/Ia32/Semaphore.c    &n= bsp;        |  13 +-
>  .../SmmRelocationLib}/Ia32/SmmInit.nasm    &= nbsp;       |  83 +++-
>  .../SmmRelocationLib/InternalSmmRelocationLib.h   = ; | 127 +++++
>  .../Library/SmmRelocationLib/SmmRelocationLib.c   = ; | 549
> +++++++++++++++++++++
>  .../Library/SmmRelocationLib/SmmRelocationLib.inf  |  = 61 +++
>  .../SmmRelocationLib/SmramSaveStateConfig.c   &nb= sp;    | 136 +++++
>  .../SmmRelocationLib}/X64/Semaphore.c    &nb= sp;         |  13 +-
>  .../SmmRelocationLib}/X64/SmmInit.nasm    &n= bsp;        |  85 +++-
>  UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c     &= nbsp;            |&n= bsp; 21 +-
>  UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c    &nb= sp;         |  10 +-
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c   &nbs= p;     | 331 ++-----------
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h   &nbs= p;     | 103 +---
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf   &n= bsp;   |   4 -
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmMpPerf.h    &nb= sp;         |   2 +-
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c   &nbs= p;     |  69 ---
>  UefiCpuPkg/UefiCpuPkg.dec      &nb= sp;            =        |   3 +
>  UefiCpuPkg/UefiCpuPkg.dsc      &nb= sp;            =        |   2 +
>  UefiPayloadPkg/UefiPayloadPkg.dsc     &= nbsp;            |&n= bsp;  2 +
>  48 files changed, 2514 insertions(+), 794 deletions(-)
>  copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D>
> OvmfPkg/Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
>  copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D>
> OvmfPkg/Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
>  create mode 100644
> OvmfPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
>  create mode 100644
> OvmfPkg/Library/SmmRelocationLib/SmmRelocationLib.c
>  create mode 100644
> OvmfPkg/Library/SmmRelocationLib/SmmRelocationLib.inf
>  create mode 100644
> OvmfPkg/Library/SmmRelocationLib/SmramSaveStateConfig.c
>  copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D>
> OvmfPkg/Library/SmmRelocationLib}/X64/Semaphore.c (78%)
>  copy {UefiCpuPkg/PiSmmCpuDxeSmm =3D>
> OvmfPkg/Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
>  create mode 100644 OvmfPkg/PlatformPei/SmmRelocation.c
>  create mode 100644 UefiCpuPkg/Include/Library/SmmRelocationLib.h=
>  create mode 100644
> UefiCpuPkg/Library/SmmRelocationLib/AmdSmmRelocationLib.inf
>  create mode 100644
> UefiCpuPkg/Library/SmmRelocationLib/AmdSmramSaveStateConfig.c
>  rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D>
> Library/SmmRelocationLib}/Ia32/Semaphore.c (71%)
>  rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D>
> Library/SmmRelocationLib}/Ia32/SmmInit.nasm (47%)
>  create mode 100644
> UefiCpuPkg/Library/SmmRelocationLib/InternalSmmRelocationLib.h
>  create mode 100644
> UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.c
>  create mode 100644
> UefiCpuPkg/Library/SmmRelocationLib/SmmRelocationLib.inf
>  create mode 100644
> UefiCpuPkg/Library/SmmRelocationLib/SmramSaveStateConfig.c
>  rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D>
> Library/SmmRelocationLib}/X64/Semaphore.c (78%)
>  rename UefiCpuPkg/{PiSmmCpuDxeSmm =3D>
> Library/SmmRelocationLib}/X64/SmmInit.nasm (59%)
>
> --
> 2.16.2.windows.1
>
>
>
>
>

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#118004) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_LV8PR12MB9452B45871B8B0D74EA2F281EA0D2LV8PR12MB9452namp_--