From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.204.1571247140930224540 for ; Wed, 16 Oct 2019 10:32:21 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=jMYu8yaG; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: michael.a.kubacki@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 10:32:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,304,1566889200"; d="scan'208";a="189748282" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by orsmga008.jf.intel.com with ESMTP; 16 Oct 2019 10:32:19 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 16 Oct 2019 10:32:19 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 16 Oct 2019 10:32:18 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 16 Oct 2019 10:32:18 -0700 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.59) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 16 Oct 2019 10:32:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JbZ6ENRNkn64sdhwzuXgIowpKd2vKOdWLpG27Kz1vAEHLPfPi2nxz3gMYiIByNgopP23RA/yfb13Zxd48qsL9i6gv33jXmg5fyEXoR5O3mxPC5pqY9nOkoCip2Qk3EcYJFYrj+attr76jj7/fwJQrh6EjIRaLb1YWt6Egnlg5qGEgc1jYHId9G9xWry+mfaA04RCUJI93nC0xxlESaGLEjvj/235UfD/D3TpW0TSVpuhJlm4jvD4ulZ/tFocNXU8S4R8PIt4/ZOSWYr1HZBS7AoURbK2tUAv5ZDTfRTw/lBoWByPDnqDEzWSt1DoO2HgIYS9FbWKdA540OMg1q1mIg== 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=PQ4qusBdgGfXF7nd2ofAHdru8RGkzo4grSkzyYStiss=; b=HD2yLz4nhdjfnygtGZPQrDbrXM2QGSS5euxDZv3XCrfds4KlW1D9Ee+7lIlrUVJGrJgmH65tcGuUfTfyofGfhQhiOtB10pO4U2AZFSxM9NMXS80W5StTd7cri30LsxvSjvlwLbTGqOwKhyMMbUGc0VWuWsDvu+CxdfsIQUcgSx7ur5fl5yMdpHf3oVzrVHlvEGM90Ovzj+IGqleUIX32+TxU+0rLkzFMpfRbS1HO+zFUWCxUxrBQnpHCFohSCaVL809vH3rdTM4hzWhnWYF2tMow86CTjCkgmxEPVISmhnT1yX2M7509Guh3MFmx9hRR9qzLasXvtM56NnSMdBcVlw== 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=PQ4qusBdgGfXF7nd2ofAHdru8RGkzo4grSkzyYStiss=; b=jMYu8yaG8pTzRlTLdeQ0eHD/xwL9gtoh8gp2sXZ/w9FGFviClnZgQv6Ne/ftuCOOAXYXd5P9O33O5rjYgSE7lV1L+5CtTb5NMn6w1NWOkLoUmxyZ7P9qIFOo/OzHbOTbRx0CcA3TTHTfQdm6DdVyQ0bUS69id4UbO09V2wTRXfc= Received: from DM6PR11MB3834.namprd11.prod.outlook.com (20.179.17.87) by DM6PR11MB4219.namprd11.prod.outlook.com (52.132.248.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.16; Wed, 16 Oct 2019 17:32:03 +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; Wed, 16 Oct 2019 17:32:03 +0000 From: "Kubacki, Michael A" To: "Agyeman, Prince" , "devel@edk2.groups.io" CC: "Sinha, Ankit" , "Desimone, Nathaniel L" Subject: Re: [edk2-platforms] [PATCH v2 2/4] KabylakeOpenBoardPkg: Add BIOS Info PEIM Thread-Topic: [edk2-platforms] [PATCH v2 2/4] KabylakeOpenBoardPkg: Add BIOS Info PEIM Thread-Index: AQHVg6sZXze907zEd0ibT2PacM3Mq6ddg9pg Date: Wed, 16 Oct 2019 17:32:03 +0000 Message-ID: References: <20191015225109.18992-1-prince.agyeman@intel.com> <20191015225109.18992-3-prince.agyeman@intel.com> In-Reply-To: <20191015225109.18992-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmNkNmQ1MTQtMTYwYy00YzcxLThlMTQtNmQwNDQ3M2Q2YjMyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQWJcL1Q3dm1ySitcL3ZYT01uUGdnR1lFeGJIY1wvRXEzbEhSTXVEUzR1aWtXdVhxR2hnbzZCM3ZqNlNjTjlXblNYViJ9 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: 0c4a60fc-8441-48f1-c8b0-08d7525ec22d x-ms-traffictypediagnostic: DM6PR11MB4219: 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: 0192E812EC x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(136003)(39860400002)(376002)(366004)(396003)(13464003)(199004)(189003)(76176011)(316002)(53546011)(6506007)(478600001)(14454004)(446003)(11346002)(99286004)(25786009)(26005)(74316002)(186003)(71190400001)(71200400001)(7696005)(7736002)(305945005)(2906002)(52536014)(5660300002)(102836004)(2501003)(110136005)(54906003)(4326008)(55016002)(33656002)(6436002)(19627235002)(3846002)(229853002)(14444005)(107886003)(6246003)(81156014)(256004)(66946007)(476003)(86362001)(66066001)(486006)(81166006)(76116006)(66476007)(66556008)(64756008)(66446008)(8936002)(8676002)(6116002)(9686003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR11MB4219;H:DM6PR11MB3834.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: WJzHfLxymC/b+mzsuJ5V3YkMC3saALsRsupZlMMiEiLk1KgA+woooUMv4zVw3y9BhAFYlI2ZIVSYRLK0vadi5E52rf2I6RtQObBhVlEinahOKgWwEvdbB8ouQclgxoraIADi+aSkqJNwduP1Hjpjqi3nF81bEWf9fk6N49473EeOV1OhVXRtf+M3zvx1/3jqbnbyY96TTyKPA8KT/5O21U2EoFRjZELZr4pvgvF9+jOkj8DtoQvKM2u3bd14zVC2SJ51oH7d9G82ZFXhHYoRC44azy7p/NhX4DTpMzfwKOZPd2PMrdIotN8DwCaqrUNPOL19NuEBA12YpMlgFOm5GQsyXhIJ22cXBHUELjONDkdmnkvTApFlmhJPrOZdtmcz26cWta4NikFPrAiI3N8FD2qwGXPVrhVbi7DWAUy/rDM= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 0c4a60fc-8441-48f1-c8b0-08d7525ec22d X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2019 17:32:03.2899 (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: tMyej7k27V8ihf7DPDsC9+QFvB0u3TNTpan6TLMEgCRFHMlmwPrzOXTommDHfApr5wi/HZn0GXCASwAddr0k1c6uXNktVNOYMZqHzVCfC2I= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4219 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 Platform\Intel\KabylakeOpenBoardPkg\GalagoPro3\OpenBoardPkg.dsc * Please move $(PLATFORM_BOARD_PACKAGE)/BiosInfo/BiosInfo.inf under the "Board Package" section. Platform\Intel\KabylakeOpenBoardPkg\KabylakeRvp3\OpenBoardPkg.dsc: * Please move $(PLATFORM_BOARD_PACKAGE)/BiosInfo/BiosInfo.inf under the "Board Package" section. Platform\Intel\KabylakeOpenBoardPkg\BiosInfo\BiosInfo.inf: * PcdLib is missing from the [LibraryClasses] section Thanks, Michael > -----Original Message----- > From: Agyeman, Prince > Sent: Tuesday, October 15, 2019 3:51 PM > To: devel@edk2.groups.io > Cc: Sinha, Ankit ; Desimone, Nathaniel L > ; Kubacki, Michael A > > Subject: [edk2-platforms] [PATCH v2 2/4] KabylakeOpenBoardPkg: Add BIOS > Info PEIM >=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 | 48 ++++++++++ > .../GalagoPro3/OpenBoardPkg.dsc | 3 + > .../GalagoPro3/OpenBoardPkg.fdf | 1 + > .../KabylakeRvp3/OpenBoardPkg.dsc | 2 + > .../KabylakeRvp3/OpenBoardPkg.fdf | 1 + > 6 files changed, 148 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..94543408b1 > --- /dev/null > +++ b/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf > @@ -0,0 +1,48 @@ > +### @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 > + > +[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..665597f79e 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc > @@ -287,6 +287,9 @@ > } >=20 > $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostM > em.inf >=20 > + > + $(PLATFORM_BOARD_PACKAGE)/BiosInfo/BiosInfo.inf > + > !if gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable =3D=3D TRUE > $(PLATFORM_PACKAGE)/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf > !endif > 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..5d4f5850f1 100644 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > @@ -359,6 +359,8 @@ > } > !endif >=20 > + $(PLATFORM_BOARD_PACKAGE)/BiosInfo/BiosInfo.inf > + > !if gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable =3D=3D TRUE > $(PLATFORM_PACKAGE)/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf > !endif > 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