From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.80383.1682431113980212444 for ; Tue, 25 Apr 2023 06:58:34 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=PcnKb9tN; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682431113; x=1713967113; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=yIdowx3G8FOkg9hYdfMlV2OIzQAWaXKXe9oNf3kY/Zg=; b=PcnKb9tNTk4+qjrKtc8/t7xUX8eMIUzbriP9oomhaX4yTHtCXMdhnimY 294wyx2nSftqG5NkwbQlrG1FTfdrhw/Seenqtg9w7XOnfjSp3QZ06QYZU 3CAbFrRtqEMHepWp0bbMjOAzMM4Ze8cFbyG0o33aP/zscUva8iR/3UtmJ iMr6eC1ApI8XHXL3kPkSoVlURF/J+1U5ScRMO89QRKPxsGfbAy+5stKvu HGhJaVgY7kP2w+IpXQzxEJRTXsISl/0DidW1Y5i/IUv83wxm0m8EcLsAi MhHtSp0IxuY9ekk4xlTwvMVATCfMSVZzc0N7GhjQTcWioJKvZUtFj2aEO w==; X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="326372805" X-IronPort-AV: E=Sophos;i="5.99,225,1677571200"; d="scan'208";a="326372805" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2023 06:58:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="726131491" X-IronPort-AV: E=Sophos;i="5.99,225,1677571200"; d="scan'208";a="726131491" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga001.jf.intel.com with ESMTP; 25 Apr 2023 06:58:16 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 25 Apr 2023 06:58:16 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Tue, 25 Apr 2023 06:58:16 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Tue, 25 Apr 2023 06:58:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XrlzthL+USZosuQhUs7S4mHMcNk465mcuQ4Mc3hpPKMXF8ieEsN5uf+S/mW/BNBQ2ZBFxbZTbyh8ImwX2CMMANEAhMBLRkSKsS9auEJ+7FYXlANlyw2Byj2fjcGGDRfFICNFjzG566Bg1N/Zo6bb1AKB/dkyZ27jI7Cj2E4SbDe04qjj/vnu89i4bzsnhGlxKKss3RO0zfBcx//0tYJGK5MlTKAB23rYUT2tGqnNU3i0yNKnNiCdOp69hy1XurTqm2mZtxVrIlB1W4byScenmZk8FAQfdf64zjKIjX5yTxtV/J+TaBEF4Tjd05HsZ2iz8R0yCJpuvBu+BOHZVbca4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+GwUQjAmfYIywPONVO5/FSxJArdmZd8o/dVbL3OD+KM=; b=jAnmzQPMeZXmgK9KBFevrcESnXaaA6HB5EHMpyyXYtacDb0x1JqvXP+NJnnN2NVErWMKp8zxzw52q3gPXzChBM3KDxeipbaEQDQo/UnjV4NyN9g5SuE+nqhZ760ihMaRJ9BMM/DZMNrwTzLD2mhjepKooM3Tfr75o4+yvwY+6rGS6lT3+WTc0aKSDBObOkW8qZ21DyZef4PI4IO5PLDifKLlbYtam7pmds2EniHR1pbYNsC7b4qzNK+wOKgABFYBiDxR/nwWeF6eWeK8p5z4TpUICsxeouypFTSdXUR2Suj0iXa++TG9Q0SwzrwdMpMgI4Swr2KkyC6PqiWLOpLyPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by CO1PR11MB5074.namprd11.prod.outlook.com (2603:10b6:303:97::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Tue, 25 Apr 2023 13:58:07 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::892b:b8e6:bab7:635d]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::892b:b8e6:bab7:635d%5]) with mapi id 15.20.6319.033; Tue, 25 Apr 2023 13:58:07 +0000 From: "Ni, Ray" To: "Liu, Zhiguang" , "devel@edk2.groups.io" CC: "Desimone, Nathaniel L" Subject: Re: [PATCH 5/5] SimicsX58SktPkg: Remove unused Smm related modules Thread-Topic: [PATCH 5/5] SimicsX58SktPkg: Remove unused Smm related modules Thread-Index: AQHZd0QtoJS4yIThSke1qujEtpXfsq88DVLQ Date: Tue, 25 Apr 2023 13:58:07 +0000 Message-ID: References: <20230425070304.2120-1-zhiguang.liu@intel.com> <20230425070304.2120-6-zhiguang.liu@intel.com> In-Reply-To: <20230425070304.2120-6-zhiguang.liu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|CO1PR11MB5074:EE_ x-ms-office365-filtering-correlation-id: eab65a96-f4a6-4168-134f-08db459518f2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sXejjaeoGbjFEYFRCSTo4m+z8GVyNwpNgqvyVXQz9gcXg/7F7X+FlcPNdt0RV7tmZyeLLuw8NCMFEQCVFgtlBc1poKPGkwnVZbMFlfeSJNcUWKQiLjgkuWOXe2B8v1Ih0M4bYII+zqV5CPglfnBzpxtgOcB/Sp0bQai+v+rJV/JgsIz8FKymigMeeVmIMFj0dMgPHa3xskQu8ldihxedVB0UnY3c0MIz/rrSfjfofl7fq1cZ6aygwMD85Fw0NtUaguJyA6cVMGSnEntPXrsFslApT5pLk6Qes3Iiq21XqnXq/fbis7Ftp2hOE+C/GLksnkpJGPHgphggOtFYLF5LeL6sl/deUVriSxpR9GncOVhi87X67R98ICy0/1hcxweFFOn1YZIIOlQScVpoTFQb3ZNYCoDT1HVI+NH/kmIL3iC7KBzQ2Lirw1tX26x9C8cD6qO1+Bprw4J4WlSGXu1dYHHpv/kJAfxitMwhMWIgyWQFcCqVqCI6VSlf+UPS0Uyi7ZdJucFVxD1eeOZoZyzyYVfNcemKMZHr27nwQ8zq+ZDssZ2aEignzldsCC8WP1CvnRDO7d8ZencNT1EhiSIPNZJdyoAe2OgFzH4prkZzvk64EC8PSC8JNCXD4ifhsn5K+5TRjBYTvy9nHm4vNAdxgA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(396003)(366004)(39860400002)(376002)(136003)(346002)(451199021)(9686003)(107886003)(53546011)(6506007)(26005)(38070700005)(55016003)(83380400001)(186003)(82960400001)(122000001)(38100700002)(66946007)(76116006)(86362001)(478600001)(66556008)(66476007)(66446008)(8676002)(8936002)(64756008)(19627235002)(110136005)(52536014)(5660300002)(71200400001)(7696005)(41300700001)(2906002)(30864003)(4326008)(33656002)(316002)(559001)(579004)(44824005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cdzvZ6dzLzQKn3BEbUuxB7cqqrRInA0hYSKRwgzNBKamz480uXBiiBGmboSk?= =?us-ascii?Q?tlBJbSqlHYrcE3ITJ2ne74pPLtWP6yx038iKssBf866rOBBM/H+3w7Cua8wh?= =?us-ascii?Q?eMeMqOJBK/LXJJNEAwffmuFIui6ou6nHt6BwpmvP729QEhBvFmku7LSpGWjK?= =?us-ascii?Q?Eh4zOdGRwuzrGf1OPME8nRBSxHTGITj/bCo20txsnLK/tx407a3uyRW5uB2T?= =?us-ascii?Q?HB5mcbA9h1WfR8PjB4i2OeM8kuahCS1/wU6r4TCHTw9wf3WY3XGWIZ2SXQwX?= =?us-ascii?Q?1lHX48NxHP1elHjrF4j9mxVcWPuvDoKRZnipPY5AMVbAb37RiOwvpO2TfTRq?= =?us-ascii?Q?uAizbKhuX63ej9F1nnzL/05PuzX0vtZ+sFTGSq/MFOm5A8Oj5zDGopSyjWSk?= =?us-ascii?Q?VUMFZpkYjkzHnQkeoKRiQ9OWi9pTUhNFwv62dcYYfboAZWCMkTBGU1ZwJ+TM?= =?us-ascii?Q?5j8Wvtxahab56Zn181DF8YvMFiuPqKP1CHzxdQKrSfpHcLKtBLO6OxgDMvuC?= =?us-ascii?Q?lPOStPKenvpZJ6aQpNQrO47I+GTCdzRwA1NnlcuuddlRYbjekPrkyiKfM+KY?= =?us-ascii?Q?xe+EZ9LrtKdxmG00WlNpS7PztJZ5305f48gp09UQNSNwuKGyKM2iLL4UuJ9F?= =?us-ascii?Q?L+ZpoMiORJydRbvr9Jv322UgtCjRXHg0PM7fPD5wtbJjOlnP7+R1Vzh/5yNK?= =?us-ascii?Q?TD2K6yMEvJkog8oJ7UfgM4OtaGTyiQzR+64pjwoB6NqyGVvmckNnGlQtFRuz?= =?us-ascii?Q?tYcOPA2wwCOjU2l2oxF59UpPml13CB0bdMu1QCmv01nY+NFp7f8LXVsdHXno?= =?us-ascii?Q?h6oPnAZ5ly4SAqs1MOoTZm7clKoFK1qfjTK3qLmePHwqVWbd/2Dyce01df7M?= =?us-ascii?Q?KLNbVSvK1BPTSjDP9TucjvEcd7AkXN2g/4hZnGgD4jSFTjdjvaCMLgPKI9WA?= =?us-ascii?Q?va95d4//+RV/+vTi8fMS8Qvllj3JGCNpW6eDx7xdgivIpVduWHS85vpgkTmE?= =?us-ascii?Q?CXdzRsaGd18hwhkNG3q7qmgiqNiXTf/pyIWgU2LjtERG+PKumVgXNoshaiWm?= =?us-ascii?Q?eNE6rm5sHLXutcRn7DdJRy9IsEXQpQyR/CRYZVYlcEnGhk83Ex7/YR+j9MG7?= =?us-ascii?Q?j7l7pfWOBurUl1AqWEW2N+KmDOrwrXBhIRda5+W+KqN56nqRtjraaW1x1rFZ?= =?us-ascii?Q?OVfr4SNx1tBl265XkxBJr+jKImFykF0GxUXcI62QPhaB4a5m82vrXw0cbSNm?= =?us-ascii?Q?pCut42VelOkzfJkJWRiDvheBuuln0OrVy1fAZolvLReBq19cPP65pv/Lyfuf?= =?us-ascii?Q?BTFxaywq+2QoslXOUhGFNHr7kCCjCKGou8XpLtKXlfQDBoLBWGFJx5LCHdI0?= =?us-ascii?Q?odDlUt7/geZkBE06d7B7h2JAYZCbQxW0dx5nNTGEbLViAfPZQYynzLoXSvEp?= =?us-ascii?Q?hfXI/UssGDJSTzDAPj8lFZ/jvvRtlX9WbkcyMINHuQu3ybVUanzQMpDTv+1b?= =?us-ascii?Q?TZXyNy/kNBUX+H6Nh40vDYye2SB1VYmELi1QSGs8bkuwA8PnxmwPXSiBzq1z?= =?us-ascii?Q?BquaYT03tlLqon62vfVTe1v0CJS4SKAJTBfWIRKb?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: eab65a96-f4a6-4168-134f-08db459518f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2023 13:58:07.3921 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: a0dETQ4S6ooFxduW3r/juj6xPCIy+fHaVmKtv0+T/J9HB1e611sRQwI1xLerDYKqN1owzQcEj8JTzRAr9WYdHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5074 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Liu, Zhiguang > Sent: Tuesday, April 25, 2023 3:03 PM > To: devel@edk2.groups.io > Cc: Liu, Zhiguang ; Desimone, Nathaniel L > ; Ni, Ray > Subject: [PATCH 5/5] SimicsX58SktPkg: Remove unused Smm related > modules >=20 > In last two commit, I replace the two SMM related modules, and now > no platform will use these two moduels. Remove them >=20 > Cc: Nate DeSimone > Cc: Ray Ni > Signed-off-by: Zhiguang Liu > --- > .../Smm/Access/SmmAccess2Dxe.c | 148 -------- > .../Smm/Access/SmmAccess2Dxe.inf | 54 --- > .../SimicsX58SktPkg/Smm/Access/SmmAccessPei.c | 338 ------------------ > .../Smm/Access/SmmAccessPei.inf | 62 ---- > .../Smm/Access/SmramInternal.c | 200 ----------- > .../Smm/Access/SmramInternal.h | 82 ----- > 6 files changed, 884 deletions(-) > delete mode 100644 > Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccess2Dxe.c > delete mode 100644 > Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccess2Dxe.inf > delete mode 100644 > Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccessPei.c > delete mode 100644 > Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccessPei.inf > delete mode 100644 > Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmramInternal.c > delete mode 100644 > Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmramInternal.h >=20 > diff --git a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccess2Dxe.c > b/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccess2Dxe.c > deleted file mode 100644 > index 5d3b2c14aa..0000000000 > --- a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccess2Dxe.c > +++ /dev/null > @@ -1,148 +0,0 @@ > -/** @file > - A DXE_DRIVER providing SMRAM access by producing > EFI_SMM_ACCESS2_PROTOCOL. > - > - X58 TSEG is expected to have been verified and set up by the > SmmAccessPei > - driver. > - > - Copyright (C) 2013, 2015, Red Hat, Inc.
> - Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#include > -#include > -#include > -#include > - > -#include "SmramInternal.h" > - > -/** > - Opens the SMRAM area to be accessible by a boot-service driver. > - > - This function "opens" SMRAM so that it is visible while not inside of = SMM. > - The function should return EFI_UNSUPPORTED if the hardware does not > support > - hiding of SMRAM. The function should return EFI_DEVICE_ERROR if the > SMRAM > - configuration is locked. > - > - @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance. > - > - @retval EFI_SUCCESS The operation was successful. > - @retval EFI_UNSUPPORTED The system does not support opening and > closing of > - SMRAM. > - @retval EFI_DEVICE_ERROR SMRAM cannot be opened, perhaps because > it is > - locked. > -**/ > -STATIC > -EFI_STATUS > -EFIAPI > -SmmAccess2DxeOpen ( > - IN EFI_SMM_ACCESS2_PROTOCOL *This > - ) > -{ > - return SmramAccessOpen (&This->LockState, &This->OpenState); > -} > - > -/** > - Inhibits access to the SMRAM. > - > - This function "closes" SMRAM so that it is not visible while outside o= f SMM. > - The function should return EFI_UNSUPPORTED if the hardware does not > support > - hiding of SMRAM. > - > - @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance. > - > - @retval EFI_SUCCESS The operation was successful. > - @retval EFI_UNSUPPORTED The system does not support opening and > closing of > - SMRAM. > - @retval EFI_DEVICE_ERROR SMRAM cannot be closed. > -**/ > -STATIC > -EFI_STATUS > -EFIAPI > -SmmAccess2DxeClose ( > - IN EFI_SMM_ACCESS2_PROTOCOL *This > - ) > -{ > - return SmramAccessClose (&This->LockState, &This->OpenState); > -} > - > -/** > - Inhibits access to the SMRAM. > - > - This function prohibits access to the SMRAM region. This function is = usually > - implemented such that it is a write-once operation. > - > - @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance. > - > - @retval EFI_SUCCESS The device was successfully locked. > - @retval EFI_UNSUPPORTED The system does not support locking of > SMRAM. > -**/ > -STATIC > -EFI_STATUS > -EFIAPI > -SmmAccess2DxeLock ( > - IN EFI_SMM_ACCESS2_PROTOCOL *This > - ) > -{ > - return SmramAccessLock (&This->LockState, &This->OpenState); > -} > - > -/** > - Queries the memory controller for the possible regions that will suppo= rt > - SMRAM. > - > - @param[in] This The EFI_SMM_ACCESS2_PROTOCOL instance. > - @param[in,out] SmramMapSize A pointer to the size, in bytes, of the > - SmramMemoryMap buffer. > - @param[in,out] SmramMap A pointer to the buffer in which firmwar= e > - places the current memory map. > - > - @retval EFI_SUCCESS The chipset supported the given resource= . > - @retval EFI_BUFFER_TOO_SMALL The SmramMap parameter was too > small. The > - current buffer size needed to hold the m= emory > - map is returned in SmramMapSize. > -**/ > -STATIC > -EFI_STATUS > -EFIAPI > -SmmAccess2DxeGetCapabilities ( > - IN CONST EFI_SMM_ACCESS2_PROTOCOL *This, > - IN OUT UINTN *SmramMapSize, > - IN OUT EFI_SMRAM_DESCRIPTOR *SmramMap > - ) > -{ > - return SmramAccessGetCapabilities (This->LockState, This->OpenState, > - SmramMapSize, SmramMap); > -} > - > -// > -// LockState and OpenState will be filled in by the entry point. > -// > -STATIC EFI_SMM_ACCESS2_PROTOCOL mAccess2 =3D { > - &SmmAccess2DxeOpen, > - &SmmAccess2DxeClose, > - &SmmAccess2DxeLock, > - &SmmAccess2DxeGetCapabilities > -}; > - > -// > -// Entry point of this driver. > -// > -EFI_STATUS > -EFIAPI > -SmmAccess2DxeEntryPoint ( > - IN EFI_HANDLE ImageHandle, > - IN EFI_SYSTEM_TABLE *SystemTable > - ) > -{ > - // > - // This module should only be included if SMRAM support is required. > - // > - ASSERT (FeaturePcdGet (PcdSmmSmramRequire)); > - > - GetStates (&mAccess2.LockState, &mAccess2.OpenState); > - return gBS->InstallMultipleProtocolInterfaces (&ImageHandle, > - &gEfiSmmAccess2ProtocolGuid, &mAccess2, > - NULL); > -} > diff --git a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccess2Dxe.inf > b/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccess2Dxe.inf > deleted file mode 100644 > index eb8c8f93dd..0000000000 > --- a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccess2Dxe.inf > +++ /dev/null > @@ -1,54 +0,0 @@ > -## @file > -# A DXE_DRIVER providing SMRAM access by producing > EFI_SMM_ACCESS2_PROTOCOL. > -# > -# X58 TSEG is expected to have been verified and set up by the > SmmAccessPei > -# driver. > -# > -# Copyright (C) 2013, 2015, Red Hat, Inc. > -# Copyright (C) 2019, Intel Corporation. All rights reserved.
> -# > -# SPDX-License-Identifier: BSD-2-Clause-Patent > -# > -## > - > -[Defines] > - INF_VERSION =3D 0x00010005 > - BASE_NAME =3D SmmAccess2Dxe > - FILE_GUID =3D AC95AD3D-4366-44BF-9A62-E4B29D7A220= 6 > - MODULE_TYPE =3D DXE_DRIVER > - VERSION_STRING =3D 1.0 > - PI_SPECIFICATION_VERSION =3D 0x00010400 > - ENTRY_POINT =3D SmmAccess2DxeEntryPoint > - > -# > -# The following information is for reference only and not required by th= e > build tools. > -# > -# VALID_ARCHITECTURES =3D IA32 X64 > -# > - > -[Sources] > - SmmAccess2Dxe.c > - SmramInternal.c > - SmramInternal.h > - > -[Packages] > - MdeModulePkg/MdeModulePkg.dec > - MdePkg/MdePkg.dec > - SimicsX58SktPkg/SktPkg.dec > - SimicsIch10Pkg/Ich10Pkg.dec > - > -[LibraryClasses] > - DebugLib > - PcdLib > - PciLib > - UefiBootServicesTableLib > - UefiDriverEntryPoint > - > -[Protocols] > - gEfiSmmAccess2ProtocolGuid ## PRODUCES > - > -[FeaturePcd] > - gSimicsX58PkgTokenSpaceGuid.PcdSmmSmramRequire > - > -[Depex] > - TRUE > diff --git a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccessPei.c > b/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccessPei.c > deleted file mode 100644 > index d489cc7513..0000000000 > --- a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccessPei.c > +++ /dev/null > @@ -1,338 +0,0 @@ > -/** @file > - A PEIM with the following responsibilities: > - > - - verify & configure the X58 TSEG in the entry point, > - - provide SMRAM access by producing PEI_SMM_ACCESS_PPI, > - - set aside the SMM_S3_RESUME_STATE object at the bottom of TSEG, and > expose > - it via the gEfiAcpiVariableGuid GUID HOB. > - > - This PEIM runs from RAM, so we can write to variables with static stor= age > - duration. > - > - Copyright (C) 2013, 2015, Red Hat, Inc.
> - Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -#include > -#include "SmramInternal.h" > - > -// > -// PEI_SMM_ACCESS_PPI implementation. > -// > - > -/** > - Opens the SMRAM area to be accessible by a PEIM driver. > - > - This function "opens" SMRAM so that it is visible while not inside of = SMM. > - The function should return EFI_UNSUPPORTED if the hardware does not > support > - hiding of SMRAM. The function should return EFI_DEVICE_ERROR if the > SMRAM > - configuration is locked. > - > - @param PeiServices General purpose services available to e= very > - PEIM. > - @param This The pointer to the SMM Access Interface= . > - @param DescriptorIndex The region of SMRAM to Open. > - > - @retval EFI_SUCCESS The region was successfully opened. > - @retval EFI_DEVICE_ERROR The region could not be opened because > locked > - by chipset. > - @retval EFI_INVALID_PARAMETER The descriptor index was out of bounds. > - > -**/ > -STATIC > -EFI_STATUS > -EFIAPI > -SmmAccessPeiOpen ( > - IN EFI_PEI_SERVICES **PeiServices, > - IN PEI_SMM_ACCESS_PPI *This, > - IN UINTN DescriptorIndex > - ) > -{ > - if (DescriptorIndex >=3D DescIdxCount) { > - return EFI_INVALID_PARAMETER; > - } > - > - // > - // According to current practice, DescriptorIndex is not considered at= all, > - // beyond validating it. > - // > - return SmramAccessOpen (&This->LockState, &This->OpenState); > -} > - > -/** > - Inhibits access to the SMRAM. > - > - This function "closes" SMRAM so that it is not visible while outside o= f SMM. > - The function should return EFI_UNSUPPORTED if the hardware does not > support > - hiding of SMRAM. > - > - @param PeiServices General purpose services available to= every > - PEIM. > - @param This The pointer to the SMM Access Interfa= ce. > - @param DescriptorIndex The region of SMRAM to Close. > - > - @retval EFI_SUCCESS The region was successfully closed. > - @retval EFI_DEVICE_ERROR The region could not be closed becaus= e > - locked by chipset. > - @retval EFI_INVALID_PARAMETER The descriptor index was out of > bounds. > - > -**/ > -STATIC > -EFI_STATUS > -EFIAPI > -SmmAccessPeiClose ( > - IN EFI_PEI_SERVICES **PeiServices, > - IN PEI_SMM_ACCESS_PPI *This, > - IN UINTN DescriptorIndex > - ) > -{ > - if (DescriptorIndex >=3D DescIdxCount) { > - return EFI_INVALID_PARAMETER; > - } > - > - // > - // According to current practice, DescriptorIndex is not considered at= all, > - // beyond validating it. > - // > - return SmramAccessClose (&This->LockState, &This->OpenState); > -} > - > -/** > - Inhibits access to the SMRAM. > - > - This function prohibits access to the SMRAM region. This function is = usually > - implemented such that it is a write-once operation. > - > - @param PeiServices General purpose services available to= every > - PEIM. > - @param This The pointer to the SMM Access Interfa= ce. > - @param DescriptorIndex The region of SMRAM to Close. > - > - @retval EFI_SUCCESS The region was successfully locked. > - @retval EFI_DEVICE_ERROR The region could not be locked because = at > - least one range is still open. > - @retval EFI_INVALID_PARAMETER The descriptor index was out of bounds. > - > -**/ > -STATIC > -EFI_STATUS > -EFIAPI > -SmmAccessPeiLock ( > - IN EFI_PEI_SERVICES **PeiServices, > - IN PEI_SMM_ACCESS_PPI *This, > - IN UINTN DescriptorIndex > - ) > -{ > - if (DescriptorIndex >=3D DescIdxCount) { > - return EFI_INVALID_PARAMETER; > - } > - > - // > - // According to current practice, DescriptorIndex is not considered at= all, > - // beyond validating it. > - // > - return SmramAccessLock (&This->LockState, &This->OpenState); > -} > - > -/** > - Queries the memory controller for the possible regions that will suppo= rt > - SMRAM. > - > - @param PeiServices General purpose services available to ev= ery > - PEIM. > - @param This The pointer to the SmmAccessPpi Interfac= e. > - @param SmramMapSize The pointer to the variable containing s= ize of > - the buffer to contain the description > - information. > - @param SmramMap The buffer containing the data describin= g the > - Smram region descriptors. > - > - @retval EFI_BUFFER_TOO_SMALL The user did not provide a sufficient > buffer. > - @retval EFI_SUCCESS The user provided a sufficiently-sized b= uffer. > - > -**/ > -STATIC > -EFI_STATUS > -EFIAPI > -SmmAccessPeiGetCapabilities ( > - IN EFI_PEI_SERVICES **PeiServices, > - IN PEI_SMM_ACCESS_PPI *This, > - IN OUT UINTN *SmramMapSize, > - IN OUT EFI_SMRAM_DESCRIPTOR *SmramMap > - ) > -{ > - return SmramAccessGetCapabilities (This->LockState, This->OpenState, > SmramMapSize, SmramMap); > -} > - > -// > -// LockState and OpenState will be filled in by the entry point. > -// > -STATIC PEI_SMM_ACCESS_PPI mAccess =3D { > - &SmmAccessPeiOpen, > - &SmmAccessPeiClose, > - &SmmAccessPeiLock, > - &SmmAccessPeiGetCapabilities > -}; > - > - > -STATIC EFI_PEI_PPI_DESCRIPTOR mPpiList[] =3D { > - { > - EFI_PEI_PPI_DESCRIPTOR_PPI | > EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, > - &gPeiSmmAccessPpiGuid, &mAccess > - } > -}; > - > - > -// > -// Utility functions. > -// > -STATIC > -UINT8 > -CmosRead8 ( > - IN UINT8 Index > - ) > -{ > - IoWrite8 (0x70, Index); > - return IoRead8 (0x71); > -} > - > -STATIC > -UINT32 > -GetSystemMemorySizeBelow4gb ( > - VOID > - ) > -{ > - UINT32 Cmos0x34; > - UINT32 Cmos0x35; > - > - Cmos0x34 =3D CmosRead8 (0x34); > - Cmos0x35 =3D CmosRead8 (0x35); > - > - return ((Cmos0x35 << 8 | Cmos0x34) << 16) + SIZE_16MB; > -} > - > - > -// > -// Entry point of this driver. > -// > -EFI_STATUS > -EFIAPI > -SmmAccessPeiEntryPoint ( > - IN EFI_PEI_FILE_HANDLE FileHandle, > - IN CONST EFI_PEI_SERVICES **PeiServices > - ) > -{ > - UINT16 HostBridgeDevId; > - UINT32 EsmramcVal; > - UINT32 TopOfLowRam, TopOfLowRamMb; > - EFI_STATUS Status; > - UINTN SmramMapSize; > - EFI_SMRAM_DESCRIPTOR SmramMap[DescIdxCount]; > - > - // > - // This module should only be included if SMRAM support is required. > - // > - ASSERT (FeaturePcdGet (PcdSmmSmramRequire)); > - > - // > - // Verify if we're running on a X58 machine type. > - // > - HostBridgeDevId =3D PciRead16 (SIMICS_HOSTBRIDGE_DID); > - if (HostBridgeDevId !=3D INTEL_ICH10_DEVICE_ID) { > - DEBUG ((EFI_D_ERROR, "%a: no SMRAM with host bridge DID=3D0x%04x; > only " > - "DID=3D0x%04x (X58) is supported\n", __FUNCTION__, HostBridgeDevId= , > - INTEL_ICH10_DEVICE_ID)); > - goto WrongConfig; > - } > - > - // > - // Confirm if Simics supports SMRAM. > - // > - // With no support for it, the ESMRAMC (Extended System Management > RAM > - // Control) register reads as zero. If there is support, the cache-ena= ble > - // bits are hard-coded as 1 by Simics. > - // > - > - TopOfLowRam =3D GetSystemMemorySizeBelow4gb (); > - ASSERT ((TopOfLowRam & (SIZE_1MB - 1)) =3D=3D 0); > - TopOfLowRamMb =3D TopOfLowRam >> 20; > - DEBUG((EFI_D_INFO, "TopOfLowRam =3D0x%x; TopOfLowRamMb =3D0x%x \n", > TopOfLowRam, TopOfLowRamMb)); > - > - > - // > - // Set Top of Low Usable DRAM. > - // > - PciWrite32 (DRAMC_REGISTER_X58(MCH_TOLUD), TopOfLowRam); > - DEBUG((EFI_D_INFO, "MCH_TOLUD =3D0x%x; \n", > PciRead32(DRAMC_REGISTER_X58(MCH_TOLUD)))); > - > - // > - // Set TSEG Memory Base. > - // > - EsmramcVal =3D (TopOfLowRamMb - FixedPcdGet8(PcdX58TsegMbytes)) << > MCH_TSEGMB_MB_SHIFT; > - // > - // Set TSEG size, and disable TSEG visibility outside of SMM. Note tha= t the > - // T_EN bit has inverse meaning; when T_EN is set, then TSEG visibilit= y is > - // *restricted* to SMM. > - // > - EsmramcVal &=3D ~(UINT32)MCH_ESMRAMC_TSEG_MASK; > - EsmramcVal |=3D FixedPcdGet8 (PcdX58TsegMbytes) =3D=3D 8 ? > MCH_ESMRAMC_TSEG_8MB : > - FixedPcdGet8 (PcdX58TsegMbytes) =3D=3D 2 ? > MCH_ESMRAMC_TSEG_2MB : > - MCH_ESMRAMC_TSEG_1MB; > - EsmramcVal |=3D MCH_ESMRAMC_T_EN; > - PciWrite32(DRAMC_REGISTER_X58(MCH_TSEGMB), EsmramcVal); > - DEBUG((EFI_D_INFO, "MCH_TSEGMB =3D0x%x; \n", > PciRead32(DRAMC_REGISTER_X58(MCH_TSEGMB)))); > - DEBUG((EFI_D_INFO, "MCH_TSEGMB_1 =3D0x%x; MCH_TSEGMB_2 > =3D0x%x;\n", ((TopOfLowRamMb - FixedPcdGet8(PcdX58TsegMbytes)) << > MCH_TSEGMB_MB_SHIFT), EsmramcVal)); > - > - // > - // Create the GUID HOB and point it to the first SMRAM range. > - // > - GetStates (&mAccess.LockState, &mAccess.OpenState); > - SmramMapSize =3D sizeof SmramMap; > - Status =3D SmramAccessGetCapabilities (mAccess.LockState, > mAccess.OpenState, &SmramMapSize, SmramMap); > - ASSERT_EFI_ERROR (Status); > - > - DEBUG_CODE_BEGIN (); > - { > - UINTN Count; > - UINTN Idx; > - > - Count =3D SmramMapSize / sizeof SmramMap[0]; > - DEBUG ((EFI_D_VERBOSE, "%a: SMRAM map follows, %d entries\n", > __FUNCTION__, (INT32)Count)); > - DEBUG ((EFI_D_VERBOSE, "% 20a % 20a % 20a % 20a\n", > "PhysicalStart(0x)", > - "PhysicalSize(0x)", "CpuStart(0x)", "RegionState(0x)")); > - for (Idx =3D 0; Idx < Count; ++Idx) { > - DEBUG ((EFI_D_VERBOSE, "% 20Lx % 20Lx % 20Lx % 20Lx\n", > - SmramMap[Idx].PhysicalStart, SmramMap[Idx].PhysicalSize, > - SmramMap[Idx].CpuStart, SmramMap[Idx].RegionState)); > - } > - } > - DEBUG_CODE_END (); > - > - // > - // We're done. The next step should succeed, but even if it fails, we = can't > - // roll back the above BuildGuidHob() allocation, because PEI doesn't > support > - // releasing memory. > - // > - return PeiServicesInstallPpi (mPpiList); > - > -WrongConfig: > - // > - // We really don't want to continue in this case. > - // > - ASSERT (FALSE); > - CpuDeadLoop (); > - return EFI_UNSUPPORTED; > -} > diff --git a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccessPei.inf > b/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccessPei.inf > deleted file mode 100644 > index 3c71e64fe9..0000000000 > --- a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmmAccessPei.inf > +++ /dev/null > @@ -1,62 +0,0 @@ > -## @file > -# A PEIM with the following responsibilities: > -# > -# - provide SMRAM access by producing PEI_SMM_ACCESS_PPI, > -# - verify & configure the X58 TSEG in the entry point, > -# - set aside the SMM_S3_RESUME_STATE object at the bottom of TSEG, > and expose > -# it via the gEfiAcpiVariableGuid GUIDed HOB. > -# > -# Copyright (C) 2013, 2015, Red Hat, Inc. > -# Copyright (C) 2019, Intel Corporation. All rights reserved.
> -# > -# SPDX-License-Identifier: BSD-2-Clause-Patent > -# > -## > - > -[Defines] > - INF_VERSION =3D 0x00010005 > - BASE_NAME =3D SmmAccessPei > - FILE_GUID =3D 6C0E75B4-B0B9-44D1-8210-3377D7B4E06= 6 > - MODULE_TYPE =3D PEIM > - VERSION_STRING =3D 1.0 > - ENTRY_POINT =3D SmmAccessPeiEntryPoint > - > -# > -# The following information is for reference only and not required by th= e > build tools. > -# > -# VALID_ARCHITECTURES =3D IA32 X64 > -# > - > -[Sources] > - SmmAccessPei.c > - SmramInternal.c > - SmramInternal.h > - > -[Packages] > - MdeModulePkg/MdeModulePkg.dec > - MdePkg/MdePkg.dec > - SimicsX58SktPkg/SktPkg.dec > - SimicsIch10Pkg/Ich10Pkg.dec > - > -[LibraryClasses] > - BaseLib > - BaseMemoryLib > - DebugLib > - HobLib > - IoLib > - PcdLib > - PciLib > - PeiServicesLib > - PeimEntryPoint > - > -[FeaturePcd] > - gSimicsX58PkgTokenSpaceGuid.PcdSmmSmramRequire > - > -[FixedPcd] > - gSimicsX58PkgTokenSpaceGuid.PcdX58TsegMbytes > - > -[Ppis] > - gPeiSmmAccessPpiGuid ## PRODUCES > - > -[Depex] > - gEfiPeiMemoryDiscoveredPpiGuid > diff --git a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmramInternal.c > b/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmramInternal.c > deleted file mode 100644 > index 4b5a92f602..0000000000 > --- a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmramInternal.c > +++ /dev/null > @@ -1,200 +0,0 @@ > -/** @file > - Functions and types shared by the SMM accessor PEI and DXE modules. > - > - Copyright (C) 2015, Red Hat, Inc. > - Copyright (C) 2019, Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#include > -#include > -#include > -#include > - > -#include "SmramInternal.h" > - > -BOOLEAN gLockState; > -BOOLEAN gOpenState; > - > -/** > - Read the MCH_SMRAM and ESMRAMC registers, and update the LockState > and > - OpenState fields in the PEI_SMM_ACCESS_PPI / > EFI_SMM_ACCESS2_PROTOCOL object, > - from the D_LCK and T_EN bits. > - > - PEI_SMM_ACCESS_PPI and EFI_SMM_ACCESS2_PROTOCOL member > functions can rely on > - the LockState and OpenState fields being up-to-date on entry, and they > need > - to restore the same invariant on exit, if they touch the bits in quest= ion. > - > - @param[out] LockState Reflects the D_LCK bit on output; TRUE iff SMRA= M > is > - locked. > - @param[out] OpenState Reflects the inverse of the T_EN bit on output; > TRUE > - iff SMRAM is open. > -**/ > -VOID > -GetStates ( > - OUT BOOLEAN *LockState, > - OUT BOOLEAN *OpenState > -) > -{ > - UINT8 EsmramcVal; > - > - EsmramcVal =3D PciRead8(DRAMC_REGISTER_X58(MCH_TSEGMB)); > - > - *OpenState =3D !(EsmramcVal & MCH_ESMRAMC_T_EN); > - *LockState =3D !*OpenState; > - > - *OpenState =3D gOpenState; > - *LockState =3D gLockState; > -} > - > -// > -// The functions below follow the PEI_SMM_ACCESS_PPI and > -// EFI_SMM_ACCESS2_PROTOCOL member declarations. The PeiServices > and This > -// pointers are removed (TSEG doesn't depend on them), and so is the > -// DescriptorIndex parameter (TSEG doesn't support range-wise locking). > -// > -// The LockState and OpenState members that are common to both > -// PEI_SMM_ACCESS_PPI and EFI_SMM_ACCESS2_PROTOCOL are taken > and updated in > -// isolation from the rest of the (non-shared) members. > -// > - > -EFI_STATUS > -SmramAccessOpen ( > - OUT BOOLEAN *LockState, > - OUT BOOLEAN *OpenState > - ) > -{ > - > - // > - // Open TSEG by clearing T_EN. > - // > - PciAnd8(DRAMC_REGISTER_X58(MCH_TSEGMB), > - (UINT8)((~(UINT32)MCH_ESMRAMC_T_EN) & 0xff)); > - > - gOpenState =3D TRUE; > - gLockState =3D !gOpenState; > - > - GetStates (LockState, OpenState); > - if (!*OpenState) { > - return EFI_DEVICE_ERROR; > - } > - return EFI_SUCCESS; > -} > - > -EFI_STATUS > -SmramAccessClose ( > - OUT BOOLEAN *LockState, > - OUT BOOLEAN *OpenState > - ) > -{ > - // > - // Close TSEG by setting T_EN. > - // > - PciOr8(DRAMC_REGISTER_X58(MCH_TSEGMB), MCH_ESMRAMC_T_EN); > - > - gOpenState =3D FALSE; > - gLockState =3D !gOpenState; > - > - GetStates (LockState, OpenState); > - if (*OpenState) { > - return EFI_DEVICE_ERROR; > - } > - return EFI_SUCCESS; > -} > - > -EFI_STATUS > -SmramAccessLock ( > - OUT BOOLEAN *LockState, > - IN OUT BOOLEAN *OpenState > - ) > -{ > - if (*OpenState) { > - return EFI_DEVICE_ERROR; > - } > - > - // > - // Close & lock TSEG by setting T_EN and D_LCK. > - // > - PciOr8 (DRAMC_REGISTER_X58(MCH_TSEGMB), MCH_ESMRAMC_T_EN); > - > - gOpenState =3D FALSE; > - gLockState =3D !gOpenState; > - > - GetStates (LockState, OpenState); > - if (*OpenState || !*LockState) { > - return EFI_DEVICE_ERROR; > - } > - return EFI_SUCCESS; > -} > - > -EFI_STATUS > -SmramAccessGetCapabilities ( > - IN BOOLEAN LockState, > - IN BOOLEAN OpenState, > - IN OUT UINTN *SmramMapSize, > - IN OUT EFI_SMRAM_DESCRIPTOR *SmramMap > - ) > -{ > - UINTN OriginalSize; > - UINT32 TsegMemoryBaseMb, TsegMemoryBase; > - UINT64 CommonRegionState; > - UINT8 TsegSizeBits; > - > - OriginalSize =3D *SmramMapSize; > - *SmramMapSize =3D DescIdxCount * sizeof *SmramMap; > - if (OriginalSize < *SmramMapSize) { > - return EFI_BUFFER_TOO_SMALL; > - } > - > - // > - // Read the TSEG Memory Base register. > - // > - TsegMemoryBaseMb =3D > PciRead32(DRAMC_REGISTER_X58(MCH_TSEGMB)); > - > - TsegMemoryBaseMb =3D 0xDF800000; > - > - TsegMemoryBase =3D (TsegMemoryBaseMb >> MCH_TSEGMB_MB_SHIFT) > << 20; > - > - // > - // Precompute the region state bits that will be set for all regions. > - // > - CommonRegionState =3D (OpenState ? EFI_SMRAM_OPEN : > EFI_SMRAM_CLOSED) | > - (LockState ? EFI_SMRAM_LOCKED : 0) | > - EFI_CACHEABLE; > - > - // > - // The first region hosts an SMM_S3_RESUME_STATE object. It is located= at > the > - // start of TSEG. We round up the size to whole pages, and we report i= t as > - // EFI_ALLOCATED, so that the SMM_CORE stays away from it. > - // > - SmramMap[DescIdxSmmS3ResumeState].PhysicalStart =3D > TsegMemoryBase; > - SmramMap[DescIdxSmmS3ResumeState].CpuStart =3D TsegMemoryBase; > - SmramMap[DescIdxSmmS3ResumeState].PhysicalSize =3D > - EFI_PAGES_TO_SIZE (EFI_SIZE_TO_PAGES (sizeof > (SMM_S3_RESUME_STATE))); > - SmramMap[DescIdxSmmS3ResumeState].RegionState =3D > - CommonRegionState | EFI_ALLOCATED; > - > - // > - // Get the TSEG size bits from the ESMRAMC register. > - // > - TsegSizeBits =3D PciRead8 (DRAMC_REGISTER_X58(MCH_TSEGMB)) & > - MCH_ESMRAMC_TSEG_MASK; > - > - TsegSizeBits =3D MCH_ESMRAMC_TSEG_8MB; > - > - // > - // The second region is the main one, following the first. > - // > - SmramMap[DescIdxMain].PhysicalStart =3D > - SmramMap[DescIdxSmmS3ResumeState].PhysicalStart + > - SmramMap[DescIdxSmmS3ResumeState].PhysicalSize; > - SmramMap[DescIdxMain].CpuStart =3D > SmramMap[DescIdxMain].PhysicalStart; > - SmramMap[DescIdxMain].PhysicalSize =3D > - (TsegSizeBits =3D=3D MCH_ESMRAMC_TSEG_8MB ? SIZE_8MB : > - TsegSizeBits =3D=3D MCH_ESMRAMC_TSEG_2MB ? SIZE_2MB : > - SIZE_1MB) - SmramMap[DescIdxSmmS3ResumeState].PhysicalSize; > - SmramMap[DescIdxMain].RegionState =3D CommonRegionState; > - > - return EFI_SUCCESS; > -} > diff --git a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmramInternal.h > b/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmramInternal.h > deleted file mode 100644 > index 81180a9c8e..0000000000 > --- a/Silicon/Intel/SimicsX58SktPkg/Smm/Access/SmramInternal.h > +++ /dev/null > @@ -1,82 +0,0 @@ > -/** @file > - Functions and types shared by the SMM accessor PEI and DXE modules. > - > - Copyright (C) 2015, Red Hat, Inc. > - Copyright (C) 2019, Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent > -**/ > - > -#include > - > -// > -// We'll have two SMRAM ranges. > -// > -// The first is a tiny one that hosts an SMM_S3_RESUME_STATE object, to > be > -// filled in by the CPU SMM driver during normal boot, for the PEI insta= nce > of > -// the LockBox library (which will rely on the object during S3 resume). > -// > -// The other SMRAM range is the main one, for the SMM core and the SMM > drivers. > -// > -typedef enum { > - DescIdxSmmS3ResumeState =3D 0, > - DescIdxMain =3D 1, > - DescIdxCount =3D 2 > -} DESCRIPTOR_INDEX; > - > -/** > - Read the MCH_SMRAM and ESMRAMC registers, and update the LockState > and > - OpenState fields in the PEI_SMM_ACCESS_PPI / > EFI_SMM_ACCESS2_PROTOCOL object, > - from the D_LCK and T_EN bits. > - > - PEI_SMM_ACCESS_PPI and EFI_SMM_ACCESS2_PROTOCOL member > functions can rely on > - the LockState and OpenState fields being up-to-date on entry, and they > need > - to restore the same invariant on exit, if they touch the bits in quest= ion. > - > - @param[out] LockState Reflects the D_LCK bit on output; TRUE iff SMRA= M > is > - locked. > - @param[out] OpenState Reflects the inverse of the T_EN bit on output; > TRUE > - iff SMRAM is open. > -**/ > -VOID > -GetStates ( > - OUT BOOLEAN *LockState, > - OUT BOOLEAN *OpenState > - ); > - > -// > -// The functions below follow the PEI_SMM_ACCESS_PPI and > -// EFI_SMM_ACCESS2_PROTOCOL member declarations. The PeiServices > and This > -// pointers are removed (TSEG doesn't depend on them), and so is the > -// DescriptorIndex parameter (TSEG doesn't support range-wise locking). > -// > -// The LockState and OpenState members that are common to both > -// PEI_SMM_ACCESS_PPI and EFI_SMM_ACCESS2_PROTOCOL are taken > and updated in > -// isolation from the rest of the (non-shared) members. > -// > - > -EFI_STATUS > -SmramAccessOpen ( > - OUT BOOLEAN *LockState, > - OUT BOOLEAN *OpenState > - ); > - > -EFI_STATUS > -SmramAccessClose ( > - OUT BOOLEAN *LockState, > - OUT BOOLEAN *OpenState > - ); > - > -EFI_STATUS > -SmramAccessLock ( > - OUT BOOLEAN *LockState, > - IN OUT BOOLEAN *OpenState > - ); > - > -EFI_STATUS > -SmramAccessGetCapabilities ( > - IN BOOLEAN LockState, > - IN BOOLEAN OpenState, > - IN OUT UINTN *SmramMapSize, > - IN OUT EFI_SMRAM_DESCRIPTOR *SmramMap > - ); > -- > 2.31.1.windows.1