From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.70.50; helo=eur03-am5-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-oln040092070050.outbound.protection.outlook.com [40.92.70.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6F6272095B07C for ; Thu, 5 Oct 2017 12:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=G20ReoZLna/mT+PAkXlZyRjmqW350GFYgbQMUUvN1wI=; b=neZC9Hb+It8Bd+XSxwOE/Nvg7heM6oJKdBhWzryCpZu6HYqml8IfG9kJFA++tPDWoHCZdVa/8+kQB2/FYVQ1WyYV5YsPkIGRDqrhEIpOxF6Ma3lz9fxES/ZGLSSV581U23SxwwlkPRI+jb08EiYQ9v4Uud+4dg3rSQlKDQA1tBFp/oMCVVaqPvFg5hRN9TteXBRz5LWwxeSLm3qclJNBQEyM1PG5fgZJeYpbncoft0K1Dz8uyuyG7ZQGX3ha6CgZzkBY8O4RBZHPw1v+RlHGP+PcL01vPo+NqgDhQ9yW1/NLn4WS2f/PYSZw4hhvRSdAt0BMZtgBkIi5tdFAjBiSZg== Received: from AM5EUR03FT019.eop-EUR03.prod.protection.outlook.com (10.152.16.59) by AM5EUR03HT098.eop-EUR03.prod.protection.outlook.com (10.152.17.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.77.10; Thu, 5 Oct 2017 19:09:33 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com (10.152.16.54) by AM5EUR03FT019.mail.protection.outlook.com (10.152.16.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.77.10 via Frontend Transport; Thu, 5 Oct 2017 19:09:33 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::d9cb:81d:c687:534f]) by AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::d9cb:81d:c687:534f%13]) with mapi id 15.20.0077.018; Thu, 5 Oct 2017 19:09:33 +0000 From: Marvin H?user To: "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH v4 0/5] Enhanced SMM support for AMD-based x86 systems. Thread-Index: AQHTPUNripcq35aGaE+VnlxPItUqFKLUaz7ggAAFaXCAAOlIgIAARN3g Date: Thu, 5 Oct 2017 19:09:33 +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: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=none action=none header.from=outlook.com; x-incomingtopheadermarker: OriginalChecksum:34BDDF00B924EA5138A42484769113ABD5B574ADA93D2F5E70ABC680AB43F19F; UpperCasedChecksum:9B55865893F9868379BCBED78FFAC3C207B3117FDDF23701684FBDC717D5AD5A; SizeAsReceived:7524; Count:46 x-tmn: [GpbclYxSRjkXtt92Ra6oSQF6wOpJHG93D2I+wv/0zO7U1bktOS/4UBqHgwpWy3GR] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM5EUR03HT098; 6:NhFGZ3zUP6ACWjkopIf/fLi8ARFFBySW0KMrd1vdidb0Le5OxXVSvxMe0xeN9rEsDkMo4zFwa+o9AwQ/AcwpmN+1OmBGzRC8SwnIYdMPSSTYmnZm6C8epLwUBbqD828R+DEmli+0XGcm0d5xhU9Z2LKYRVysd9HShaSYnMjke2aCD6NUkvGMyMu1XuCJ11JyY9dYFd9ESpqcklUYA5+3TcfmdD6J9/w9hZIIdEzGATgZ3N++3UW+UxxlYj0HOB4RXSyy1aN5YQZewOwVoP7+2tQpIrTPUkf5PNT4GOClOJFZPnvqkoV8K6SrEKRfB/F2ylwyDh5FvP9CZNUTPRd1bg==; 5:I3KsY24Uny3QrG+ceYJcK0wqpnS+Phalc70p1EnAqk4eUZ+p//jovNT3ty+8VBenHdVnhI88mn6d1fz4UPppfjndH21rw3U0VvqWQREpFqxPa7z/rwocaIov8PidSgkAWhMJuCFC7tsmZNBPhiZjbg==; 24:QCgb84XJmyCbUtLuPuRkTEcvYoU30wDjBKIqesEc2w6JIc04K39XYXbGxGgcKHaW+ZrOD5Qrps/uOhLX+6mnEBZmULw9YMESzxIsmeTvZ6k=; 7:dHfZrqPDlNBYUWASmXCDmtf6Ks/2dbHGUjKg1xKutWJqr4gIQart7hnTIOiY7uYuFAZRJblJv06esnu/3gQQhSVpdeOsysQl6y6BRBtiEbkK+wdt764baoB3AjftIhupgKTUucWZ3GRaXUUfnezg2pCUP3sVE/H+1haAke11C0cWcLJ1O8zZp8C/cpnPBO0aKz8FU/Mlefdmgxn3IMLVrkzeCd9FRnFdqRMljExi8BY= x-incomingheadercount: 46 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 171f106e-9f50-4cf1-b286-08d50c249d1e x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045); SRVR:AM5EUR03HT098; x-ms-traffictypediagnostic: AM5EUR03HT098: x-exchange-antispam-report-test: UriScan:(189930954265078)(767451399110)(788757137089)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031); SRVR:AM5EUR03HT098; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5EUR03HT098; x-forefront-prvs: 04519BA941 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:AM5EUR03HT098; H:AM4PR06MB1491.eurprd06.prod.outlook.com; FPR:; SPF:None; LANG:; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2017 19:09:33.6090 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR03HT098 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 19:06:15 -0000 Content-Language: de-DE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Leo, Yes, that's right. That PCD would be the only needed to be set by the platf= orm DSC. Thanks, Marvin > -----Original Message----- > From: Duran, Leo [mailto:leo.duran@amd.com] > Sent: Thursday, October 5, 2017 4:57 PM > To: 'Marvin H?user' ; edk2- > devel@lists.01.org > Cc: Yao, Jiewen > Subject: RE: [edk2] [PATCH v4 0/5] Enhanced SMM support for AMD-based > x86 systems. >=20 >=20 >=20 > > -----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. > > > > Hey Jiewen, > > Hey Leo, > > > > May I suggest replacing "StandardSignatureIsAuthenticAMD()" and the > > PCDs introduced by the series with a Fixed "PcdCpuVendor" enum or alike= ? >=20 > Hi Marvin, > I'm not sure I follow your suggestion. > It seems like the platform .DSC would then need to set PcdCpuVendor to an > appropriate value at build-time... No? > Leo. >=20 > > The contra of "StandardSignatureIsAuthenticAMD()" is that it's a > > runtime action. From my point of view, this has no notable advantage > > as boards use 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 > > that 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 CPU 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. > > > > Thanks, > > Marvin. > > > > > -----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(1 > > 1 > > > 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