From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=rOhF4c9H; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: michael.a.kubacki@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Mon, 07 Oct 2019 18:31:04 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Oct 2019 18:31:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,269,1566889200"; d="scan'208";a="205256126" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 07 Oct 2019 18:31:02 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 7 Oct 2019 18:31:02 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 7 Oct 2019 18:31:01 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 7 Oct 2019 18:31:01 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (104.47.32.55) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 7 Oct 2019 18:31:01 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eNsmocOHYUR9ASVfiFLKeTfyCwNBAnZ4Z2ufGtGMCPqPw8sxjs2cvWIPinje/7XIrwRqra8GrwvEH6qnx3xCGqVhUfnvV2HSCjUldAq8N65wvgqD/m8tk09ChrgZ8sQEsOYlM71iiVkxVUWnxPktcSl2hm7UMj67I16jEaV8hKFC+LBqn5Ey21+X0MBuRcBXvAXvo4Sb/VjI5romOvEg6jqYcc0AZUIa6vvLKJTozGMGzvBlVgqJRxp+pnJrKm27OJvXM1kThWDiEd8g9MPJkVO13hnqjxINP2/GGBlHilDzSjkK2QerK/0ICes1fHpfUWxxn4pydyW4gofToHOZVg== 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=yktJe2KRvGgIEWHXvHe/gryQ3dBOLlWtpd+0PXi247E=; b=VO2HssZ1RmFBxPXMSzC54OZU49MpgUESiuXBEWnjaG53T5Fy8JPaxxsfVjhJ3XUGoD8hJqi2OJjSSunpLMu+h+W63ij/I0bAAoPfJiOe8eEC8PIAzmm3zOSRj5qQ9ZGsJgWf5bBqNVWK02omXiR8oKU+E6qS4J09lR6kYz1kxWmIVCG9hJKdfk5yOmMg5FMSatvDOCJYF66IgiKBVtvDmxCXZr8Fw31S9r6zwRjbsih3VBXU4GvymdiFg8YYgTGR7p+TOSkhRGh4KjIHqdlPFRcdvh+sagCjpE1pliTMjfWhv9pleSForUPlujt3HR180TTbcQboesOw2msWRSxG5g== 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=yktJe2KRvGgIEWHXvHe/gryQ3dBOLlWtpd+0PXi247E=; b=rOhF4c9Hqh4+ylwGWrBtk+Wni/afjgoIxfAzxjXBWBNV2869edqn/lIgEdmzPAGg71Wzeakismp4vI//RjhjmrxNQNGbmiFiK1gcD8gvDLvfD9PYkA9jmkuOre6+bq7TolBoUVnGceKNJPje6E/ZWQrvPFj1cJR6YaStq/2hmCc= Received: from DM6PR11MB3834.namprd11.prod.outlook.com (20.179.17.87) by DM6PR11MB3802.namprd11.prod.outlook.com (20.179.16.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.24; Tue, 8 Oct 2019 01:30:39 +0000 Received: from DM6PR11MB3834.namprd11.prod.outlook.com ([fe80::59cc:8a30:6b9e:584e]) by DM6PR11MB3834.namprd11.prod.outlook.com ([fe80::59cc:8a30:6b9e:584e%3]) with mapi id 15.20.2327.025; Tue, 8 Oct 2019 01:30:39 +0000 From: "Kubacki, Michael A" To: "Agyeman, Prince" , "devel@edk2.groups.io" CC: "Sinha, Ankit" , "Desimone, Nathaniel L" Subject: Re: [edk2-platforms] [PATCH 2/5] KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM Thread-Topic: [edk2-platforms] [PATCH 2/5] KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM Thread-Index: AQHVei9m0zK0PQkS4020XzhvPkCdGadP+pPw Date: Tue, 8 Oct 2019 01:30:38 +0000 Message-ID: References: <20191003211259.49664-1-prince.agyeman@intel.com> <20191003211259.49664-3-prince.agyeman@intel.com> In-Reply-To: <20191003211259.49664-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTI3Nzg2ZTgtYTYwYS00ZjAzLWEwZjgtODc2MzIxYTYyNWYxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRVlja1JhSDV1azJpK3liTVwveXZ4dTBlRXRlcHZ5bmlmWmlGR0tHOUZBNk1RVkJUWUxQaTdkNnhwSjdFdVpxakEifQ== 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: 02c9d35f-d5e7-466e-77fb-08d74b8f2080 x-ms-traffictypediagnostic: DM6PR11MB3802: 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: 01842C458A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(366004)(376002)(346002)(136003)(39860400002)(189003)(199004)(13464003)(55016002)(76116006)(8676002)(99286004)(81156014)(7736002)(476003)(8936002)(66946007)(305945005)(66556008)(2501003)(66476007)(66446008)(64756008)(81166006)(86362001)(74316002)(9686003)(2906002)(52536014)(33656002)(5660300002)(186003)(6246003)(66066001)(26005)(229853002)(446003)(11346002)(486006)(102836004)(6506007)(7696005)(76176011)(53546011)(3846002)(6116002)(14454004)(107886003)(71190400001)(6436002)(256004)(19627235002)(4326008)(14444005)(25786009)(71200400001)(54906003)(478600001)(110136005)(316002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR11MB3802;H:DM6PR11MB3834.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: at9e68NVzikr8T7nqO1xoYb32OkVx/OUxQBr5HTQYDojPcJCAAt+Dcw1m/XBPZWLFxy7XUFA3oQSe6vKUYmJd9A7XzvhHmEgqgnaz8WDvGqyv2A4ykk9F8vyo2G76e/ti6o2UfBhDi0yzdgtLND+P3CeX2uPUTegIl5Mc7Kw+kAzo/bTztAgiG0tpf1uOiLr/WCy/DmiUfdG5tL8MJKYtmS/n3VXZU6vcz/M4i7XKWx81wu722e85d34pJ6bmcqtgqTB6YvLbMoOvMHIxxkiAX3e+pTCKzpz3AeUDxjfkciaGBKwdHzF4JkfBoExRr/cK6RHPQVK3qCcY6Gd5ta/abPK92a89ACegCUniPzWRYbdMhY8IijsKmca3hRz0y99KkZCjGY6rDsivbRDPLrRoRVCHBN4hPcTM++2eKKyiGg= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 02c9d35f-d5e7-466e-77fb-08d74b8f2080 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2019 01:30:38.9054 (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: w6FM9ZDIktFZX7NdWGM9fzmVCpxeDFNhvEk+wrp55ozH2FshC+iGlHJHT3LVyP+GZdIDtG0pxtmt8nTntp4PAMNI2yNh2PmvSEWyzIF018w= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3802 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 BiosInfo.c: BiosInfoEntryPoint () function description should be updated. The function = installs the BiosInfo PPI but also produces the BiosInfo HOB. It also looks like you can remove the following macros: #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) > -----Original Message----- > From: Agyeman, Prince > Sent: Thursday, October 3, 2019 2:13 PM > To: devel@edk2.groups.io > Cc: Sinha, Ankit ; Desimone, Nathaniel L > ; Kubacki, Michael A > > Subject: [edk2-platforms] [PATCH 2/5] > KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM >=20 > Added BIOS Info PEIM to KabylakeRvp3 to publish the BIOS info HOB. This > PEIM currently publishs the board's microcode region info. >=20 > Cc: Ankit Sinha > Cc: Nate DeSimone > Cc: Kubacki Michael A >=20 > Signed-off-by: Prince Agyeman > --- > .../KabylakeRvp3/BiosInfo/BiosInfo.c | 93 +++++++++++++++++++ > .../KabylakeRvp3/BiosInfo/BiosInfo.inf | 48 ++++++++++ > .../KabylakeRvp3/OpenBoardPkg.dsc | 2 + > .../KabylakeRvp3/OpenBoardPkg.fdf | 1 + > 4 files changed, 144 insertions(+) > create mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c > create mode 100644 > Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf >=20 > diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c > new file mode 100644 > index 0000000000..6a058a0fc2 > --- /dev/null > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/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. > + > + @param FileHandle Handle of the file being invoked. > + @param PeiServices Describes the list of possible PEI Services. > + > + @retval EFI_SUCCESS Install the BiosInfo Ppi 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/KabylakeRvp3/BiosInfo/BiosInfo.i > nf > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.i > nf > new file mode 100644 > index 0000000000..94543408b1 > --- /dev/null > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/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/KabylakeRvp3/OpenBoardPkg.dsc > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > index 7090852192..ef69a19aa4 100644 > --- > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > +++ > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc > @@ -324,6 +324,8 @@ > } > !endif >=20 > + $(PROJECT)/BiosInfo/BiosInfo.inf > + > # > # Security > # > diff --git > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf > index 2b8eab36a1..81181710e6 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 $(PROJECT)/BiosInfo/BiosInfo.inf >=20 > [FV.FvPostMemoryUncompact] > BlockSize =3D $(FLASH_BLOCK_SIZE) > -- > 2.19.1.windows.1