From nobody Wed Apr 24 16:41:38 2024 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+48455+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+48455+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1570137182; cv=none; d=zoho.com; s=zohoarc; b=FgIUi+Xwh3EOAhVpXc8jRRwMaRHcj4hR9RgJphaet1ShSr7+tQLLt0JtffFAWQAUguknedy/WFMczu8JznKGxFwRNhRdyv6amtDX5fpunNx93hJ8xul4V9QpQ8mavgqYmHYQijSYAw3ZWYOVmBYr0yhpTXogzkfP1VjGMxrhpVk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570137182; 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=6dX+2oLe9xC8yx+TBNCPJVBpspnncW11Jq/YfygMrDo=; b=Sm3cg8Vr2Pwy9OlMNTjPRajbayFnaqVMxjF6NcqXo3FtxPSN3eWkHzHHckirgv5L8YWJOyeYoCBF2HBD50XZNV/NK91k47Rc6W1JIYE5GhZqonP8ui6A/K3s3WxWnpxSPVi8JNPXvFWLJB1JGQlGwMDBQakuYQb6Q1J+X8QDffM= 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+48455+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 1570137182009247.39147121764074; Thu, 3 Oct 2019 14:13:02 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id gBtAYY1788612xnGhgGVsDkb; 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="216952084" 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 1/5] BoardModulePkg: Add bios info HOB Date: Thu, 3 Oct 2019 14:12:55 -0700 Message-Id: <20191003211259.49664-2-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: NFY2f8xMzlspM0bLHliQEMRFx1787277AA= 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=+gJ22GWOIs505ULMO17osqtTWqKW9Kx31n3wlGBfkyg=; h=Cc:Date:From:Reply-To:Subject:To; b=qt/KTOQi+NIBLoF1mDEuAVLYq/ZG6vU0nYx5NVP3arcadW4XSDf9YPiZJlTCQTx/fH7 ipooEhqiR6cS2U+gFgJhBBaKkfn6btMW4IJUICEXpS4vAM33h0viaHD+hs6pB1h878VTX nCpk8NAbWY3mPAAB/BmXv0T2Iaglesf8Ygc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Added gBiosInfoGuid to be used to publish BIOS information HOB which is needed in FIT generation Also added the Bios Info header file BiosInfo.h Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman Reviewed-by: Nate DeSimone --- .../Intel/BoardModulePkg/BoardModulePkg.dec | 3 + .../BoardModulePkg/Include/Library/BiosInfo.h | 62 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec b/Platform/In= tel/BoardModulePkg/BoardModulePkg.dec index 6f13945ca8..035427b2f5 100644 --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec @@ -36,3 +36,6 @@ [Guids] ## Include Include/Guid/BiosId.h gBiosIdGuid =3D { 0xC3E36D09, 0x8294, 0x4b97, { 0xA8, 0x57, 0xD5, 0x28, = 0x8F, 0xE3, 0x3E, 0x28 } } + + ## GUID to publish BIOS information HOB + gBiosInfoGuid =3D { 0x09d0d15c, 0xe9f0, 0x4dfc, {0x9e, 0x0b, 0x39, 0x33,= 0x1f, 0xca, 0x66, 0x85} } diff --git a/Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h b/Pla= tform/Intel/BoardModulePkg/Include/Library/BiosInfo.h new file mode 100644 index 0000000000..bba1c07bff --- /dev/null +++ b/Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h @@ -0,0 +1,62 @@ +/** @file + + Driver for BIOS Info support. + + Copyright (c) 2019, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef _BIOS_INFO_H_ +#define _BIOS_INFO_H_ + +// +// BIOS INFO data structure +// This is self contained data structure for BIOS info for TXT +// +#pragma pack (1) +#define BIOS_INFO_SIGNATURE SIGNATURE_64 ('$', 'B', 'I', 'O', 'S', 'I', '= F', '$') +typedef struct { + UINT64 Signature; + UINT32 EntryCount; + UINT32 Reserved; +//BIOS_INFO_STRUCT Struct[EntryCount]; +} BIOS_INFO_HEADER; + +// +// BIOS_INFO_STRUCT attributes +// bits[0:3] means general attributes +// bits[4:7] means type specific attributes +// +#define BIOS_INFO_STRUCT_ATTRIBUTE_GENERAL_EXCLUDE_FROM_FIT 0x01 +#define BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION 0x10 +#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_POST_IBB 0x10 +#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_NON_IBB 0x20 + +typedef struct { + // + // FitTable entry type + // + UINT8 Type; + // + // BIOS_INFO_STRUCT attributes + // + UINT8 Attributes; + // + // FitTable entry version + // + UINT16 Version; + // + // FitTable entry real size + // + UINT32 Size; + // + // FitTable entry address + // + UINT64 Address; +} BIOS_INFO_STRUCT; + +extern EFI_GUID gBiosInfoGuid; + +#pragma pack () + +#endif --=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 (#48455): https://edk2.groups.io/g/devel/message/48455 Mute This Topic: https://groups.io/mt/34386697/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- From nobody Wed Apr 24 16:41:38 2024 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- From nobody Wed Apr 24 16:41:38 2024 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+48457+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+48457+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1570137182; cv=none; d=zoho.com; s=zohoarc; b=Bv4lOsC1Q3PlgCZ80krLFShojbmRwNJzgFLhTu10HYn6dDE+svcynvg1oX9DvwKhCzP6I44WLnTEqAh2swsE4RWtq/XkHzqS4SAaIt76lDr/zkq73e2sJD2WNzm7fuzPyZmCAMsRXce8dTa0wi0FfjHckMesOkYxvHrMlEfl2j8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570137182; 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=Vlp909UkVuFk3O9lievNAs2EzMaWmb/6+KOhdkSPhhY=; b=Y+95r+rJnNfuZeDGjM2IAAE0bx8BQ+W5aNp+mjT9qoblhNFmWGLUrKdFCzC8E4aOoWFF3ofiTovLCGne8YSgFUAgE1uHQYCk5KTzNj7ROWTvneJ297v6yNr8HFItVUry5nyGPlKPyDZ5dKY21csWkoFMVQPM0N4nHXSnoexqnD8= 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+48457+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 1570137182723207.32164356245312; Thu, 3 Oct 2019 14:13:02 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id qzJEYY1788612xcuErRc7tEJ; 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:01 -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="216952092" 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 3/5] KabylakeOpenBoardPkg/GalagoPro3: Add BiosInfo PEIM Date: Thu, 3 Oct 2019 14:12:57 -0700 Message-Id: <20191003211259.49664-4-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: BReJhPHSFpHN46NHSGB26LSUx1787277AA= 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=VyOrFTgA6azhQ+WoND2ND1aU8eijCh9jB/KtJwZ8IWQ=; h=Cc:Date:From:Reply-To:Subject:To; b=Zbcp4SgoEIsJibOvcTrW6L57jTc0PJWnN2gONO+pxHoHsK6s9xrfv/3Mi/7fWYcVrbw xNBdvp70grWh1SQoejT4fdn830JzaYbeNG+aRpuefak8poeHVYWcKVaMk8SxYDvjAikXA vHVvb3WVKW2cjQWw0070GOf5Z7maHlHjNL4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Added BiosInfo PEIM to publish the Bios Info HOB. Currently this PEIM publishes one Bios Info entry which is the microcode region information. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../GalagoPro3/BiosInfo/BiosInfo.c | 92 +++++++++++++++++++ .../GalagoPro3/BiosInfo/BiosInfo.inf | 48 ++++++++++ .../GalagoPro3/OpenBoardPkg.dsc | 2 + .../GalagoPro3/OpenBoardPkg.fdf | 1 + 4 files changed, 143 insertions(+) create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo= /BiosInfo.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo= /BiosInfo.inf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosIn= fo.c b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c new file mode 100644 index 0000000000..4db9d4685c --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c @@ -0,0 +1,92 @@ +/** @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/GalagoPro3/BiosInfo/BiosIn= fo.inf b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.i= nf new file mode 100644 index 0000000000..a0e18cff9c --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/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 3132E669-D16B-4AA7-B09B-BC0EB5F40E1F + 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/GalagoPro3/OpenBoardPkg.ds= c b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc index d67e0cc000..64e25168c7 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc @@ -244,6 +244,8 @@ } $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyPei/SiliconPolicyPeiPostMe= m.inf =20 + $(PROJECT)/BiosInfo/BiosInfo.inf + # # Security # diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fd= f b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf index 56bb0edaad..a095c044a5 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf @@ -240,6 +240,7 @@ INF $(PLATFORM_PACKAGE)/PlatformInit/ReportFv/ReportFvP= ei.inf INF $(PROJECT)/Override/Platform/Intel/MinPlatformPkg/PlatformInit/Platfor= mInitPei/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 (#48457): https://edk2.groups.io/g/devel/message/48457 Mute This Topic: https://groups.io/mt/34386699/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- From nobody Wed Apr 24 16:41:38 2024 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+48459+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+48459+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1570137183; cv=none; d=zoho.com; s=zohoarc; b=W7PzMpM/9z31+0rMptvvF4hAtz7u8TgH+TfOycr81HMcNGYDQeqy5GWK4zDtqvvMLmc5+i/FoRUv+Loo8IYnIsO9nODcqe+a8PcSkFexKZLHS1UY2UEyMEH5TAXIpVLWfF+Q6oKgHsbZE9lxlltK8y9gXAXzrHBUNmeZtKdamfQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570137183; 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=ecfMWclkAO+Dsd1HaIQqyFdnibaT5lL6K/fMCNOriTo=; b=JDXH9BoictZ/kDu8d7xFXDFozDcsyucdVpbwkt2bwKKwB1MR19ZNrrkA1ndhi23XHRI78KQ9e2cK+wIXjjCqa6s+Wz5/AtILGSWn74nezgFE36t2o3v3F3z6PWnHhllY3bNR4R5J25Tu35ei+t/BtrCzwW3weudGLDyoAxvHoW8= 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+48459+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 1570137183133326.97872255912637; Thu, 3 Oct 2019 14:13:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 8XSDYY1788612xA7QjZkH8FW; Thu, 03 Oct 2019 14:13:02 -0700 X-Received: from mga04.intel.com (mga04.intel.com []) by groups.io with SMTP; Thu, 03 Oct 2019 14:13:01 -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="216952096" 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 4/5] WhiskeylakeOpenBoardPkg: Add BIOS INFO PEIM Date: Thu, 3 Oct 2019 14:12:58 -0700 Message-Id: <20191003211259.49664-5-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: 1fytb8bjHRFRyZGv9gRTrNcLx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1570137182; bh=jjfaBUrMMu/j16fi9eDYda0RSOz4fexNuHkx+C9bvLY=; h=Cc:Date:From:Reply-To:Subject:To; b=fsFifuhM+9tdojjfil9IjsFDxut3rvBDi7zMLkuhOCA4GOWlUEVN7vq59sbJ83R3y1X RrzbtA/04s5PbrMUCAldaBqWwcXLT1UbhZUBEXkwSDwlIvC/WKQ+nQ7roHC0r1iZy+LiY 3CP77/bh3powEk3VPhcBeGL5jai1Odz1Byg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Added BIOS info PEIM to publish Bios Info HOB. This PEIM currently publishes the microcode FV info. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman --- .../WhiskeylakeURvp/BiosInfo/BiosInfo.c | 93 +++++++++++++++++++ .../WhiskeylakeURvp/BiosInfo/BiosInfo.inf | 48 ++++++++++ .../WhiskeylakeURvp/OpenBoardPkg.dsc | 2 + .../WhiskeylakeURvp/OpenBoardPkg.fdf | 1 + 4 files changed, 144 insertions(+) create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/= BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/= BiosInfo/BiosInfo.inf diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInf= o/BiosInfo.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosI= nfo/BiosInfo.c new file mode 100644 index 0000000000..6a058a0fc2 --- /dev/null +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosI= nfo.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/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInf= o/BiosInfo.inf b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Bio= sInfo/BiosInfo.inf new file mode 100644 index 0000000000..f268de00f5 --- /dev/null +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosI= nfo.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-4830F26662B7 + 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 + CoffeelakeSiliconPkg/SiPkg.dec + CoffeeLakeFspBinPkg/CoffeeLakeFspBinPkg.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/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoa= rdPkg.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoar= dPkg.dsc index eea809140c..00a89f4507 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.d= sc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.d= sc @@ -246,6 +246,8 @@ SiliconPolicyUpdateLib|MinPlatformPkg/PlatformInit/Library/SiliconPo= licyUpdateLibNull/SiliconPolicyUpdateLibNull.inf } =20 + $(PROJECT)/BiosInfo/BiosInfo.inf + # # Security # diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoa= rdPkg.fdf b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoar= dPkg.fdf index 611078e4b4..867cee8a64 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.f= df +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.f= df @@ -237,6 +237,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 (#48459): https://edk2.groups.io/g/devel/message/48459 Mute This Topic: https://groups.io/mt/34386701/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- From nobody Wed Apr 24 16:41:38 2024 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+48458+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+48458+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1570137182; cv=none; d=zoho.com; s=zohoarc; b=jSxm+YW1BKdxMGEkUPrT4QmBkSwUiLNcZYmwb4ouLQRnWDA6C8ZA0V8yEYmJd/ITSHwu76/AGoT4bu1Mbf1VcFul1NIVJKmxfm1z6I22bkPTT/nG0Lk0aUYEG66nynZbt2DZbqKIlVcvPvIyvyQ7tdjYiY3md1Gg7jSNJzkdTP8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570137182; 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=/3VdiNHpyRIjQrMnHmSwCQLwejj041Wim8vPJM6MLpM=; b=evmvn2/Pa+GM2UvS6bY44B9PFdViHoDVmLeWC45lyLH3OzSWp0n+w5IFtnD8SbpGgGQOLG3GS/dt27L9ActJcVCVsNS6OjnEhmwAgJpo9A4AIyIsRvDI62NOCUqc4IREIbiGustyG3n9k41hzYpeS41rYjpxRG0v/e0gbl6csKE= 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+48458+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 1570137182787532.3418611342112; Thu, 3 Oct 2019 14:13:02 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id j1oHYY1788612xkEsCdMNwfZ; Thu, 03 Oct 2019 14:13:02 -0700 X-Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Thu, 03 Oct 2019 14:13:01 -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="216952101" 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 , Michael Kubacki Subject: [edk2-devel] [edk2-platforms] [PATCH 5/5] Platform/Intel: Add FIT generation tool Date: Thu, 3 Oct 2019 14:12:59 -0700 Message-Id: <20191003211259.49664-6-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: ddT55IZJStjV4S91xBrcARrox1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1570137182; bh=YRVzTQUfFDf0E+WMWaTMpFRTuqTeiA0feVMwxxw0LlM=; h=Cc:Date:From:Reply-To:Subject:To; b=QTPc3ES/xSKq8j9a3q+xj6FRaKucMU0QPXkrMOYutgm9xq/tlcBZ+FkakoCX0CmV49Z 1OwkBrEL/0Z6n5KFBokI4pORGotw2qEFB8oGbaGMklzBmMkXQVrCywl70HLeaAnM6bt9j Uvxkhs3C5XTEVNMk7/0RZZ++7ONDbFoFJ4Q= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Added fit generation tool to the build process. What was done: Added BIOS_INFO_GUID to the build.cfg Added BIOS_INFO_GUID to GalagoPro3, KabylakeRvp3 and WhiskeylakeURvp build_config.cfg This allows the boards to specify the GUID associated with the its Bios Info PEIM BIOS_INFO_GUID is passed as an argument to FitGen in the FIT table generation process Cc: Ankit Sinha Cc: Nate DeSimone Cc: Michael Kubacki Signed-off-by: Prince Agyeman Reviewed-by: Michael Kubacki Reviewed-by: Nate DeSimone --- .../GalagoPro3/build_config.cfg | 1 + .../KabylakeRvp3/build_config.cfg | 1 + .../WhiskeylakeURvp/build_config.cfg | 1 + Platform/Intel/build.cfg | 1 + Platform/Intel/build_bios.py | 57 +++++++++++++++++++ 5 files changed, 61 insertions(+) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cf= g b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg index 8c6c51abb4..3f64239a29 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg @@ -31,3 +31,4 @@ FSP_PKG_NAME =3D KabylakeFspPkg FSP_BINARY_BUILD =3D FALSE FSP_TEST_RELEASE =3D FALSE SECURE_BOOT_ENABLE =3D FALSE +BIOS_INFO_GUID =3D 3132E669-D16B-4AA7-B09B-BC0EB5F40E1F diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.= cfg b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg index 78f808bfaf..f6ae4b342a 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg @@ -33,3 +33,4 @@ FSP_PKG_NAME =3D AmberLakeFspPkg FSP_BINARY_BUILD =3D FALSE FSP_TEST_RELEASE =3D FALSE SECURE_BOOT_ENABLE =3D FALSE +BIOS_INFO_GUID =3D C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929 diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_c= onfig.cfg b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_co= nfig.cfg index 1b0619bc1c..1dfe5ffd10 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.c= fg +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.c= fg @@ -31,3 +31,4 @@ FSP_PKG_NAME =3D CoffeelakeSiliconPkg FSP_BINARY_BUILD =3D FALSE FSP_TEST_RELEASE =3D FALSE SECURE_BOOT_ENABLE =3D FALSE +BIOS_INFO_GUID =3D A842B2D2-5C88-44E9-A9E2-4830F26662B7 diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg index 2040774d1b..6aee96694c 100644 --- a/Platform/Intel/build.cfg +++ b/Platform/Intel/build.cfg @@ -48,6 +48,7 @@ SECURE_BOOT_ENABLE =3D FALSE REBUILD_MODE =3D BUILD_ROM_ONLY =3D NUMBER_OF_PROCESSORS =3D 0 +BIOS_INFO_GUID =3D =20 =20 [PLATFORMS] diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index 46285df19a..ea098de705 100644 --- a/Platform/Intel/build_bios.py +++ b/Platform/Intel/build_bios.py @@ -196,6 +196,31 @@ def pre_build(build_config, build_type=3D"DEBUG", sile= nt=3DFalse, toolchain=3DNone): if return_code !=3D 0: build_failed(config) =20 + # + # build platform silicon tools + # + # save the current workspace + saved_work_directory =3D config["WORKSPACE"] + # change the workspace to silicon tools directory + config["WORKSPACE"] =3D os.path.join(config["WORKSPACE_SILICON"], "Too= ls") + + command =3D ["nmake"] + if os.name =3D=3D "posix": # linux + command =3D ["make"] + # add path to generated FitGen binary to + # environment path variable + config["PATH"] +=3D os.pathsep + \ + os.path.join(config["BASE_TOOLS_PATH"], + "Source", "C", "bin") + + # build the silicon tools + _, _, result, return_code =3D execute_script(command, config, shell=3D= shell) + if return_code !=3D 0: + build_failed(config) + + # restore WORKSPACE environment variable + config["WORKSPACE"] =3D saved_work_directory + config["SILENT_MODE"] =3D 'TRUE' if silent else 'FALSE' =20 print("=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= ") @@ -404,6 +429,35 @@ def post_build(config): :returns: nothing """ print("Running post_build to complete the build process.") + board_fd =3D config["BOARD"].upper() + final_fd =3D os.path.join(config["BUILD_DIR_PATH"], "FV", + "{}.fd".format(board_fd)) + + if config["BIOS_INFO_GUID"]: + # Generate the fit table + print("Generating FIT ...") + if os.path.isfile(final_fd): + temp_fd =3D os.path.join(config["BUILD_DIR_PATH"], "FV", + "{}_.fd".format(board_fd)) + shell =3D True + command =3D ["FitGen", "-D", + final_fd, temp_fd, "-NA", + "-I", config["BIOS_INFO_GUID"]] + + if os.name =3D=3D "posix": # linux + shell =3D False + + _, _, result, return_code =3D execute_script(command, config, = shell=3Dshell) + if return_code !=3D 0: + print("Error while generating fit") + else: + # copy output to final binary + shutil.copyfile(temp_fd, final_fd) + # remove temp file + os.remove(temp_fd) + else: + print("{} does not exist".format(final_fd)) + # remove temp file =20 # Additional build scripts for this platform result =3D post_build_ex(config) @@ -426,6 +480,9 @@ def post_build(config): except OSError: pass =20 + print("Done") + if os.path.isfile(final_fd): + print("Fd file can be found at {}".format(final_fd)) =20 def build_failed(config): """Displays results when build fails --=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 (#48458): https://edk2.groups.io/g/devel/message/48458 Mute This Topic: https://groups.io/mt/34386700/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-