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 8F93DAC0B2C for ; Fri, 26 Apr 2024 06:07:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=De4C/Fol4E0YOkGsUafNv2gFJmCanNCxcBW1BEFR9aw=; 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=1714111646; v=1; b=1ox6kK7oUHpGYgwtL9A8tEkyHpA56CwIOwam+5O+7OtpsqAVGFwcIlrRYc5VQ3RcH4bNOfpt 7wbLqEh0BIgS0y1IMUM1aPeeFITw2LaYMzvqSFIlrPrfr+I+U7vZFa42WheSJxrakRBw1/e4WMy o5roRQ2cZLE4WO6tTg932mXRwWJdrxgWARFCozPmfeamhddhXG14G4nivja7dYribC8W5iGcsdi HhLI+P6b+BAbzu+lMSk1nEIL4T84mulEQ3ieA2S2U/T2q8xWdzSXuS7Bfub1XGdD2NvOPJakUSF KOdqb52kykV6/NR+rW1+2qM5gaCU31K3alzapks36irqg== X-Received: by 127.0.0.2 with SMTP id ys9vYY7687511xc75jEgjySs; Thu, 25 Apr 2024 23:07:26 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mx.groups.io with SMTP id smtpd.web10.7223.1714111640993486754 for ; Thu, 25 Apr 2024 23:07:21 -0700 X-CSE-ConnectionGUID: HynPoA9RSPCokI0jOY8tkQ== X-CSE-MsgGUID: AR4+AS+ASwuv0oKXU/+BrQ== X-IronPort-AV: E=McAfee;i="6600,9927,11055"; a="20390427" X-IronPort-AV: E=Sophos;i="6.07,231,1708416000"; d="scan'208,217";a="20390427" X-Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2024 23:07:20 -0700 X-CSE-ConnectionGUID: a5PbuRSZS8GGmvEdWNjNaA== X-CSE-MsgGUID: 1l4bymoOQdKXScJgnOKfHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,231,1708416000"; d="scan'208,217";a="30119353" X-Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 25 Apr 2024 23:07:20 -0700 X-Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 25 Apr 2024 23:07:19 -0700 X-Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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; Thu, 25 Apr 2024 23:07:19 -0700 X-Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 25 Apr 2024 23:07:19 -0700 X-Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) 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; Thu, 25 Apr 2024 23:07:19 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by SN7PR11MB6851.namprd11.prod.outlook.com (2603:10b6:806:2a3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.21; Fri, 26 Apr 2024 06:07:17 +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; Fri, 26 Apr 2024 06:07:16 +0000 From: "Ni, Ray" To: Gerd Hoffmann CC: "Wu, Jiaxin" , "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/efgwrFtqcSAgAZI9YCAAYbkEIAAGEAAgAA6z7CAAQM8kIAAgp6AgADgg0CAAFDITYAAFX2AgAGCjwY= Date: Fri, 26 Apr 2024 06:07:16 +0000 Message-ID: References: <17C74D78B0B952AD.15491@groups.io> <3v4gqem2libtqyxyw6gzuqrifjxurj7lahdbrfn4474fvgkit2@kojgaroebe3o> <4p5no7tieltk7n2p4mzkuy2ypd2kkxdwxs6lsfnwlrlucosmba@zs5cfcjhfz5y> <4fngcjpmyqnzyp6bh3ycylan2a3k4s4sy2tktankxor4eqnjth@txcoonsfhsmt> In-Reply-To: <4fngcjpmyqnzyp6bh3ycylan2a3k4s4sy2tktankxor4eqnjth@txcoonsfhsmt> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|SN7PR11MB6851:EE_ x-ms-office365-filtering-correlation-id: add573b8-5f0a-449b-f46a-08dc65b71ff7 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: =?iso-8859-1?Q?FL2v72nTYiL8loVUIlHA6tYRRWAXV/LeP5P/AYak/AEIR84g/CruzGnFTj?= =?iso-8859-1?Q?ho4vRiLkWrGovti9TRCju5jonjwxoD3WfN1NN3G7gyjYxQMM+WZpypLm1K?= =?iso-8859-1?Q?jXrSd/9Ep0jSwsSPFYkdUPouL+XM50Czy7TBnQKDtgPK5ROhfLs+MpQ4H0?= =?iso-8859-1?Q?1NFoKPy4QeRqO1nGmhw0t1sFroNZXLIlC/vmEwqDdCDtes4hmJ3NoUI7wR?= =?iso-8859-1?Q?mggXqj4h/mXhDZ0vEkd3VGjs8CTZIpusLTmU+pV9uyoZFSUi267dUQ4I/Y?= =?iso-8859-1?Q?XkYvWEzFBkY0pgqwuyuhX4QJ18OLWMRT0NXgl2jmVbWzVluXtUgFsWCif/?= =?iso-8859-1?Q?ZeHYB8WFDPSdmmI++Ik+/jlLNPH7Y5osAfdc39pXrpR4O0iyF3VfmhP8MQ?= =?iso-8859-1?Q?dw9Y2pEg7DBTb0g6y+eL80N6YzGvq47BtnLZWghmUs6euCSVEQBHeM7nPS?= =?iso-8859-1?Q?SabBTUQIKukEdkejf5qg+IGUxyG7EmgF0zgmtaFyZqGGkhlVIyzsltlUPn?= =?iso-8859-1?Q?xRNR26YBy7bWzpid1Hx48FZJPPXOHQnlDRvzaPgCo/IQpGSJc21ArtR0tE?= =?iso-8859-1?Q?PZQAxL315HkcclCd5FZzH0PASOKf27WNfBATwuUqUp57lOP7uNbXoCQGA/?= =?iso-8859-1?Q?4PjxAij8lFtbAzQyPu4EiSEdP44d8L1KFetLLDqrp+nUVy37mN8LB4HgtV?= =?iso-8859-1?Q?dJVSPgk/L5U4hS20ZhK3CUa6O/eaZzJdhq9FfxYw6CKM8/iRO2uwoLR4wx?= =?iso-8859-1?Q?ndhFlaMomYHIi5atE8kFtFSM1YOH+Bo2+hQhdBSfGtIEFxnK6LIF33nzon?= =?iso-8859-1?Q?VnLHfA1+gbGxtB/VQ9KhskKaZ4G8eo1bETYY0uF0Ecq2RKaduqGNT4r1ym?= =?iso-8859-1?Q?gkTmVkqt3jrbkJ9Gq1iMcPn2WFOxLHN/O9slaYnQrAIfHr8vqlE0kPFEbp?= =?iso-8859-1?Q?accEhDCsL3JWNVQUx8ZlGc46aCnLPo1mOC3MSfVsTXxXyBhUAamKWd+NZl?= =?iso-8859-1?Q?NcEOfmhh077dBddlXyRYb8sVQoYyoEGcSoro5wRNbU+yAuEBpAtUtq2+UR?= =?iso-8859-1?Q?1rmM1fiUWYyp0k2t9cbSe2rsHPtbVwv+Q9i9EkpLeL/xVxH5VXWwhLJuY3?= =?iso-8859-1?Q?88+KMmhueLLd8VOZTYgRDgCLN43xu0IG4O/PeS3EEnbN0hW05xH7L9ARqY?= =?iso-8859-1?Q?ThXqh7jmOGSbER1xsRV4cituWmWXQhWci0JtClkzexQsCiDQLfOZQn6bRw?= =?iso-8859-1?Q?Jg/CZ8lLl1+3bxHwaNwqCF8InFKYfNPzbaUc/h/ztyh13N9JAy0LccSWLe?= =?iso-8859-1?Q?LYHA4EoryNSYNErNiHJaHGmeJMcA7+gY5SmDzPamd0k68uyP3ocme5+YOC?= =?iso-8859-1?Q?lRpUjRlPe8JbMoSU57a4A8aSueejo0qQ=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?OxUsq20mhy1FRgvtQO2qBP25SQ1I4Sttwb9K2VUfGKH5UCb05UX/nK8JWp?= =?iso-8859-1?Q?BmF/IcYnRQSC0iTUjt0HxOtgRZMpwr4X3EDEqne+petcTxc47Mn5cBZiMw?= =?iso-8859-1?Q?W9W+zKUQjrTYgPI6ksWqKVhpD9WR/59bOsG6DE/ccmgUAnDHMP2iPjG7GU?= =?iso-8859-1?Q?IWKPtf3qKAs3Wsb5BK5aOvWoC7NUlf9bifqnFozoH0l6upLCLf9kY1fH/x?= =?iso-8859-1?Q?KsH+7qDtjSevy99uqPu95SvM5Ma5x0ydI9y96EVAmLLZpWlChdbTViyuoi?= =?iso-8859-1?Q?CxqujbQOctyoldyQVYIk7u4CG5jsquNtkjlhxfmF+h7Sedf/muezCVaSkG?= =?iso-8859-1?Q?X/1YCwHWFThhQn8UJlh1XZ/sF07IVJWAvdTjnZN6n84FPV0p4aARBuKEO1?= =?iso-8859-1?Q?k+3FMBaZbDAGhgOnuUrtZ4hCs+ytZb8Bpq+6KpPJ9G9FvX7CEzxDO7dd+c?= =?iso-8859-1?Q?s7720X45OPSIBfnWS9X6fbT9qXAXb0Dz3riSbpQYMASAGlih3AHAOs3Jri?= =?iso-8859-1?Q?qUHWEnVHASiI5/2eiRrcjjQz+gWDbllRambV3/b3DVT6b9/iYMg+5+Mgq1?= =?iso-8859-1?Q?siXDGHWR0eMOm02D2BsvMxsplQo/VeE3SetQGnG+JTkMUF6z+ScI9A/QJe?= =?iso-8859-1?Q?JuW5BzEmDLQ+sp0987KUiVMwUJPMQKsZ0WEOde3Lo21p+6hfZptL0N2Prd?= =?iso-8859-1?Q?j/dUXEBP7w3ZQ96SOru6P2sgsQLJBLMtBd+6GzR3RHVYn8/Ge5ezX5woxk?= =?iso-8859-1?Q?OKGrsGIkOCokvhnIp+LTvdkOWLU5hrg2N8zpSWEPd+F0xsQ8r6Q2+8/ABx?= =?iso-8859-1?Q?qyWeVXvKRI2A225rMu61DNDqRlRfmrnJGtPtD1yHmKbp/+ahyAbceihCwJ?= =?iso-8859-1?Q?ZmUZGocpzlF4Ik09mX3U1+nS0lkia1JFJh+Q+fgOA87SzrPLvRU+nVRGDh?= =?iso-8859-1?Q?zVHCpE4jkyw1nDVVQ3KzBk8bOc2T6Pw2T95u0Hsdc6YltbqE9V4/Jaowjx?= =?iso-8859-1?Q?QqQSXfmxuXQQ/Kt687xe4BSSgQtZx4YSMAStVf+KiXYv0OD8kNytoC8p1z?= =?iso-8859-1?Q?DA1KmeHbX/EHCSee6g4bFLfmPunGhnlerm1nGfktl+dZPlxu+mkvSnDNo7?= =?iso-8859-1?Q?kfz2nkntxEtLa3gEvc9/CyXHunpMmcXNgo5sNwQvVrCUe8FnDHBDU1bXaQ?= =?iso-8859-1?Q?8OYHCAT6pUOd42XbcWXMG6PkrMWruu63sXX6pjIqwkkQXnfHpAIAyHzYq6?= =?iso-8859-1?Q?c+dPGXOLJshCCSIkPmmoMygnrYeDl+lt9tXMT+lbyG3qmNLnyOUIAut2dq?= =?iso-8859-1?Q?9PbgEXNdien1I5xjXGMcpyKEUM+jbxM0CbAqfLnYaaAgPawW6Bw0gYvBdv?= =?iso-8859-1?Q?2RqGw2jWuOMa/Pym4DIFbCHg1XxF0CX2pPk//x0TPuS3liyq/SG3VwFk0H?= =?iso-8859-1?Q?4RttI96bfka7nVgbpDR52sbNzW0y5mNnJ5fx5rjVNPkaOGPT+X6KoNi05l?= =?iso-8859-1?Q?JLgHIPTIiL78uGmYcDKe/cc+ttouP+o14tBQhsZ5obPdMAqU5ULO51WaAQ?= =?iso-8859-1?Q?GstTVaX9DTEpcyAB769sX2gruNpgzU6Tb5+abSthZUj2RBw2qgmrDjqXEp?= =?iso-8859-1?Q?x+2+REs8r77fA=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: add573b8-5f0a-449b-f46a-08dc65b71ff7 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Apr 2024 06:07:16.9259 (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: ySq+OxdYOaWjoZs3Kb6uV4ZQe9jX2dvwW9I42tKdV2GdWQtzFUyIx7xYjfMMkyGwYMILuAbQ5bcJqfkNKvUhww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6851 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: Thu, 25 Apr 2024 23:07:21 -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: iUrcNxj0UCERjwPfhDfOr4ygx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB82444A65F94A70A5EA06C4A48C162MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=1ox6kK7o; 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_MN6PR11MB82444A65F94A70A5EA06C4A48C162MN6PR11MB8244namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks, Ray ________________________________ From: Gerd Hoffmann Sent: Thursday, April 25, 2024 14:58 To: Ni, Ray Cc: Wu, Jiaxin ; devel@edk2.groups.io ; Zeng, Star ; Kumar, Rahul R ; Dong, Guo ; Rhodes, Sean ; Lu, James ; Guo, Gua ; Ard Biesh= euvel ; Yao, Jiewen ; Abdu= l Lateef Attar ; Abner Chang ; Tom Lendacky Subject: Re: [edk2-devel] [PATCH v3 00/13] Add SmmRelocationLib Hi, > That means the SMMRevId is 0_xx64h for AMD64 processor. But I am not > sure what the value is for AMD32 processor. Maybe 0 according to the > OVMF logic. The smm emulation in the linux kernel uses 0 and 0x64. [Ray] OK. that supports the OVMF instance's logic. But I'd like Tom or any = other AMD guys to provide spec that says 0 for AMD32. > 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_64B= IT; > } > --- > The above logic detects the current CPU mode and 64bit save state area la= yout is used if it's running in 64bit. > But if a AMD64 CPU runs in 32bit mode, the above logic causes the > 32bit save state area layout is used. It's not right! The save state > area layout does not depend on the CPU running mode, but whether it's > a legacy CPU or a 64-capable CPU. Well, that is not entirely clear to me. Could it be 64-bit processors support both 32-bit and 64-bit format, for backward compatibility reasons? [Ray] The CPU uses a fixed save state area layout no matter it runs in 32bi= t or 64bit. The 64bit cpu only uses the 64bit format, no matter it runs in 32bit or 64b= it. So OvmfPkgIa32 builds could use the 32-bit format, OvmfPkgX64 builds use the 64-bit format, everything works fine? [Ray] For OVMF, it depends on how the virtual cpu is defined by QEMU implem= entation. If the underline CPU is a AMD64 cpu, the CPU supports running in 32bit or 6= 4bit modes. But no matter it runs in 32bit or 64bit, the save state area layout always follows the 64= bit format. The tricky corner case is OvmfPkgIa32X64, where (after applying this series) 32-bit PEI should setup things for 64-bit SMM/DXE, and checking the current processor mode will not give use the result we need. > Jiaxin, I agree that the confusion should be cleaned up by AMD > experts. Let's not change any existing behavior. Agree. Tom? take care, Gerd -=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 (#118310): https://edk2.groups.io/g/devel/message/118310 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_MN6PR11MB82444A65F94A70A5EA06C4A48C162MN6PR11MB8244namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable


Thanks,
Ray


From: Gerd H= offmann <kraxel@redhat.com>
Sent: Thursday, April 25, 2024 14:58
To: Ni, Ray <ray.ni@intel.com>
Cc: Wu, Jiaxin <jiaxin.wu@intel.com>; devel@edk2.groups.i= o <devel@edk2.groups.io>; Zeng, Star <star.zeng@intel.com>; Kum= ar, Rahul R <rahul.r.kumar@intel.com>; Dong, Guo <guo.dong@intel.c= om>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@= intel.com>; 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=
 
  Hi,

> That means the SMMRevId is 0_xx64h for AMD64 processor. But I am not > sure what the value is for AMD32 processor. Maybe 0 according to the > OVMF logic.

The smm emulation in the linux kernel uses 0 and 0x64.
[Ray] OK. that sup= ports the OVMF instance's logic. But I'd like Tom or any other AMD guys to = provide spec that says 0 for AMD32.


> But, I am very suspicious about the logic in AMD's version as below: > --- AMD's version
>   SmmSaveStateRegisterLma =3D (UINT8)EFI_MM_SAVE_STATE_REGIS= TER_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= layout is used if it's running in 64bit.

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

Well, that is not entirely clear to me.  Could it be 64-bit processors=
support both 32-bit and 64-bit format, for backward compatibility
reasons?

[Ray] The CPU uses= a fixed save state area layout no matter it runs in 32bit or 64bit.
The 64bit cpu only= uses the 64bit format, no matter it runs in 32bit or 64bit.


So OvmfPkgIa32 builds could use the 32-bit format, OvmfPkgX64 builds use the 64-bit format, everything works fine?

[Ray] For OVMF, it= depends on how the virtual cpu is defined by QEMU implementation.
If the underline C= PU is a AMD64 cpu, the CPU supports running in 32bit or 64bit modes. But no= matter
it runs in 32bit or 64bit, the save state area layout always follows the 64= bit format.

The tricky corner case is OvmfPkgIa32X64, where (after applying this
series) 32-bit PEI should setup things for 64-bit SMM/DXE, and checking
the current processor mode will not give use the result we need.

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

Agree.  Tom?

take care,
  Gerd

_._,_._,_

Groups.io Links:

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

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

_._,_._,_
--_000_MN6PR11MB82444A65F94A70A5EA06C4A48C162MN6PR11MB8244namp_--