From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=helo; client-ip=104.47.36.73; helo=nam02-sn1-obe.outbound.protection.outlook.com; envelope-from=leo.duran@amd.com; receiver=edk2-devel@lists.01.org Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0073.outbound.protection.outlook.com [104.47.36.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5FDA92095B06D for ; Thu, 5 Oct 2017 07:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=H16s+KvWu6KcurUB4bHHUXzRZmA0vSVvd2FKL1AgNA0=; b=FF43qnkjDOmKGIijqPOycuzII5mscbG7NtsCz/2AXK+o48mH//QImRubnzwTo9/kyuvcv7TBDs1IjWca2yOGeGq39xXnMAGoAhjddgGYPDqP8uYYV9VollwLfy4/xnp/T0b839VRCp4mVrGZIzzlJbFrvuyuhWWjm16HRf1BltQ= Received: from DM5PR12MB1243.namprd12.prod.outlook.com (10.168.237.22) by DM5PR12MB1242.namprd12.prod.outlook.com (10.168.237.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 5 Oct 2017 14:57:16 +0000 Received: from DM5PR12MB1243.namprd12.prod.outlook.com ([10.168.237.22]) by DM5PR12MB1243.namprd12.prod.outlook.com ([10.168.237.22]) with mapi id 15.20.0077.018; Thu, 5 Oct 2017 14:57:15 +0000 From: "Duran, Leo" To: 'Marvin H?user' , "edk2-devel@lists.01.org" CC: "Yao, Jiewen" Thread-Topic: [edk2] [PATCH v4 0/5] Enhanced SMM support for AMD-based x86 systems. Thread-Index: AQHTPUNYtwJfNb+e0EKOV9qKHxulcaLUbPOAgAAIUACAAOOG8A== Date: Thu, 5 Oct 2017 14:57:15 +0000 Message-ID: References: <1507143747-18377-1-git-send-email-leo.duran@amd.com> <74D8A39837DF1E4DA445A8C0B3885C503A9CFB71@shsmsx102.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=leo.duran@amd.com; x-originating-ip: [165.204.77.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR12MB1242; 20:ZYNIQMtxBiczi9f3H0LFXLaj6KCnfhVLLCpf2iGt/wiF4puk0XedfQtQf6BUojeq3r3z/2cjEa+Fl9ZgGR4TnBVpDCxYtnS70G4//t9y7PlJDZboH/FZLszR4/t34RUk+AVt9XVUypGD4nE8H3XwhSKSB6TZbsiRIMfyou9tFYBLCQIJBev+ocam6ErZf6QtwjG6TqVfpOXRoKRIAprtV6vhKYzgjT8EEX5bnBN9BD3w+d9V/qxpBNQwmPpeJ29+ x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 3d3d117e-8270-4020-9e74-08d50c015e54 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR12MB1242; x-ms-traffictypediagnostic: DM5PR12MB1242: x-exchange-antispam-report-test: UriScan:(189930954265078)(767451399110)(788757137089)(162533806227266)(228905959029699); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123564025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR12MB1242; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR12MB1242; x-forefront-prvs: 04519BA941 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(39860400002)(346002)(13464003)(199003)(189002)(377454003)(81156014)(2906002)(25786009)(7696004)(5660300001)(97736004)(6306002)(3846002)(53936002)(7736002)(99286003)(189998001)(478600001)(6436002)(316002)(74316002)(55016002)(86362001)(45080400002)(9686003)(6116002)(110136005)(2950100002)(4326008)(966005)(2501003)(68736007)(6506006)(101416001)(229853002)(3280700002)(66066001)(8676002)(3660700001)(105586002)(102836003)(8936002)(53546010)(14454004)(6246003)(77096006)(54356999)(81166006)(2900100001)(305945005)(106356001)(39060400002)(50986999)(33656002)(76176999)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1242; H:DM5PR12MB1243.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2017 14:57:15.8335 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1242 Subject: Re: [PATCH v4 0/5] Enhanced SMM support for AMD-based x86 systems. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Oct 2017 14:53:55 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Marvin H?user [mailto:Marvin.Haeuser@outlook.com] > Sent: Wednesday, October 04, 2017 8:19 PM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Duran, Leo > > Subject: RE: [edk2] [PATCH v4 0/5] Enhanced SMM support for AMD-based > x86 systems. >=20 > Hey Jiewen, > Hey Leo, >=20 > May I suggest replacing "StandardSignatureIsAuthenticAMD()" and the PCDs > introduced by the series with a Fixed "PcdCpuVendor" enum or alike? Hi Marvin, I'm not sure I follow your suggestion. It seems like the platform .DSC would then need to set PcdCpuVendor to an a= ppropriate value at build-time... No? Leo. > The contra of "StandardSignatureIsAuthenticAMD()" is that it's a runtime > action. From my point of view, this has no notable advantage as boards us= e > either an Intel or an AMD chipset and hence the EDK2 Firmware Package has > compilation-time knowledge of the target platform. > On the other hand, the PCDs introduced by this patch cause the contra tha= t > the platform DSC must set the correct vendor-specific (intel, AMD) value. > If the code checked for the CPU Vendor PCD and used the correct values > based on that, the values for the other vendors would get optimized away > (no unnecessary runtime actions) and the platform package owner does not > need to worry about setting PCDs to AMD-specific values except for the CP= U > Vendor PCD. > Backwards-compatibility could be ensured by defaulting to some reserved > value for the PCD and handling detection via > StandardSignatureIsAuthenticAMD() if the platform DSC does not change it. >=20 > Thanks, > Marvin. >=20 > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > > Yao, Jiewen > > Sent: Thursday, October 5, 2017 2:49 AM > > To: Leo Duran ; edk2-devel@lists.01.org > > Subject: Re: [edk2] [PATCH v4 0/5] Enhanced SMM support for AMD-based > > x86 systems. > > > > Hi Leo > > I do not suggest we introduce PcdCpuSmmSmramSaveStateMapOffset. > > > > This is unnecessary, because it is CPU attribute but not some end user > > configurable data. > > > > I think we can use CPUID to distinguish AMD from INTEL. Is that > > technically possible? > > > > I found we already have code at > > > > > C:\home\EdkIIGit\edk2\UefiCpuPkg\Library\BaseXApicX2ApicLib\BaseXApic > > X2ApicLib.c(1206): if (StandardSignatureIsAuthenticAMD()) { > > > > > C:\home\EdkIIGit\edk2\UefiCpuPkg\Library\BaseXApicLib\BaseXApicLib.c(11 > > 11): if (StandardSignatureIsAuthenticAMD()) { > > > > > > > > Thank you > > Yao Jiewen > > > > > > > -----Original Message----- > > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf > > > Of Leo Duran > > > Sent: Thursday, October 5, 2017 3:02 AM > > > To: edk2-devel@lists.01.org > > > Subject: [edk2] [PATCH v4 0/5] Enhanced SMM support for AMD-based > > > x86 systems. > > > > > > This patch-set introduces a couple of FixedPCDs to replace > > > Intel-specific macros, and better support AMD-based x86 systems. > > > > > > 1) PcdCpuSmmSmramSaveStateMapOffset - SMRAM Save State Map > > Offset. > > > 2) PcdCpuSmmPSDOffset - Processor SMM Descriptor Offset in SMRAM. > > > > > > Changes since v3: > > > Correction on cover letter. > > > > > > Changes since v2: > > > The intent of this revision is to maintain compatibility with > > > existing packages. To that end, changes to OvmgfPkg and QuarkSocPkg > > > are > > reverted. > > > Moreover, pertinent macros are replaced in the C code, rather than > > > on header files that are shared globally. > > > > > > Changes since v1: > > > Revision to Cc list for UefiCpuPkg. > > > > > > Leo Duran (5): > > > UefiCpuPkg/UefiCpuPkg.dec: Create FixedPCDs for SMM support > > > UefiCpuPkg/PiSmmCpuDxeSmm: Consume FixedPCDs to enhance SMM > > support > > > UefiCpuPkg/PiSmmCpuDxeSmm: Use FixedPCDs to enhance SMM > > support > > > UefiCpuPkg/SmmCpuFeaturesLib: Consume FixedPCD to enhance SMM > > > support > > > UefiCpuPkg/SmmCpuFeaturesLib: Use FixedPCD on non-STM library > > > > > > UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | 4 > > > +++- > > > UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf | 5 > > > +++++ > > > UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf | > 5 > > > +++++ > > > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/Semaphore.c | 4 > > > +++- > > > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.S | 4 > > > +++- > > > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.asm | 4 > > > +++- > > > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmiEntry.nasm | 4 > > > +++- > > > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | > > > 10 +++++----- > > > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | > > > 2 -- > > > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | > > > 4 ++++ > > > UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c > > > | 4 +++- > > > UefiCpuPkg/PiSmmCpuDxeSmm/SmramSaveState.c | 4 > > > +++- > > > UefiCpuPkg/PiSmmCpuDxeSmm/X64/Semaphore.c | > > > 4 +++- > > > UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.S | 4 > > > +++- > > > UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.asm | 4 > > > +++- > > > UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiEntry.nasm | 4 > > > +++- > > > UefiCpuPkg/UefiCpuPkg.dec | 9 > > > +++++++++ > > > 17 files changed, 61 insertions(+), 18 deletions(-) > > > > > > -- > > > 2.7.4 > > > > > > _______________________________________________ > > > edk2-devel mailing list > > > edk2-devel@lists.01.org > > > https://lists.01.org/mailman/listinfo/edk2-devel > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel