From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.1442.1571366694176419110 for ; Thu, 17 Oct 2019 19:44:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=GQiXCR7v; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: michael.a.kubacki@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 19:44:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,310,1566889200"; d="scan'208";a="199572564" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by orsmga003.jf.intel.com with ESMTP; 17 Oct 2019 19:44:53 -0700 Received: from orsmsx151.amr.corp.intel.com (10.22.226.38) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 17 Oct 2019 19:44:53 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX151.amr.corp.intel.com (10.22.226.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 17 Oct 2019 19:44:53 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (104.47.32.51) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 17 Oct 2019 19:44:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H7B2RNJ1r6BGGRKfpvWeRsnzLziRp8M0pYqMyHiztWFKait+VdqWmWdZFDjma13gPgUMKVosDuxU5Y1byGSqaf2PXutPhRblYrH3ZnUYv8hflrzEnpHbqKRWl8ylcYiW4l1oMoeOdm5Y0XSsi82upESVYipLxnkCMkIosw4cANnaN5G85/eWSAJr/vljXxAp4GR01sinrlwHTp9Tk7Bj6EYuZZMqfWNV5wbWFUxmgWIgWeGIqUKoFtQzmWMg5pcEsY039518uKUuL2qMY/citjPfGIJwlpykrkv9r5Rcw67yMgnF5J6RBudhmw0hP2MbDEHNXgQpXcInrSKdiZbeJg== 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=qsLNE4efEh65FNrReGVUcMi45fk4cIo1PKy5LPGOiu8=; b=ZUrgZVF6EdkmYUOtVrGIgSaSqg8tZm/eXKD2fq6Z4KRCUOgenUkmLMZ8gMzWGhA7QSyGkD4PEGnI3TED7WTc5GMZQNIo21HbysYbXxw0OcGhS8muXvONEMedQDRg7jU/DuB6937u1XoXPO+jbyaAzgodtbPscEE+VNNpuo8vy9YVdR7IrCjokn40Z0csbfdf5aHC5e4ptzUNwE9Wen8aBTEcydCosJ62US6yKNE0nh82DkPBAMQu/CMTCMjuWRYqLVhFqX8mYsgYIaFU/04uVblrq/Bw1e6QRBkDLnpHt9uon3iWme/LWJwQXljFB5aroPcf5cftgTVFnsUwIC4WhA== 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=qsLNE4efEh65FNrReGVUcMi45fk4cIo1PKy5LPGOiu8=; b=GQiXCR7v36jehQPal0sWOUV5r9BBlKEMJr8e3OlFZv5gZr9Ok91MdIWLStr9Z/5CS4OnBTqFS/nXgEt8ah2Ea19jcYstGS0f8ys2jbTlsV5NJRvbz2RRZOdFlJAz/wsl6W7ZgFh4Cuhm+YVfohJiIomh24geNsoijYYI45gsP9I= Received: from DM6PR11MB3834.namprd11.prod.outlook.com (20.179.17.87) by DM6PR11MB4025.namprd11.prod.outlook.com (20.176.125.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.16; Fri, 18 Oct 2019 02:44:48 +0000 Received: from DM6PR11MB3834.namprd11.prod.outlook.com ([fe80::21f7:6d8d:919b:d755]) by DM6PR11MB3834.namprd11.prod.outlook.com ([fe80::21f7:6d8d:919b:d755%6]) with mapi id 15.20.2347.023; Fri, 18 Oct 2019 02:44:48 +0000 From: "Kubacki, Michael A" To: "Agyeman, Prince" , "devel@edk2.groups.io" CC: "Sinha, Ankit" , "Desimone, Nathaniel L" Subject: Re: [edk2-platforms] [PATCH v3 2/4] KabylakeOpenBoardPkg: Add BIOS Info PEIM Thread-Topic: [edk2-platforms] [PATCH v3 2/4] KabylakeOpenBoardPkg: Add BIOS Info PEIM Thread-Index: AQHVhUdQQK8F56RqzkCCkua7ggzHl6dfsRMg Date: Fri, 18 Oct 2019 02:44:48 +0000 Message-ID: References: <20191018000145.3140-1-prince.agyeman@intel.com> <20191018000145.3140-3-prince.agyeman@intel.com> In-Reply-To: <20191018000145.3140-3-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmJjODIzNzItM2U4Yy00ZWZlLWE2ZjItYzE1NjczYjIzY2RlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZFNEanBla0hxd3NiYTFRcm5GZ09VQUw3SDVWTmhrcmRlUkhjQ2FKaThNem1jVGxEdFphTksxWHB4blc2VEt3cyJ9 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: 3cd6cf9c-c054-494f-e871-08d7537524b1 x-ms-traffictypediagnostic: DM6PR11MB4025: 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:8273; x-forefront-prvs: 01949FE337 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39850400004)(136003)(376002)(366004)(346002)(396003)(189003)(199004)(13464003)(11346002)(25786009)(76176011)(229853002)(6436002)(6246003)(2501003)(99286004)(8936002)(2906002)(5660300002)(33656002)(86362001)(55016002)(9686003)(66946007)(6306002)(76116006)(81156014)(71190400001)(7696005)(66446008)(64756008)(66556008)(8676002)(19627235002)(66476007)(71200400001)(81166006)(107886003)(6116002)(3846002)(446003)(102836004)(305945005)(256004)(14444005)(26005)(186003)(478600001)(316002)(66066001)(14454004)(966005)(74316002)(7736002)(110136005)(4326008)(54906003)(486006)(52536014)(6506007)(53546011)(476003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR11MB4025;H:DM6PR11MB3834.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: kCsgeIVSRDp9+uaqk9dawsrvKnJLPdpRX0/pRBmbD56eBGyJE2/VJwk+JIyRysXdnYKveUCK3xrKYB4I7MCcE2fn3PZDrpVmjvzNhxI0mzDswMB98Y9J/NEGpJFj249qRJQEME5xcZSF6FhRcpO/QO3qXTOzFSCImYE6syXQCTuZcBN/SaEJ3bpHc6FFDtjpr9vUsDLvjqNjTCBXd7ddgulITK0l29DEXxRT1NFnRHck4U5jkPEsZndlW/DQcWbitYPiu7K2K9NHV1gMcX+Ht37eGE8VSeAjQZ5F0RM3Rz1NFhY2E/t+b1I0TrUmGI0nU0QF6KtgbN/BuH+cGil2JBXe7pkcNBXZ+Y8okZWM3H3i4jI6ysjWSgFjIbBBSr0CyNYDDDoiG/w8nRIkq258BontjGXUV7Y+d5P+Tiz7f67CrzJey7wO/rTbB/1/VIzvQT06oujRzIKaglqytH7WNg== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 3cd6cf9c-c054-494f-e871-08d7537524b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2019 02:44:48.6363 (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: puMU7Z2eaiYkmAJfqv0/bBpMo4WNcn3Vz+711JS5DN4xQrKCzTAcm2lixAZkgfXoBQ1LLnUTkV2KiOUKqIe3wkdom00gDY8Ug1csb5B0PaU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4025 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: Thursday, October 17, 2019 5:02 PM > To: devel@edk2.groups.io > Cc: Sinha, Ankit ; Desimone, Nathaniel L > ; Kubacki, Michael A > > Subject: [edk2-platforms] [PATCH v3 2/4] KabylakeOpenBoardPkg: Add BIOS > Info PEIM >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2210 >=20 > Added BIOS Info PEIM to KabylakeRvp3 and GalagoPro3 to publish the BIOS > info HOB. This PEIM currently publishes the board's microcode region > information. >=20 > Cc: Ankit Sinha > Cc: Nate DeSimone > Cc: Kubacki Michael A >=20 > Signed-off-by: Prince Agyeman > --- > .../KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c | 93 > +++++++++++++++++++ > .../BiosInfo/BiosInfo.inf | 49 ++++++++++ > .../GalagoPro3/OpenBoardPkg.dsc | 1 + > .../GalagoPro3/OpenBoardPkg.fdf | 1 + > .../KabylakeRvp3/OpenBoardPkg.dsc | 1 + > .../KabylakeRvp3/OpenBoardPkg.fdf | 1 + > 6 files changed, 146 insertions(+) > create mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c > create mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf >=20 > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c > b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c > new file mode 100644 > index 0000000000..578e66149e > --- /dev/null > +++ b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c > @@ -0,0 +1,93 @@ > +/** @file > + Driver for BIOS Info support. > + > + Copyright (c) 2019, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#define INDEXPORT_TO_ADDRESS(x) (x) > +#define DATAPORT_TO_ADDRESS(x) ((x) << 16) > +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32) > +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40) > +#define PORTINDEXNUMBER_TO_ADDRESS(x) ((x) << 48) > + > +// > +// Internal > +// > +#pragma pack (1) > + > +typedef struct { > + BIOS_INFO_HEADER Header; > + BIOS_INFO_STRUCT Entry[1]; > +} BIOS_INFO; > +#pragma pack () > + > +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO mBiosInfo =3D { > + { > + BIOS_INFO_SIGNATURE, > + 1, > + 0, > + }, > + { > + { > + FIT_TYPE_01_MICROCODE, > + BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION, > + 0x0100, > + FixedPcdGet32 (PcdFlashMicrocodeFvSize), > + FixedPcdGet32 (PcdFlashMicrocodeFvBase) > + } > + } > +}; > + > +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR > mBiosInfoPpiList > +=3D { > + EFI_PEI_PPI_DESCRIPTOR_PPI | > EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, > + &gBiosInfoGuid, > + &mBiosInfo > +}; > + > +/** > + Installs BiosInfo Ppi and builds BiosInfo HOB . > + > + @param FileHandle Handle of the file being invoked. > + @param PeiServices Describes the list of possible PEI Services. > + > + @retval EFI_SUCCESS Install the BiosInfo Ppi and HOB successfully. > + > +**/ > +EFI_STATUS > +EFIAPI > +BiosInfoEntryPoint ( > + IN EFI_PEI_FILE_HANDLE FileHandle, > + IN CONST EFI_PEI_SERVICES **PeiServices > + ) > +{ > + EFI_STATUS Status; > + VOID *HobData; > + > + // > + // Install PPI, so that other PEI module can add dependency. > + // > + Status =3D PeiServicesInstallPpi (&mBiosInfoPpiList); ASSERT_EFI_ERRO= R > + (Status); > + > + // > + // Build hob, so that DXE module can also get the data. > + // > + HobData =3D BuildGuidHob (&gBiosInfoGuid, sizeof (mBiosInfo)); ASSERT > + (HobData !=3D NULL); if (HobData =3D=3D NULL) { > + return EFI_OUT_OF_RESOURCES; > + } > + CopyMem (HobData, &mBiosInfo, sizeof (mBiosInfo)); > + > + return EFI_SUCCESS; > +} > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf > b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf > new file mode 100644 > index 0000000000..e5e40144a6 > --- /dev/null > +++ b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf > @@ -0,0 +1,49 @@ > +### @file > +# Module Information description file for BIOS Info Driver # # > +Copyright (c) 2019, Intel Corporation. All rights reserved.
# > +SPDX-License-Identifier: BSD-2-Clause-Patent ### > + > +[Defines] > + INF_VERSION =3D 0x00010017 > + BASE_NAME =3D BiosInfo > + FILE_GUID =3D C83BCE0E-6F16-4D3C-8D9F-4D6F5A03292= 9 > + VERSION_STRING =3D 1.0 > + MODULE_TYPE =3D PEIM > + ENTRY_POINT =3D BiosInfoEntryPoint > +# > +# The following information is for reference only and not required by th= e > build tools. > +# > +# VALID_ARCHITECTURES IA32 X64 > +# > + > +[LibraryClasses] > + PeimEntryPoint > + PeiServicesLib > + HobLib > + BaseMemoryLib > + DebugLib > + PcdLib > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + IntelSiliconPkg/IntelSiliconPkg.dec > + KabylakeSiliconPkg/SiPkg.dec > + KabylakeFspBinPkg/KabylakeFspBinPkg.dec > + BoardModulePkg/BoardModulePkg.dec > + MinPlatformPkg/MinPlatformPkg.dec > + > +[Pcd] > + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase ## > CONSUMES > + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize ## CON= SUMES > + > +[Sources] > + BiosInfo.c > + > +[Guids] > + gBiosInfoGuid ## PRODUCES > + > +[Depex] > + TRUE > diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc > b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc > index b6f9807e7e..f59248bba4 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc > @@ -298,6 +298,7 @@ > !if gKabylakeOpenBoardPkgTokenSpaceGuid.PcdTbtEnable =3D=3D TRUE > $(PLATFORM_BOARD_PACKAGE)/Features/Tbt/TbtInit/Pei/PeiTbtInit.inf > !endif > + $(PLATFORM_BOARD_PACKAGE)/BiosInfo/BiosInfo.inf >=20 > [Components.X64] > ####################################### > diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf > b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf > index c46f7a71e5..80efab1aad 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf > @@ -240,6 +240,7 @@ INF > $(PLATFORM_PACKAGE)/PlatformInit/ReportFv/ReportFvPei.inf > INF > $(PROJECT)/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformI > nitPei/PlatformInitPreMem.inf > INF IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf > INF > $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMe > m.inf > +INF $(PLATFORM_BOARD_PACKAGE)/BiosInfo/BiosInfo.inf >=20 > [FV.FvPostMemoryUncompact] > BlockSize =3D $(FLASH_BLOCK_SIZE) > diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > index b412dc9eec..7e65eeda6f 100644 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > @@ -370,6 +370,7 @@ > !if gKabylakeOpenBoardPkgTokenSpaceGuid.PcdTbtEnable =3D=3D TRUE > $(PLATFORM_BOARD_PACKAGE)/Features/Tbt/TbtInit/Pei/PeiTbtInit.inf > !endif > + $(PLATFORM_BOARD_PACKAGE)/BiosInfo/BiosInfo.inf >=20 > [Components.X64] > ####################################### > diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf > index c61b93db84..dbd6f2aa10 100644 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf > @@ -242,6 +242,7 @@ INF > $(PLATFORM_PACKAGE)/PlatformInit/ReportFv/ReportFvPei.inf > INF > $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitPei/PlatformInitPreMem.i > nf > INF IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf > INF > $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreMe > m.inf > +INF $(PLATFORM_BOARD_PACKAGE)/BiosInfo/BiosInfo.inf >=20 > [FV.FvPostMemoryUncompact] > BlockSize =3D $(FLASH_BLOCK_SIZE) > -- > 2.19.1.windows.1