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 9296CAC0A20 for ; Thu, 25 Apr 2024 05:51:02 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=OBV75qxQwQGBL1rs60vCKQaV48ivRp9fR6rX6LjXKNg=; 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=1714024261; v=1; b=xva5YzsgszmMbWK8/+ott8ULYKPjZT4i/acv50tBz/C3p5Fbccce6XHpVZ1EHZDz84yoiptb reYIKZ9qbI+jk19zcyS6bHhdTOANiSo2GSje9oQwraSBsZrz8VQ49NJAYjEOxnS5gj2kKSE4tlD 6gsJiYrl1d4C931LYmLbeVSKKenu1BTTJItcTEDSpt29e1yYi5MEYb1kHQlRxWfEJY9NpXMxd86 GARWTl37Q3Biv+9FPkPwk+2Zj5vI+V8aDdXVLbdDylDSAtrfFgZv9h3TNT6GyvNNpW6aMh9S3nn gNFx4tybhE+UlgIot+rI/nP02RDGwuU4O7ne0jlUOK04w== X-Received: by 127.0.0.2 with SMTP id zHbYYY7687511xwIU2L4uczq; Wed, 24 Apr 2024 22:51:01 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by mx.groups.io with SMTP id smtpd.web10.10257.1714024255239108734 for ; Wed, 24 Apr 2024 22:50:55 -0700 X-CSE-ConnectionGUID: UqDCM3MAQkeiDUyLynixYg== X-CSE-MsgGUID: kuN0g2vKT76pRg3EFvlMXg== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="9514678" X-IronPort-AV: E=Sophos;i="6.07,228,1708416000"; d="scan'208,217";a="9514678" X-Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 22:50:55 -0700 X-CSE-ConnectionGUID: 08WPEefwSJC4SgOoMSO8cA== X-CSE-MsgGUID: qagUqaGiQIuFRvSWQOQRgw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,228,1708416000"; d="scan'208,217";a="24991132" X-Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Apr 2024 22:50:54 -0700 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 24 Apr 2024 22:50:53 -0700 X-Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 24 Apr 2024 22:50:53 -0700 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 24 Apr 2024 22:50:53 -0700 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 24 Apr 2024 22:50:52 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by MW6PR11MB8365.namprd11.prod.outlook.com (2603:10b6:303:240::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.21; Thu, 25 Apr 2024 05:50:49 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::8774:81a7:c5b7:5c2c%7]) with mapi id 15.20.7519.021; Thu, 25 Apr 2024 05:50:49 +0000 From: "Ni, Ray" To: "Wu, Jiaxin" , Gerd Hoffmann CC: "devel@edk2.groups.io" , "Zeng, Star" , "Kumar, Rahul R" , "Dong, Guo" , "Rhodes, Sean" , "Lu, James" , "Guo, Gua" , Ard Biesheuvel , "Yao, Jiewen" , "Abdul Lateef Attar" , Abner Chang , Tom Lendacky Subject: Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib Thread-Topic: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib Thread-Index: AQHakV2GkVjeKzZueEqpL2F3/efgwrFtqcSAgAZI9YCAAYbkEIAAGEAAgAA6z7CAAQM8kIAAgp6AgADgg0CAAFDITQ== Date: Thu, 25 Apr 2024 05:50:49 +0000 Message-ID: References: <17C74D78B0B952AD.15491@groups.io> <3v4gqem2libtqyxyw6gzuqrifjxurj7lahdbrfn4474fvgkit2@kojgaroebe3o> <4p5no7tieltk7n2p4mzkuy2ypd2kkxdwxs6lsfnwlrlucosmba@zs5cfcjhfz5y> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|MW6PR11MB8365:EE_ x-ms-office365-filtering-correlation-id: c3d11073-0aca-4b9a-4add-08dc64eba8f0 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?Windows-1252?Q?yXB7A8Ua9GAAcUF9VC0cftqwSmKxrMJIKDH9UoqpWbF5G3y5uTEtSJMk?= =?Windows-1252?Q?rIiOnILyTk7clucBm1YMH2RFphroh/U4ONkc3fdhzywbr2ERXmL7oxsf?= =?Windows-1252?Q?6eSA1bY/mzf6aqhg/pdeUy7JLsvjp8y2YsHYC+zOhsr5ZmiUQllrXUQc?= =?Windows-1252?Q?zXCfCmuJ/juOdnfwM57ulYirqwrK0EyQdchHlM2MR2vuIagGm4vEb1H1?= =?Windows-1252?Q?0CGw+cPqaT4SA5EOgDX37nEmh8s4apMs8Zy/2YJ+EBJMCXVQd19ubrZu?= =?Windows-1252?Q?Vnq2WDo8SRDYDhrndwTD8DUqbTEJVvCI40Sj/yZ82Sit9PwpSdL1Y1YX?= =?Windows-1252?Q?mKhm3MrbX6FRNgn+hrSXsVUCRcjjkhRcGlE89QzqiCYT0K4oUtmbR9HP?= =?Windows-1252?Q?fAgShKUTkWMpyohYCiJeIAD/raWUGNOuOFb/Ca2zkHA2Nmpb/k6JhB3a?= =?Windows-1252?Q?q/0oWaFeCJTkBrMoo6cq1lRlnsq/QvGpeeF/41uabYY1pHipJntqjRgx?= =?Windows-1252?Q?2KY5xu+Qcpb+3LXKrMhQ/rwldSbiEdB28s/FQZzHIghviaC4hixLblR8?= =?Windows-1252?Q?MWBhtyb0mastRdpXMVQ+jjtD4877fPJfN4BOB9qdnV2XhUmwppNV6E/H?= =?Windows-1252?Q?ElKhkFdKvIFeW/0R128CSzeUKRf1ulrjKELROa6E/xLDGnf2n51fUUW1?= =?Windows-1252?Q?6NFW4c636t5V/T3nwKaPARQmUrm9Ye/RDwo6Nnh10cw8S1OQp2Qdat/+?= =?Windows-1252?Q?yY5ch/vWz7bh2HEVklJoBywnCAOuXWE9XWqTn86fVLWRJzS8ubXwi5Q+?= =?Windows-1252?Q?MzdKT8y782alZavPmI/vGiy07YgRMi0gu+QJ3IZ0XWG8+S5vpLhMceM1?= =?Windows-1252?Q?m68tcNhBOGJjc2nMC4jgRBjPcoRXHV23D6ku3dSCMPVyagb6rEmIVtQy?= =?Windows-1252?Q?gjTuEMCn4ww1NLPUU7x58fxRfaxRZ/lG2gwX46XL8McKdCs7zFx97EYL?= =?Windows-1252?Q?/RzYxo2UGfzCg27/M6ZfQC1V+7PiFuIFxLGa8RyLToOUtiusNVAEF3lm?= =?Windows-1252?Q?UqCdkjcSGxGJQabppIF5uGkEhzDz4ViXn5AOAGlYvAEWRjdNMDqcxzsL?= =?Windows-1252?Q?xIQ3RjTchDqFTcXte5VKan12ESD4rF5bAA+L+IQ8+ScQpmqFFMMuJpWO?= =?Windows-1252?Q?m+7thj8lKe9lCwp3T3JHh95AOoRYSa0SAuWPxQEGWmJgIjUsYtwLxNED?= =?Windows-1252?Q?VMzBWXCrx/SSQhYjC+ePJ8xgrq4VrYq6BzFxb/rPtUtflYjKGmHnV3X8?= =?Windows-1252?Q?mhndvtbc72QzDcvuQFdzm2/9A6aTJodaxuNcxmiMStqplImXykkazZDE?= =?Windows-1252?Q?+QXKepKdlWFjIPIf/Qgm5TLYRb9J2pvBsDvF3z/p+JBQf5zYM08aeN7l?= =?Windows-1252?Q?G2lwl1gW+KCjzky3hQR58w=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?LcbL/Dk2iqVElL8nsBTzpmEeFHFVvSpQ8ZtLpWkNrqKQERexxJEtMUYg?= =?Windows-1252?Q?v93BH9kixKv91oqasKjtvSuAoBwgOMg644MQyOf6LD5tBekCe5C/GKkM?= =?Windows-1252?Q?wazd5POcLkLvV+82Ed+q+pj6RDsTgWqKx+AoqZh6lHl5hcHPW7vRxdTJ?= =?Windows-1252?Q?vANyam68cBw1og34DQ8BxAZfFRgIU8VCVuo/D4Bfv0IU8gTiLvyrslht?= =?Windows-1252?Q?nDT+IZpHavl4TT/OlnHgTP8zxwmR9Dlj0bXMsMDATCL1RgwceSpqIkKN?= =?Windows-1252?Q?lRQj4BUo59KWvyqIVD6Ug9mLLKqoE7+NB/Kn5+IwUiJ34AoFido4fi1H?= =?Windows-1252?Q?NEWO/CiehqMEF1GGDLhx4lL4Dq/RbLhZGZpLoR6M0Hp6T10ar6nWM4c5?= =?Windows-1252?Q?Iyrkf/9KJJjqJpybrS/fpsMdj//Ie54hFV+vd63ORwo8bpvv8W5C0NyH?= =?Windows-1252?Q?7LJsrW7eIlHwKAw+IkKZLiROfrzp4w/g7kA2kZ5zDCCGMn5QzAckuEDM?= =?Windows-1252?Q?Litu3tl4VfhvMt0dPep9CC98yyjAsFWOCYF/lPftyNV7enwLf3hDHkmW?= =?Windows-1252?Q?EwfAgNWoMNATUfaA7No0faB839r7BdTCaT11WtNiV4uIpl5e2LIJaL/H?= =?Windows-1252?Q?QQZOpPZCP1I4JCiUJsOkFZtSDVPgdkfUOu8IT4vrCGia4IVg8nNZQmJr?= =?Windows-1252?Q?Z1IPpEqR0CJ5iXR/ON37nDJZ0ivSsxYJMrK+HTrQbEiV27FVHEQ+OUQb?= =?Windows-1252?Q?WSUaCyEoku2dgjEJrTHkjh65QqhRlrsICSYyDEO+KAJFUrzF6gq1NewS?= =?Windows-1252?Q?cp1NDqHG6JhF8qIXGumThgURsuzz0MmGpSyWqhTHhZmE7hu600YZuHyo?= =?Windows-1252?Q?1DcGs7YVAd5otSK5kyed7D0wmv3qVgxIPp1HPK4MBjBfOqBoifQt28Qf?= =?Windows-1252?Q?G7CfmykSjVyO5GInDSZiHW7kv8nOnJaq8lBZN8m6/BKRP4XmLfT3RPQ4?= =?Windows-1252?Q?9/4REhuIzo3LjV7PcAvKqEdd2AFVWH5WcML0IzpIuMCra5rrvPKOXs3b?= =?Windows-1252?Q?m4uiF3iBC95ZPgW8LTlBMYUQB1tZzpg/Zm1qCeqN/DZrfjaMMfyAVsTY?= =?Windows-1252?Q?BVfKw0ifV4VCcLGd025qs27mMVvJQwrT609DKqj477RaUrqvO5DpRbQl?= =?Windows-1252?Q?WlsiMmOUEl5xhfO5dw5NbPvZCaLBohqIC9x6MMA59A+krM36pf8PIVX6?= =?Windows-1252?Q?zXjcxDJwM3WXu0NpL+e6e7VTOsRgaL/Lr+4wFqCrycWyweNI/w++AZXc?= =?Windows-1252?Q?EAy+ke9XvkdW+gZYtFRW9VbCT6MTvf6sSYnNbqLmkhL4kuGq/u4mUXLO?= =?Windows-1252?Q?o7iKMXk8l5QC8x0y/k0ieHrQ32xW4aI0HVcwDkbROcA5KqJOSrNfUXkI?= =?Windows-1252?Q?iJKhvg9k4sSxlYVPvZznzOhTGBiL+0793R0QNLQqZ8bvh8LwtRmF/qkG?= =?Windows-1252?Q?A+vCBGYFzgYyyfVU9cwWkW/udGGrgzNXdg5hbIs8n3zBwAPQI3UVElv7?= =?Windows-1252?Q?YulVcMDLrWvFYV8jV87aVRY1TySdYnKcsI2LEZBlK3Va7vlgxb4RFKEG?= =?Windows-1252?Q?rqkT/uHxSOkIBR9C4oDQ+Wo3VaKah5O7qvferfy/FXA7VzNFVjCmLjdd?= =?Windows-1252?Q?ppqTzGQmXvo=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3d11073-0aca-4b9a-4add-08dc64eba8f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2024 05:50:49.3995 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lVopYxrHl4Q5mB9qnN6zuIEC52iiYmucctguUIEQYyVm3znsmzlOpasB1O7/TMymQJjmtNlYnq3hpT+5v4qn9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR11MB8365 X-OriginatorOrg: intel.com 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: Wed, 24 Apr 2024 22:50:55 -0700 Resent-From: ray.ni@intel.com Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Y3CifJWVLrHzL2tEsZK1otSVx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB8244BC511F9259F8E287FD448C172MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=xva5Yzsg; 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 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_MN6PR11MB8244BC511F9259F8E287FD448C172MN6PR11MB8244namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable I checked the AMD64 Architecture Programmer's Manual and it says below: --- AMD64 manual --- SMM-revision Level=97Bits 15:0. Specifies the version of SMM supported by t= he processor. The SMM-revision level is of the form 0_xx64h, where xx start= s with 00 and is incremented for later revisions to the SMM mechanism. --- That means the SMMRevId is 0_xx64h for AMD64 processor. But I am not sure w= hat the value is for AMD32 processor. Maybe 0 according to the OVMF logic. --- OVMF's logic --- AMD_SMRAM_SAVE_STATE_MAP *CpuSaveState; CpuSaveState =3D (AMD_SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMBASE += SMRAM_SAVE_STATE_MAP_OFFSET); if ((CpuSaveState->x86.SMMRevId & 0xFFFF) =3D=3D 0) { CpuSaveState->x86.SMBASE =3D (UINT32)SmBase; } else { CpuSaveState->x64.SMBASE =3D (UINT32)SmBase; } ------ But, I am very suspicious about the logic in AMD's version as below: --- AMD's version SmmSaveStateRegisterLma =3D (UINT8)EFI_MM_SAVE_STATE_REGISTER_LMA_32BIT; LMAValue =3D (UINT32)AsmReadMsr64 (EFER_ADDRESS) & LMA; if (LMAValue) { SmmSaveStateRegisterLma =3D (UINT8)EFI_MM_SAVE_STATE_REGISTER_LMA_64BIT= ; } --- The above logic detects the current CPU mode and 64bit save state area layo= ut is used if it's running in 64bit. But if a AMD64 CPU runs in 32bit mode, the above logic causes the 32bit sav= e state area layout is used. It's not right! The save state area layout does not depend on the CPU running mode, but whe= ther it's a legacy CPU or a 64-capable CPU. Jiaxin, I agree that the confusion should be cleaned up by AMD experts. Let= 's not change any existing behavior. Thanks, Ray ________________________________ From: Wu, Jiaxin Sent: Thursday, April 25, 2024 8:54 To: Gerd Hoffmann Cc: devel@edk2.groups.io ; Ni, Ray = ; Zeng, Star ; Kumar, Rahul R ; Dong, Guo ; Rhodes, Sean ; Lu= , James ; Guo, Gua ; Ard Biesheuvel = ; Yao, Jiewen ; Abdul Late= ef Attar ; Abner Chang ; To= m Lendacky Subject: RE: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib > > > > AMD version is not work for IA32X64 ovmf. > > > > I checked the detailed: CpuSaveState->x64 is always used for OVMF no > matter IA32 or X64, while AMD is not, which is decided by the MSR > EFER_ADDRESS LMA bit check. > > Hmm, probably because only PEI runs in 32-bit mode whereas DXE and SMM > run in 64-bit mode, so 32-bit PEI has to prepare things for the 64-bit > SMM. > > > There is a potential issue/open in OVMF why need use the X64 > > CpuSaveState for IA32. Before this open resolved, I still prefer to > > keep use the ovmf specific lib instance. > > Yes, lets stick to the ovmf version for now, and maybe remove it later > when fixing the ia32 ovmf builds. > Ok, no problem. -=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 (#118266): https://edk2.groups.io/g/devel/message/118266 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_MN6PR11MB8244BC511F9259F8E287FD448C172MN6PR11MB8244namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
I checked the AMD64 Architecture Programmer's Manual and it says below:
--- AMD64 manual ---
SMM-revision Level=97Bits 15:0. Specifies the version of SMM supported by t= he processor. The SMM-revision level is of the form 0_xx64h, where xx start= s with 00 and is incremented for later revisions to the SMM mechanism.
---

That means the SMMRevId is 0_xx64h for AMD64 processor. But I am not sure w= hat the value is for AMD32 processor. Maybe 0 according to the OVMF logic.<= /div>
--- OVMF's logic ---
  AMD_SMRAM_SAVE_STATE_MAP  *CpuSaveState;

  CpuSaveState =3D (AMD_SMRAM_SAVE_STATE_MAP *)(UINTN)(SMM_DEFAULT_SMB= ASE + SMRAM_SAVE_STATE_MAP_OFFSET);

  if ((CpuSaveState->x86.SMMRevId & 0xFFFF) =3D=3D 0) {
    CpuSaveState->x86.SMBASE =3D (UINT32)SmBase;
  } else {
    CpuSaveState->x64.SMBASE =3D (UINT32)SmBase;
  }
------


But, I am very suspicious about the logic in AMD's version as below:
--- AMD's version
  SmmSaveStateRegisterLma =3D (UINT8)EFI_MM_SAVE_STATE_REGISTER_LMA_32= BIT;

  LMAValue =3D (UINT32)AsmReadMsr64 (EFER_ADDRESS) & LMA;
  if (LMAValue) {
    SmmSaveStateRegisterLma =3D (UINT8)EFI_MM_SAVE_STATE_REGISTER= _LMA_64BIT;
  }
---
The above logic detects the current CPU mode and 64bit save state area layo= ut is used if it's running in 64bit.

But if a AMD64 CPU runs in 32bit mode, the above logic causes the 32bit sav= e state area layout is used. It's not right!
The save state area layout does not depend on the CPU running mode, but whe= ther it's a legacy CPU or a 64-capable CPU.

Jiaxin, I agree that the confusion should be cleaned up by AMD experts. Let= 's not change any existing behavior.

Thanks,
Ray

From: Wu, Jiaxin <jiaxin= .wu@intel.com>
Sent: Thursday, April 25, 2024 8:54
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: devel@edk2.groups.io <devel@edk2.groups.io>; Ni, Ray <r= ay.ni@intel.com>; Zeng, Star <star.zeng@intel.com>; Kumar, Rahul R= <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.com>; Rho= des, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com&g= t;; Guo, Gua <gua.guo@intel.com>; Ard Biesheuvel <ardb+tianocore@kern= el.org>; Yao, Jiewen <jiewen.yao@intel.com>; Abdul Lateef Attar &l= t;AbdulLateef.Attar@amd.com>; Abner Chang <abner.chang@amd.com>; T= om Lendacky <thomas.lendacky@amd.com>
Subject: RE: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib
 
> >
> > AMD version is not work for IA32X64 ovmf.
> >
> > I checked the detailed: CpuSaveState->x64 is always used for O= VMF no
> matter IA32 or X64, while AMD is not, which is decided by the MSR
> EFER_ADDRESS LMA bit check.
>
> Hmm, probably because only PEI runs in 32-bit mode whereas DXE and SMM=
> run in 64-bit mode, so 32-bit PEI has to prepare things for the 64-bit=
> SMM.
>
> > There is a potential issue/open in OVMF why need use the X64
> > CpuSaveState for IA32. Before this open resolved, I still prefer = to
> > keep use the ovmf specific lib instance.
>
> Yes, lets stick to the ovmf version for now, and maybe remove it later=
> when fixing the ia32 ovmf builds.
>

Ok, no problem.


_._,_._,_

Groups.io Links:

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

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

_._,_._,_
--_000_MN6PR11MB8244BC511F9259F8E287FD448C172MN6PR11MB8244namp_--