From nobody Fri May 3 10:48:31 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+49195+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+49195+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1571356908; cv=none; d=zoho.com; s=zohoarc; b=luU+L7/Exi+dY+Ua47yPG6KfAMT702Kvf4rexxqaLm1db5QhIlU9aV424qflJPgSOJ4++pOqkN/ktdrV/8L9V0JsrlVisVwb30uZIblJiehiy9pgsiRohiohp1d/vqqf/QF5c5ybP1TbyPiFsO0muCsB7cnhYKs9WkEizFnIv4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571356908; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=R1PlfVHqb3WVig88YBfaQrNCjCIbjKnTTMDrf/wEky8=; b=OnzlgnwZXmRJBgpN1b1zi6bAUaFkv8ciEp0EdzNrUVHLXMDDiw0gpkB8iVdYCSqeK/fuldFIzonDgP7wKyNSdFRoJF3F6nwsgwoAcCjvybvTWK0dzwdyZ6FdLsNPNn0IssyL9w2kpKsAQO2Q3LYmtG1y8Zp7//g4sFtW8nzr0jE= 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+49195+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 1571356908215193.01996185949292; Thu, 17 Oct 2019 17:01:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aaaaYY1788612xaaaaaaaaaa; Thu, 17 Oct 2019 17:01:47 -0700 X-Received: from mga04.intel.com (mga04.intel.com []) by mx.groups.io with SMTP id smtpd.web11.9133.1571356905843798000 for ; Thu, 17 Oct 2019 17:01:46 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 17:01:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,309,1566889200"; d="scan'208";a="202542453" X-Received: from paagyema-desk2.amr.corp.intel.com ([10.24.15.58]) by FMSMGA003.fm.intel.com with ESMTP; 17 Oct 2019 17:01:45 -0700 From: "Agyeman, Prince" To: devel@edk2.groups.io Cc: Ankit Sinha , Nate DeSimone , Kubacki Michael A Subject: [edk2-devel] [edk2-platforms] [PATCH v3 1/4] BoardModulePkg: Add BIOS Info HOB Date: Thu, 17 Oct 2019 17:01:42 -0700 Message-Id: <20191018000145.3140-2-prince.agyeman@intel.com> In-Reply-To: <20191018000145.3140-1-prince.agyeman@intel.com> References: <20191018000145.3140-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: aaaaaaaaaaaaaaaaaaaaaaaax1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1571356907; bh=U8rEsua7XsRqiEJqrx9l9UFMiDxMgFXSlhKCZw7iLuY=; h=Cc:Date:From:Reply-To:Subject:To; b=Cy87WyJVA76kzRh0fZ4PIH24CtYieQfWru9tQjB5gk+KNixY9rQLp+2nxdeTij6BEtR 4pvhyoWJhLTDms25GkK/f3sfu6U9iA5zPUhzxWiH3Bqn6lehR5/Q8XzEpIOVXRw315iin FuHi1LSLqdHC88S5gpqK2ynURbDWYIDVc9A= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2210 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2211 Added gBiosInfoGuid to be used in publishing the BIOS information HOB which is needed in FIT generation Also added the BIOS Info header file BiosInfo.h that defines the BIOS info struct and GUID Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman Reviewed-by: Michael Kubacki Reviewed-by: Nate DeSimone --- .../Intel/BoardModulePkg/BoardModulePkg.dec | 3 + .../BoardModulePkg/Include/Guid/BiosInfo.h | 61 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec b/Platform/In= tel/BoardModulePkg/BoardModulePkg.dec index f96fb09aa1..f461cc7cab 100644 --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec @@ -39,3 +39,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/Guid/BiosInfo.h b/Platfo= rm/Intel/BoardModulePkg/Include/Guid/BiosInfo.h new file mode 100644 index 0000000000..d73409ea6f --- /dev/null +++ b/Platform/Intel/BoardModulePkg/Include/Guid/BiosInfo.h @@ -0,0 +1,61 @@ +/** @file + Definitions and GUID for BIOS INFO. + + 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 (#49195): https://edk2.groups.io/g/devel/message/49195 Mute This Topic: https://groups.io/mt/34950129/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 Fri May 3 10:48:31 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+49196+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+49196+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1571356908; cv=none; d=zoho.com; s=zohoarc; b=KURNEUR3huapqIq9g7d6m45Tf+xmRmWos28d2hb2QeqOm3BRtaBxSK1MPZNTGURQgqjRxgbY3kYB36xgF0co7LH/yJfIff44aCY3veHSGnKpygf8Y8uvrYRVZ+eN5VUJm/fu1fprwqMmCBCnyiOhIxgTdy/ZR8mP7obSfGmRzIA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571356908; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=3LNmGNDYmhcC7zYTCxQRM/QhaRsall0lNd9antwIGdU=; b=WczZWedhn4n8J/kQBr4VSZPREPtqtTGiQg+d1IH33mn98pBqrTSP456+eZTND/SrJsQgdpIRJDD9gtkSpq3ZHLS9GVifw/boM0k6IwfWdn3DBhIGwWOyuZr47PeemvV+Q2jM4UcMLlqFR+HbBXU1kfuqDhAoPAL8BI8WBd8Hi4Y= 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+49196+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 1571356908216507.6508540483709; Thu, 17 Oct 2019 17:01:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aaaaYY1788612xaaaaaaaaaa; Thu, 17 Oct 2019 17:01:47 -0700 X-Received: from mga04.intel.com (mga04.intel.com []) by mx.groups.io with SMTP id smtpd.web11.9133.1571356905843798000 for ; Thu, 17 Oct 2019 17:01:46 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 17:01:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,309,1566889200"; d="scan'208";a="202542459" X-Received: from paagyema-desk2.amr.corp.intel.com ([10.24.15.58]) by FMSMGA003.fm.intel.com with ESMTP; 17 Oct 2019 17:01:45 -0700 From: "Agyeman, Prince" To: devel@edk2.groups.io Cc: Ankit Sinha , Nate DeSimone , Kubacki Michael A Subject: [edk2-devel] [edk2-platforms] [PATCH v3 2/4] KabylakeOpenBoardPkg: Add BIOS Info PEIM Date: Thu, 17 Oct 2019 17:01:43 -0700 Message-Id: <20191018000145.3140-3-prince.agyeman@intel.com> In-Reply-To: <20191018000145.3140-1-prince.agyeman@intel.com> References: <20191018000145.3140-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: aaaaaaaaaaaaaaaaaaaaaaaax1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1571356907; bh=ogk7rFZHdBYWnu8MACpRF01KFT5kETBBrD6iEM40pRo=; h=Cc:Date:From:Reply-To:Subject:To; b=Jfe7H90sbvmBjpme5cP05Tlu8H6PADwpLohpNuk248gKv3O96L2Mziy/ilgX51012p2 Ak+oCspMXmNmEfGlY9Bd0CF9+qf8zeOK7uOdxsRIYOOUVlsfFlsmlZvOBe64VmtBVmsai cElF1iDZLi/kwv0npIjV262tfNQiyMD1+SY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2210 Added BIOS Info PEIM to KabylakeRvp3 and GalagoPro3 to publish the BIOS info HOB. This PEIM currently publishes the board's microcode region information. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman Reviewed-by: Chasel Chiu Reviewed-by: Michael Kubacki Reviewed-by: Nate DeSimone --- .../KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c | 93 +++++++++++++++++++ .../BiosInfo/BiosInfo.inf | 49 ++++++++++ .../GalagoPro3/OpenBoardPkg.dsc | 1 + .../GalagoPro3/OpenBoardPkg.fdf | 1 + .../KabylakeRvp3/OpenBoardPkg.dsc | 1 + .../KabylakeRvp3/OpenBoardPkg.fdf | 1 + 6 files changed, 146 insertions(+) create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.i= nf diff --git a/Platform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c b/Plat= form/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.c new file mode 100644 index 0000000000..578e66149e --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/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_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/BiosInfo/BiosInfo.inf b/Pl= atform/Intel/KabylakeOpenBoardPkg/BiosInfo/BiosInfo.inf new file mode 100644 index 0000000000..e5e40144a6 --- /dev/null +++ b/Platform/Intel/KabylakeOpenBoardPkg/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 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 + PcdLib + +[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 b6f9807e7e..f59248bba4 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc @@ -298,6 +298,7 @@ !if gKabylakeOpenBoardPkgTokenSpaceGuid.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/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fd= f b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf index c46f7a71e5..80efab1aad 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 $(PLATFORM_BOARD_PACKAGE)/BiosInfo/BiosInfo.inf =20 [FV.FvPostMemoryUncompact] BlockSize =3D $(FLASH_BLOCK_SIZE) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.= dsc b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc index b412dc9eec..7e65eeda6f 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc @@ -370,6 +370,7 @@ !if gKabylakeOpenBoardPkgTokenSpaceGuid.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/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.= fdf b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf index c61b93db84..dbd6f2aa10 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 $(PLATFORM_BOARD_PACKAGE)/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 (#49196): https://edk2.groups.io/g/devel/message/49196 Mute This Topic: https://groups.io/mt/34950130/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 Fri May 3 10:48:31 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+49197+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+49197+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1571356908; cv=none; d=zoho.com; s=zohoarc; b=AsDPJwFkMPaz/kqNZMJnyPRiAgrSNN1rCDP/Xac8Akw+HQyd1cqI8uBr1sNed95J2CgQAdx2mb1txsNn5jFUG9X7NkzsEo1eDoaV/kgCwTcBQJ/QndjJwkyPjEc5yh3d5pTMLH/PQJ5cnMp9TLGqfwQ2K3rCUjEkPNMoBdo+Mws= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571356908; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=dgWT6QFdghIa/oLTFmj5rqV7bj+FbkAllGDQGClU1D4=; b=L+LDLheh0qsdbp7+DH5f9RRsu6oVsfA1ikqDFXrl+OCrsnFR5hEYMSKcfpCjwLtmu0w1p3uZVeinwazMvBqoILrB2L0unIKYpGZtNIlWzsnInOZg0HnpacDMc5FKYeIFKhdJB/ofd2I81l0ISUZJV+GnUXEpatz8Fb0nQEmCbPY= 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+49197+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 157135690833588.75493662144208; Thu, 17 Oct 2019 17:01:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aaaaYY1788612xaaaaaaaaaa; Thu, 17 Oct 2019 17:01:47 -0700 X-Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web10.9260.1571356906766453432 for ; Thu, 17 Oct 2019 17:01:46 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 17:01:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,309,1566889200"; d="scan'208";a="202542462" X-Received: from paagyema-desk2.amr.corp.intel.com ([10.24.15.58]) by FMSMGA003.fm.intel.com with ESMTP; 17 Oct 2019 17:01:46 -0700 From: "Agyeman, Prince" To: devel@edk2.groups.io Cc: Ankit Sinha , Nate DeSimone , Kubacki Michael A Subject: [edk2-devel] [edk2-platforms] [PATCH v3 3/4] WhiskeylakeOpenBoardPkg: Add BIOS Info PEIM Date: Thu, 17 Oct 2019 17:01:44 -0700 Message-Id: <20191018000145.3140-4-prince.agyeman@intel.com> In-Reply-To: <20191018000145.3140-1-prince.agyeman@intel.com> References: <20191018000145.3140-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: aaaaaaaaaaaaaaaaaaaaaaaax1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1571356907; bh=xej8M/oSotbOrHZIaNB3wCO4G/7J1qAS6XHAN2TKN30=; h=Cc:Date:From:Reply-To:Subject:To; b=cXwPTXFcjS+rPkEFinuqOaw5wu6bpqR7gXO1o6w6seoU8BMQKBzKuG9leUaXdFMn6MO YjnXO6bJsDYqbtDAhTVkFr3qOQYzH3rXmw3NCYdjb7YK281c6+qrKoGqA8MPhSDNghUEG R34qO5WbrYm7Gl8tP4BV8PgdJqXKOm3kxU8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2211 Added BIOS Info PEIM to publish Bios Info HOB. This PEIM currently publishes the microcode FV information. Cc: Ankit Sinha Cc: Nate DeSimone Cc: Kubacki Michael A Signed-off-by: Prince Agyeman Reviewed-by: Michael Kubacki Reviewed-by: Nate DeSimone --- .../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/BiosInf= o.c create mode 100644 Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInf= o.inf diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/BiosInfo/BiosInfo.c b/P= latform/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_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/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-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 + 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 ## 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 423fa88c12..8e0ea2d5ce 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.d= sc +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.d= sc @@ -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/OpenBoa= rdPkg.fdf b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoar= dPkg.fdf index 320e444aae..140e6260c9 100644 --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.f= df +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.f= df @@ -240,6 +240,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 $(PLATFORM_BOARD_PACKAGE)/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 (#49197): https://edk2.groups.io/g/devel/message/49197 Mute This Topic: https://groups.io/mt/34950131/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 Fri May 3 10:48:31 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+49198+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+49198+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1571356908; cv=none; d=zoho.com; s=zohoarc; b=N7pSUlPHr15EAJItICWlSIbI28sSMpwPcbCZnS7cdMZVDxDjF+UPPnEu1y2rlDaGMEPXhmE9SZ0x0Gp27wRdMHA4sXBnOFjlz3erQO2ZCK2aUD73fVt7pfK+F4MkCxfIznWhe7FVSDo/rt6VnumOB6iWCiQAsoKpauS67kLvfOQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571356908; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=vI/NkFmglsphc+OTH6MNjW1okIVM42M7kVkOBEI/u68=; b=DrGwHP60C60hy9Lowucf2TU12d9t7NL0MGGey2lXXRNsBY6itP0T5H30LLTUVPpTIPS3ccFGYcQzcqnXTwxmcM4YFUIIUcXyuPjd/5p/c9MS9LyfciklPzq65tSQGlfAn0H4ISEi2l693Lkaq6E1/BB5Y8YkWkFlvFAsl2RSLrk= 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+49198+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 1571356908365940.0410355743509; Thu, 17 Oct 2019 17:01:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id aaaaYY1788612xaaaaaaaaaa; Thu, 17 Oct 2019 17:01:47 -0700 X-Received: from mga04.intel.com (mga04.intel.com []) by mx.groups.io with SMTP id smtpd.web11.9133.1571356905843798000 for ; Thu, 17 Oct 2019 17:01:46 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 17:01:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,309,1566889200"; d="scan'208";a="202542465" X-Received: from paagyema-desk2.amr.corp.intel.com ([10.24.15.58]) by FMSMGA003.fm.intel.com with ESMTP; 17 Oct 2019 17:01:46 -0700 From: "Agyeman, Prince" To: devel@edk2.groups.io Cc: Ankit Sinha , Nate DeSimone , Michael Kubacki Subject: [edk2-devel] [edk2-platforms] [PATCH v3 4/4] Platform/Intel: Add FIT generation tool Date: Thu, 17 Oct 2019 17:01:45 -0700 Message-Id: <20191018000145.3140-5-prince.agyeman@intel.com> In-Reply-To: <20191018000145.3140-1-prince.agyeman@intel.com> References: <20191018000145.3140-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: aaaaaaaaaaaaaaaaaaaaaaaax1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1571356907; bh=Snwfzb7ALbbRr299i55lAw75IwlCGvBNquseGBJfi70=; h=Cc:Date:From:Reply-To:Subject:To; b=xJvYWWjG2vNp6yhy8+0+2fhkOBL3eqwfz5LL4SQDbDM577bvYKB2x/XvuoSEUTSCIaO 4TPG/UDpr0n2xG9Ie/VSXU+bYs8me/vvUMjOkDqtsEKq50UUH+xTZIPeinVZK4OB1A+1b z+UvJcZMz3yoiIoIKDlzv/AMvK94z6sLV1M= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2210 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2211 Added FitGen tool build and FIT generation to the BIOS build process. What was done: - Build the FIT generation tool - Added default/empty BIOS_INFO_GUID to the build.cfg - Added BIOS_INFO_GUID to GalagoPro3,KabylakeRvp3 and WhiskeylakeURvp's build_config.cfg This allows a board to specify the GUID associated with the BIOS Info PEIM to be used in the board's FIT generation. BIOS_INFO_GUID is passed as an argument to FitGen tool which allow the tool to locate the BIOS Info module to be used in FIT generation. 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..458fe3d35d 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 C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929 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 (#49198): https://edk2.groups.io/g/devel/message/49198 Mute This Topic: https://groups.io/mt/34950132/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-