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.web09.1141.1572994044388418980 for ; Tue, 05 Nov 2019 14:47:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=T8VQ1T6u; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: michael.a.kubacki@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2019 14:47:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,271,1569308400"; d="scan'208";a="226192684" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by FMSMGA003.fm.intel.com with ESMTP; 05 Nov 2019 14:47:23 -0800 Received: from orsmsx126.amr.corp.intel.com (10.22.240.126) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 5 Nov 2019 14:47:23 -0800 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX126.amr.corp.intel.com (10.22.240.126) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 5 Nov 2019 14:47:23 -0800 Received: from NAM03-CO1-obe.outbound.protection.outlook.com (104.47.40.57) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 5 Nov 2019 14:47:22 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AoK9KQFm6Nh0JrLZWDObfJ49CwDQcpQohzZusmK6aFxWWdCY0rlNO3VjQIUxyP4Brq+l9QbU0tRN5xPdMIAvXR/h0gsOWZ0Q4GY9IG8XFGr9U9ZpVqHDXY+piZOvF+VPGuvwQuU1K5NgUQ2f5uwYGG/+vXy53i5DNAp0zSY5u9MWcp6UdQRUE4nSleyhYH5igJAF/wGszNHY/a5+EUHsbAnz1eCdcLqIy6rrJuh3Mm3e+yclq3cnM7FRQmCCL4ioaUsEtvmEqdzazBKCPZVnR9pMfP2xIJUyvrXxW8Y/bfZZpvUIWhFMhUWT025JEHm7i1NxAovieQVOQLNUqaD1yw== 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-SenderADCheck; bh=8T84jGR7nOQsDSQC/WbFCgue4ZzlS18xpK1Jz6HGp+s=; b=iKN08as6KjYER7oMOBu7NnPn+yprn8ezvlqkn3t1wGj2lt1RNc/1vHCWuuKxQyjMaW60BiZdY2tIy4F3ReCOeJM0XLLAhAy1PlCqnk3Wol6aJB52OIfs/vhYNBaI87q//BtKcpaxKIC0wGgZf8BbbQnLbkaqks7bdSt2WWUVWZZs+uzGr6FXXmmKge8l9tPe/LzmwpC/NeI15p7YxAEm2RJqVFqTgDSmcEwUTBVYs7UGUk3/dPmN2NMtcpDRz0XgSchmuNIxfmp4qyGGqJpe956kTzkBqyFFHFkSmFKxZkyI1BBmzJYCH1LS20tBGDSTI0iYbLydve9fIlghUqVP5g== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8T84jGR7nOQsDSQC/WbFCgue4ZzlS18xpK1Jz6HGp+s=; b=T8VQ1T6u4OCgDVAchg6fc/sNfqp8zEo6vFNNtJBuQtxDn+uA0FdJSvilXrz7BROuPyYgUs514fY6Xoc0+tFg9HuGTsGmWdikFc9va2N4GdbxhP+uu1UVGgh3gBoC4AcXoJ/Juu72WpvqKaybZ9B6cvlrSOyQDruYwSIgWP7hCnI= Received: from BY5PR11MB4484.namprd11.prod.outlook.com (52.132.254.155) by BY5PR11MB4370.namprd11.prod.outlook.com (52.132.254.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2408.24; Tue, 5 Nov 2019 22:47:21 +0000 Received: from BY5PR11MB4484.namprd11.prod.outlook.com ([fe80::c1ef:6e0b:90c8:55e2]) by BY5PR11MB4484.namprd11.prod.outlook.com ([fe80::c1ef:6e0b:90c8:55e2%7]) with mapi id 15.20.2430.020; Tue, 5 Nov 2019 22:47:21 +0000 From: "Kubacki, Michael A" To: "Agyeman, Prince" , "devel@edk2.groups.io" CC: "Sinha, Ankit" , "Desimone, Nathaniel L" Subject: Re: [edk2-platforms] [PATCH v2] SimicsOpenBoardPkg: Add CmosAccessLib to BoardX58Ich10 Thread-Topic: [edk2-platforms] [PATCH v2] SimicsOpenBoardPkg: Add CmosAccessLib to BoardX58Ich10 Thread-Index: AQHVkQ49ZCzb9MfEjEmu8FR5o6fKTad9M7Fw Date: Tue, 5 Nov 2019 22:47:21 +0000 Message-ID: References: <20191101234335.42520-1-prince.agyeman@intel.com> In-Reply-To: <20191101234335.42520-1-prince.agyeman@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTFmMDJkOTItZmYwNy00YWNlLWFjNmQtYmZlYmQ4MzRiMmNiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiS29jXC9GSitVZ1F5XC9Nam5TQWVDczI3a3ZZR1NcL3pPaUoxQmJLcXFlcnRmRFoxV0FPbXlINXNQeXowa1lRSTNmdSJ9 dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=michael.a.kubacki@intel.com; x-originating-ip: [134.134.136.217] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2785625c-1d96-4f72-946e-08d762421e55 x-ms-traffictypediagnostic: BY5PR11MB4370: x-ms-exchange-purlcount: 1 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0212BDE3BE x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(199004)(189003)(13464003)(53546011)(99286004)(7736002)(256004)(26005)(66066001)(102836004)(25786009)(14444005)(186003)(81156014)(81166006)(52536014)(86362001)(8676002)(30864003)(5660300002)(66476007)(66556008)(64756008)(14454004)(66946007)(76116006)(66446008)(498600001)(33656002)(486006)(305945005)(6506007)(229853002)(110136005)(71190400001)(71200400001)(966005)(2906002)(11346002)(8936002)(19627235002)(446003)(476003)(9686003)(6246003)(107886003)(6306002)(76176011)(2501003)(55016002)(4326008)(6436002)(7696005)(54906003)(3846002)(6116002)(74316002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY5PR11MB4370;H:BY5PR11MB4484.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jvb5VVKLInNNJkjmAj6rwFyj9qzvw5pTdvmJkwVAvQ1Fh+YLYx6G0pownztjQW3piU3v0koc8u45MhoMHPjlMbf5JGTw6QHQMVaGJmAfZ3YHdkpYXR978QmeR2J34pbat6eIsLrdA93kFxAQoL7PFK0EuqgF6jnFWgORv51kLRC5IzwPXGeuIUYJeXFlM2TU3fu8uOPOljf+wUVJpLLnm3mWUm9HpcPdErgBmXfT2tVYFLu3bmj4BA/TpvUKfpUH3upSDV+LeyNmhuFhxLFp5fyqsiM6rej/uKYYk2yo+1HjLKw16PA5GH7B6kvaJDR6JyxNX20lm47iBI/K4FsxnuU3dPXvjWbAXsRrunR8YXWTlrAK5XIq7XXi7EHAhR3t5JvPq3vGX9kIaw1BuTV/P4GULRingeSnZpweVTEpCY+p5BBDvhVNN8AH/5TzX1mxA9lF7/Cebb4Tc7cY511hyrwWf+TcOmoMq/zfXm498/o= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 2785625c-1d96-4f72-946e-08d762421e55 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2019 22:47:21.0994 (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: Kh2ri7Y5vy88sKbSP4yxWDtdYBoREn038vsX7/49hX1PxKqcXLlK4D5ylRDf0WjlertORBAb0pStSMIUeeI3YgrwES6FeAyQ3f6bZasJptQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4370 Return-Path: michael.a.kubacki@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Michael Kubacki > -----Original Message----- > From: Agyeman, Prince > Sent: Friday, November 1, 2019 4:44 PM > To: devel@edk2.groups.io > Cc: Sinha, Ankit ; Desimone, Nathaniel L > ; Kubacki, Michael A > > Subject: [edk2-platforms] [PATCH v2] SimicsOpenBoardPkg: Add > CmosAccessLib to BoardX58Ich10 >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2164 >=20 > Replaced Cmos.c and Cmos.h with BoardModulePkg's Cmos library > CmosAccessLib >=20 > Cc: Ankit Sinha > Cc: Nate DeSimone > Cc: Kubacki Michael A >=20 > Signed-off-by: Prince Agyeman > --- > .../BoardInitLib/PeiX58Ich10InitPreMemLib.c | 46 --------------- > .../BoardX58Ich10/OpenBoardPkg.dsc | 2 + > .../Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c | 57 ------------------- > .../Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h | 50 ---------------- > .../SimicsOpenBoardPkg/SimicsPei/MemDetect.c | 19 +------ > .../SimicsOpenBoardPkg/SimicsPei/Platform.c | 4 +- > .../SimicsPei/SimicsPei.inf | 3 +- > .../SmbiosPlatformDxe/SmbiosPlatformDxe.c | 38 +------------ > .../SmbiosPlatformDxe/SmbiosPlatformDxe.h | 1 + > .../SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 2 + > 10 files changed, 14 insertions(+), 208 deletions(-) delete mode 100644 > Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c > delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h >=20 > diff --git > a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/Library/BoardInitLib/ > PeiX58Ich10InitPreMemLib.c > b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/Library/BoardInitLib/ > PeiX58Ich10InitPreMemLib.c > index c3a31ed426..325a341cdf 100644 > --- > a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/Library/BoardInitLib/ > PeiX58Ich10InitPreMemLib.c > +++ > b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/Library/BoardInitL > +++ ib/PeiX58Ich10InitPreMemLib.c > @@ -20,52 +20,6 @@ >=20 > #include "PeiX58Ich10InitLib.h" > #include > -/** > - Reads 8-bits of CMOS data. > - > - Reads the 8-bits of CMOS data at the location specified by Index. > - The 8-bit read value is returned. > - > - @param Index The CMOS location to read. > - > - @return The value read. > - > -**/ > -UINT8 > -EFIAPI > -CmosRead8( > - IN UINTN Index > - ) > -{ > - IoWrite8 (0x70, (UINT8)Index); > - return IoRead8(0x71); > -} > - > - > -/** > - Writes 8-bits of CMOS data. > - > - Writes 8-bits of CMOS data to the location specified by Index > - with the value specified by Value and returns Value. > - > - @param Index The CMOS location to write. > - @param Value The value to write to CMOS. > - > - @return The value written to CMOS. > - > -**/ > -UINT8 > -EFIAPI > -CmosWrite8( > - IN UINTN Index, > - IN UINT8 Value > - ) > -{ > - IoWrite8 (0x70, (UINT8)Index); > - IoWrite8 (0x71, Value); > - return Value; > -} > - >=20 > EFI_STATUS > EFIAPI > diff --git > a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc > b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc > index 78f1e80990..9b9e088cbe 100644 > --- > a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc > +++ > b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc > @@ -116,6 +116,8 @@ >=20 > SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/Serializ= eV > ariablesLib.inf >=20 > SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/Sil= iconP > olicyInitLib.inf >=20 > SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib > /SiliconPolicyUpdateLib.inf > + > + > PlatformCmosAccessLib|BoardModulePkg/Library/PlatformCmosAccessLibN > ull > + /PlatformCmosAccessLibNull.inf > + > CmosAccessLib|BoardModulePkg/Library/CmosAccessLib/CmosAccessLib.inf >=20 > [LibraryClasses.common.SEC] > ####################################### > diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c > b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c > deleted file mode 100644 > index b34ba9283b..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c > +++ /dev/null > @@ -1,57 +0,0 @@ > -/** @file > - PC/AT CMOS access routines > - > - Copyright (c) 2006 - 2019 Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ > - > -#include "Cmos.h" > -#include "Library/IoLib.h" > - > -/** > - Reads 8-bits of CMOS data. > - > - Reads the 8-bits of CMOS data at the location specified by Index. > - The 8-bit read value is returned. > - > - @param Index The CMOS location to read. > - > - @return The value read. > - > -**/ > -UINT8 > -EFIAPI > -CmosRead8 ( > - IN UINTN Index > - ) > -{ > - IoWrite8 (0x70, (UINT8) Index); > - return IoRead8 (0x71); > -} > - > - > -/** > - Writes 8-bits of CMOS data. > - > - Writes 8-bits of CMOS data to the location specified by Index > - with the value specified by Value and returns Value. > - > - @param Index The CMOS location to write. > - @param Value The value to write to CMOS. > - > - @return The value written to CMOS. > - > -**/ > -UINT8 > -EFIAPI > -CmosWrite8 ( > - IN UINTN Index, > - IN UINT8 Value > - ) > -{ > - IoWrite8 (0x70, (UINT8) Index); > - IoWrite8 (0x71, Value); > - return Value; > -} > - > diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h > b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h > deleted file mode 100644 > index 07fa2e2d11..0000000000 > --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h > +++ /dev/null > @@ -1,50 +0,0 @@ > -/** @file > - PC/AT CMOS access routines > - > - Copyright (c) 2006 - 2019 Intel Corporation. All rights reserved.
> - > - SPDX-License-Identifier: BSD-2-Clause-Patent -**/ > - > -#ifndef __CMOS_H__ > -#define __CMOS_H__ > - > -/** > - Reads 8-bits of CMOS data. > - > - Reads the 8-bits of CMOS data at the location specified by Index. > - The 8-bit read value is returned. > - > - @param Index The CMOS location to read. > - > - @return The value read. > - > -**/ > -UINT8 > -EFIAPI > -CmosRead8 ( > - IN UINTN Index > - ); > - > -/** > - Writes 8-bits of CMOS data. > - > - Writes 8-bits of CMOS data to the location specified by Index > - with the value specified by Value and returns Value. > - > - @param Index The CMOS location to write. > - @param Value The value to write to CMOS. > - > - @return The value written to CMOS. > - > -**/ > -UINT8 > -EFIAPI > -CmosWrite8 ( > - IN UINTN Index, > - IN UINT8 Value > - ); > - > - > -#endif > - > diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c > b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c > index ee0eead5a8..e547de0045 100644 > --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c > +++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c > @@ -22,11 +22,11 @@ > #include > #include > #include > +#include > #include > #include >=20 > #include "Platform.h" > -#include "Cmos.h" >=20 > UINT8 mPhysMemAddressWidth; >=20 > @@ -80,9 +80,6 @@ GetSystemMemorySizeBelow4gb ( > VOID > ) > { > - UINT8 Cmos0x34; > - UINT8 Cmos0x35; > - > // > // CMOS 0x34/0x35 specifies the system memory above 16 MB. > // * CMOS(0x35) is the high byte > @@ -91,11 +88,7 @@ GetSystemMemorySizeBelow4gb ( > // * Since this is memory above 16MB, the 16MB must be added > // into the calculation to get the total memory size. > // > - > - Cmos0x34 =3D (UINT8) CmosRead8 (0x34); > - Cmos0x35 =3D (UINT8) CmosRead8 (0x35); > - > - return (UINT32) (((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + > SIZE_16MB); > + return (UINT32) (((UINTN)CmosRead16 (0x34) << 16) + SIZE_16MB); > } >=20 >=20 > @@ -105,8 +98,6 @@ GetSystemMemorySizeAbove4gb ( > ) > { > UINT32 Size; > - UINTN CmosIndex; > - > // > // CMOS 0x5b-0x5d specifies the system memory above 4GB MB. > // * CMOS(0x5d) is the most significant size byte @@ -114,11 +105,7 @@ > GetSystemMemorySizeAbove4gb ( > // * CMOS(0x5b) is the least significant size byte > // * The size is specified in 64kb chunks > // > - > - Size =3D 0; > - for (CmosIndex =3D 0x5d; CmosIndex >=3D 0x5b; CmosIndex--) { > - Size =3D (UINT32) (Size << 8) + (UINT32) CmosRead8 (CmosIndex); > - } > + Size =3D (CmosRead16 (0x5c) << 8) + CmosRead8 (0x5b); >=20 > return LShiftU64 (Size, 16); > } > diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c > b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c > index 7568d25c4e..0bec76e496 100644 > --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c > +++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c > @@ -22,13 +22,13 @@ > #include > #include > #include > +#include > #include #include > #include #include > >=20 > #include "Platform.h" > -#include "Cmos.h" >=20 > EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] =3D { > { EfiACPIMemoryNVS, 0x004 }, > @@ -524,7 +524,7 @@ DebugDumpCmos ( > VOID > ) > { > - UINT32 Loop; > + UINT8 Loop; >=20 > DEBUG ((EFI_D_INFO, "CMOS:\n")); >=20 > diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/SimicsPei.inf > b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/SimicsPei.inf > index 9499d2aad5..710fa680be 100644 > --- a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/SimicsPei.inf > +++ b/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/SimicsPei.inf > @@ -23,7 +23,6 @@ > # >=20 > [Sources] > - Cmos.c > FeatureControl.c > MemDetect.c > Platform.c > @@ -36,6 +35,7 @@ > MinPlatformPkg/MinPlatformPkg.dec > SimicsX58SktPkg/SktPkg.dec > SimicsIch10Pkg/Ich10Pkg.dec > + BoardModulePkg/BoardModulePkg.dec >=20 > [Guids] > gEfiMemoryTypeInformationGuid > @@ -53,6 +53,7 @@ > PeimEntryPoint > MtrrLib > PcdLib > + CmosAccessLib >=20 > [Pcd] > gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsPeiMemFvBase > diff --git > a/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > Dxe.c > b/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > Dxe.c > index 7165c0a0c3..37c659e275 100644 > --- > a/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > Dxe.c > +++ > b/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > +++ Dxe.c > @@ -10,35 +10,11 @@ > #include "SmbiosPlatformDxe.h" >=20 >=20 > -/** > -Reads 8-bits of CMOS data. > - > -Reads the 8-bits of CMOS data at the location specified by Index. > -The 8-bit read value is returned. > - > -@param Index The CMOS location to read. > - > -@return The value read. > - > -**/ > -UINT8 > -EFIAPI > -CmosRead8( > - IN UINTN Index > - ) > -{ > - IoWrite8(0x70, (UINT8)Index); > - return IoRead8(0x71); > -} > - > UINT32 > GetSystemMemorySizeBelow4gb( > VOID > ) > { > - UINT8 Cmos0x34; > - UINT8 Cmos0x35; > - > // > // CMOS 0x34/0x35 specifies the system memory above 16 MB. > // * CMOS(0x35) is the high byte > @@ -47,11 +23,7 @@ GetSystemMemorySizeBelow4gb( > // * Since this is memory above 16MB, the 16MB must be added > // into the calculation to get the total memory size. > // > - > - Cmos0x34 =3D (UINT8)CmosRead8(0x34); > - Cmos0x35 =3D (UINT8)CmosRead8(0x35); > - > - return (UINT32)(((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + > SIZE_16MB); > + return (UINT32) (((UINTN) CmosRead16 (0x34) << 16) + SIZE_16MB); > } >=20 > STATIC > @@ -61,8 +33,6 @@ GetSystemMemorySizeAbove4gb( > ) > { > UINT32 Size; > - UINTN CmosIndex; > - > // > // CMOS 0x5b-0x5d specifies the system memory above 4GB MB. > // * CMOS(0x5d) is the most significant size byte @@ -70,11 +40,7 @@ > GetSystemMemorySizeAbove4gb( > // * CMOS(0x5b) is the least significant size byte > // * The size is specified in 64kb chunks > // > - > - Size =3D 0; > - for (CmosIndex =3D 0x5d; CmosIndex >=3D 0x5b; CmosIndex--) { > - Size =3D (UINT32)(Size << 8) + (UINT32)CmosRead8(CmosIndex); > - } > + Size =3D (CmosRead16 (0x5c) << 8) + CmosRead8 (0x5b); >=20 > return LShiftU64(Size, 16); > } > diff --git > a/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > Dxe.h > b/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > Dxe.h > index f9c641845c..0dc174421c 100644 > --- > a/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > Dxe.h > +++ > b/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > +++ Dxe.h > @@ -20,6 +20,7 @@ > #include > #include #include > +#include >=20 > /** > Validates the SMBIOS entry point structure diff --git > a/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > Dxe.inf > b/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > Dxe.inf > index 1420a315cf..3cc6a03564 100644 > --- > a/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > Dxe.inf > +++ > b/Platform/Intel/SimicsOpenBoardPkg/SmbiosPlatformDxe/SmbiosPlatform > +++ Dxe.inf > @@ -32,6 +32,7 @@ > MdeModulePkg/MdeModulePkg.dec > SimicsOpenBoardPkg/OpenBoardPkg.dec > AdvancedFeaturePkg/AdvancedFeaturePkg.dec > + BoardModulePkg/BoardModulePkg.dec >=20 > [LibraryClasses] > UefiBootServicesTableLib > @@ -42,6 +43,7 @@ > HobLib > MemoryAllocationLib > IoLib > + CmosAccessLib >=20 > [Protocols] > gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED > -- > 2.19.1.windows.1