From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.283.1572484979922012573 for ; Wed, 30 Oct 2019 18:23:00 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: nathaniel.l.desimone@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 18:22:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,249,1569308400"; d="scan'208";a="401707784" Received: from orsmsx103.amr.corp.intel.com ([10.22.225.130]) by fmsmga006.fm.intel.com with ESMTP; 30 Oct 2019 18:22:59 -0700 Received: from orsmsx113.amr.corp.intel.com ([169.254.9.28]) by ORSMSX103.amr.corp.intel.com ([169.254.5.9]) with mapi id 14.03.0439.000; Wed, 30 Oct 2019 18:22:59 -0700 From: "Nate DeSimone" To: "Agyeman, Prince" , "devel@edk2.groups.io" CC: "Sinha, Ankit" , "Kubacki, Michael A" Subject: Re: [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Add CmosAccessLib to BoardX58Ich10 Thread-Topic: [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Add CmosAccessLib to BoardX58Ich10 Thread-Index: AQHVjqgIMBUZDKBMRkO+rdLQpDPC/adz9boA Date: Thu, 31 Oct 2019 01:22:58 +0000 Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5B86F4B@ORSMSX113.amr.corp.intel.com> References: <20191029222719.13912-1-prince.agyeman@intel.com> In-Reply-To: <20191029222719.13912-1-prince.agyeman@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2QzMDgyMzctMWUxMi00YmEwLWI2MjMtOWMwNzM3MjM2M2VjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoib1lGUGJ2OU9iOVdcL0ZOUG1oTWgrcTZsWkFcL0xveWlSM3VPUVB6UnRsQXpjZWR2dEdPV2dWV01sN2RcL1R0SHRYVCJ9 x-ctpclassification: CTP_NT x-originating-ip: [10.22.254.138] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Nate DeSimone -----Original Message----- From: Agyeman, Prince =20 Sent: Tuesday, October 29, 2019 3:27 PM To: devel@edk2.groups.io Cc: Sinha, Ankit ; Desimone, Nathaniel L ; Kubacki, Michael A Subject: [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Add CmosAccessLib to = BoardX58Ich10 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2164 Replaced Cmos.c and Cmos.h with BoardModulePkg's Cmos library CmosAccessLib Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../BoardX58Ich10/OpenBoardPkg.dsc | 2 + .../Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c | 57 ------------------- ..= ./Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h | 50 ---------------- .../Simi= csOpenBoardPkg/SimicsPei/MemDetect.c | 4 +- .../SimicsOpenBoardPkg/SimicsPei/Platform.c | 4 +- .../SimicsPei/SimicsPei.inf | 3 +- 6 files changed, 8 insertions(+), 112 deletions(-) delete mode 100644 Pla= tform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c delete mode 100644 Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.d= sc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc index 4f8ab4170d..67f1680a4f 100644 --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc +++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc @@ -115,6 +115,8 @@ SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/Seriali= zeVariablesLib.inf SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/Si= liconPolicyInitLib.inf SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLi= b/SiliconPolicyUpdateLib.inf + =20 + PlatformCmosAccessLib|BoardModulePkg/Library/PlatformCmosAccessLibNull + /PlatformCmosAccessLibNull.inf =20 + 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/Plat= form/Intel/SimicsOpenBoardPkg/SimicsPei/MemDetect.c index ee0eead5a8..4d16fd2fac 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 @@ -105,7 +105,7 @@ GetSystemMemorySizeAbove4gb ( ) { UINT32 Size; - UINTN CmosIndex; + UINT8 CmosIndex; =20 // // CMOS 0x5b-0x5d specifies the system memory above 4GB MB. diff --git a/Platform/Intel/SimicsOpenBoardPkg/SimicsPei/Platform.c b/Platf= orm/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/Pl= atform/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 -- 2.19.1.windows.1