From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.67.79; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067079.outbound.protection.outlook.com [40.92.67.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BC6E521CF58A6 for ; Wed, 4 Oct 2017 18:15:30 -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=DTJGW3OAsWU+qZI5yDFat/DenP89p8MSJszni1tyESs=; b=vPekc3zmeiXIbzHvwkZg+CVz5IGW2SGUyquvc+VXbbuDQbd0zzNNNCPCZCNfhqV2W0ieR0NDZx5wr5bpztAc8UgtfC8HbOSLoRdLVq0wVNa4j6TjLwYQuQKV9D4ah0vkX1l2JtNi2p4ngBdk6yVrMkbJwtq6k7PalU6cu87OK8b6GdEL2w7VAgDt51sWKCESF61W1xnIhL7ZkkBa8Fb912nVdkn34ZyJelPt3QEbKEUP8qQOlAZga26zOGvdCpzCDDhxXouk/jyJFoBxmX0AnOspr3bZbySeky0wpQMFMrxPkyEX/hq1JlxkAluxbA/CQc2xUqpZMetu2xN/5DmT+w== Received: from AM5EUR02FT042.eop-EUR02.prod.protection.outlook.com (10.152.8.60) by AM5EUR02HT073.eop-EUR02.prod.protection.outlook.com (10.152.9.34) 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 01:18:48 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com (10.152.8.59) by AM5EUR02FT042.mail.protection.outlook.com (10.152.9.106) 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 01:18:48 +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 01:18:48 +0000 From: Marvin H?user To: "edk2-devel@lists.01.org" CC: "Yao, Jiewen" , "leo.duran@amd.com" Thread-Topic: [edk2] [PATCH v4 0/5] Enhanced SMM support for AMD-based x86 systems. Thread-Index: AQHTPUNripcq35aGaE+VnlxPItUqFKLUaz7ggAAFaXA= Date: Thu, 5 Oct 2017 01:18:48 +0000 Message-ID: References: <1507143747-18377-1-git-send-email-leo.duran@amd.com> <74D8A39837DF1E4DA445A8C0B3885C503A9CFB71@shsmsx102.ccr.corp.intel.com> In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503A9CFB71@shsmsx102.ccr.corp.intel.com> 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:198136E6D165A286E9D710280B18878CCDDF4D76B2653DC69D30AAE78272DA6D; UpperCasedChecksum:26B3D672928A29CA76BC19974DCE66D1E4827262FDFE349A000BDFA3B24D6269; SizeAsReceived:7387; Count:46 x-tmn: [G0GWXKGxxwgiy+cF4RDGB1gLqhJpR5VOjn5+J9ZFzEFGo/jmmd37E52qHhsQsRr2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM5EUR02HT073; 6:PhUSVNj/VcUIO/5oib4lgXn2FHLcNKXJ1bSyeB2NcO/Rf6gKcJPWohCHaIT5ZAxqYRCEnUGETjsdFaU8TMGXR7LQtwSLoOYa8b5FPO4I3OaypvcQmxluDaOIYVRKXIrZPPXiH0kANUkEp3gy9eXc4o5veDtqLsfzuwJ4liU2enhFf40jheIIe7osHrZSulcdkzqcDOwpLSgkn8WNHoA6vNUV9jVIM+3Ggjh4jzSB8chWOxogdWrI/HeXkado3C3suUomy40Srqthk5JuVKsMvkZmD+p5DkHCZyF3Ff42zqOR290CF37xWEwJCtkhje98HlHtd1YLZM3XsCJF4KV+/A==; 5:381ilysr9WDUfc2jc1D5l/X5450F3INmJqHQGr0Py4yO+A5GexEa3LpbYm5uNA4fwMqztWf+I9jG8H1YdWNgo0us4fgOztfp58aFzt2Gxp5NUnZ7vyyUruwTOgDy+vUZ/7wIAH4ufstfpCt8Qi8C3Q==; 24:/PlN8Vwjbf8RWF3hUWx/lZ35ZJ/OHRnwnYVpDdWx73aZfc8pM0LxhlTIces0dePhz0sx9W+n3a1OX8+E7zHrAM4TpTbxc6USjZM9xOTthAA=; 7:LourqKeR0kp7UyUVZeA8prjHTYe7lVhgy4fqn4UtbcbgzhXVvy7t6Z9UF1m8+bkmi8cwVyB3axfQpTPJXtwcdozYUSeocVgP47dqvx0FbMPbA/oLutVbFtXbXIOeQkQnDJase+tCK3R9oQyzUSKRNlhMXYM5Ti3TLKCNfmmruAr9USb9kNqmHyYxnah4u1FgvCyIRcRvG7o2xw1k0StUBHJtSIpasg2hQw75lmLpfFU= x-incomingheadercount: 46 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: e6604ab2-a636-4bfe-ea1e-08d50b8f0817 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201702061074)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045); SRVR:AM5EUR02HT073; x-ms-traffictypediagnostic: AM5EUR02HT073: x-exchange-antispam-report-test: UriScan:(767451399110)(788757137089)(162533806227266); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(444000031); SRVR:AM5EUR02HT073; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5EUR02HT073; x-forefront-prvs: 04519BA941 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:AM5EUR02HT073; 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 01:18:48.4394 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT073 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 01:15:31 -0000 Content-Language: de-DE Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hey Jiewen, Hey Leo, May I suggest replacing "StandardSignatureIsAuthenticAMD()" and the PCDs in= troduced by the series with a Fixed "PcdCpuVendor" enum or alike? The contra of "StandardSignatureIsAuthenticAMD()" is that it's a runtime ac= tion. From my point of view, this has no notable advantage as boards use ei= ther an Intel or an AMD chipset and hence the EDK2 Firmware Package has com= pilation-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 base= d on that, the values for the other vendors would get optimized away (no un= necessary runtime actions) and the platform package owner does not need to = worry about setting PCDs to AMD-specific values except for the CPU Vendor P= CD. Backwards-compatibility could be ensured by defaulting to some reserved val= ue 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. >=20 > Hi Leo > I do not suggest we introduce PcdCpuSmmSmramSaveStateMapOffset. >=20 > This is unnecessary, because it is CPU attribute but not some end user > configurable data. >=20 > I think we can use CPUID to distinguish AMD from INTEL. Is that technical= ly > possible? >=20 > I found we already have code at >=20 > C:\home\EdkIIGit\edk2\UefiCpuPkg\Library\BaseXApicX2ApicLib\BaseXApic > X2ApicLib.c(1206): if (StandardSignatureIsAuthenticAMD()) { >=20 > C:\home\EdkIIGit\edk2\UefiCpuPkg\Library\BaseXApicLib\BaseXApicLib.c(11 > 11): if (StandardSignatureIsAuthenticAMD()) { >=20 >=20 >=20 > Thank you > Yao Jiewen >=20 >=20 > > -----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