From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web12.2738.1572506538844192773 for ; Thu, 31 Oct 2019 00:22:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=KpRZbAHz; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: michael.a.kubacki@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2019 00:22:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,250,1569308400"; d="scan'208";a="212374236" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by orsmga002.jf.intel.com with ESMTP; 31 Oct 2019 00:22:18 -0700 Received: from orsmsx159.amr.corp.intel.com (10.22.240.24) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 00:22:17 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX159.amr.corp.intel.com (10.22.240.24) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 00:22:17 -0700 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.53) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 31 Oct 2019 00:22:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AJdAgj8AD8nKQHwSgwOdOrsxTqtBSyS//bq1WXQIKFpq9il1jEkwgK8BGy4/DJ9DBzapoOnj2z3xES1B47o/p8OkTmxecPfvyJjiaKbA/r+bqbfvDM5+VFvityc1nh08vSla7TqVPu0I9SUt2C0n+Lmg/OonxNHbLZ4+K5fDlLGG9SNvRbYEF5MtVPEdaOr2yxRuEiCmCRgTnh9jeHEaWLT760djsl2+M2oh7RJ98JyRxsPqQJaAGFS44FTgfhbT5fe7SUf+zlx9MY1eQ0+TslCvMxsV5EzGa2oUG6kUbCQfY4bYwEg4dfsBd4b7/E1S7mfbJnbF92W4YGAVmIKZ2w== 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=5QNfcHnCiyQzoWmXcpqPqFxUKoCPUucvHdJnm1bHreI=; b=O87Rk+hZtBguwQ4tsbbGNlY3frwlKz5dm1FvST4KKRJbUZzBaIE9v8uFLHpUJJLoTbR/MD/4g+TcpiSt9JxApD1tmko4Vmfp66ue/6Q0sI1GEs11QT/ISX45egb1GaFCbpPmNS5efDEBcClTv57r+0pFN5S/HpP6sqksAgIJWTn7HDrFQ8y6340ObYe2nRT5FOFC5p0HIbgsLt8QkuClqkaiFXExWOgwcuIGzOPZA51+gTJIeA9wlauWd8H/2HLZUMaGzeQRs7qwhGg/kHyg3Zo2NwpjQ/b5XaLy+H7qJopiupIuHRtyzOMZTZUWMekeNMv0HAptPFCNV+h14Yc3rQ== 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=5QNfcHnCiyQzoWmXcpqPqFxUKoCPUucvHdJnm1bHreI=; b=KpRZbAHzZt3pG8u5tvwOOevdxMGxJPFdzrkmYSQfTJDF5KGpmoKBYKRMsvPa1N8/LpPTjz6yfqv2u/iIROOmfO8fqW1D9M3REFUjPyovWgMzedlOVl/6VUZC/oYsfpvlRLb4OGs88jP5VaHp5iSt/cIcaTG88ot6yIVjWXmKPtw= Received: from BYAPR11MB3831.namprd11.prod.outlook.com (20.178.239.150) by BYAPR11MB3813.namprd11.prod.outlook.com (20.178.239.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.20; Thu, 31 Oct 2019 07:22:14 +0000 Received: from BYAPR11MB3831.namprd11.prod.outlook.com ([fe80::1d66:1307:6b66:a78f]) by BYAPR11MB3831.namprd11.prod.outlook.com ([fe80::1d66:1307:6b66:a78f%5]) with mapi id 15.20.2387.028; Thu, 31 Oct 2019 07:22:14 +0000 From: "Kubacki, Michael A" To: "Agyeman, Prince" , "devel@edk2.groups.io" CC: "Sinha, Ankit" , "Desimone, Nathaniel L" Subject: Re: [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Add CmosAccessLib to BoardX58Ich10 Thread-Topic: [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Add CmosAccessLib to BoardX58Ich10 Thread-Index: AQHVjqgYn3eTO4OHQkmxwwMkqCmAIqd0WQqQ Date: Thu, 31 Oct 2019 07:22:14 +0000 Message-ID: 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 x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWY3ZDY5MjctNTVlYS00NDExLWE3NGMtNDYxNzNkNWY3YWQxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicVVTXC9sU2RrSTJBNnpIc3RGZDR5Z2VUclM2VWJnUlRPM01KTTY4Sk9vTDZ3eDJsZ0JrK2x1MFVZNmxwUmw4ekMifQ== 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: 73e00a57-3447-4731-f7e1-08d75dd30d89 x-ms-traffictypediagnostic: BYAPR11MB3813: 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:10000; x-forefront-prvs: 02070414A1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(376002)(396003)(366004)(346002)(39860400002)(189003)(199004)(13464003)(5660300002)(74316002)(102836004)(14454004)(25786009)(76116006)(229853002)(53546011)(6246003)(6506007)(71200400001)(66946007)(316002)(71190400001)(66446008)(64756008)(66556008)(66476007)(86362001)(19627235002)(486006)(8936002)(476003)(446003)(11346002)(14444005)(256004)(186003)(305945005)(26005)(107886003)(4326008)(7736002)(110136005)(55016002)(54906003)(6306002)(9686003)(2501003)(966005)(52536014)(6436002)(99286004)(8676002)(33656002)(478600001)(2906002)(81166006)(3846002)(6116002)(76176011)(66066001)(81156014)(7696005);DIR:OUT;SFP:1102;SCL:1;SRVR:BYAPR11MB3813;H:BYAPR11MB3831.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:3;A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YpICJQSTCeH0n4oE1eHMjLM0XtuVj6/iQxdMcZGnUytfcJThb+mnCgLbDot7ar21x/QaIQ5kTBHXcB85B2VgO50BZNkLa2s6dY2BT8zqURiPTByb/PDckvGmep7C0kK42uBk0JKHrDI1LYvZlGiWyoa0resWOhdvomRoVdPAWu9jKT9aGGKMVok40wuo5YIWgP0JAOXAV2XFfrWuU7uLUnf0vr1teVEG+8CODjFEKCxNsI2jJdHuep4RjAeVhU8V7MnJr0weS0NmQ5wdsMUO5d0AtTlZdm3FYcwMecBeYOL7QynBgDYmz48xAWiPTRA3YAr6Nm79UyIj5Ghj4Hbqfcgdx7K8ov1g6a1K3xP/EWRAp05LSqNnE1u4DoHYtpy0hpvXL7aWsq98olETfLe0/1YebMBLpso1R653cxISaw7Fq2hjpy6UOJTyrSQUjDAfIvUCTEyEQ5JQsZAYKBqPQENINzGqxqUuA1knWAZCK2s= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 73e00a57-3447-4731-f7e1-08d75dd30d89 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Oct 2019 07:22:14.0854 (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: hjT8x2m8DYRKHq7BpHBbjtB2tNJ0Hlaoz6g6y+eQ7gwZTDHuVLFLRKSpLR/taku8nJ6QSR4CvqgI5EiWqOi/0Hq8vgmWJ/UqsQu9vkLwIM8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3813 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 I still see custom implementation of CMOS functions and usage of those functions in SimicsOpenBoardPkg. Examples: 1. Platform\Intel\SimicsOpenBoardPkg\BoardX58Ich10\Library\BoardInitLib\Pei= X58Ich10InitPreMemLib.c: * CmosRead8 () * CmosWrite8 () 2. Platform\Intel\SimicsOpenBoardPkg\SimicsPei\MemDetect.c: * CmosRead8 () 3. Platform\Intel\SimicsOpenBoardPkg\SimicsPei\Platform.c: * CmosRead8 () 4. Platform\Intel\SimicsOpenBoardPkg\SmbiosPlatformDxe\SmbiosPlatformDxe.c: * CmosRead8 () Can you please check these and clean any other CMOS usage that is handled b= y the library? Thanks, Michael > -----Original Message----- > From: Agyeman, Prince > 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 >=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 > --- > .../BoardX58Ich10/OpenBoardPkg.dsc | 2 + > .../Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.c | 57 ------------------- > .../Intel/SimicsOpenBoardPkg/SimicsPei/Cmos.h | 50 ---------------- > .../SimicsOpenBoardPkg/SimicsPei/MemDetect.c | 4 +- > .../SimicsOpenBoardPkg/SimicsPei/Platform.c | 4 +- > .../SimicsPei/SimicsPei.inf | 3 +- > 6 files changed, 8 insertions(+), 112 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/OpenBoardPkg.dsc > 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 @@ >=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..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/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 > -- > 2.19.1.windows.1