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.1444.1571366702348107754 for ; Thu, 17 Oct 2019 19:45:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=uEqDJI1/; 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 orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 19:45:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,310,1566889200"; d="scan'208";a="200578350" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 17 Oct 2019 19:45:01 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 17 Oct 2019 19:45:01 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 17 Oct 2019 19:45:01 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (104.47.32.59) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 17 Oct 2019 19:45:01 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NzFSFxH+lIT2jhmfgDiiUAviPycHdqavqujgDjx6f/cp+jW9Wo81GT25eCU6BRJhe2Tk62Zi7Bz+4ud66EypVPsVFF1n14xde7JSgbTx/fS/AEy2RZ/tw4c5r6de6OBnskMSatAzAnGAo5FxqMvDgJ6b54r5zu4zsoTNlSA8B42ePPFkVj/zXfQ4G31PZglMrENhldfq08meHr1oVc7ga6j8kvNUba6bOeZ53JuQreaGEMWEgej8puaZkDwHwBt4aP5siclrDgglLYSzC5o1IsEEM2y/yhOBWXqXWObUkGReKeYNEnZXesx1pTJEfJQbQXo2C3v7tyTuXgjpeckdcQ== 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=mrxJSRv0VFkC/TRA8WJ8Ls1HsWtos/3j3FDcDlPXqL4=; b=Rv61StSbJz5dZ7gYGIgvH8knlFzlQoZIkF3Pjeko65AEvLXNam7kzV4nR6sVcD0Zw078TyanOaG8pyeUixzrymaHh5ZDU6xPFV/MotatZ0vwgRoP4+TSaXGOTAQdbs8leOipD+emFdAIukcpRq7voJoj9FgTfutzpFSRkTvyBOaWaJWvZpgUqDwBOcyqbXmaDoCEUryvZ/S0uP1Cxi4ah730XRFdxZFryZyPx7lHMLQ/OVN77d4AjGbXBZVnffN8qcBx5+x9cX4asviLdUQjXYVgq+NiJxXEeq6ABUPkfa0KW0s81IbwEhrtEeKKathFY4OJ6tS74zZSuT+DscRZ1Q== 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=mrxJSRv0VFkC/TRA8WJ8Ls1HsWtos/3j3FDcDlPXqL4=; b=uEqDJI1/z/WY8Kjtw1RKuvLIR7EJZ/Whgh18z+rzT8Ig3Sg9P4n4J+K0XoM9naXVNjEYZP6QuQ4aTpPujxSLX1GvO4lmcizn6whepsB1hzaehu9/ZKrys64HSHpjKOvLkbHINBJojvzNgvoF/W8ivEEGsdmY+bi12PCaFBHg3Rg= 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:58 +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:58 +0000 From: "Kubacki, Michael A" To: "Agyeman, Prince" , "devel@edk2.groups.io" CC: "Sinha, Ankit" , "Desimone, Nathaniel L" Subject: Re: [edk2-platforms] [PATCH v3 3/4] WhiskeylakeOpenBoardPkg: Add BIOS Info PEIM Thread-Topic: [edk2-platforms] [PATCH v3 3/4] WhiskeylakeOpenBoardPkg: Add BIOS Info PEIM Thread-Index: AQHVhUdfNmBTWUKWc0WZmUjNfG8ADqdfsRoA Date: Fri, 18 Oct 2019 02:44:58 +0000 Message-ID: References: <20191018000145.3140-1-prince.agyeman@intel.com> <20191018000145.3140-4-prince.agyeman@intel.com> In-Reply-To: <20191018000145.3140-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWU5OTM5NDQtMThiZC00OTQ4LTgzZDYtYzk5NDY4ZWRmNzY2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibmtVZnRKcTJlakVQQVN2cXk5NXJQYzRibWUwQVdrQnkzN0lHZzA1alwvNkJXSFBuM2sxek1SbU5YNDI1WnVlVTEifQ== 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: 60a9d065-d5a0-4eb3-d7e8-08d753752a5f 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:7691; 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)(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: 0uh+D70fSMdKgzL2RUDs0WTHFJ7TtMuVuUPCtGl+PlbBbT7jPIXniWgTemlNmuB00fijMzyf2xRhJdZ0MJ/TOyE+jVus4R079gwm774GrP8A1dMd+L16RS+dfA2KXuBWuMSvENiP6jRxxy9aNSt1MPenClA2tfgPX00VKnMY+vjzpLmA9PXBFGax+qEa1xz/GALxA4pv3rVI6/cYcuRAaKc+0/igU1XeIPA94wwVkSAzI0+Fj2kLjy/sPFKnCSZuChkbGWYSVCatauXHbzuyROf5zvm4+Ec7YAw8xutUiW3BwM1+vuIcx8LFnMeCyKROVTYd1FwytsyMKRirOvpFMdFVKjotTJPqIm/vt+xYsq+v8IuFP8Ie4VQ9PNVjeopoFzhs5OlcEcx1MK/lYg5sipBwSJi+x39628Q5Can5+JHVyvTIbEC8v7+zyWODdJbqAZHD7n8SsYIjNz4eCpzZwA== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 60a9d065-d5a0-4eb3-d7e8-08d753752a5f X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2019 02:44:58.1379 (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: /PEmwUCuseFaOhPrQVh8SYDvzTHfhvuXFd1J+RL3qGNtrik8EwXFw/WnYLKOGFOjpsPBHS4zRn2rZ3ZsRhYXb1dgMMz8pFDSwfBC2JdrDP4= 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 3/4] WhiskeylakeOpenBoardPkg: Add > BIOS Info PEIM >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2211 >=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 | 49 ++++++++++ > .../WhiskeylakeURvp/OpenBoardPkg.dsc | 2 + > .../WhiskeylakeURvp/OpenBoardPkg.fdf | 1 + > 4 files changed, 145 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..a9687d93de > --- /dev/null > +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/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 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 > + PcdLib > + > +[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..8e0ea2d5ce 100644 > --- > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard > Pkg.dsc > +++ > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoard > Pk > +++ g.dsc > @@ -314,6 +314,7 @@ > $(PLATFORM_PACKAGE)/Tcg/Tcg2PlatformPei/Tcg2PlatformPei.inf > !endif >=20 > + > ####################################### > # Board Package > ####################################### > @@ -321,6 +322,7 @@ > !if gWhiskeylakeOpenBoardPkgTokenSpaceGuid.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/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