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.234.1571247143154115236 for ; Wed, 16 Oct 2019 10:32:23 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=Xr4y2klZ; 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 orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2019 10:32:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,304,1566889200"; d="scan'208";a="370868161" Received: from orsmsx104.amr.corp.intel.com ([10.22.225.131]) by orsmga005.jf.intel.com with ESMTP; 16 Oct 2019 10:32:22 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX104.amr.corp.intel.com (10.22.225.131) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 16 Oct 2019 10:32:22 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX603.amr.corp.intel.com (10.22.229.16) 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:21 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) 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:21 -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:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QFFzup32As403r39VtZewy7BnL6vTAZPfsHSwZ66CZNAJZtk9LpjcFyfc8HsjeLT/QukbC/W4UMupA8Txx86OhTOHVRqkZpUlud7S9R3gkSiDXQOItRqeUfk2R0MekHxiKehKmZjms8Q9zBpVo16fXrrQ4gS4elEKyQrMZ++9KXy4aCc244ZRj0DpsUYGguYtmJyNJ5liabIN+Pjl93j6bjeLDdr/ZCsCE85vQDPkgGFDuO4vHdKJ+ULwuGDCpioxTx0SHJB0tr/ZfvTlenU6Kql+3yTnxIEBEd4gBe8EfCxe4XIPlCcdPNCJklw1wlju9et4wfAH5wCqEWjFM1ocQ== 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=PxCWULy8u5ABfOmJ4wFzjXG+Mu6zUNGwn9q6fae/VmQ=; b=Tsl5yfM6R/Vej2esvWDa4eMLJPAtQT6YUrwIb3l5fJ8yu+8HouYYnWS1dqtVz/dOUDSTOJ9fl42czXgAtaCElKr4eNay3yvr5xay/oqcf3kXyOKmCO8DQj+rqIH8gpWMTua/BlBNwknGqa6YX3jIJt9jjxQlBUOIm/H8lA1y7iLqbkZNc/HUq1rcoFyr6RMGpnqZ/iZQZsvBncQp+8PKkzMlKereEEwScNx+4abGZAqqx57BWpdhCg2WI3I6TFoi2cOa3n0UexbDxmQ6jtT51CbtlOFMSwDteJeYDAdkIVa5u+PLutgRrttaAWCQ/nlpCZwJPUiHE18ciaNTngn36Q== 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=PxCWULy8u5ABfOmJ4wFzjXG+Mu6zUNGwn9q6fae/VmQ=; b=Xr4y2klZvxpnWIe2E/MUf6Wf15b0z2+9jopotHV9F7gFSbqlHXM6cpdNJ7aczxA8O/64g2XF8l2GGwulAuGweX7NR9RrC6G28h0QBIW9HnErhwB5J0N400NsFfdryCuYcbiHLNBK8pDBxCoLJD6sf+Zy8NxTK5RsKy3Xa/+pa1Q= 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:09 +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:09 +0000 From: "Kubacki, Michael A" To: "Agyeman, Prince" , "devel@edk2.groups.io" CC: "Sinha, Ankit" , "Desimone, Nathaniel L" Subject: Re: [edk2-platforms] [PATCH v2 3/4] WhiskeylakeOpenBoardPkg: Add BIOS Info PEIM Thread-Topic: [edk2-platforms] [PATCH v2 3/4] WhiskeylakeOpenBoardPkg: Add BIOS Info PEIM Thread-Index: AQHVg6sccjx2DeJOJUqTsx8+oS+pVaddhPWQ Date: Wed, 16 Oct 2019 17:32:08 +0000 Message-ID: References: <20191015225109.18992-1-prince.agyeman@intel.com> <20191015225109.18992-4-prince.agyeman@intel.com> In-Reply-To: <20191015225109.18992-4-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGI0NTI2ZWEtZGM0Yy00MDI4LTg1YTQtMTlkNzE4YmY2ZTU5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNTZhbjBSeldHNHRZRjZSZGhsYWtWUTVqVXRQUytYckd2SFI1am1QYVpRUUtGTVlsbVZJbFBGS2tQNXVteTg0cSJ9 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: 52085db5-1dc7-47dc-6f12-08d7525ec57e 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:8882; 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)(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: /BIBwxZI5siBn20GpKOQORE5lVdbqabgggOyglYZwGAHTK/kyNgQ9Q6FfS4Aj3JnORGqOpmn4yYOk1yoYCvfSz1i7220bbcgU6RHDtPwhBDw2lMSCTjWZrJZX0iVSguFwJjD7U6msfFaom99Fr4mbYObjesxGpRskroBhTfKC5itO4a5hhFJAvyfhnJrj1ohY3D/6YwAcSCwIMakSjdzrU8wLqXCI9vYg18uIKljmWX3265NkOitnL2Ra6R1ZrZUpybbKDc84glphvIjb5dTV7Ln6U8TUxkSV4kecPpLX7UON58lMXeRWwGXx5TB6SemA1/8XtjCuetiFAGVI/qe2zdy3IxRibKGBmqBuaotgUIQ4Yue/AhzVwaG25W0hO2ekcwQJDVy1T9ecfCVw6zolb5y45Wwvh7ejH2x8PujBAA= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 52085db5-1dc7-47dc-6f12-08d7525ec57e X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2019 17:32:08.8946 (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: wQ9QBf9+8bfqJX0f61SDocLE3A/YsJi2olldeCXnK5/AJuTGU7qRtRQBamKrZKSYn7TbTv/cvSgMd/aXB0gWrYpERTE9iw/lZQxVa3WDLUY= 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\WhiskeylakeOpenBoardPkg\WhiskeylakeURvp\OpenBoardPkg.dsc: * Please move $(PLATFORM_BOARD_PACKAGE)/BiosInfo/BiosInfo.inf under the "Board Package" 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 3/4] WhiskeylakeOpenBoardPkg: Add > BIOS Info PEIM >=20 > Added BIOS Info PEIM to publish Bios Info HOB. This PEIM currently publis= hes > the microcode FV information. >=20 > Cc: Ankit Sinha > Cc: Nate DeSimone > Cc: Kubacki Michael A >=20 > Signed-off-by: Prince Agyeman > --- > .../BiosInfo/BiosInfo.c | 93 +++++++++++++++++++ > .../BiosInfo/BiosInfo.inf | 48 ++++++++++ > .../WhiskeylakeURvp/OpenBoardPkg.dsc | 2 + > .../WhiskeylakeURvp/OpenBoardPkg.fdf | 1 + > 4 files changed, 144 insertions(+) > create mode 100644 > Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c > create mode 100644 > Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf >=20 > diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c > b/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c > new file mode 100644 > index 0000000000..578e66149e > --- /dev/null > +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/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/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf > b/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.inf > new file mode 100644 > index 0000000000..f268de00f5 > --- /dev/null > +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/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 A842B2D2-5C88-44E9-A9E2-4830F26662B= 7 > + 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 > + CoffeelakeSiliconPkg/SiPkg.dec > + CoffeeLakeFspBinPkg/CoffeeLakeFspBinPkg.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/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard > Pkg.dsc > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard > Pkg.dsc > index 423fa88c12..3690069df4 100644 > --- > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard > Pkg.dsc > +++ > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard > Pk > +++ g.dsc > @@ -314,6 +314,8 @@ > $(PLATFORM_PACKAGE)/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf > !endif >=20 > + $(PLATFORM_BOARD_PACKAGE)/BiosInfo/BiosInfo.inf > + > ####################################### > # Board Package > ####################################### > diff --git > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard > Pkg.fdf > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard > Pkg.fdf > index 320e444aae..140e6260c9 100644 > --- > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard > Pkg.fdf > +++ > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard > Pk > +++ g.fdf > @@ -240,6 +240,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