From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: zailiang.sun@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Wed, 10 Jul 2019 21:54:20 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2019 21:54:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,476,1557212400"; d="scan'208";a="193281410" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 10 Jul 2019 21:54:19 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 10 Jul 2019 21:54:19 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 10 Jul 2019 21:54:19 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.134]) with mapi id 14.03.0439.000; Thu, 11 Jul 2019 12:54:17 +0800 From: "Sun, Zailiang" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Qian, Yi" , Gary Lin Subject: Re: [edk2-platforms Patch 21/28] Vlv2TbltDevicePkg: Re-enable BIOS ID feature Thread-Topic: [edk2-platforms Patch 21/28] Vlv2TbltDevicePkg: Re-enable BIOS ID feature Thread-Index: AQHVN1J69FOoDlqphkiP4dX6QIwR9KbE2p0A Date: Thu, 11 Jul 2019 04:54:16 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C95E5A@SHSMSX104.ccr.corp.intel.com> References: <20190710190516.6012-1-michael.d.kinney@intel.com> <20190710190516.6012-22-michael.d.kinney@intel.com> In-Reply-To: <20190710190516.6012-22-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-By: Zailiang Sun > -----Original Message----- > From: Kinney, Michael D > Sent: Thursday, July 11, 2019 3:05 AM > To: devel@edk2.groups.io > Cc: Sun, Zailiang ; Qian, Yi ; > Gary Lin > Subject: [edk2-platforms Patch 21/28] Vlv2TbltDevicePkg: Re-enable BIOS I= D > feature >=20 > Add back BIOSID feature using GenBiosId.py script and BiosIdLib from the > BoardModulePkg. Remove the VLV2 specific BiosIdLib implementation. >=20 > Cc: Zailiang Sun > Cc: Yi Qian > Cc: Gary Lin > Signed-off-by: Michael D Kinney > --- > .../Include/Library/BiosIdLib.h | 86 ---------------- > .../Library/BiosIdLib/BiosIdLib.c | 98 ------------------- > .../Library/BiosIdLib/BiosIdLib.inf | 33 ------- > .../PlatformDxe/PlatformDxe.inf | 5 +- > .../Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf | 7 ++ > .../Vlv2TbltDevicePkg/PlatformPkgGcc.fdf | 7 ++ > .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 2 +- > .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 2 +- > .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 2 +- > .../PlatformSetupDxe/PlatformSetupDxe.inf | 3 +- > .../SmBiosMiscDxe/MiscBiosVendorFunction.c | 49 +--------- > .../SmBiosMiscDxe/SmBiosMiscDxe.inf | 8 +- > Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat | 27 +++++ > Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh | 46 +++++++++ > 14 files changed, 100 insertions(+), 275 deletions(-) delete mode 10064= 4 > Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h > delete mode 100644 > Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c > delete mode 100644 > Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf >=20 > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h > b/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h > deleted file mode 100644 > index bd08c9a80f..0000000000 > --- a/Platform/Intel/Vlv2TbltDevicePkg/Include/Library/BiosIdLib.h > +++ /dev/null > @@ -1,86 +0,0 @@ > -/*++ > - > - Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved. > - > - SPDX-License-Identifier: BSD-2-Clause-Patent > - > -Module Name: > - > - BiosIdLib.h > - > -Abstract: > - > - BIOS ID library definitions. > - > - This library provides functions to get BIOS ID, VERSION, DATE and TIME > - > ---*/ > - > -#ifndef _BIOS_ID_LIB_H_ > -#define _BIOS_ID_LIB_H_ > - > -// > -// BIOS ID string format: > -// > -// > $(BOARD_ID)$(BOARD_REV).$(OEM_ID).$(VERSION_MAJOR).$(BUILD_TYPE > )$(VERSION_MINOR).YYMMDDHHMM > -// > -// Example: "TRFTCRB1.86C.0008.D03.0506081529" > -// > -#pragma pack(1) > - > -typedef struct { > - CHAR16 BoardId[7]; // "TRFTCRB" > - CHAR16 BoardRev; // "1" > - CHAR16 Dot1; // "." > - CHAR16 OemId[3]; // "86C" > - CHAR16 Dot2; // "." > - CHAR16 VersionMajor[4]; // "0008" > - CHAR16 Dot3; // "." > - CHAR16 BuildType; // "D" > - CHAR16 VersionMinor[2]; // "03" > - CHAR16 Dot4; // "." > - CHAR16 TimeStamp[10]; // "YYMMDDHHMM" > - CHAR16 NullTerminator; // 0x0000 > -} BIOS_ID_STRING; > - > -#define MEM_IFWIVER_START 0x7E0000 > -#define MEM_IFWIVER_LENGTH 0x1000 > - > -typedef struct _MANIFEST_OEM_DATA{ > - UINT32 Signature; > - unsigned char FillNull[0x39]; > - UINT32 IFWIVersionLen; > - unsigned char IFWIVersion[32]; > -}MANIFEST_OEM_DATA; > - > -// > -// A signature precedes the BIOS ID string in the FV to enable search by > external tools. > -// > -typedef struct { > - UINT8 Signature[8]; // "$IBIOSI$" > - BIOS_ID_STRING BiosIdString; // "TRFTCRB1.86C.0008.D03.0506081529= " > -} BIOS_ID_IMAGE; > - > -#pragma pack() > - > -/** > - This function returns the Version & Release Date and Time by getting a= nd > converting > - BIOS ID. > - > - @param[in] BiosVersion The Bios Version out of the conversion. > - @param[in] BiosReleaseDate The Bios Release Date out of the > conversion. > - @param[in] BiosReleaseTime The Bios Release Time out of the > conversion. > - > - @retval EFI_SUCCESS BIOS Version & Release Date and Time ha= ve > been got successfully. > - @retval EFI_NOT_FOUND BiosId image is not found, and no param= eter > will be modified. > - @retval EFI_INVALID_PARAMETER All the parameters are NULL. > - > -**/ > -EFI_STATUS > -GetBiosVersionDateTime ( > - OUT CHAR16 *BiosVersion, OPTIONAL > - OUT CHAR16 *BiosReleaseDate, OPTIONAL > - OUT CHAR16 *BiosReleaseTime OPTIONAL > - ); > - > -#endif > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib= .c > b/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c > deleted file mode 100644 > index f6ab37313c..0000000000 > --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.c > +++ /dev/null > @@ -1,98 +0,0 @@ > -/*++ > - > -Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved > - > - SPDX-License-Identifier: BSD-2-Clause-Patent > - > -Module Name: > - > - BiosIdLib.c > - > -Abstract: > - > - Boot service DXE BIOS ID library implementation. > - > - These functions in this file can be called during DXE and cannot be ca= lled > during runtime > - or in SMM which should use a RT or SMM library. > - > ---*/ > - > -#include > -#include > - > -#include > - > -/** > - This function returns the Version & Release Date and Time by getting a= nd > converting > - BIOS ID. > - > - @param BiosVersion The Bios Version out of the conversion. > - @param BiosReleaseDate The Bios Release Date out of the conversion. > - @param BiosReleaseTime - The Bios Release Time out of the conversion. > - > - @retval EFI_SUCCESS - BIOS Version & Release Date and Time have been > got successfully. > - @retval EFI_NOT_FOUND - BiosId image is not found, and no parameter > will be modified. > - @retval EFI_INVALID_PARAMETER - All the parameters are NULL. > - > -**/ > -EFI_STATUS > -GetBiosVersionDateTime ( > - OUT CHAR16 *BiosVersion, OPTIONAL > - OUT CHAR16 *BiosReleaseDate, OPTIONAL > - OUT CHAR16 *BiosReleaseTime OPTIONAL > - ) > -{ > - if ((BiosVersion =3D=3D NULL) && (BiosReleaseDate =3D=3D NULL) && > (BiosReleaseTime =3D=3D NULL)) { > - return EFI_INVALID_PARAMETER; > - } > - > - if (BiosVersion !=3D NULL) { > - // > - // Fill the BiosVersion data from the BIOS ID. > - // > - StrCpy (BiosVersion, L"MNW2MAX1.X64.0084.D01"); > - } > - > - if (BiosReleaseDate !=3D NULL) { > - // > - // Fill the build timestamp date from the BIOS ID in the "MM/DD/YY" > format. > - // > - BiosReleaseDate[0] =3D L'0'; > - BiosReleaseDate[1] =3D L'1'; > - BiosReleaseDate[2] =3D L'/'; > - > - BiosReleaseDate[3] =3D L'0'; > - BiosReleaseDate[4] =3D L'1'; > - BiosReleaseDate[5] =3D L'/'; > - > - // > - // Add 20 for SMBIOS table > - // Current Linux kernel will misjudge 09 as year 0, so using 2009 fo= r > SMBIOS table > - // > - BiosReleaseDate[6] =3D L'2'; > - BiosReleaseDate[7] =3D L'0'; > - BiosReleaseDate[8] =3D L'1'; > - BiosReleaseDate[9] =3D L'9'; > - > - BiosReleaseDate[10] =3D L'\0'; > - } > - > - if (BiosReleaseTime !=3D NULL) { > - > - // > - // Fill the build timestamp time from the BIOS ID in the "HH:MM" for= mat. > - // > - > - BiosReleaseTime[0] =3D L'0'; > - BiosReleaseTime[1] =3D L'0'; > - BiosReleaseTime[2] =3D L':'; > - > - BiosReleaseTime[3] =3D L'0'; > - BiosReleaseTime[4] =3D L'0'; > - > - BiosReleaseTime[5] =3D L'\0'; > - } > - > - return EFI_SUCCESS; > -} > - > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib= .inf > b/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf > deleted file mode 100644 > index 0d38d73ada..0000000000 > --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf > +++ /dev/null > @@ -1,33 +0,0 @@ > -#/*++ > -# > -# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved -#= -# SPDX- > License-Identifier: BSD-2-Clause-Patent -# -# Module Name: > -# > -# BiosIdLib.inf > -# > -# Abstract: > -# > -# Component description file for BIOS ID library > -# > -#--*/ > -[Defines] > - INF_VERSION =3D 0x00010005 > - BASE_NAME =3D BiosIdLib > - FILE_GUID =3D 98546145-64F1-4d2e-814F-6BF963DB793= 0 > - MODULE_TYPE =3D BASE > - VERSION_STRING =3D 1.0 > - LIBRARY_CLASS =3D BiosIdLib > - PI_SPECIFICATION_VERSION =3D 0x0001000A > - > -[Sources] > - BiosIdLib.c > - > -[Packages] > - MdePkg/MdePkg.dec > - MdePkg/MdePkg.dec > - MdeModulePkg/MdeModulePkg.dec > - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec > - Vlv2TbltDevicePkg/PlatformPkg.dec > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf > index 9fee691365..88c9b36cb1 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf > @@ -48,10 +48,11 @@ [sources.common] > [Packages] > MdePkg/MdePkg.dec > MdeModulePkg/MdeModulePkg.dec > - Vlv2TbltDevicePkg/PlatformPkg.dec > - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec > SecurityPkg/SecurityPkg.dec > CryptoPkg/CryptoPkg.dec > + BoardModulePkg/BoardModulePkg.dec > + Vlv2TbltDevicePkg/PlatformPkg.dec > + Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec >=20 > [LibraryClasses] > BaseLib > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf > index c538fe4a06..dd4550dd88 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.fdf > @@ -382,6 +382,13 @@ [FV.FVMAIN] > INF > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan > dlerRuntimeDxe.inf > } >=20 > +# > +# gBiosIdGuid > +# > +FILE FREEFORM =3D C3E36D09-8294-4b97-A857-D5288FE33E28 { > + SECTION RAW =3D > +$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/BiosId.bin > + } > + > # > # EDK II Related Platform codes > # > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf > index bd9d415939..b6e8e40582 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf > @@ -331,6 +331,13 @@ [FV.FVMAIN] > INF > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan > dlerRuntimeDxe.inf > } >=20 > +# > +# gBiosIdGuid > +# > +FILE FREEFORM =3D C3E36D09-8294-4b97-A857-D5288FE33E28 { > + SECTION RAW =3D > +$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/BiosId.bin > + } > + > # > # EDK II Related Platform codes > # > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc > index 6317bc1342..26c1caad94 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc > @@ -221,7 +221,7 @@ [LibraryClasses.common] > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > !endif >=20 > - BiosIdLib|Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf > + BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf > CpuIA32Lib|Vlv2TbltDevicePkg/Library/CpuIA32Lib/CpuIA32Lib.inf >=20 > StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > index 8f69bb47dd..dc6d8b1b26 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc > @@ -219,7 +219,7 @@ [LibraryClasses.common] > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > !endif >=20 > - BiosIdLib|Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf > + BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf > CpuIA32Lib|Vlv2TbltDevicePkg/Library/CpuIA32Lib/CpuIA32Lib.inf >=20 > StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > index d146321750..cbc87aa9be 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc > @@ -221,7 +221,7 @@ [LibraryClasses.common] > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf > !endif >=20 > - BiosIdLib|Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf > + BiosIdLib|BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf > CpuIA32Lib|Vlv2TbltDevicePkg/Library/CpuIA32Lib/CpuIA32Lib.inf >=20 > StallSmmLib|Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf > diff --git > a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.i > nf > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.i > nf > index 85e8b1e8d6..8ff246041d 100644 > --- > a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.i > nf > +++ > b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe > +++ .inf > @@ -60,9 +60,10 @@ [Sources] > [Packages] > MdePkg/MdePkg.dec > MdeModulePkg/MdeModulePkg.dec > + SecurityPkg/SecurityPkg.dec > + BoardModulePkg/BoardModulePkg.dec > Vlv2TbltDevicePkg/PlatformPkg.dec > Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec #for PchAccess.h > - SecurityPkg/SecurityPkg.dec >=20 > [LibraryClasses] > BaseLib > diff --git > a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorFunctio > n.c > b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorFuncti > on.c > index fb4fa820a5..0fbd5ac0bd 100644 > --- > a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorFunctio > n.c > +++ > b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorFunct > +++ ion.c > @@ -163,12 +163,6 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) > SMBIOS_TABLE_TYPE0 *SmbiosRecord; > EFI_SMBIOS_HANDLE SmbiosHandle; > EFI_MISC_BIOS_VENDOR *ForType0InputData; > - UINT16 UVerStr[32]; > - UINTN LoopIndex; > - UINTN CopyIndex; > - MANIFEST_OEM_DATA *IFWIVerStruct; > - UINT8 *Data8 =3D NULL; > - UINT16 SpaceVer[2]=3D{0x0020,0x0000}; > UINT16 BIOSVersionTemp[100]; >=20 > ForType0InputData =3D (EFI_MISC_BIOS_VENDOR *)RecordData; > @@ -208,49 +202,8 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) > TokenToGet =3D STRING_TOKEN (STR_MISC_BIOS_VERSION); > Version =3D SmbiosMiscGetString (TokenToGet); >=20 > - ZeroMem (UVerStr, 2*32); > - ZeroMem (BIOSVersionTemp, 2*100); > + ZeroMem (BIOSVersionTemp, sizeof (BIOSVersionTemp)); > StrCat (BIOSVersionTemp,Version); > - Data8 =3D AllocatePool (SECTOR_SIZE_4KB); > - ZeroMem (Data8, SECTOR_SIZE_4KB); > - > - Status =3D gBS->LocateProtocol ( > - &gEfiSpiProtocolGuid, > - NULL, > - (VOID **)&mSpiProtocol > - ); > - if (!EFI_ERROR(Status)) { > - // > - // Get data form SPI ROM. > - // > - Status =3D FlashRead ( > - MEM_IFWIVER_START, > - Data8, > - SECTOR_SIZE_4KB, > - EnumSpiRegionAll > - ); > - if (!EFI_ERROR(Status)) { > - for(LoopIndex =3D 0; LoopIndex <=3D SECTOR_SIZE_4KB; LoopIndex++) = { > - IFWIVerStruct =3D (MANIFEST_OEM_DATA *)(Data8 + LoopIndex); > - if(IFWIVerStruct->Signature =3D=3D SIGNATURE_32('$','F','U','D')= ) { > - DEBUG ((EFI_D_ERROR, "the IFWI Length is:%d\n", IFWIVerStruct- > >IFWIVersionLen)); > - if(IFWIVerStruct->IFWIVersionLen < 32) { > - for(CopyIndex =3D 0; CopyIndex < IFWIVerStruct->IFWIVersionL= en; > CopyIndex++) { > - UVerStr[CopyIndex] =3D (UINT16)IFWIVerStruct- > >IFWIVersion[CopyIndex]; > - } > - UVerStr[CopyIndex] =3D 0x0000; > - DEBUG ((EFI_D_ERROR, "The IFWI Version is :%s,the IFWI Lengt= h > is:%d\n", UVerStr,IFWIVerStruct->IFWIVersionLen)); > - StrCat(BIOSVersionTemp,SpaceVer); > - StrCat(BIOSVersionTemp,UVerStr); > - DEBUG ((EFI_D_ERROR, "The BIOS and IFWI Version is :%s\n", > BIOSVersionTemp)); > - } > - break; > - } > - } > - } > - } > - FreePool(Data8); > - > VerStrLen =3D StrLen(BIOSVersionTemp); > if (VerStrLen > SMBIOS_STRING_MAX_LENGTH) { > return EFI_UNSUPPORTED; > diff --git > a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf > b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf > index 92b51b1743..016fb53b18 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf > +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/SmBiosMiscDxe.inf > @@ -81,12 +81,13 @@ [Sources] > MiscMemoryDeviceFunction.c >=20 > [Packages] > - MdeModulePkg/MdeModulePkg.dec > - Vlv2TbltDevicePkg/PlatformPkg.dec > MdePkg/MdePkg.dec > - Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec > + MdeModulePkg/MdeModulePkg.dec > NetworkPkg/NetworkPkg.dec > UefiCpuPkg/UefiCpuPkg.dec > + BoardModulePkg/BoardModulePkg.dec > + Vlv2TbltDevicePkg/PlatformPkg.dec > + Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec >=20 > [LibraryClasses] > HiiLib > @@ -120,7 +121,6 @@ [Protocols] > gMemInfoProtocolGuid > gEfiTdtOperationProtocolGuid > gDxePchPlatformPolicyProtocolGuid > - gEfiSpiProtocolGuid > gEfiSimpleNetworkProtocolGuid >=20 > [Pcd] > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat > b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat > index 5cae78bb6d..ffd6722582 100644 > --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat > +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.bat > @@ -207,11 +207,15 @@ if defined VS140COMNTOOLS ( > ) >=20 > echo Ensuring correct build directory is present > +if not exist %WORKSPACE%\Build mkdir %WORKSPACE%\Build > if "%Arch%"=3D=3D"IA32" ( > + if not exist %WORKSPACE%\Build\%PLATFORM_NAME%IA32 mkdir > + %WORKSPACE%\Build\%PLATFORM_NAME%IA32 > set > BUILD_PATH=3D%WORKSPACE%\Build\%PLATFORM_NAME%IA32\%TARGET% > _%TOOL_CHAIN_TAG% > ) else ( > + if not exist %WORKSPACE%\Build\%PLATFORM_NAME% mkdir > + %WORKSPACE%\Build\%PLATFORM_NAME% > set > BUILD_PATH=3D%WORKSPACE%\Build\%PLATFORM_NAME%\%TARGET%_%T > OOL_CHAIN_TAG% > ) > +if not exist %BUILD_PATH% mkdir %BUILD_PATH% >=20 > echo Modifing Conf files for this build... > :: Remove lines with these tags from target.txt > @@ -234,6 +238,29 @@ echo MAX_CONCURRENT_THREAD_NUMBER > =3D %build_threads% >> %WOR >=20 > move > /Y %WORKSPACE%\Conf\target.txt.tmp %WORKSPACE%\Conf\target.txt >n > ul >=20 > +::******************************************************** > ************* > +* > +:: Generate BIOS ID > +::******************************************************** > ************* > +* > + > +echo BOARD_ID =3D MNW2MAX > %BUILD_PATH%/BiosId.env > +echo BOARD_REV =3D 1 >> %BUILD_PATH%/BiosId.env > +if "%Arch%"=3D=3D"IA32" ( > + echo BOARD_EXT =3D I32 >> %BUILD_PATH%/BiosId.env > +) > +if "%Arch%"=3D=3D"X64" ( > + echo BOARD_EXT =3D X64 >> %BUILD_PATH%/BiosId.env > +) > +echo VERSION_MAJOR =3D 0090 >> %BUILD_PATH%/BiosId.env > +if "%TARGET%"=3D=3D"DEBUG" ( > + echo BUILD_TYPE =3D D >> %BUILD_PATH%/BiosId.env > +) > +if "%TARGET%"=3D=3D"RELEASE" ( > + echo BUILD_TYPE =3D R >> %BUILD_PATH%/BiosId.env > +) > +echo VERSION_MINOR =3D 01 >> %BUILD_PATH%/BiosId.env > + > +%WORKSPACE%\edk2- > platforms\Platform\Intel\Tools\GenBiosId\GenBiosId.py > +-i %BUILD_PATH%/BiosId.env -o %BUILD_PATH%/BiosId.bin -ot > +%BUILD_PATH%/BiosId.txt > + > ::********************************************************* > ************* > :: Build BIOS > ::********************************************************* > ************* > diff --git a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh > b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh > index aac8534677..03fa062310 100755 > --- a/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh > +++ b/Platform/Intel/Vlv2TbltDevicePkg/bld_vlv.sh > @@ -66,6 +66,7 @@ cd $CORE_PATH > make -C BaseTools >=20 > ## Define platform specific environment variables. > +PLATFORM_NAME=3DVlv2TbltDevicePkg > PLATFORM_PACKAGE=3DVlv2TbltDevicePkg > PLATFORM_PKG_PATH=3D$PLATFORM_PATH/$PLATFORM_PACKAGE > config_file=3D$PLATFORM_PKG_PATH/PlatformPkgConfig.dsc > @@ -186,6 +187,51 @@ else > echo TARGET_ARCH =3D IA32 X64 >> > $WORKSPACE/Conf/target.txt > fi >=20 > + > +## Set and Create $BUILD_PATH if necessary if [ ! -d ${WORKSPACE}/Build > +]; then > + mkdir ${WORKSPACE}/Build > +fi > + > +if [ $Arch =3D=3D "IA32" ]; then > + if [ ! -d ${WORKSPACE}/Build/${PLATFORM_NAME}IA32 ]; then > + mkdir ${WORKSPACE}/Build/${PLATFORM_NAME}IA32 > + fi > + > +BUILD_PATH=3D${WORKSPACE}/Build/${PLATFORM_NAME}IA32/${TARGET}_ > ${TOOL_CHA > +IN_TAG} > +else > + if [ ! -d ${WORKSPACE}/Build/${PLATFORM_NAME} ]; then > + mkdir ${WORKSPACE}/Build/${PLATFORM_NAME} > + fi > + > +BUILD_PATH=3D${WORKSPACE}/Build/${PLATFORM_NAME}/${TARGET}_${T > OOL_CHAIN_T > +AG} > +fi > + > +if [ ! -d $BUILD_PATH ]; then > + mkdir $BUILD_PATH > +fi > + > +##******************************************************* > ************** > +* > +## Generate BIOS ID > +##******************************************************* > ************** > +* > + > +echo BOARD_ID =3D MNW2MAX > $BUILD_PATH/BiosId.env > +echo BOARD_REV =3D 1 >> $BUILD_PATH/BiosId.env > +if [ $Arch =3D=3D "IA32" ]; then > + echo BOARD_EXT =3D I32 >> $BUILD_PATH/BiosId.env > +fi > +if [ $Arch =3D=3D "X64" ]; then > + echo BOARD_EXT =3D X64 >> $BUILD_PATH/BiosId.env > +fi > +echo VERSION_MAJOR =3D 0090 >> $BUILD_PATH/BiosId.env > +if [ $TARGET =3D=3D "DEBUG" ]; then > + echo BUILD_TYPE =3D D >> $BUILD_PATH/BiosId.env > +fi > +if [ $TARGET =3D=3D "RELEASE" ]; then > + echo BUILD_TYPE =3D R >> $BUILD_PATH/BiosId.env > +fi > +echo VERSION_MINOR =3D 01 >> $BUILD_PATH/BiosId.env > + > +python > +$WORKSPACE/edk2- > platforms/Platform/Intel/Tools/GenBiosId/GenBiosId.py > +-i $BUILD_PATH/BiosId.env -o $BUILD_PATH/BiosId.bin -ot > +$BUILD_PATH/BiosId.txt > + >=20 > ##******************************************************** > ************** > ## Build BIOS >=20 > ##******************************************************** > ************** > -- > 2.21.0.windows.1