From nobody Tue May 14 18:00:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39866+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39866+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1556652673; cv=none; d=zoho.com; s=zohoarc; b=fS3VBj6kDCyY+iwFdxrcH5NG1/7grqbx3IcnxoBgL5UeUuCgUsMeC2esgaYTthKh/n2/yYVvctaJtFQP9Dg7ghWljauul7viaH7OuQ0Jrxg+VIP1WrZiV834eiBOYmv93bhNV6OFGIx1ieqdSpSMs6s6bxhEES9a/h/ax0F+zG0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556652673; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=lGARhzleOi4IxW+M6Ne/XZz8lwFhWxIXT1S/eMv+Fvc=; b=ZTTl0gTEXvHIcvh8EXU73+F4d8B3aw59urzfoYxZrFCc/4Va0j6BCa38uDNk9Mx9fZbVEGFPm5AZJio/8fGOQQAGEwwqHuIkK/v6dB9k/Gr+YgnjFR8bt0vAlt+b+KEAPyeZPdiRXN98DpkotSMAEEllKLZ5PTir0Dfct9ViOYM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39866+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1556652673552883.5366026149766; Tue, 30 Apr 2019 12:31:13 -0700 (PDT) Return-Path: X-Received: from mga14.intel.com (mga14.intel.com []) by groups.io with SMTP; Tue, 30 Apr 2019 12:31:12 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2019 12:31:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,414,1549958400"; d="scan'208";a="320349798" X-Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.111.157]) by orsmga005.jf.intel.com with ESMTP; 30 Apr 2019 12:31:11 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Liming Gao , Laszlo Ersek Subject: [edk2-devel] [Patch V3 1/8] MdePkg: Add PcdSpeculationBarrierType Date: Tue, 30 Apr 2019 12:31:01 -0700 Message-Id: <20190430193108.8544-2-michael.d.kinney@intel.com> In-Reply-To: <20190430193108.8544-1-michael.d.kinney@intel.com> References: <20190430193108.8544-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1556652673; bh=3OXPoE2dR0N3IIvMqU5HHLpoVKSqHre+NPx/BfUibJM=; h=Cc:Date:From:Reply-To:Subject:To; b=h9Rdcdx2vsN3sW5cNElq2ACvKvEFhtdvQWj8BFHVb5KA9L5MRFFwdikCfRqhbX5HnYK K20J12g/rcatlgoY7mdg1i9N3YV/wmPsaXSp18Z7Q+cgPVEFtiHwLE8LH4b4y27mXBoX5 FzWKtw2QU9sAcYRfnSWx5SwHUDn9oercxks= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Add gEfiMdePkgTokenSpaceGuid.PcdSpeculationBarrierType that uses the PCD type FixedAtBuild. This performs a build time selection for the type of speculation barrier to use in the BaseLib function SpeculationBarrier(). The recommended speculation barrier for x86 is LFENCE and this is the default value for this PCD. x86 CPUs that do not support LFENCE must select one of the other supported values which includes CPUID and nothing. Cc: Liming Gao Signed-off-by: Michael D Kinney Reviewed-by: Laszlo Ersek Reviewed-by: Kelly Steele --- MdePkg/MdePkg.dec | 9 +++++++++ MdePkg/MdePkg.uni | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index e2ea8fff66..28d4a966c2 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -2062,6 +2062,15 @@ [PcdsFixedAtBuild] # @Prompt Enable control flow enforcement. gEfiMdePkgTokenSpaceGuid.PcdControlFlowEnforcementPropertyMask|0x0|UINT3= 2|0x30001017 =20 + ## Indicates the type of instruction sequence to use for a speculation + # barrier. The default instruction sequence is LFENCE.

+ # 0x00 - No operation.
+ # 0x01 - LFENCE (IA32/X64).
+ # 0x02 - CPUID (IA32/X64).
+ # Other - reserved + # @Prompt Speculation Barrier Type. + gEfiMdePkgTokenSpaceGuid.PcdSpeculationBarrierType|0x01|UINT8|0x30001018 + [PcdsFixedAtBuild,PcdsPatchableInModule] ## Indicates the maximum length of unicode string used in the following # BaseLib functions: StrLen(), StrSize(), StrCmp(), StrnCmp(), StrCpy()= , StrnCpy()

diff --git a/MdePkg/MdePkg.uni b/MdePkg/MdePkg.uni index c359bb4b5b..5c1fa24065 100644 --- a/MdePkg/MdePkg.uni +++ b/MdePkg/MdePkg.uni @@ -149,6 +149,14 @@ = " BIT0 - SMM CET Shadow Stack is enabled.
\n" = " Other - reserved" =20 +#string STR_gEfiMdePkgTokenSpaceGuid_PcdSpeculationBarrierType_PROMPT #la= nguage en-US "Speculation Barrier Type." + +#string STR_gEfiMdePkgTokenSpaceGuid_PcdSpeculationBarrierType_HELP #lang= uage en-US "Indicates the type of instruction sequence to use for a specul= ation.barrier. The default instruction sequence is LFENCE.

\n" + = "0x00 - No operation.
\n" + = "0x01 - LFENCE (IA32/X64).
\n" + = "0x02 - CPUID (IA32/X64).
\n" + = "Other - reserved" + #string STR_gEfiMdePkgTokenSpaceGuid_PcdMaximumAsciiStringLength_PROMPT #= language en-US "Maximum Length of Ascii String" =20 #string STR_gEfiMdePkgTokenSpaceGuid_PcdMaximumAsciiStringLength_HELP #la= nguage en-US "Sets the maximum number of ASCII characters used for string f= unctions. This affects the following BaseLib functions: AsciiStrLen(), Asc= iiStrSize(), AsciiStrCmp(), AsciiStrnCmp(), AsciiStrCpy(), AsciiStrnCpy(). =

\n" --=20 2.21.0.windows.1 -=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 (#39866): https://edk2.groups.io/g/devel/message/39866 Mute This Topic: https://groups.io/mt/31424366/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 18:00:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39867+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39867+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1556652673; cv=none; d=zoho.com; s=zohoarc; b=CrVSyZscFlzCLZKBpYeqtkIMp5fvNU1eDiYyQoYsS6UjTR7fUtNh7RgXrSqSzTBVEPAMqUd0aMlxFsSS+2/ZvH/rh4VyhX3AFVaYMdKLP19RCH3Uk4O/a/yUrguIMHTYgx/XeWv+QE5JpnwQU/tmbAwZtqKp7KQJwd2O1dJEM5A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556652673; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=Il/nD4M70Wne78KwoN4kWMY1+myoqBs/MXxUeYWudc0=; b=WkcXLIOnEdit9JkFj+QVw1EgLiaVPMk1EpWEEceBk0i2VwfBt7D27Iuljm7jRYJxso3//BY8FqWZbc9WakFmZ1uQPfV/RXnqGYDqR2io7ZUKaYk6U4oqDRziAqkbhaVI3YxYBi8JLB63C+XA3w5XJxbXaD4btS13z+q87yQCKeA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39867+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1556652673875216.95719028167457; Tue, 30 Apr 2019 12:31:13 -0700 (PDT) Return-Path: X-Received: from mga14.intel.com (mga14.intel.com []) by groups.io with SMTP; Tue, 30 Apr 2019 12:31:13 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2019 12:31:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,414,1549958400"; d="scan'208";a="320349801" X-Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.111.157]) by orsmga005.jf.intel.com with ESMTP; 30 Apr 2019 12:31:11 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Liming Gao , Laszlo Ersek Subject: [edk2-devel] [Patch V3 2/8] MdePkg/BaseLib: Use PcdSpeculationBarrierType Date: Tue, 30 Apr 2019 12:31:02 -0700 Message-Id: <20190430193108.8544-3-michael.d.kinney@intel.com> In-Reply-To: <20190430193108.8544-1-michael.d.kinney@intel.com> References: <20190430193108.8544-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1556652673; bh=SOdSah3gf4mdDQ0KSSnOGHGbdeoSpDntJW0xyU/0N7c=; h=Cc:Date:From:Reply-To:Subject:To; b=cpUX7xWcdaNBaJBQ0Wvp9vdUYJcsxG4HFiTrY3y0MTbzc/TOmN2WRa/X74iiTcNwcdq NE+Xrw7YDqKqLZkFr9yXJafYh5d3NRJmOioXp+IQjU3MAUEXnUH52lGfe7eBeDQlkVajJ orhKr8rxr9rQX3BkTmgqanQXABozjZRWQ0A= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Use PcdSpeculationBarrierType in the x86 implementation of SpeculationBarrier() to select between AsmLfence(), AsmCpuid(), and no operation. Cc: Liming Gao Signed-off-by: Michael D Kinney Reviewed-by: Laszlo Ersek Reviewed-by: Kelly Steele --- MdePkg/Library/BaseLib/BaseLib.inf | 1 + MdePkg/Library/BaseLib/X86SpeculationBarrier.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/Ba= seLib.inf index 533e83e0b2..3586beb0ab 100644 --- a/MdePkg/Library/BaseLib/BaseLib.inf +++ b/MdePkg/Library/BaseLib/BaseLib.inf @@ -394,6 +394,7 @@ [Pcd] gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength ## SOMETIMES_CO= NSUMES gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength ## SOMETIMES_CO= NSUMES gEfiMdePkgTokenSpaceGuid.PcdControlFlowEnforcementPropertyMask ## SOME= TIMES_CONSUMES + gEfiMdePkgTokenSpaceGuid.PcdSpeculationBarrierType ## SOMETIMES_CO= NSUMES =20 [FeaturePcd] gEfiMdePkgTokenSpaceGuid.PcdVerifyNodeInList ## CONSUMES diff --git a/MdePkg/Library/BaseLib/X86SpeculationBarrier.c b/MdePkg/Librar= y/BaseLib/X86SpeculationBarrier.c index 8e5f983bb8..b28fd8de9b 100644 --- a/MdePkg/Library/BaseLib/X86SpeculationBarrier.c +++ b/MdePkg/Library/BaseLib/X86SpeculationBarrier.c @@ -1,7 +1,7 @@ /** @file SpeculationBarrier() function for IA32 and x64. =20 - Copyright (C) 2018, Intel Corporation. All rights reserved.
+ Copyright (C) 2018 - 2019, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -22,5 +22,9 @@ SpeculationBarrier ( VOID ) { - AsmLfence (); + if (PcdGet8 (PcdSpeculationBarrierType) =3D=3D 0x01) { + AsmLfence (); + } else if (PcdGet8 (PcdSpeculationBarrierType) =3D=3D 0x02) { + AsmCpuid (0x01, NULL, NULL, NULL, NULL); + } } --=20 2.21.0.windows.1 -=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 (#39867): https://edk2.groups.io/g/devel/message/39867 Mute This Topic: https://groups.io/mt/31424369/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 18:00:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39868+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39868+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1556652674; cv=none; d=zoho.com; s=zohoarc; b=d3HdhA8m8Yhg69JEDPtTkWIh1D8VGFVL6LHn3uJ2PcOfSC51X1WqekZ3V39SKYubjVMG/uc1SZF6zuoygrcR/X0XM6cf27VPTaQZNE0wfWpSElYzMv7Yr7u88rD3OjibgfdnEHTj4MN+IFgaieA2r4AORE8BSu+b7aPa5bptib4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556652674; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=EikQFFBFj6p1+trnd5ENNSRNr3KpK8USWEMpblZikTM=; b=OmPiGwyhfbF91yR3w/gX72eMHbD4e0Ly+QZQVGZIcX4ioJgAoZ6Pf2L+ipK/I9UvZxYLUvhfaR1+/R/SGSAxWb3snXerIPbau+TFfWa9l6EaxYjs/B0Y225Vdi46/YGYmtCLZUpSFcC6/4ABLBKOSavm7R+H3mkUkLx2PvhejnU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39868+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1556652674322239.9900431825746; Tue, 30 Apr 2019 12:31:14 -0700 (PDT) Return-Path: X-Received: from mga14.intel.com (mga14.intel.com []) by groups.io with SMTP; Tue, 30 Apr 2019 12:31:13 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2019 12:31:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,414,1549958400"; d="scan'208";a="320349804" X-Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.111.157]) by orsmga005.jf.intel.com with ESMTP; 30 Apr 2019 12:31:12 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Kelly Steele , Liming Gao Subject: [edk2-devel] [Patch V3 3/8] QuarkPlatformPkg: Set PcdSpeculationBarrierType to CPUID Date: Tue, 30 Apr 2019 12:31:03 -0700 Message-Id: <20190430193108.8544-4-michael.d.kinney@intel.com> In-Reply-To: <20190430193108.8544-1-michael.d.kinney@intel.com> References: <20190430193108.8544-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1556652673; bh=LdXmGd3GgvZMwOaKyVWT5p5ivDMfL9G/CvlntjsXonY=; h=Cc:Date:From:Reply-To:Subject:To; b=RVsWibBFpgOlAG783SBU87qRZMCF4x3lhi1YUOXoSfHb5cyZUIezmxfJbcerpkWGve4 RPJ4Bq0AaIl7yyG7NmS73wMOmhFkfXl5yGFUyqdyuPoUT6P/eltvtPttUCIzs4jrVBa33 SCGMDQVo3D46TWIoZ5NZWFjPkQu3nzQ807Y= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Set PcdSpeculationBarrierType to use CPUID instead of the default LFENCE in the BaseLib function SpeculationBarrier(). LFENCE requires SSE2, and Quark platforms do not support SSE2. Cc: Kelly Steele Cc: Liming Gao Signed-off-by: Michael D Kinney Reviewed-by: Kelly Steele Reviewed-by: Michael Kubacki --- QuarkPlatformPkg/Quark.dsc | 7 ++++++- QuarkPlatformPkg/QuarkMin.dsc | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc index 422fd9cf8d..96ddc1565a 100644 --- a/QuarkPlatformPkg/Quark.dsc +++ b/QuarkPlatformPkg/Quark.dsc @@ -2,7 +2,7 @@ # Clanton Peak CRB platform with 32-bit DXE for 4MB/8MB flash devices. # # This package provides Clanton Peak CRB platform specific modules. -# Copyright (c) 2013 - 2018 Intel Corporation. +# Copyright (c) 2013 - 2019 Intel Corporation. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -448,6 +448,11 @@ [PcdsFixedAtBuild] gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName|L"QUARKREC.Cap" !endif =20 + # + # Quark does not support LFENCE. Use CPUID as speculation barrier + # + gEfiMdePkgTokenSpaceGuid.PcdSpeculationBarrierType|0x02 + [PcdsPatchableInModule] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x803000C7 gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0 diff --git a/QuarkPlatformPkg/QuarkMin.dsc b/QuarkPlatformPkg/QuarkMin.dsc index 00e2febb54..8ca75bc474 100644 --- a/QuarkPlatformPkg/QuarkMin.dsc +++ b/QuarkPlatformPkg/QuarkMin.dsc @@ -406,6 +406,11 @@ [PcdsFixedAtBuild] =20 gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand|FALSE =20 + # + # Quark does not support LFENCE. Use CPUID as speculation barrier + # + gEfiMdePkgTokenSpaceGuid.PcdSpeculationBarrierType|0x02 + [PcdsPatchableInModule] gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x803000C7 gEfiMdeModulePkgTokenSpaceGuid.PcdVpdBaseAddress|0x0 --=20 2.21.0.windows.1 -=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 (#39868): https://edk2.groups.io/g/devel/message/39868 Mute This Topic: https://groups.io/mt/31424370/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 18:00:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39870+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39870+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1556652674; cv=none; d=zoho.com; s=zohoarc; b=FwD6Y0yZhjo5KG8zflxhyb79UOiLQDJHkNFMW4o9/tgpNGAJKDSUS34QJ8CvIVO07Y7d14VHUurag7bgd8mqGnj69G2NJBmPPNTN0dY/XqVsBxtT4aNP0k+OBemYOCngNMujMPCLhXqycaa/5j7NrwVqjuL0OO2qXSsPPVJUK+o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556652674; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=lKLaRSOi2JgYiXDcXd3goldRkXoJA1NaePwkCeECW0M=; b=lSTan95PWldbYUAhxmcIYL42SjFqDdLVJL5Wl7oQ8Q5dvsOCsFR60IvtvGW/XVFojtgiBkEI0x23VhHpFa1DllqfQkcYIXy03YvxLGz96U00G/MdZjVQNCBUz2pLMUirpy1SEQ8AviqpRLO7iHVjYzd3wGN9dB8PDTmfgjLnuMs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39870+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1556652674668197.41948894040468; Tue, 30 Apr 2019 12:31:14 -0700 (PDT) Return-Path: X-Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by groups.io with SMTP; Tue, 30 Apr 2019 12:31:13 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2019 12:31:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,414,1549958400"; d="scan'208";a="320349807" X-Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.111.157]) by orsmga005.jf.intel.com with ESMTP; 30 Apr 2019 12:31:12 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Laszlo Ersek Subject: [edk2-devel] [Patch V3 4/8] UefiCpuPkg/MpInitLibUp: Add uniprocessor MpInitLib Date: Tue, 30 Apr 2019 12:31:04 -0700 Message-Id: <20190430193108.8544-5-michael.d.kinney@intel.com> In-Reply-To: <20190430193108.8544-1-michael.d.kinney@intel.com> References: <20190430193108.8544-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1556652674; bh=Jdeekw2Iz3XPJx3l/eVlWW9iEETAGvHHTIbjFA1gFfA=; h=Cc:Date:From:Reply-To:Subject:To; b=cW75LLtqWvd1yixZYqjbK5UVcGuWNbSWd8PJysDyOZca342Hgthzq4YobmohVB9Qwd/ wwQJnSjeqArxsxqcbgwsc3DVfQZf23xuZOQpmRKYRDsQz/mcSHcN2hbywZ4B3I4i+gbTR qc+ie49iVi6UQiP08UR1Zf5Bo4xH1YEWTV4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Add a new instance of the MpInitLib that is designed for uniprocessor platforms that require the use of modules that depend on the MP_SERVICES_PROTOCOL for dispatch or to retrieve information about the boot processor. Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Signed-off-by: Michael D Kinney Reviewed-by: Kelly Steele Reviewed-by: Laszlo Ersek Reviewed-by: Ray Ni --- UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 407 ++++++++++++++++++ .../Library/MpInitLibUp/MpInitLibUp.inf | 37 ++ .../Library/MpInitLibUp/MpInitLibUp.uni | 14 + UefiCpuPkg/UefiCpuPkg.dsc | 3 +- 4 files changed, 460 insertions(+), 1 deletion(-) create mode 100644 UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c create mode 100644 UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf create mode 100644 UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.uni diff --git a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c b/UefiCpuPkg/Libr= ary/MpInitLibUp/MpInitLibUp.c new file mode 100644 index 0000000000..36c2bb5326 --- /dev/null +++ b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c @@ -0,0 +1,407 @@ +/** @file + Multiple-Processor initialization Library for uniprocessor platforms. + + Copyright (c) 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include +#include +#include +#include + +/** + MP Initialize Library initialization. + + This service will allocate AP reset vector and wakeup all APs to do APs + initialization. + + This service must be invoked before all other MP Initialize Library + service are invoked. + + @retval EFI_SUCCESS MP initialization succeeds. + @retval Others MP initialization fails. + +**/ +EFI_STATUS +EFIAPI +MpInitLibInitialize ( + VOID + ) +{ + // + // Enable the local APIC for Virtual Wire Mode. + // + ProgramVirtualWireMode (); + + return EFI_SUCCESS; +} + +/** + Retrieves the number of logical processor in the platform and the number= of + those logical processors that are enabled on this boot. This service may= only + be called from the BSP. + + @param[out] NumberOfProcessors Pointer to the total number of l= ogical + processors in the system, includ= ing the BSP + and disabled APs. + @param[out] NumberOfEnabledProcessors Pointer to the number of enabled= logical + processors that exist in system,= including + the BSP. + + @retval EFI_SUCCESS The number of logical processors and ena= bled + logical processors was retrieved. + @retval EFI_DEVICE_ERROR The calling processor is an AP. + @retval EFI_INVALID_PARAMETER NumberOfProcessors is NULL and NumberOfE= nabledProcessors + is NULL. + @retval EFI_NOT_READY MP Initialize Library is not initialized. + +**/ +EFI_STATUS +EFIAPI +MpInitLibGetNumberOfProcessors ( + OUT UINTN *NumberOfProcessors, OPTIONAL + OUT UINTN *NumberOfEnabledProcessors OPTIONAL + ) +{ + *NumberOfProcessors =3D 1; + *NumberOfEnabledProcessors =3D 1; + return EFI_SUCCESS; +} + +/** + Gets detailed MP-related information on the requested processor at the + instant this call is made. This service may only be called from the BSP. + + @param[in] ProcessorNumber The handle number of processor. + @param[out] ProcessorInfoBuffer A pointer to the buffer where informat= ion for + the requested processor is deposited. + @param[out] HealthData Return processor health data. + + @retval EFI_SUCCESS Processor information was returned. + @retval EFI_DEVICE_ERROR The calling processor is an AP. + @retval EFI_INVALID_PARAMETER ProcessorInfoBuffer is NULL. + @retval EFI_NOT_FOUND The processor with the handle specified = by + ProcessorNumber does not exist in the pl= atform. + @retval EFI_NOT_READY MP Initialize Library is not initialized. + +**/ +EFI_STATUS +EFIAPI +MpInitLibGetProcessorInfo ( + IN UINTN ProcessorNumber, + OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer, + OUT EFI_HEALTH_FLAGS *HealthData OPTIONAL + ) +{ + EFI_HOB_GUID_TYPE *GuidHob; + EFI_SEC_PLATFORM_INFORMATION_RECORD *SecPlatformInformation; + + if (ProcessorInfoBuffer =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + if (ProcessorNumber !=3D 0) { + return EFI_NOT_FOUND; + } + ProcessorInfoBuffer->ProcessorId =3D 0; + ProcessorInfoBuffer->StatusFlag =3D PROCESSOR_AS_BSP_BIT | + PROCESSOR_ENABLED_BIT | + PROCESSOR_HEALTH_STATUS_BIT; + ProcessorInfoBuffer->Location.Package =3D 0; + ProcessorInfoBuffer->Location.Core =3D 0; + ProcessorInfoBuffer->Location.Thread =3D 0; + if (HealthData !=3D NULL) { + GuidHob =3D GetFirstGuidHob (&gEfiSecPlatformInformationPpiGuid); + if (GuidHob !=3D NULL) { + SecPlatformInformation =3D GET_GUID_HOB_DATA (GuidHob); + HealthData->Uint32 =3D SecPlatformInformation->IA32HealthFlags.Uint3= 2; + } else { + DEBUG ((DEBUG_INFO, "Does not find any HOB stored CPU BIST informati= on!\n")); + HealthData->Uint32 =3D 0; + } + } + return EFI_SUCCESS; +} + +/** + This service executes a caller provided function on all enabled APs. + + @param[in] Procedure A pointer to the function to be run = on + enabled APs of the system. See type + EFI_AP_PROCEDURE. + @param[in] SingleThread If TRUE, then all the enabled APs ex= ecute + the function specified by Procedure = one by + one, in ascending order of processor= handle + number. If FALSE, then all the enab= led APs + execute the function specified by Pr= ocedure + simultaneously. + @param[in] WaitEvent The event created by the caller with= CreateEvent() + service. If it is NULL, then execut= e in + blocking mode. BSP waits until all A= Ps finish + or TimeoutInMicroSeconds expires. I= f it's + not NULL, then execute in non-blocki= ng mode. + BSP requests the function specified = by + Procedure to be started on all the e= nabled + APs, and go on executing immediately= . If + all return from Procedure, or Timeou= tInMicroSeconds + expires, this event is signaled. The= BSP + can use the CheckEvent() or WaitForE= vent() + services to check the state of event= . Type + EFI_EVENT is defined in CreateEvent(= ) in + the Unified Extensible Firmware Inte= rface + Specification. + @param[in] TimeoutInMicroseconds Indicates the time limit in microsec= onds for + APs to return from Procedure, either= for + blocking or non-blocking mode. Zero = means + infinity. If the timeout expires be= fore + all APs return from Procedure, then = Procedure + on the failed APs is terminated. All= enabled + APs are available for next function = assigned + by MpInitLibStartupAllAPs() or + MPInitLibStartupThisAP(). + If the timeout expires in blocking m= ode, + BSP returns EFI_TIMEOUT. If the tim= eout + expires in non-blocking mode, WaitEv= ent + is signaled with SignalEvent(). + @param[in] ProcedureArgument The parameter passed into Procedure = for + all APs. + @param[out] FailedCpuList If NULL, this parameter is ignored. = Otherwise, + if all APs finish successfully, then= its + content is set to NULL. If not all A= Ps + finish before timeout expires, then = its + content is set to address of the buf= fer + holding handle numbers of the failed= APs. + The buffer is allocated by MP Initia= lization + library, and it's the caller's respo= nsibility to + free the buffer with FreePool() serv= ice. + In blocking mode, it is ready for co= nsumption + when the call returns. In non-blocki= ng mode, + it is ready when WaitEvent is signal= ed. The + list of failed CPU is terminated by + END_OF_CPU_LIST. + + @retval EFI_SUCCESS In blocking mode, all APs have finished = before + the timeout expired. + @retval EFI_SUCCESS In non-blocking mode, function has been = dispatched + to all enabled APs. + @retval EFI_UNSUPPORTED A non-blocking mode request was made aft= er the + UEFI event EFI_EVENT_GROUP_READY_TO_BOOT= was + signaled. + @retval EFI_UNSUPPORTED WaitEvent is not NULL if non-blocking mo= de is not + supported. + @retval EFI_DEVICE_ERROR Caller processor is AP. + @retval EFI_NOT_STARTED No enabled APs exist in the system. + @retval EFI_NOT_READY Any enabled APs are busy. + @retval EFI_NOT_READY MP Initialize Library is not initialized. + @retval EFI_TIMEOUT In blocking mode, the timeout expired be= fore + all enabled APs have finished. + @retval EFI_INVALID_PARAMETER Procedure is NULL. + +**/ +EFI_STATUS +EFIAPI +MpInitLibStartupAllAPs ( + IN EFI_AP_PROCEDURE Procedure, + IN BOOLEAN SingleThread, + IN EFI_EVENT WaitEvent OPTIONAL, + IN UINTN TimeoutInMicroseconds, + IN VOID *ProcedureArgument OPTIONAL, + OUT UINTN **FailedCpuList OPTIONAL + ) +{ + return EFI_NOT_STARTED; +} + +/** + This service lets the caller get one enabled AP to execute a caller-prov= ided + function. + + @param[in] Procedure A pointer to the function to be run = on the + designated AP of the system. See type + EFI_AP_PROCEDURE. + @param[in] ProcessorNumber The handle number of the AP. The ran= ge is + from 0 to the total number of logical + processors minus 1. The total number= of + logical processors can be retrieved = by + MpInitLibGetNumberOfProcessors(). + @param[in] WaitEvent The event created by the caller with= CreateEvent() + service. If it is NULL, then execut= e in + blocking mode. BSP waits until this = AP finish + or TimeoutInMicroSeconds expires. I= f it's + not NULL, then execute in non-blocki= ng mode. + BSP requests the function specified = by + Procedure to be started on this AP, + and go on executing immediately. If = this AP + return from Procedure or TimeoutInMi= croSeconds + expires, this event is signaled. The= BSP + can use the CheckEvent() or WaitForE= vent() + services to check the state of event= . Type + EFI_EVENT is defined in CreateEvent(= ) in + the Unified Extensible Firmware Inte= rface + Specification. + @param[in] TimeoutInMicroseconds Indicates the time limit in microsec= onds for + this AP to finish this Procedure, ei= ther for + blocking or non-blocking mode. Zero = means + infinity. If the timeout expires be= fore + this AP returns from Procedure, then= Procedure + on the AP is terminated. The + AP is available for next function as= signed + by MpInitLibStartupAllAPs() or + MpInitLibStartupThisAP(). + If the timeout expires in blocking m= ode, + BSP returns EFI_TIMEOUT. If the tim= eout + expires in non-blocking mode, WaitEv= ent + is signaled with SignalEvent(). + @param[in] ProcedureArgument The parameter passed into Procedure = on the + specified AP. + @param[out] Finished If NULL, this parameter is ignored. = In + blocking mode, this parameter is ign= ored. + In non-blocking mode, if AP returns = from + Procedure before the timeout expires= , its + content is set to TRUE. Otherwise, t= he + value is set to FALSE. The caller can + determine if the AP returned from Pr= ocedure + by evaluating this value. + + @retval EFI_SUCCESS In blocking mode, specified AP finished = before + the timeout expires. + @retval EFI_SUCCESS In non-blocking mode, the function has b= een + dispatched to specified AP. + @retval EFI_UNSUPPORTED A non-blocking mode request was made aft= er the + UEFI event EFI_EVENT_GROUP_READY_TO_BOOT= was + signaled. + @retval EFI_UNSUPPORTED WaitEvent is not NULL if non-blocking mo= de is not + supported. + @retval EFI_DEVICE_ERROR The calling processor is an AP. + @retval EFI_TIMEOUT In blocking mode, the timeout expired be= fore + the specified AP has finished. + @retval EFI_NOT_READY The specified AP is busy. + @retval EFI_NOT_READY MP Initialize Library is not initialized. + @retval EFI_NOT_FOUND The processor with the handle specified = by + ProcessorNumber does not exist. + @retval EFI_INVALID_PARAMETER ProcessorNumber specifies the BSP or dis= abled AP. + @retval EFI_INVALID_PARAMETER Procedure is NULL. + +**/ +EFI_STATUS +EFIAPI +MpInitLibStartupThisAP ( + IN EFI_AP_PROCEDURE Procedure, + IN UINTN ProcessorNumber, + IN EFI_EVENT WaitEvent OPTIONAL, + IN UINTN TimeoutInMicroseconds, + IN VOID *ProcedureArgument OPTIONAL, + OUT BOOLEAN *Finished OPTIONAL + ) +{ + return EFI_INVALID_PARAMETER; +} + +/** + This service switches the requested AP to be the BSP from that point onw= ard. + This service changes the BSP for all purposes. This call can only be per= formed + by the current BSP. + + @param[in] ProcessorNumber The handle number of AP that is to become t= he new + BSP. The range is from 0 to the total numbe= r of + logical processors minus 1. The total numbe= r of + logical processors can be retrieved by + MpInitLibGetNumberOfProcessors(). + @param[in] EnableOldBSP If TRUE, then the old BSP will be listed as= an + enabled AP. Otherwise, it will be disabled. + + @retval EFI_SUCCESS BSP successfully switched. + @retval EFI_UNSUPPORTED Switching the BSP cannot be completed pr= ior to + this service returning. + @retval EFI_UNSUPPORTED Switching the BSP is not supported. + @retval EFI_DEVICE_ERROR The calling processor is an AP. + @retval EFI_NOT_FOUND The processor with the handle specified = by + ProcessorNumber does not exist. + @retval EFI_INVALID_PARAMETER ProcessorNumber specifies the current BS= P or + a disabled AP. + @retval EFI_NOT_READY The specified AP is busy. + @retval EFI_NOT_READY MP Initialize Library is not initialized. + +**/ +EFI_STATUS +EFIAPI +MpInitLibSwitchBSP ( + IN UINTN ProcessorNumber, + IN BOOLEAN EnableOldBSP + ) +{ + return EFI_UNSUPPORTED; +} + +/** + This service lets the caller enable or disable an AP from this point onw= ard. + This service may only be called from the BSP. + + @param[in] ProcessorNumber The handle number of AP. + The range is from 0 to the total number of + logical processors minus 1. The total numbe= r of + logical processors can be retrieved by + MpInitLibGetNumberOfProcessors(). + @param[in] EnableAP Specifies the new state for the processor f= or + enabled, FALSE for disabled. + @param[in] HealthFlag If not NULL, a pointer to a value that spec= ifies + the new health status of the AP. This flag + corresponds to StatusFlag defined in + EFI_MP_SERVICES_PROTOCOL.GetProcessorInfo()= . Only + the PROCESSOR_HEALTH_STATUS_BIT is used. Al= l other + bits are ignored. If it is NULL, this para= meter + is ignored. + + @retval EFI_SUCCESS The specified AP was enabled or disabled= successfully. + @retval EFI_UNSUPPORTED Enabling or disabling an AP cannot be co= mpleted + prior to this service returning. + @retval EFI_UNSUPPORTED Enabling or disabling an AP is not suppo= rted. + @retval EFI_DEVICE_ERROR The calling processor is an AP. + @retval EFI_NOT_FOUND Processor with the handle specified by P= rocessorNumber + does not exist. + @retval EFI_INVALID_PARAMETER ProcessorNumber specifies the BSP. + @retval EFI_NOT_READY MP Initialize Library is not initialized. + +**/ +EFI_STATUS +EFIAPI +MpInitLibEnableDisableAP ( + IN UINTN ProcessorNumber, + IN BOOLEAN EnableAP, + IN UINT32 *HealthFlag OPTIONAL + ) +{ + return EFI_UNSUPPORTED; +} + +/** + This return the handle number for the calling processor. This service m= ay be + called from the BSP and APs. + + @param[out] ProcessorNumber Pointer to the handle number of AP. + The range is from 0 to the total number of + logical processors minus 1. The total numbe= r of + logical processors can be retrieved by + MpInitLibGetNumberOfProcessors(). + + @retval EFI_SUCCESS The current processor handle number was = returned + in ProcessorNumber. + @retval EFI_INVALID_PARAMETER ProcessorNumber is NULL. + @retval EFI_NOT_READY MP Initialize Library is not initialized. + +**/ +EFI_STATUS +EFIAPI +MpInitLibWhoAmI ( + OUT UINTN *ProcessorNumber + ) +{ + if (ProcessorNumber =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + *ProcessorNumber =3D 0; + return EFI_SUCCESS; +} diff --git a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf b/UefiCpuPkg/Li= brary/MpInitLibUp/MpInitLibUp.inf new file mode 100644 index 0000000000..24ad29c03c --- /dev/null +++ b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf @@ -0,0 +1,37 @@ +## @file +# MP Initialize Library instance for uniprocessor platforms. +# +# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D MpInitLibUp + MODULE_UNI_FILE =3D MpInitLibUp.uni + FILE_GUID =3D 70E9818C-A4F0-4061-9FA2-2DFFC7016D6E + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.1 + LIBRARY_CLASS =3D MpInitLib + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D IA32 X64 +# + +[Sources] + MpInitLibUp.c + +[Packages] + MdePkg/MdePkg.dec + UefiCpuPkg/UefiCpuPkg.dec + +[LibraryClasses] + DebugLib + LocalApicLib + HobLib + +[Ppis] + gEfiSecPlatformInformationPpiGuid ## SOMETIMES_CONSUMES diff --git a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.uni b/UefiCpuPkg/Li= brary/MpInitLibUp/MpInitLibUp.uni new file mode 100644 index 0000000000..ca1ab94379 --- /dev/null +++ b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.uni @@ -0,0 +1,14 @@ +// /** @file +// MP Initialize Library instance for uniprocessor platforms. +// +// MP Initialize Library instance for uniprocessor platforms. +// +// Copyright (c) 2019, Intel Corporation. All rights reserved.
+// +// SPDX-License-Identifier: BSD-2-Clause-Patent +// +// **/ + +#string STR_MODULE_ABSTRACT #language en-US "MP Initialize Lib= rary instance for uniprocessor platforms." + +#string STR_MODULE_DESCRIPTION #language en-US "MP Initialize Lib= rary instance for uniprocessor platforms." diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc index 9ed2f79648..bf690d3978 100644 --- a/UefiCpuPkg/UefiCpuPkg.dsc +++ b/UefiCpuPkg/UefiCpuPkg.dsc @@ -1,7 +1,7 @@ ## @file # UefiCpuPkg Package # -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -124,6 +124,7 @@ [Components.IA32, Components.X64] UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf + UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf UefiCpuPkg/Library/MtrrLib/MtrrLib.inf UefiCpuPkg/Library/PlatformSecLibNull/PlatformSecLibNull.inf UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.inf --=20 2.21.0.windows.1 -=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 (#39870): https://edk2.groups.io/g/devel/message/39870 Mute This Topic: https://groups.io/mt/31424372/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 18:00:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39869+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39869+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1556652674; cv=none; d=zoho.com; s=zohoarc; b=B1b5zvkSgKXWfvXwEUrqqcZleaiaZ24VRkUqoWpsKHCW/zMtGM+YGziXxfBuMzCIWwoz76OUriu5KluHgYC1RWYtyHQ/eO3kzMEiimfMx3cdot9ZrTX2hgrcvSubmuuKqFiVgzTe5j0Pm2xooQUYjULo4HCn7k+n+5FMxbakTNU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556652674; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=yK5vy/0m8r/CBG3Ns4GRJCnVX19LThTLrnlzVZfdttY=; b=aO32zeRPTasySAGTPIeAUx4UkCHCGR/9BS87LUD+ohKFidkqXURjV5iI6ULR3giJzFEwZ6dv4gM2syfuKsam9w0iT4VEjtD+zLtK20/UdV1FiZ06fraNozEBAAyeq3p5ayuzEcanQnN6zDxtDTh4X+fRk39kkOIdozUUVUTqwew= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39869+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1556652674359771.9499484567514; Tue, 30 Apr 2019 12:31:14 -0700 (PDT) Return-Path: X-Received: from mga14.intel.com (mga14.intel.com []) by groups.io with SMTP; Tue, 30 Apr 2019 12:31:13 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2019 12:31:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,414,1549958400"; d="scan'208";a="320349810" X-Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.111.157]) by orsmga005.jf.intel.com with ESMTP; 30 Apr 2019 12:31:12 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Laszlo Ersek Subject: [edk2-devel] [Patch V3 5/8] UefiCPuPkg/CpuMpPei: Add missing CpuLib class Date: Tue, 30 Apr 2019 12:31:05 -0700 Message-Id: <20190430193108.8544-6-michael.d.kinney@intel.com> In-Reply-To: <20190430193108.8544-1-michael.d.kinney@intel.com> References: <20190430193108.8544-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1556652674; bh=nhYLNXOK+PHeo/xFm1L7QwRV9crQ0WqeWTgQztqxExU=; h=Cc:Date:From:Reply-To:Subject:To; b=m39dJ6B+vCpU0WNNtTUw0i0+OUG11cdntTbtlI2kDfU7sWQsCe+2nXMswqVvSmOXbGh 2zS5kFDVYwyyszkDgeo/mSG0skC0fBUlP3xlDnVvyFc1uveMwmDdRmCWqr03+Jy1Cs2Wf fNEFL7vAOiNYuLC4E0+sCQh491aMajFAhqA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The CpuMpPei module uses a services from the CpuLib class, but the CpuLib class is missing from the INF file. This update is required to use the new MpInitLibUp instance that does not use the CpuLib class. Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Signed-off-by: Michael D Kinney Reviewed-by: Kelly Steele Reviewed-by: Laszlo Ersek --- UefiCpuPkg/CpuMpPei/CpuMpPei.inf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.inf b/UefiCpuPkg/CpuMpPei/CpuMpPe= i.inf index 14ec75f254..4fc4ea77ba 100644 --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.inf +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.inf @@ -1,7 +1,7 @@ ## @file # CPU driver installs CPU PI Multi-processor PPI. # -# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -43,6 +43,7 @@ [LibraryClasses] CpuExceptionHandlerLib MpInitLib BaseMemoryLib + CpuLib =20 [Ppis] gEfiPeiMpServicesPpiGuid ## PRODUCES --=20 2.21.0.windows.1 -=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 (#39869): https://edk2.groups.io/g/devel/message/39869 Mute This Topic: https://groups.io/mt/31424371/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 18:00:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39872+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39872+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1556652674; cv=none; d=zoho.com; s=zohoarc; b=RqVzqG8I+gVWCAdwB2ztIOL6XdAkrXnOrisgS8KYxfb18xb+kBX3fovIwCuNOo+4lHFwOA6RVkDqKwHwURJ6PzsPwFdBlkG6FlhAM8cBPP/BF/188zqskV69otWFP/KMcR/TFxKiOj1OIndijbV020B39d7TnS0h8wBtFjRi3oM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556652674; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=H9oPZDayrOySixaKDKRuWr1ClPeOVpcMAjoq168Vx4I=; b=oeOVOsc36PyFZ9kEct0WF8eoevpckW1gMR58us1c9+uiEVhSDX7vWUYOngOmZwZt6sIIWwbpN4IzRz6Q5gDq9IJsHI1BkOHH2g+LNSFHIBmKxpdDFyRjNboahji4eU2SyjgqVGQV+sRz1LW4hcM3cbm8hp0dxhE1gUwKCR7ZDio= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39872+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 155665267476935.873752963309585; Tue, 30 Apr 2019 12:31:14 -0700 (PDT) Return-Path: X-Received: from mga14.intel.com (mga14.intel.com []) by groups.io with SMTP; Tue, 30 Apr 2019 12:31:13 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2019 12:31:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,414,1549958400"; d="scan'208";a="320349813" X-Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.111.157]) by orsmga005.jf.intel.com with ESMTP; 30 Apr 2019 12:31:12 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Kelly Steele , Liming Gao Subject: [edk2-devel] [Patch V3 6/8] QuarkPlatformPkg: Use uniprocessor MpInitLibUp Date: Tue, 30 Apr 2019 12:31:06 -0700 Message-Id: <20190430193108.8544-7-michael.d.kinney@intel.com> In-Reply-To: <20190430193108.8544-1-michael.d.kinney@intel.com> References: <20190430193108.8544-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1556652674; bh=oheRPddBAff9cjuj6UBCvonXY2qkSvamkbqrO3tZYXA=; h=Cc:Date:From:Reply-To:Subject:To; b=VZjD/c0ASB/icN9XyKCSl/vWHng3hTvt6UEKsiAs6t6atIWFejaBA4fW+dy8alRZGhu xLMMw6g2zhPYLYboR3/sQmmYHo8OmVA8IORpPLwjMhtJj/hOGXJEhK5MzOqiLTuZx8cxZ 2nGTV1pvFNJI0u3YeSF295Di3cw7EN62cl4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Update Quark DSC files to use MpInitLibUp instead of DxeMpInitLib and PeiMpInitLib. Cc: Kelly Steele Cc: Liming Gao Signed-off-by: Michael D Kinney Reviewed-by: Kelly Steele Reviewed-by: Michael Kubacki --- QuarkPlatformPkg/Quark.dsc | 3 +-- QuarkPlatformPkg/QuarkMin.dsc | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/QuarkPlatformPkg/Quark.dsc b/QuarkPlatformPkg/Quark.dsc index 96ddc1565a..e5ebeb5e09 100644 --- a/QuarkPlatformPkg/Quark.dsc +++ b/QuarkPlatformPkg/Quark.dsc @@ -195,7 +195,7 @@ [LibraryClasses] # MtrrLib|QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.inf LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf - MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf + MpInitLib|UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf =20 # # Quark North Cluster @@ -261,7 +261,6 @@ [LibraryClasses.IA32.PEIM,LibraryClasses.IA32.PEI_CORE] TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf PlatformHelperLib|QuarkPlatformPkg/Library/PlatformHelperLib/PeiPlatform= HelperLib.inf CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiC= puExceptionHandlerLib.inf - MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf !if $(PERFORMANCE_ENABLE) PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.= inf diff --git a/QuarkPlatformPkg/QuarkMin.dsc b/QuarkPlatformPkg/QuarkMin.dsc index 8ca75bc474..c95a5fcff9 100644 --- a/QuarkPlatformPkg/QuarkMin.dsc +++ b/QuarkPlatformPkg/QuarkMin.dsc @@ -167,7 +167,7 @@ [LibraryClasses] # MtrrLib|QuarkSocPkg/QuarkNorthCluster/Library/MtrrLib/MtrrLib.inf LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf - MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf + MpInitLib|UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf =20 # # Quark North Cluster @@ -219,7 +219,6 @@ [LibraryClasses.IA32.PEIM,LibraryClasses.IA32.PEI_CORE] TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf PlatformHelperLib|QuarkPlatformPkg/Library/PlatformHelperLib/PeiPlatform= HelperLib.inf CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiC= puExceptionHandlerLib.inf - MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf !if $(SECURE_BOOT_ENABLE) BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf !endif --=20 2.21.0.windows.1 -=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 (#39872): https://edk2.groups.io/g/devel/message/39872 Mute This Topic: https://groups.io/mt/31424374/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 18:00:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39873+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39873+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1556652674; cv=none; d=zoho.com; s=zohoarc; b=fvrUrCcBMBGq6foQalKHK/DlpYiPUCS0DByEMtS032rjEf2dlI2v46trDXQU/6CvnjX5snRWm1NaZaCq3QxNy5JxMAJQSf4hUpb2I6oxGh/50LvtcMEM4+a1L8xb+u9CwnTgeUeU9ijGWRFv1H0zJDWrnNct6pkhNXXbfys6Z7A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556652674; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=hg2H1eoQxj8PpNPXPqt90op5ceebtQ1XPophj05VkIU=; b=KeyNHKdPr/ycG4EMZmnARWu5opYWWA0tcegtmINsAtp9vy3GpHPoVQAU5AGTangP8mhFX6qzHrzLNNAqrf6QrGwBS+F6PdF7IM/GagD3nx+afuu5RQV8DfUX45lZsWfN4OyU6HO2L/yIr8ImrRj1fYancg2IrWRXdmOLXj3kI5E= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39873+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1556652674906924.2918673053612; Tue, 30 Apr 2019 12:31:14 -0700 (PDT) Return-Path: X-Received: from mga06.intel.com (mga06.intel.com []) by groups.io with SMTP; Tue, 30 Apr 2019 12:31:14 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2019 12:31:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,414,1549958400"; d="scan'208";a="320349816" X-Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.111.157]) by orsmga005.jf.intel.com with ESMTP; 30 Apr 2019 12:31:12 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Kelly Steele Subject: [edk2-devel] [Patch V3 7/8] QuarkSocPkg/SmmAccessDxe: Set region to UC on SMRAM close Date: Tue, 30 Apr 2019 12:31:07 -0700 Message-Id: <20190430193108.8544-8-michael.d.kinney@intel.com> In-Reply-To: <20190430193108.8544-1-michael.d.kinney@intel.com> References: <20190430193108.8544-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1556652674; bh=06J/MmAnl3BtdfTh/Bjv7Lhyl+Hvdp5D4gf7wk535Ek=; h=Cc:Date:From:Reply-To:Subject:To; b=h6zESxaFi2WHzIYHk44Bn5IpqrcmbwA+cerQrXX9Wwl63PRXDZn4lSRqMpqw9EtXmQ7 C9KaSXcWaORlVepQRNkgiTtyo9b0NZVIChILu9DC6c8EVio2iQ/wCRzfo4CQEQowO/F/U zHHoZ2Wt7la47qEErGAPajGy2qFJ5cTkYhk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The following commit removed the unconditional UC setting just prior to closing the SMRAM region. This is a correct change for most platforms. https://github.com/tianocore/edk2/commit/bfc87aa78e77ed15b09d1b4499c5eab63e= 8842bb The Quark platforms still require this UC setting, so move the UC setting into the Quark specific SMM Access Protocol when the Close() service is called. Cc: Kelly Steele Signed-off-by: Michael D Kinney Reviewed-by: Kelly Steele --- .../Smm/Dxe/SmmAccessDxe/SmmAccess.inf | 3 ++- .../Smm/Dxe/SmmAccessDxe/SmmAccessDriver.c | 18 +++++++++++++++++- .../Smm/Dxe/SmmAccessDxe/SmmAccessDriver.h | 3 ++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccess.i= nf b/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccess.inf index db916f686a..405e9eb7fd 100644 --- a/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccess.inf +++ b/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccess.inf @@ -1,7 +1,7 @@ ## @file # Component description file for SmmAccess module # -# Copyright (c) 2013-2015 Intel Corporation. +# Copyright (c) 2013-2019 Intel Corporation. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -34,6 +34,7 @@ [LibraryClasses] S3BootScriptLib UefiDriverEntryPoint UefiBootServicesTableLib + DxeServicesTableLib PcdLib SmmLib =20 diff --git a/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccessDr= iver.c b/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccessDriver= .c index 6148dea1b4..830f8b83c3 100644 --- a/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccessDriver.c +++ b/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccessDriver.c @@ -2,7 +2,7 @@ This is the driver that publishes the SMM Access Protocol instance for the Tylersburg chipset. =20 -Copyright (c) 2013-2015 Intel Corporation. +Copyright (c) 2013-2019 Intel Corporation. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -221,6 +221,7 @@ Returns: =20 --*/ { + EFI_STATUS Status; SMM_ACCESS_PRIVATE_DATA *SmmAccess; BOOLEAN OpenState; UINTN Index; @@ -239,6 +240,21 @@ Returns: return EFI_DEVICE_ERROR; } =20 + // + // Reset SMRAM cacheability to UC + // + for (Index =3D 0; Index < mSmmAccess.NumberRegions; Index++) { + DEBUG ((DEBUG_INFO, "SmmAccess->Close: Set to UC Base=3D%016lx Size= =3D%016lx\n", SmmAccess->SmramDesc[Index].CpuStart, SmmAccess->SmramDesc[In= dex].PhysicalSize)); + Status =3D gDS->SetMemorySpaceAttributes( + SmmAccess->SmramDesc[Index].CpuStart, + SmmAccess->SmramDesc[Index].PhysicalSize, + EFI_MEMORY_UC + ); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_WARN, "SmmAccess: Failed to reset SMRAM window to EFI_= MEMORY_UC\n")); + } + } + // // Close TSEG // diff --git a/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccessDr= iver.h b/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccessDriver= .h index 80f73ba0e3..aca169d3e2 100644 --- a/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccessDriver.h +++ b/QuarkSocPkg/QuarkNorthCluster/Smm/Dxe/SmmAccessDxe/SmmAccessDriver.h @@ -3,7 +3,7 @@ Header file for SMM Access Driver. =20 This file includes package header files, library classes and protocol, PPI= & GUID definitions. =20 -Copyright (c) 2013-2015 Intel Corporation. +Copyright (c) 2013-2019 Intel Corporation. =20 SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -21,6 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include +#include #include =20 // --=20 2.21.0.windows.1 -=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 (#39873): https://edk2.groups.io/g/devel/message/39873 Mute This Topic: https://groups.io/mt/31424375/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Tue May 14 18:00:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39871+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39871+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1556652674; cv=none; d=zoho.com; s=zohoarc; b=SRxYt2WbClYlK6ZQicy06iNpzEj81gvMECciZj0bDP3486WdjO+a2lexLDudgPKuL0O8hWqj0Fi2wRuSSN76HmJITCBrhAgv3QHFHL2edDcdh9oAYIpjwtr2/dQqflD/hUEVAbDMqrknkPAFzuAA016tUABWk00X90/0w4tQtl0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556652674; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=tCd3yXKPPpJkEtUDm1uAkrSLGmapSQSioP7VDDMbSbY=; b=kohrlIKxM5x0wypJo2yH+wU/u7uZ84kE+cSyA5a3SfZQcqLU/4S2mZX4e4pM4jI8qM37IZKXM9ypkkb4poZi4Ynca8p6FybgCRy4wmb7G4dZ1zHCOrPCatGjVYADjFl6fbe/pJqK8o6GbXLBglntDo5nawqEclbp+tx7lWI3wSE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39871+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1556652674634682.7247026641021; Tue, 30 Apr 2019 12:31:14 -0700 (PDT) Return-Path: X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Tue, 30 Apr 2019 12:31:13 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Apr 2019 12:31:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,414,1549958400"; d="scan'208";a="320349819" X-Received: from unknown (HELO mdkinney-MOBL2.amr.corp.intel.com) ([10.241.111.157]) by orsmga005.jf.intel.com with ESMTP; 30 Apr 2019 12:31:12 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Kelly Steele Subject: [edk2-devel] [Patch V3 8/8] QuarkPlatformPkg/PlatformInit: Resolve ResetSystemLib name collision Date: Tue, 30 Apr 2019 12:31:08 -0700 Message-Id: <20190430193108.8544-9-michael.d.kinney@intel.com> In-Reply-To: <20190430193108.8544-1-michael.d.kinney@intel.com> References: <20190430193108.8544-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1556652674; bh=P6NDaNAVYpd24vc8243+b+5CCFOd3KCCDzh/wzYyKwY=; h=Cc:Date:From:Reply-To:Subject:To; b=HSh8I8wHdKd4Atni/7xj4UV7wIX5cYhSH509Wo52gy8KnEJMq/bxShPt8Z1ayny9iW3 +nQcbFgpohfXZ3vpCKkIW5oikAvbHE1sF/MsMEZQqsX5HFf2x7w2hLVdmdPRcCZPgt8aB BAeNGV2n/8cORFbCprkWvWjdJAXe/wNxJYM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Change function name from ResetSystem() to PlatformResetSystem() to resolve name collision with ResetSystemLib. Cc: Kelly Steele Signed-off-by: Michael D Kinney Reviewed-by: Kelly Steele --- QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c | 6 +++--- .../Platform/Pei/PlatformInit/PlatformEarlyInit.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c b/= QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c index cc2a6674d0..cfdcba8e02 100644 --- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c +++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MemoryCallback.c @@ -7,7 +7,7 @@ following action is performed in this file, 4. Set MTRR for PEI 5. Create FV HOB and Flash HOB =20 -Copyright (c) 2013 - 2016, Intel Corporation. +Copyright (c) 2013 - 2019, Intel Corporation. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -20,7 +20,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 extern EFI_PEI_PPI_DESCRIPTOR mPpiStall[]; =20 -EFI_PEI_RESET_PPI mResetPpi =3D { ResetSystem }; +EFI_PEI_RESET_PPI mResetPpi =3D { PlatformResetSystem }; =20 EFI_PEI_PPI_DESCRIPTOR mPpiList[1] =3D { { @@ -40,7 +40,7 @@ EFI_PEI_PPI_DESCRIPTOR mPpiList[1] =3D { **/ EFI_STATUS EFIAPI -ResetSystem ( +PlatformResetSystem ( IN CONST EFI_PEI_SERVICES **PeiServices ) { diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.h= b/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.h index 6792538d42..84def44717 100644 --- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.h +++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/PlatformEarlyInit.h @@ -1,7 +1,7 @@ /** @file The header file of Platform PEIM. =20 -Copyright (c) 2013 Intel Corporation. +Copyright (c) 2013 - 2019 Intel Corporation. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -59,7 +59,7 @@ UpdateBootMode ( **/ EFI_STATUS EFIAPI -ResetSystem ( +PlatformResetSystem ( IN CONST EFI_PEI_SERVICES **PeiServices ); =20 --=20 2.21.0.windows.1 -=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 (#39871): https://edk2.groups.io/g/devel/message/39871 Mute This Topic: https://groups.io/mt/31424373/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-