From nobody Mon Feb 9 03:12:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+48456+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+48456+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1570137181; cv=none; d=zoho.com; s=zohoarc; b=aT0HBFGvFLAz7Y66ECXAZY7B3LlyQ1NBTZ/X0PTyomk7xCjSfLYMgXoqHtLsVRjc1o6vBTuTEHfH65bZOpThtwI7exU7OCXkQbED+CW1Eqba+vDC65Lie2/Ppr6WQyXrdjeXVEkhqDR4szb208A/xxhSENsVNQZ7w1RUl1Sonlk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570137181; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=MaCkNcKCN1+Pgtsonb9SLstGdOMGossaEUrplb2Vf1c=; b=TVtiGlwYSDZqbSqR7XiNht2/BlKuTjZXnUOpTpblv4Xa/zcs6+9cL+mSTsTao9pvIAwPmsFyt4ACzo+HLzIf2Z2NRwaWNEM8isapPKOqPVq0Fn7c5Ggxv2wrUsWiqZeDZr/N47snOtEuY2hgtyGDLa12Ex1rfSn70CM+kYUs4jM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+48456+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1570137181689153.4240559724409; Thu, 3 Oct 2019 14:13:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id iwvjYY1788612x2wQIHsWmGE; Thu, 03 Oct 2019 14:13:01 -0700 X-Received: from mga04.intel.com (mga04.intel.com []) by groups.io with SMTP; Thu, 03 Oct 2019 14:13:00 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2019 14:13:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,253,1566889200"; d="scan'208";a="216952089" X-Received: from paagyema-desk2.amr.corp.intel.com ([10.24.15.58]) by fmsmga004.fm.intel.com with ESMTP; 03 Oct 2019 14:13:00 -0700 From: "Agyeman, Prince" To: devel@edk2.groups.io Cc: Ankit Sinha , Nate DeSimone , Kubacki Michael A Subject: [edk2-devel] [edk2-platforms] [PATCH 2/5] KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM Date: Thu, 3 Oct 2019 14:12:56 -0700 Message-Id: <20191003211259.49664-3-prince.agyeman@intel.com> In-Reply-To: <20191003211259.49664-1-prince.agyeman@intel.com> References: <20191003211259.49664-1-prince.agyeman@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,prince.agyeman@intel.com X-Gm-Message-State: ewforHnsM72Zzz177DnaQ4Xex1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1570137181; bh=T4xd1j6ccdM67vvxIuBNWSug7K9Cr3cNzSOHLl2Gj4E=; h=Cc:Date:From:Reply-To:Subject:To; b=eNY5Vmxy/CCmImWZtHNj8uekiuD9BXzq2ihXiquzPH3Gna530Te1t2TwapuLbdmsBk6 zDqJ2lowb+586mkqxk3xgut72UXUhgWTAAgOXlXCDAlVtoh0AA2AJpuDYG3ufUhq64yAJ wmt4s2uUY7Yn91THVaUJysFxqJYGX0Ntbv0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Added BIOS Info PEIM to KabylakeRvp3 to publish the BIOS info HOB. This PEIM currently publishs the board's microcode region info. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A 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/BiosIn= fo/BiosInfo.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosIn= fo/BiosInfo.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/Bios= Info.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_ERROR (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/Bios= Info.inf b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosIn= fo.inf 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-4D6F5A032929 + VERSION_STRING =3D 1.0 + MODULE_TYPE =3D PEIM + ENTRY_POINT =3D BiosInfoEntryPoint +# +# The following information is for reference only and not required by the = 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 ## CONSU= MES + gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize ## CONSU= MES + +[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/ReportFvP= ei.inf INF $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf INF IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf INF $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPreM= em.inf +INF $(PROJECT)/BiosInfo/BiosInfo.inf =20 [FV.FvPostMemoryUncompact] BlockSize =3D $(FLASH_BLOCK_SIZE) --=20 2.19.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#48456): https://edk2.groups.io/g/devel/message/48456 Mute This Topic: https://groups.io/mt/34386698/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-