From nobody Wed Apr 24 14:11:08 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+49608+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+49608+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1572388042; cv=none; d=zoho.com; s=zohoarc; b=DUFbqBK5gflRXal0GGEYsbF5R/kBQPdtqV5yhJ/r4XZOxKVj1zPIWUejjTm9mk7Q/PD+yOqsbrC9+ZLEnv+Uag3wcB3981uV8UYyXkccBB+2Vi48dgbmMKFyf0qh9seeIr+0IQcEGZMV4qxn5LHF7p4cf/Lvbi5iyCoA/BGSgh0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572388042; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=kswYA78TRi5iuEngOeKMoUe6FXAC1qhGb9Ol2qu0ib8=; b=bMxtqbLwgUC2XeUYVBL1Ewekt16lu9MWlhDxyff8xnywZw34vJ6nDjkql0JbjS5+z2papoJhqVk7X+BoSTuI/5FgLHEcvvVjg/SurfkN4nBhNQBmRdWA9Lmf6VgBv56ttkdD/UOgIlyw+RD2RkaVtvzWhteDlLp9QAAHhtxFGNM= 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+49608+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 157238804200845.64789027753511; Tue, 29 Oct 2019 15:27:22 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aaaaYY1788612xaaaaaaaaaa; Tue, 29 Oct 2019 15:27:21 -0700 X-Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web12.2830.1572388040779756649 for ; Tue, 29 Oct 2019 15:27:20 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2019 15:27:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,245,1569308400"; d="scan'208";a="205609954" X-Received: from paagyema-desk2.amr.corp.intel.com ([10.24.15.58]) by FMSMGA003.fm.intel.com with ESMTP; 29 Oct 2019 15:27:19 -0700 From: "Agyeman, Prince" To: devel@edk2.groups.io Cc: Ankit Sinha , Nate DeSimone , Kubacki Michael A Subject: [edk2-devel] [edk2-platforms] [PATCH] SimicsOpenBoardPkg: Add CmosAccessLib to BoardX58Ich10 Date: Tue, 29 Oct 2019 15:27:19 -0700 Message-Id: <20191029222719.13912-1-prince.agyeman@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,prince.agyeman@intel.com X-Gm-Message-State: aaaaaaaaaaaaaaaaaaaaaaaax1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1572388041; bh=GMeHxUaN73imJRdXmykix6z50BQBKDAVA62iaN/KxVo=; h=Cc:Date:From:Reply-To:Subject:To; b=fTYzSVTj3/F5uikTmQuPqYSskBg3ge6NKEkP5i8c/xHJFYEuNaNm1LFAjHR4eBM/v84 ylSVE/KFTQ10TEjqJvcr/W1I9wp/GoGfOb6boEd0Q+zZNB3DSKD7gN1fgVEHJC+pE5iqx Pbpv8Xr3Skia2BXZyrp8oj6ggqvw+KG4bz8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Nate DeSimone --- .../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 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 + PlatformCmosAccessLib|BoardModulePkg/Library/PlatformCmosAccessLibNull/P= latformCmosAccessLibNull.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/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 --=20 2.19.1.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 (#49608): https://edk2.groups.io/g/devel/message/49608 Mute This Topic: https://groups.io/mt/39678428/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-