From nobody Sun May 19 01:43:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+66716+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66716+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1603933150; cv=none; d=zohomail.com; s=zohoarc; b=iFLrRXGrsH6kvbkwbhEYqyZRdJl43uag4u/eJxLx6NIf5gR+1yfmGfYnTRh4Bfk4W6o8rxb0pZZ8opO9cQUMjBgWVc9leuI4cZJST1QAopx13OqNYIjo1YY/ogZV8+LBXZs80IOwDMCsdBrnohN3cxlQfmxbrm8ImJENq6gUhZg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603933150; 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=J7AqydDXQLKt0+FQcqMUyRilK/c8X4r0IcVkTJ9LKhM=; b=hgpwdl+OrzOQWIQS3uJtmLavqZyr4IGApCPHabO55MGIUWR5Ed024LJGerHTL4ZrB6GVrWpNa66Mv+JFzMctcETIw+MKp20oc2b9AbB4vK34eR+7YJA3ma/KS7JJiO+PMA3HVVYA2oSDzk2/ZZzlYsJDu1mDF0SqYD8rqIgNYsw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66716+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 1603933150409702.21259520991; Wed, 28 Oct 2020 17:59:10 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id DoEwYY1788612xPF7Hff70gs; Wed, 28 Oct 2020 17:59:10 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web08.2012.1603933147078054841 for ; Wed, 28 Oct 2020 17:59:07 -0700 IronPort-SDR: gvBAff1NZADZ9FGD/wQlMRNVpcPZVHRo0a2zNOWa9OX05Cj+mRn8quqk5u8aA2YzjFg5S//NPv 9kxeFdCUixGw== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="253061060" X-IronPort-AV: E=Sophos;i="5.77,428,1596524400"; d="scan'208";a="253061060" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 17:59:06 -0700 IronPort-SDR: ZxV61+Bu9kxEhSznL69RyFPKWfTs0xA2iw1qPl0dqNWYr79ycOb5bPL92NO6ytqxDeIguptXzY lFj0exPUozuw== X-IronPort-AV: E=Sophos;i="5.77,428,1596524400"; d="scan'208";a="526540091" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.212.237.149]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 17:59:05 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms][Patch 1/3] Vlv2TbltDevicePkg: Use safe string and PCD functions Date: Wed, 28 Oct 2020 17:58:57 -0700 Message-Id: <20201029005859.1263-2-michael.d.kinney@intel.com> In-Reply-To: <20201029005859.1263-1-michael.d.kinney@intel.com> References: <20201029005859.1263-1-michael.d.kinney@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,michael.d.kinney@intel.com X-Gm-Message-State: 3s4yvqwVrDAm9SNphIXY2sS9x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603933150; bh=5S4DxddULIRfMZOtNk7H3S/PXL0wvL9HQTZsCta87WE=; h=Cc:Date:From:Reply-To:Subject:To; b=s17jhQ21WkwAu859E52KWRjAGG6I6h3h7QpE97kSZqrAeUUolazoennt0A3i1GxrjV0 42pAGNpkZM8K628txdJp3br9FGy85/BDuV/pcDHsBEvReGIzU+Mk5W/xot6Xj1hyYX18U x7Ox/zxPrLs9ktVPb4YxzZIl0ZbcoFN1rMs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Update all modules to use safe string functions from BaseLib and PcdLib to address build failures. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney Reviewed-by: Zailiang Sun --- .../FirmwareUpdate/FirmwareUpdate.c | 10 +- .../PlatformInitPei/PlatformEarlyInit.c | 6 +- .../PlatformSetupDxe/PlatformSetupDxe.c | 40 +++--- .../PlatformSetupDxe/SetupInfoRecords.c | 39 +++--- .../MiscBaseBoardManufacturerFunction.c | 30 +++-- .../SmBiosMiscDxe/MiscBiosVendorFunction.c | 20 +-- .../MiscChassisManufacturerFunction.c | 28 +++-- .../SmBiosMiscDxe/MiscMemoryDeviceFunction.c | 30 +++-- ...MiscNumberOfInstallableLanguagesFunction.c | 6 +- .../SmBiosMiscDxe/MiscOemStringFunction.c | 10 +- .../SmBiosMiscDxe/MiscOemType0x90Function.c | 28 +++-- .../SmBiosMiscDxe/MiscOemType0x94Function.c | 115 +++++++++++------- .../SmBiosMiscDxe/MiscOnboardDeviceFunction.c | 10 +- ...cPortInternalConnectorDesignatorFunction.c | 12 +- .../MiscProcessorCacheFunction.c | 4 +- .../MiscProcessorInformationFunction.c | 28 +++-- .../MiscSystemLanguageStringFunction.c | 10 +- .../MiscSystemManufacturerFunction.c | 31 +++-- .../MiscSystemOptionStringFunction.c | 10 +- .../MiscSystemSlotDesignationFunction.c | 10 +- .../VlvPlatformInitDxe/IgdOpRegion.c | 4 +- 21 files changed, 297 insertions(+), 184 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Application/FirmwareUpdate/Fi= rmwareUpdate.c b/Platform/Intel/Vlv2TbltDevicePkg/Application/FirmwareUpdat= e/FirmwareUpdate.c index a2fc54e20e..d4da8537e2 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Application/FirmwareUpdate/FirmwareU= pdate.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/Application/FirmwareUpdate/FirmwareU= pdate.c @@ -1,10 +1,12 @@ /** @file =20 -Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2007 - 2020, Intel Corporation. All rights reserved.
+ = =20 + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 + = =20 + =20 **/ =20 @@ -239,7 +241,7 @@ ParseCommandLine ( PrintToken (STRING_TOKEN (STR_FWUPDATE_PATH_ERROR), HiiHandle, Arg= v[Index]); return EFI_INVALID_PARAMETER; } - StrCpy (mInputData.FileName, Argv[Index]); + StrCpyS (mInputData.FileName, sizeof (mInputData.FileName) / sizeof = (CHAR16), Argv[Index]); mInputData.UpdateFromFile =3D TRUE; } } diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarly= Init.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit= .c index 59845a69c4..3d3fba4e4c 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformInitPei/PlatformEarlyInit.c @@ -1,6 +1,6 @@ /** @file =20 - Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -363,9 +363,9 @@ MeasuredBootInit ( ) { if (SystemConfiguration->MeasuredBootEnable) { - PcdSetBool (PcdMeasuredBootEnable, TRUE); + PcdSetBoolS (PcdMeasuredBootEnable, TRUE); } else { - PcdSetBool (PcdMeasuredBootEnable, FALSE); + PcdSetBoolS (PcdMeasuredBootEnable, FALSE); } =20 return EFI_SUCCESS; diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetu= pDxe.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe= .c index f3850b2aff..a8a02e2687 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.c @@ -1,6 +1,6 @@ /** @file =20 - Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -236,8 +236,8 @@ SystemConfigCallback ( case EFI_BROWSER_ACTION_CHANGING: { if (KeyValue =3D=3D 0x1235) { - StrCpy (StringBuffer1, L"Will you disable PTT ? "); - StrCpy (StringBuffer2, L"Enter (YES) / Esc (NO)"); + StrCpyS (StringBuffer1, 200, L"Will you disable PTT ? "); + StrCpyS (StringBuffer2, 200, L"Enter (YES) / Esc (NO)"); =20 // // Popup a menu to notice user @@ -253,8 +253,8 @@ SystemConfigCallback ( =20 } } else if (KeyValue =3D=3D 0x1236) { - StrCpy (StringBuffer1, L"Will you revoke trust ? "); - StrCpy (StringBuffer2, L"Enter (YES) / Esc (NO)"); + StrCpyS (StringBuffer1, 200, L"Will you revoke trust ? "); + StrCpyS (StringBuffer2, 200, L"Enter (YES) / Esc (NO)"); =20 // // Popup a menu to notice user @@ -271,9 +271,9 @@ SystemConfigCallback ( } } else if (KeyValue =3D=3D 0x1239) { if (Value->u8 =3D=3D 0x00) { - StrCpy (StringBuffer1, L"WARNING: SOC may be damaged due to high te= mperature"); - StrCpy (StringBuffer2, L"when DPTF is disabled and IGD turbo is ena= bled."); - StrCpy (StringBuffer3, L"Press Enter/ESC to continue..."); + StrCpyS (StringBuffer1, 200, L"WARNING: SOC may be damaged due to h= igh temperature"); + StrCpyS (StringBuffer2, 200, L"when DPTF is disabled and IGD turbo = is enabled."); + StrCpyS (StringBuffer3, 200, L"Press Enter/ESC to continue..."); =20 // // Popup a menu to notice user @@ -286,9 +286,9 @@ SystemConfigCallback ( // // Popup a menu to notice user // - StrCpy (StringBuffer1, L"WARNING: All your data on the eMMC will be = lost"); - StrCpy (StringBuffer2, L"Do you really want to enable secure erase o= n eMMC?"); - StrCpy (StringBuffer3, L" Enter (YES) / Esc (NO) = "); + StrCpyS (StringBuffer1, 200, L"WARNING: All your data on the eMMC wi= ll be lost"); + StrCpyS (StringBuffer2, 200, L"Do you really want to enable secure e= rase on eMMC?"); + StrCpyS (StringBuffer3, 200, L" Enter (YES) / Esc (NO) = "); =20 do { CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuff= er1, StringBuffer2, StringBuffer3,NULL); @@ -364,8 +364,8 @@ SystemConfigCallback ( // // Popup a menu to notice user // - StrCpy (StringBuffer1, L"Do you want to Commit Changes and Exit?"); - StrCpy (StringBuffer2, L" Enter (YES) / Esc (NO) "); + StrCpyS (StringBuffer1, 200, L"Do you want to Commit Changes and Exi= t?"); + StrCpyS (StringBuffer2, 200, L" Enter (YES) / Esc (NO) = "); =20 do { CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuff= er1, StringBuffer2, NULL); @@ -431,8 +431,8 @@ SystemConfigCallback ( // // Popup a menu to notice user // - StrCpy (StringBuffer1, L"Do you want to Discard Changes and Exit?"); - StrCpy (StringBuffer2, L" Enter (YES) / Esc (NO) "); + StrCpyS (StringBuffer1, 200, L"Do you want to Discard Changes and Ex= it?"); + StrCpyS (StringBuffer2, 200, L" Enter (YES) / Esc (NO) = "); =20 do { CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuff= er1, StringBuffer2, NULL); @@ -451,8 +451,8 @@ SystemConfigCallback ( // // Popup a menu to notice user // - StrCpy (StringBuffer1, L"Do you want to load setup defaults and Exit= ?"); - StrCpy (StringBuffer2, L" Enter (YES) / Esc (NO) = "); + StrCpyS (StringBuffer1, 200, L"Do you want to load setup defaults an= d Exit?"); + StrCpyS (StringBuffer2, 200, L" Enter (YES) / Esc (NO) = "); =20 do { CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, StringBuff= er1, StringBuffer2, NULL); @@ -522,9 +522,9 @@ SystemConfigCallback ( ); } } else if ((KeyValue =3D=3D 0x123A) || (KeyValue =3D=3D 0x123B) || (Ke= yValue =3D=3D 0x123C)) { - StrCpy (StringBuffer1, L"WARNING: Enable or disable USB Controller= s will "); - StrCpy (StringBuffer2, L"make global reset to restart system."); - StrCpy (StringBuffer3, L"Press Enter/ESC to continue..."); + StrCpyS (StringBuffer1, 200, L"WARNING: Enable or disable USB Cont= rollers will "); + StrCpyS (StringBuffer2, 200, L"make global reset to restart system= ."); + StrCpyS (StringBuffer3, 200, L"Press Enter/ESC to continue..."); // // Popup a menu to notice user // diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRec= ords.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords= .c index 1770d0de42..5a597d86da 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c @@ -1,6 +1,6 @@ /** @file =20 - Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -138,7 +138,7 @@ GetOptionalStringByIndex ( return EFI_NOT_FOUND; } else { *String =3D AllocatePool (StrSize * sizeof (CHAR16)); - AsciiStrToUnicodeStr (OptionalStrStart, *String); + AsciiStrToUnicodeStrS (OptionalStrStart, *String, StrSize); } =20 return EFI_SUCCESS; @@ -418,9 +418,9 @@ PrepareSetupInformation ( Length =3D StrLen(ReleaseDate) + StrLen(ReleaseTime); =20 BuildDateTime =3D AllocateZeroPool ((Length+2) * sizeof(CHAR16)); - StrCpy (BuildDateTime, ReleaseDate); - StrCat (BuildDateTime, L" "); - StrCat (BuildDateTime, ReleaseTime); + StrCpyS (BuildDateTime, Length + 2, ReleaseDate); + StrCatS (BuildDateTime, Length + 2, L" "); + StrCatS (BuildDateTime, Length + 2, ReleaseTime); =20 TokenToUpdate =3D (STRING_REF)STR_BIOS_VERSION_VALUE; DEBUG ((EFI_D_ERROR, "update STR_BIOS_VERSION_VALUE\n")); @@ -991,7 +991,7 @@ UpdatePlatformInformation ( MrcVersion =3D 0x00000000; MrcVersion &=3D 0xffff; Index =3D EfiValueToString (Buffer, MrcVersion/100, PREFIX_ZERO, 0); - StrCat (Buffer, L"."); + StrCatS (Buffer, sizeof (Buffer) / sizeof (CHAR16), L"."); EfiValueToString (Buffer + Index + 1, (MrcVersion%100)/10, PREFIX_ZERO, = 0); EfiValueToString (Buffer + Index + 2, (MrcVersion%100)%10, PREFIX_ZERO, = 0); HiiSetString(mHiiHandle,STRING_TOKEN(STR_MRC_VERSION_VALUE), Buffer, NUL= L); @@ -1081,15 +1081,16 @@ UpdatePlatformInformation ( VOID GetDeviceSpeedString ( CHAR16 *NewString, + UINTN NewStringSize, IN UINTN DeviceSpeed ) { if (DeviceSpeed =3D=3D 0x01) { - StrCat (NewString, L"1.5Gb/s"); + StrCatS (NewString, NewStringSize, L"1.5Gb/s"); } else if (DeviceSpeed =3D=3D 0x02) { - StrCat (NewString, L"3.0Gb/s"); + StrCatS (NewString, NewStringSize, L"3.0Gb/s"); } else if (DeviceSpeed =3D=3D 0x03) { - StrCat (NewString, L"6.0Gb/s"); + StrCatS (NewString, NewStringSize, L"6.0Gb/s"); } else if (DeviceSpeed =3D=3D 0x0) { =20 } @@ -1206,6 +1207,7 @@ IdeDataFilter (void) UINT32 IdeDevice; EFI_ATA_IDENTIFY_DATA *IdentifyDriveInfo; CHAR16 *NewString; + UINTN NewStringSize; CHAR16 SizeString[20]; STRING_REF NameToUpdate; CHAR8 StringBuffer[0x100]; @@ -1216,6 +1218,7 @@ IdeDataFilter (void) // Assume no line strings is longer than 256 bytes. // NewString =3D AllocateZeroPool (0x100); + NewStringSize =3D 0x100 / sizeof (CHAR16); PciDevicePath =3D NULL; =20 // @@ -1334,15 +1337,15 @@ IdeDataFilter (void) DriveSize =3D (UINT32) DivU64x32(MultU64x32(DivU64x32(DriveSize,= 1000), 512), 1000); } =20 - StrCat (NewString, L"("); + StrCatS (NewString, NewStringSize, L"("); EfiValueToString (SizeString, DriveSize/1000, PREFIX_BLANK, 0); - StrCat (NewString, SizeString); - StrCat (NewString, L"."); + StrCatS (NewString, NewStringSize, SizeString); + StrCatS (NewString, NewStringSize, L"."); EfiValueToString (SizeString, (DriveSize%1000)/100, PREFIX_BLANK, = 0); - StrCat (NewString, SizeString); - StrCat (NewString, L"GB"); + StrCatS (NewString, NewStringSize, SizeString); + StrCatS (NewString, NewStringSize, L"GB"); } else { - StrCat (NewString, L"(ATAPI"); + StrCatS (NewString, NewStringSize, L"(ATAPI"); } =20 // @@ -1352,11 +1355,11 @@ IdeDataFilter (void) DeviceSpeed =3D GetChipsetSataPortSpeed(PortNumber); =20 if (DeviceSpeed) { - StrCat (NewString, L"-"); - GetDeviceSpeedString( NewString, DeviceSpeed); + StrCatS (NewString, NewStringSize, L"-"); + GetDeviceSpeedString( NewString, NewStringSize, DeviceSpeed); } =20 - StrCat (NewString, L")"); + StrCatS (NewString, NewStringSize, L")"); =20 HiiSetString(mHiiHandle, NameToUpdate, NewString, NULL); =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardMa= nufacturerFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscB= aseBoardManufacturerFunction.c index 8eddc5c2a6..5bd26f8028 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufactu= rerFunction.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufactu= rerFunction.c @@ -1,6 +1,6 @@ /*++ =20 -Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -40,6 +40,7 @@ extern EFI_PLATFORM_INFO_HOB *mPlatformInfo; MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer) { CHAR8 *OptionalStrStart; + UINTN OptionalStrSize; UINTN ManuStrLen; UINTN ProductStrLen; UINTN VerStrLen; @@ -167,8 +168,9 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer) // // Two zeros following the last string. // - SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE2) + ManuStrLen += 1 + ProductStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + AssertTagStr= Len + 1 + ChassisStrLen +1 + 1); - ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE2) + ManuStrLen + 1 + Pro= ductStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + AssertTagStrLen + 1 = + ChassisStrLen +1 + 1); + OptionalStrSize =3D ManuStrLen + 1 + ProductStrLen + 1 + VerStrLen + 1 += SerialNumStrLen + 1 + AssertTagStrLen + 1 + ChassisStrLen +1 + 1; + SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE2) + OptionalStrS= ize); + ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE2) + OptionalStrSize); =20 SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION; SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE2); @@ -217,12 +219,22 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer) // // Since we fill NumberOfContainedObjectHandles =3D 0 for simple, just a= fter this filed to fill string // - UnicodeStrToAsciiStr(Manufacturer, OptionalStrStart); - UnicodeStrToAsciiStr(Product, OptionalStrStart + ManuStrLen + 1); - UnicodeStrToAsciiStr(Version, OptionalStrStart + ManuStrLen + 1 + Produc= tStrLen + 1); - UnicodeStrToAsciiStr(SerialNumber, OptionalStrStart + ManuStrLen + 1 + P= roductStrLen + 1 + VerStrLen + 1); - UnicodeStrToAsciiStr(AssertTag, OptionalStrStart + ManuStrLen + 1 + Prod= uctStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1); - UnicodeStrToAsciiStr(Chassis, OptionalStrStart + ManuStrLen + 1 + Produc= tStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + AssertTagStrLen + 1); + UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (ManuStrLen + 1); + OptionalStrSize -=3D (ManuStrLen + 1); + UnicodeStrToAsciiStrS (Product, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (ProductStrLen + 1); + OptionalStrSize -=3D (ProductStrLen + 1); + UnicodeStrToAsciiStrS (Version, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (VerStrLen + 1); + OptionalStrSize -=3D (VerStrLen + 1); + UnicodeStrToAsciiStrS (SerialNumber, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (SerialNumStrLen + 1); + OptionalStrSize -=3D (SerialNumStrLen + 1); + UnicodeStrToAsciiStrS (AssertTag, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (AssertTagStrLen + 1); + OptionalStrSize -=3D (AssertTagStrLen + 1); + UnicodeStrToAsciiStrS (Chassis, OptionalStrStart, OptionalStrSize); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorF= unction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorFu= nction.c index 0fbd5ac0bd..335752021f 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorFunction= .c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendorFunction= .c @@ -1,6 +1,6 @@ /*++ =20 -Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -148,6 +148,7 @@ Base2ToByteWith64KUnit ( MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) { CHAR8 *OptionalStrStart; + UINTN OptionalStrSize; UINTN VendorStrLen; UINTN VerStrLen; UINTN DateStrLen; @@ -203,7 +204,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) Version =3D SmbiosMiscGetString (TokenToGet); =20 ZeroMem (BIOSVersionTemp, sizeof (BIOSVersionTemp)); - StrCat (BIOSVersionTemp,Version); + StrCatS (BIOSVersionTemp, sizeof (BIOSVersionTemp) / sizeof (CHAR16), Ve= rsion); VerStrLen =3D StrLen(BIOSVersionTemp); if (VerStrLen > SMBIOS_STRING_MAX_LENGTH) { return EFI_UNSUPPORTED; @@ -219,8 +220,9 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) // // Two zeros following the last string. // - SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE0) + VendorStrLen= + 1 + VerStrLen + 1 + DateStrLen + 1 + 1); - ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE0) + VendorStrLen + 1 + V= erStrLen + 1 + DateStrLen + 1 + 1); + OptionalStrSize =3D VendorStrLen + 1 + VerStrLen + 1 + DateStrLen + 1 + = 1; + SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE0) + OptionalStrS= ize); + ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE0) + OptionalStrSize); =20 SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_BIOS_INFORMATION; SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE0); @@ -264,9 +266,13 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) SmbiosRecord->EmbeddedControllerFirmwareMinorRelease =3D ForType0InputDa= ta->BiosEmbeddedFirmwareMinorRelease; =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(Char16String, OptionalStrStart); - UnicodeStrToAsciiStr(BIOSVersionTemp, OptionalStrStart + VendorStrLen + = 1); - UnicodeStrToAsciiStr(ReleaseDate, OptionalStrStart + VendorStrLen + 1 + = VerStrLen + 1); + UnicodeStrToAsciiStrS(Char16String, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (VendorStrLen + 1); + OptionalStrSize -=3D (VendorStrLen + 1); + UnicodeStrToAsciiStrS(BIOSVersionTemp, OptionalStrStart, OptionalStrSize= ); + OptionalStrStart +=3D (VerStrLen + 1); + OptionalStrSize -=3D (VerStrLen + 1); + UnicodeStrToAsciiStrS(ReleaseDate, OptionalStrStart, OptionalStrSize); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscChassisManu= facturerFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscCha= ssisManufacturerFunction.c index c42ba3d0d1..75016eb9fa 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscChassisManufacture= rFunction.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscChassisManufacture= rFunction.c @@ -1,10 +1,12 @@ /*++ =20 -Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
+ = =20 + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 + = =20 + =20 =20 Module Name: @@ -40,6 +42,7 @@ extern EFI_PLATFORM_INFO_HOB *mPlatformInfo; MISC_SMBIOS_TABLE_FUNCTION(MiscChassisManufacturer) { CHAR8 *OptionalStrStart; + UINTN OptionalStrSize; UINTN ManuStrLen; UINTN VerStrLen; UINTN AssertTagStrLen; @@ -99,8 +102,9 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscChassisManufacturer) // // Two zeros following the last string. // - SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE3) + ManuStrLen += 1 + VerStrLen + 1 + SerialNumStrLen + 1 + AssertTagStrLen + 1 + 1); - ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE3) + ManuStrLen + 1 + Ve= rStrLen + 1 + SerialNumStrLen + 1 + AssertTagStrLen + 1 + 1); + OptionalStrSize =3D ManuStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + = 1 + AssertTagStrLen + 1 + 1; + SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE3) + OptionalStrS= ize); + ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE3) + OptionalStrSize); =20 SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE; SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE3); @@ -137,10 +141,16 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscChassisManufacturer) CopyMem (SmbiosRecord->OemDefined,(UINT8*)&ForType3InputData->ChassisOem= Defined, 4); =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(Manufacturer, OptionalStrStart); - UnicodeStrToAsciiStr(Version, OptionalStrStart + ManuStrLen + 1); - UnicodeStrToAsciiStr(SerialNumber, OptionalStrStart + ManuStrLen + 1 + V= erStrLen + 1); - UnicodeStrToAsciiStr(AssertTag, OptionalStrStart + ManuStrLen + 1 + VerS= trLen + 1 + SerialNumStrLen + 1); + UnicodeStrToAsciiStrS(Manufacturer, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (ManuStrLen + 1); + OptionalStrSize -=3D (ManuStrLen + 1); + UnicodeStrToAsciiStrS(Version, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (VerStrLen + 1); + OptionalStrSize -=3D (VerStrLen + 1); + UnicodeStrToAsciiStrS(SerialNumber, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (SerialNumStrLen + 1); + OptionalStrSize -=3D (SerialNumStrLen + 1); + UnicodeStrToAsciiStrS(AssertTag, OptionalStrStart, OptionalStrSize); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscMemoryDevic= eFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscMemoryDevi= ceFunction.c index 3e74ec31db..e64e4bd2a0 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscMemoryDeviceFuncti= on.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscMemoryDeviceFuncti= on.c @@ -1,6 +1,6 @@ /*++ =20 -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -81,6 +81,7 @@ GetType16Hndl ( MISC_SMBIOS_TABLE_FUNCTION( MiscMemoryDevice ) { CHAR8 *OptionalStrStart; + UINTN OptionalStrSize; UINTN MemDeviceStrLen; UINTN MemBankLocatorStrLen; UINTN MemManufacturerStrLen; @@ -246,8 +247,9 @@ MISC_SMBIOS_TABLE_FUNCTION( MiscMemoryDevice ) // // Two zeros following the last string. // - SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE17) + MemDevi= ceStrLen + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSe= rialNumberStrLen + 1 + MemAssetTagStrLen+1 + MemPartNumberStrLen + 1 + 1); - ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE17) + MemDeviceStrLe= n + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSerialNum= berStrLen + 1 + MemAssetTagStrLen+1 + MemPartNumberStrLen + 1 + 1); + OptionalStrSize =3D MemDeviceStrLen + 1 + MemBankLocatorStrLen + 1 += MemManufacturerStrLen + 1 + MemSerialNumberStrLen + 1 + MemAssetTagStrLen+= 1 + MemPartNumberStrLen + 1 + 1; + SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE17) + Optiona= lStrSize); + ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE17) + OptionalStrSiz= e); =20 SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_MEMORY_DEVICE; SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE17); @@ -287,12 +289,22 @@ MISC_SMBIOS_TABLE_FUNCTION( MiscMemoryDevice ) SmbiosRecord->MemoryType =3D MemoryType; =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(MemDevice, OptionalStrStart); - UnicodeStrToAsciiStr(MemBankLocator, OptionalStrStart + MemDeviceStr= Len + 1); - UnicodeStrToAsciiStr(MemManufacturer, OptionalStrStart + MemDeviceSt= rLen + 1 + MemBankLocatorStrLen + 1); - UnicodeStrToAsciiStr(MemSerialNumber, OptionalStrStart + MemDeviceSt= rLen + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1); - UnicodeStrToAsciiStr(MemAssetTag, OptionalStrStart + MemDeviceStrLen= + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSerialNumb= erStrLen + 1); - UnicodeStrToAsciiStr(MemPartNumber, OptionalStrStart + MemDeviceStrL= en + 1 + MemBankLocatorStrLen + 1 + MemManufacturerStrLen + 1 + MemSerialNu= mberStrLen + 1+ MemAssetTagStrLen+1 ); + UnicodeStrToAsciiStrS (MemDevice, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (MemDeviceStrLen + 1); + OptionalStrSize -=3D (MemDeviceStrLen + 1); + UnicodeStrToAsciiStrS (MemBankLocator, OptionalStrStart, OptionalStr= Size); + OptionalStrStart +=3D (MemBankLocatorStrLen + 1); + OptionalStrSize -=3D (MemBankLocatorStrLen + 1); + UnicodeStrToAsciiStrS (MemManufacturer, OptionalStrStart, OptionalSt= rSize); + OptionalStrStart +=3D (MemManufacturerStrLen + 1); + OptionalStrSize -=3D (MemManufacturerStrLen + 1); + UnicodeStrToAsciiStrS (MemSerialNumber, OptionalStrStart, OptionalSt= rSize); + OptionalStrStart +=3D (MemSerialNumberStrLen + 1); + OptionalStrSize -=3D (MemSerialNumberStrLen + 1); + UnicodeStrToAsciiStrS (MemAssetTag, OptionalStrStart, OptionalStrSiz= e); + OptionalStrStart +=3D (MemAssetTagStrLen + 1); + OptionalStrSize -=3D (MemAssetTagStrLen + 1); + UnicodeStrToAsciiStrS (MemPartNumber, OptionalStrStart, OptionalStrS= ize); =20 // // Now we have got the full smbios record, call smbios protocol to a= dd this record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfIns= tallableLanguagesFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDx= e/MiscNumberOfInstallableLanguagesFunction.c index 4a96a2c465..24bf6250e4 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallabl= eLanguagesFunction.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscNumberOfInstallabl= eLanguagesFunction.c @@ -1,6 +1,6 @@ /*++ =20 -Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
=20 =20 SPDX-License-Identifier: BSD-2-Clause-Patent @@ -56,7 +56,7 @@ CurrentLanguageMatch ( return; } =20 - CurrentLang =3D GetEfiGlobalVariable (L"PlatformLang"); + GetEfiGlobalVariable2 (L"PlatformLang", &CurrentLang, NULL); DefaultLang =3D (CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLang= ); BestLanguage =3D GetBestLanguage ( Languages, @@ -234,7 +234,7 @@ MISC_SMBIOS_TABLE_FUNCTION(NumberOfInstallableLanguages) SmbiosRecord->Flags =3D (UINT8)ForType13InputData->LanguageFlags.Abbrevi= atedLanguageFormat; SmbiosRecord->CurrentLanguages =3D 1; OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - AsciiStrCpy(OptionalStrStart, CurrentLang); + AsciiStrCpyS(OptionalStrStart, LangStrLen + 1 + 1, CurrentLang); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemStringFu= nction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemStringFunc= tion.c index 8624481149..50d16a196b 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemStringFunction.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemStringFunction.c @@ -1,10 +1,12 @@ /*++ =20 -Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
+ = =20 + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 + = =20 + =20 Module Name: =20 @@ -72,7 +74,7 @@ MISC_SMBIOS_TABLE_FUNCTION(OemString) SmbiosRecord->Hdr.Handle =3D 0; SmbiosRecord->StringCount =3D 1; OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(OemStr, OptionalStrStart); + UnicodeStrToAsciiStrS (OemStr, OptionalStrStart, OemStrLen + 1 + 1); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90= Function.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90= Function.c index d5a4243624..1aa632ccef 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90Functio= n.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x90Functio= n.c @@ -1,10 +1,12 @@ /*++ =20 -Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved. - = =20 +Copyright (c) 1999 - 2020, Intel Corporation. All rights reserved. + = =20 + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 + = =20 + =20 =20 =20 @@ -286,6 +288,7 @@ AddSmbiosT0x90Callback ( CHAR16 *Stepping; STRING_REF TokenToGet; CHAR8 *OptionalStrStart; + UINTN OptionalStrSize; EFI_SMBIOS_PROTOCOL *SmbiosProtocol; =20 DEBUG ((EFI_D_INFO, "Executing SMBIOS T0x90 callback.\n")); @@ -340,8 +343,9 @@ AddSmbiosT0x90Callback ( return EFI_UNSUPPORTED; } =20 - SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE90) + SECVerStrLe= n + 1 + uCodeVerStrLen + 1 + GOPStrLen + 1 + SteppingStrLen + 1 + 1); - ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE90) + SECVerStrLen + 1 + = uCodeVerStrLen + 1 + GOPStrLen + 1 + SteppingStrLen + 1 + 1); + OptionalStrSize =3D SECVerStrLen + 1 + uCodeVerStrLen + 1 + GOPStrLen + = 1 + SteppingStrLen + 1 + 1; + SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE90) + OptionalStr= Size); + ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE90) + OptionalStrSize); =20 SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_FIRMWARE_VERSION_INFO; SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE90); @@ -372,10 +376,16 @@ AddSmbiosT0x90Callback ( SmbiosRecord->CpuStepping =3D 4; =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(SECVer, OptionalStrStart); - UnicodeStrToAsciiStr(uCodeVer, OptionalStrStart + SECVerStrLen + 1); - UnicodeStrToAsciiStr(GOPVer, OptionalStrStart + SECVerStrLen + 1 + uCode= VerStrLen + 1); - UnicodeStrToAsciiStr(Stepping, OptionalStrStart + SECVerStrLen + 1 + uCo= deVerStrLen + 1 + GOPStrLen + 1); + UnicodeStrToAsciiStrS (SECVer, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (SECVerStrLen + 1); + OptionalStrSize -=3D (SECVerStrLen + 1); + UnicodeStrToAsciiStrS (uCodeVer, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (uCodeVerStrLen + 1); + OptionalStrSize -=3D (uCodeVerStrLen + 1); + UnicodeStrToAsciiStrS (GOPVer, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (GOPStrLen + 1); + OptionalStrSize -=3D (GOPStrLen + 1); + UnicodeStrToAsciiStrS (Stepping, OptionalStrStart, OptionalStrSize); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94= Function.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94= Function.c index f1bb15ae6e..54915e9053 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94Functio= n.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemType0x94Functio= n.c @@ -1,6 +1,6 @@ /*++ =20 -Copyright (c) 1999 - 2019, Intel Corporation. All rights reserved. +Copyright (c) 1999 - 2020, Intel Corporation. All rights reserved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -604,7 +604,7 @@ UpdatePlatformInformation ( MrcVersion =3D MmioRead32 (MmPciAddress (0, 0, 0, 0, 0xF0)); MrcVersion &=3D 0xffff; Index =3D EfiValueToString (Buffer, MrcVersion/100, PREFIX_ZERO, 0); - StrCat (Buffer, L"."); + StrCatS (Buffer, sizeof (Buffer) / sizeof (CHAR16), L"."); EfiValueToString (Buffer + Index + 1, (MrcVersion%100)/10, PREFIX_ZERO, = 0); EfiValueToString (Buffer + Index + 2, (MrcVersion%100)%10, PREFIX_ZERO, = 0); HiiSetString(mHiiHandle,STRING_TOKEN(STR_MISC_MRC_VERSION_VALUE), Buffer= , NULL); @@ -1064,72 +1064,95 @@ AddSmbiosT0x94Callback ( =20 =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(GOPVer, OptionalStrStart); - StrIdx +=3D GOPStrLen + 1; + RecordLen -=3D sizeof (SMBIOS_TABLE_TYPE94); + UnicodeStrToAsciiStrS (GOPVer, OptionalStrStart, RecordLen); + StrIdx +=3D GOPStrLen + 1; + RecordLen -=3D GOPStrLen + 1; =20 - UnicodeStrToAsciiStr(SECVer, OptionalStrStart + StrIdx); - StrIdx +=3D SECVerStrLen + 1; + UnicodeStrToAsciiStrS (SECVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D SECVerStrLen + 1; + RecordLen -=3D SECVerStrLen + 1; =20 - UnicodeStrToAsciiStr(MrcVer, OptionalStrStart + StrIdx); - StrIdx +=3D MRCVersionStrLen + 1; + UnicodeStrToAsciiStrS (MrcVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D MRCVersionStrLen + 1; + RecordLen -=3D MRCVersionStrLen + 1; =20 - UnicodeStrToAsciiStr(uCodeVer, OptionalStrStart + StrIdx); - StrIdx +=3D uCodeVerStrLen + 1; + UnicodeStrToAsciiStrS (uCodeVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D uCodeVerStrLen + 1; + RecordLen -=3D uCodeVerStrLen + 1; =20 - UnicodeStrToAsciiStr(PunitVer, OptionalStrStart + StrIdx); - StrIdx +=3D PUNITVersionStrLen + 1; + UnicodeStrToAsciiStrS (PunitVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D PUNITVersionStrLen + 1; + RecordLen -=3D PUNITVersionStrLen + 1; =20 - UnicodeStrToAsciiStr(PmcVer, OptionalStrStart + StrIdx); - StrIdx +=3D PMCVersionStrLen + 1; + UnicodeStrToAsciiStrS (PmcVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D PMCVersionStrLen + 1; + RecordLen -=3D PMCVersionStrLen + 1; =20 - UnicodeStrToAsciiStr(UlpmcVer, OptionalStrStart + StrIdx); - StrIdx +=3D ULPMCVersionStrLen + 1; + UnicodeStrToAsciiStrS (UlpmcVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D ULPMCVersionStrLen + 1; + RecordLen -=3D ULPMCVersionStrLen + 1; =20 =20 - UnicodeStrToAsciiStr(SocVer, OptionalStrStart + StrIdx); - StrIdx +=3D SOCVersionStrLen +1; + UnicodeStrToAsciiStrS (SocVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D SOCVersionStrLen +1; + RecordLen -=3D SOCVersionStrLen +1; =20 - UnicodeStrToAsciiStr(BoardVer, OptionalStrStart + StrIdx); - StrIdx +=3D BOARDVersionStrLen + 1; + UnicodeStrToAsciiStrS (BoardVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D BOARDVersionStrLen + 1; + RecordLen -=3D BOARDVersionStrLen + 1; =20 - UnicodeStrToAsciiStr(FabVer, OptionalStrStart + StrIdx); - StrIdx +=3D FABVersionStrLen + 1; + UnicodeStrToAsciiStrS (FabVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D FABVersionStrLen + 1; + RecordLen -=3D FABVersionStrLen + 1; =20 - UnicodeStrToAsciiStr(CpuFlavor, OptionalStrStart + StrIdx); - StrIdx +=3D CPUFLAVORStrLen + 1; + UnicodeStrToAsciiStrS (CpuFlavor, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D CPUFLAVORStrLen + 1; + RecordLen -=3D CPUFLAVORStrLen + 1; =20 - UnicodeStrToAsciiStr(BiosVer, OptionalStrStart + StrIdx); - StrIdx +=3D BIOSVersionStrLen + 1; + UnicodeStrToAsciiStrS (BiosVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D BIOSVersionStrLen + 1; + RecordLen -=3D BIOSVersionStrLen + 1; =20 - UnicodeStrToAsciiStr(PmicVer, OptionalStrStart + StrIdx); - StrIdx +=3D PMICVersionStrLen + 1; + UnicodeStrToAsciiStrS (PmicVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D PMICVersionStrLen + 1; + RecordLen -=3D PMICVersionStrLen + 1; =20 - UnicodeStrToAsciiStr(TouchVer, OptionalStrStart + StrIdx); - StrIdx +=3D TOUCHVersionStrLen + 1; + UnicodeStrToAsciiStrS (TouchVer, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D TOUCHVersionStrLen + 1; + RecordLen -=3D TOUCHVersionStrLen + 1; =20 - UnicodeStrToAsciiStr(SecureBootMode, OptionalStrStart + StrIdx); - StrIdx +=3D SecureBootModeLen + 1; + UnicodeStrToAsciiStrS (SecureBootMode, OptionalStrStart + StrIdx, Record= Len); + StrIdx +=3D SecureBootModeLen + 1; + RecordLen -=3D SecureBootModeLen + 1; =20 - UnicodeStrToAsciiStr(BootMode, OptionalStrStart + StrIdx); - StrIdx +=3D BootModeLen + 1; + UnicodeStrToAsciiStrS (BootMode, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D BootModeLen + 1; + RecordLen -=3D BootModeLen + 1; =20 - UnicodeStrToAsciiStr(SpeedStepMode, OptionalStrStart + StrIdx); - StrIdx +=3D SpeedStepModeLen + 1; + UnicodeStrToAsciiStrS (SpeedStepMode, OptionalStrStart + StrIdx, RecordL= en); + StrIdx +=3D SpeedStepModeLen + 1; + RecordLen -=3D SpeedStepModeLen + 1; =20 - UnicodeStrToAsciiStr(CpuTurbo, OptionalStrStart + StrIdx); - StrIdx +=3D CpuTurboLen + 1; + UnicodeStrToAsciiStrS (CpuTurbo, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D CpuTurboLen + 1; + RecordLen -=3D CpuTurboLen + 1; =20 - UnicodeStrToAsciiStr(MaxCState, OptionalStrStart + StrIdx); - StrIdx +=3D MaxCStateLen + 1; + UnicodeStrToAsciiStrS (MaxCState, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D MaxCStateLen + 1; + RecordLen -=3D MaxCStateLen + 1; =20 - UnicodeStrToAsciiStr(GfxTurbo, OptionalStrStart + StrIdx); - StrIdx +=3D GfxTurboLen + 1; + UnicodeStrToAsciiStrS (GfxTurbo, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D GfxTurboLen + 1; + RecordLen -=3D GfxTurboLen + 1; =20 - UnicodeStrToAsciiStr(IdleReserve, OptionalStrStart + StrIdx); - StrIdx +=3D S0ixLen + 1; + UnicodeStrToAsciiStrS (IdleReserve, OptionalStrStart + StrIdx, RecordLen= ); + StrIdx +=3D S0ixLen + 1; + RecordLen -=3D S0ixLen + 1; =20 - UnicodeStrToAsciiStr(RC6, OptionalStrStart + StrIdx); - StrIdx +=3D RC6Len + 1; + UnicodeStrToAsciiStrS (RC6, OptionalStrStart + StrIdx, RecordLen); + StrIdx +=3D RC6Len + 1; + RecordLen -=3D RC6Len + 1; =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOnboardDevi= ceFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOnboardDe= viceFunction.c index aef25065b8..1a02dbb349 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOnboardDeviceFunct= ion.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOnboardDeviceFunct= ion.c @@ -1,10 +1,12 @@ /** @file =20 -Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 1999 - 2020, Intel Corporation. All rights reserved.
+ = =20 + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 + = =20 + =20 =20 Module Name: @@ -118,7 +120,7 @@ MISC_SMBIOS_TABLE_FUNCTION ( SmbiosRecord->Device[0].DeviceType =3D StatusAndType; SmbiosRecord->Device[0].DescriptionString =3D 1; OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(DeviceDescription, OptionalStrStart); + UnicodeStrToAsciiStrS (DeviceDescription, OptionalStrStart, DescriptionS= trLen + 1 + 1); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscPortInterna= lConnectorDesignatorFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMis= cDxe/MiscPortInternalConnectorDesignatorFunction.c index 6bc088cd13..73975809db 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscPortInternalConnec= torDesignatorFunction.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscPortInternalConnec= torDesignatorFunction.c @@ -1,10 +1,12 @@ /** @file =20 -Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2004 - 2020, Intel Corporation. All rights reserved.
+ = =20 + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 + = =20 + =20 =20 Module Name: @@ -134,8 +136,8 @@ MISC_SMBIOS_TABLE_FUNCTION ( SmbiosRecord->PortType =3D (UINT8)ForType8InputData->PortType; =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(InternalRef, OptionalStrStart); - UnicodeStrToAsciiStr(ExternalRef, OptionalStrStart + InternalRefStrLen += 1); + UnicodeStrToAsciiStrS (InternalRef, OptionalStrStart, InternalRefStrLen = + 1 + ExternalRefStrLen + 1 + 1); + UnicodeStrToAsciiStrS (ExternalRef, OptionalStrStart + InternalRefStrLen= + 1, ExternalRefStrLen + 1 + 1); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCa= cheFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcesso= rCacheFunction.c index c64e87e20b..fadace2205 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunc= tion.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorCacheFunc= tion.c @@ -1,6 +1,6 @@ /*++ =20 -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -147,7 +147,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscProcessorCache) // SmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(SocketDesignation, OptionalStrStart); + UnicodeStrToAsciiStrS (SocketDesignation, OptionalStrStart, + 7 + 1 + = 1); =20 Smbios->Add( Smbios, diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorIn= formationFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscPr= ocessorInformationFunction.c index 8a52d017c1..3360bdc541 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorInformati= onFunction.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscProcessorInformati= onFunction.c @@ -1,6 +1,6 @@ /*++ =20 -Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -199,6 +199,7 @@ MeasureTscFrequency ( MISC_SMBIOS_TABLE_FUNCTION (MiscProcessorInformation) { CHAR8 *OptionalStrStart; + UINTN OptionalStrSize; EFI_STRING SerialNumber; CHAR16 *Version=3DNULL; CHAR16 *Manufacturer=3DNULL; @@ -306,7 +307,8 @@ MISC_SMBIOS_TABLE_FUNCTION (MiscProcessorInformation) // // Two zeros following the last string. // - SmbiosRecord =3D AllocateZeroPool(sizeof (SMBIOS_TABLE_TYPE4) + AssetT= agStrLen + 1 + SocketStrLen + 1+ ManufacturerStrLen +1 + VersionStrLen+ 1+ = SerialNumberStrLen + 1 + PartNumberStrLen+ 1 + 1); + OptionalStrSize =3D AssetTagStrLen + 1 + SocketStrLen + 1+ Manufacture= rStrLen +1 + VersionStrLen+ 1+ SerialNumberStrLen + 1 + PartNumberStrLen+ 1= + 1; + SmbiosRecord =3D AllocateZeroPool(sizeof (SMBIOS_TABLE_TYPE4) + Option= alStrSize); =20 SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION; SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE4); @@ -421,12 +423,22 @@ MISC_SMBIOS_TABLE_FUNCTION (MiscProcessorInformation) SmbiosRecord->L3CacheHandle =3D L3CacheHandle; =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(Socket, OptionalStrStart); - UnicodeStrToAsciiStr(Manufacturer, OptionalStrStart + SocketStrLen + 1= ); - UnicodeStrToAsciiStr(Version, OptionalStrStart + SocketStrLen + 1 + Ma= nufacturerStrLen+ 1); - UnicodeStrToAsciiStr(SerialNumber, OptionalStrStart + SocketStrLen + 1= + VersionStrLen + 1 + ManufacturerStrLen + 1); - UnicodeStrToAsciiStr(AssetTag, OptionalStrStart + SerialNumberStrLen += 1 + VersionStrLen + 1 + ManufacturerStrLen + 1 + SocketStrLen + 1); - UnicodeStrToAsciiStr(PartNumber, OptionalStrStart + SerialNumberStrLen= + 1 + VersionStrLen + 1 + ManufacturerStrLen + 1 + SocketStrLen + 1 + Asse= tTagStrLen + 1 ); + UnicodeStrToAsciiStrS (Socket, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (SocketStrLen + 1); + OptionalStrSize -=3D (SocketStrLen + 1); + UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, OptionalStrSize= ); + OptionalStrStart +=3D (ManufacturerStrLen + 1); + OptionalStrSize -=3D (ManufacturerStrLen + 1); + UnicodeStrToAsciiStrS (Version, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (VersionStrLen + 1); + OptionalStrSize -=3D (VersionStrLen + 1); + UnicodeStrToAsciiStrS (SerialNumber, OptionalStrStart, OptionalStrSize= ); + OptionalStrStart +=3D (SerialNumberStrLen + 1); + OptionalStrSize -=3D (SerialNumberStrLen + 1); + UnicodeStrToAsciiStrS (AssetTag, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (AssetTagStrLen + 1); + OptionalStrSize -=3D (AssetTagStrLen + 1); + UnicodeStrToAsciiStrS (PartNumber, OptionalStrStart, OptionalStrSize); =20 // // Now we have got the full Smbios record, call Smbios protocol to add= this record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemLangu= ageStringFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSy= stemLanguageStringFunction.c index 8abfa4074a..70f44f9290 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemLanguageStri= ngFunction.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemLanguageStri= ngFunction.c @@ -1,10 +1,12 @@ /*++ =20 -Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
+ = =20 + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 + = =20 + =20 Module Name: =20 @@ -75,7 +77,7 @@ MISC_SMBIOS_TABLE_FUNCTION(SystemLanguageString) SmbiosRecord->Flags =3D 1; SmbiosRecord->CurrentLanguages =3D 1; OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(Str, OptionalStrStart); + UnicodeStrToAsciiStrS (Str, OptionalStrStart, StrLeng + 1 + 1); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManuf= acturerFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSyst= emManufacturerFunction.c index b18dbd6ae2..efeebc92b8 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturer= Function.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturer= Function.c @@ -1,6 +1,6 @@ /*++ =20 -Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -47,6 +47,7 @@ AddSmbiosManuCallback ( { =20 CHAR8 *OptionalStrStart; + UINTN OptionalStrSize; UINTN ManuStrLen; UINTN VerStrLen; UINTN PdNameStrLen; @@ -245,8 +246,9 @@ AddSmbiosManuCallback ( // // Two zeros following the last string. // - SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE1) + ManuStrLen += 1 + PdNameStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + SkuNumberStrL= en + 1 + FamilyNameStrLen + 1 + 1); - ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE1) + ManuStrLen + 1 + PdN= ameStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + SkuNumberStrLen + 1 += FamilyNameStrLen + 1 + 1); + OptionalStrSize =3D ManuStrLen + 1 + PdNameStrLen + 1 + VerStrLen + 1 + = SerialNumStrLen + 1 + SkuNumberStrLen + 1 + FamilyNameStrLen + 1 + 1; + SmbiosRecord =3D AllocatePool(sizeof (SMBIOS_TABLE_TYPE1) + OptionalStrS= ize); + ZeroMem(SmbiosRecord, sizeof (SMBIOS_TABLE_TYPE1) + OptionalStrSize); =20 SmbiosRecord->Hdr.Type =3D EFI_SMBIOS_TYPE_SYSTEM_INFORMATION; SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE1); @@ -290,13 +292,22 @@ AddSmbiosManuCallback ( SmbiosRecord->WakeUpType =3D (UINT8)ForType1InputData->SystemWakeupType; =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(Manufacturer, OptionalStrStart); - UnicodeStrToAsciiStr(ProductName, OptionalStrStart + ManuStrLen + 1); - UnicodeStrToAsciiStr(Version, OptionalStrStart + ManuStrLen + 1 + PdName= StrLen + 1); - UnicodeStrToAsciiStr(SerialNumber, OptionalStrStart + ManuStrLen + 1 + P= dNameStrLen + 1 + VerStrLen + 1); - - UnicodeStrToAsciiStr(SkuNumber, OptionalStrStart + ManuStrLen + 1 + PdNa= meStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1); - UnicodeStrToAsciiStr(FamilyName, OptionalStrStart + ManuStrLen + 1 + PdN= ameStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + SkuNumberStrLen +1); + UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (ManuStrLen + 1); + OptionalStrSize -=3D (ManuStrLen + 1); + UnicodeStrToAsciiStrS (ProductName, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (PdNameStrLen + 1); + OptionalStrSize -=3D (PdNameStrLen + 1); + UnicodeStrToAsciiStrS (Version, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (VerStrLen + 1); + OptionalStrSize -=3D (VerStrLen + 1); + UnicodeStrToAsciiStrS (SerialNumber, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (SerialNumStrLen + 1); + OptionalStrSize -=3D (SerialNumStrLen + 1); + UnicodeStrToAsciiStrS (SkuNumber, OptionalStrStart, OptionalStrSize); + OptionalStrStart +=3D (SkuNumberStrLen + 1); + OptionalStrSize -=3D (SkuNumberStrLen + 1); + UnicodeStrToAsciiStrS (FamilyName, OptionalStrStart, OptionalStrSize); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemOptio= nStringFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSyst= emOptionStringFunction.c index ee27a75e3a..1609bca79b 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemOptionString= Function.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemOptionString= Function.c @@ -1,10 +1,12 @@ /*++ =20 -Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
+ = =20 + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 + = =20 + =20 =20 Module Name: @@ -75,7 +77,7 @@ MISC_SMBIOS_TABLE_FUNCTION(SystemOptionString) =20 SmbiosRecord->StringCount =3D 1; OptionalStrStart =3D (CHAR8*) (SmbiosRecord + 1); - UnicodeStrToAsciiStr(OptionString, OptionalStrStart); + UnicodeStrToAsciiStrS (OptionString, OptionalStrStart, OptStrLen + 1 + 1= ); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemSlotD= esignationFunction.c b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscS= ystemSlotDesignationFunction.c index 7270ef826f..aeed9a79a9 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemSlotDesignat= ionFunction.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemSlotDesignat= ionFunction.c @@ -1,10 +1,12 @@ /*++ =20 -Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
- = =20 +Copyright (c) 2009 - 2020, Intel Corporation. All rights reserved.
+ = =20 + SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 + = =20 + =20 =20 Module Name: @@ -111,7 +113,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemSlotDesignation) // CopyMem ((UINT8 *) &SmbiosRecord->SlotCharacteristics1,(UINT8 *) &ForTyp= e9InputData->SlotCharacteristics,2); OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(SlotDesignation, OptionalStrStart); + UnicodeStrToAsciiStrS (SlotDesignation, OptionalStrStart, SlotDesignatio= nStrLen + 1 + 1); // // Now we have got the full smbios record, call smbios protocol to add t= his record. // diff --git a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegio= n.c b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c index 3815c8fa9c..970a3271c5 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/VlvPlatformInitDxe/IgdOpRegion.c @@ -1,7 +1,7 @@ =20 /*++ =20 -Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved +Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -499,7 +499,7 @@ SetGOPVersionCallback ( ZeroMem (GopVersion, sizeof (GopVersion)); Status =3D GetGOPDriverVersion(GopVersion); if(!EFI_ERROR(Status)) { - StrCpy((CHAR16*)&(mIgdOpRegion.OpRegion->Header.GOPV[0]), GopVersion); + StrCpyS ((CHAR16*)&(mIgdOpRegion.OpRegion->Header.GOPV[0]), 16, GopVer= sion); return Status; } return EFI_UNSUPPORTED; --=20 2.28.0.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 (#66716): https://edk2.groups.io/g/devel/message/66716 Mute This Topic: https://groups.io/mt/77878163/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 Sun May 19 01:43:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+66717+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66717+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1603933150; cv=none; d=zohomail.com; s=zohoarc; b=bx7bVNWBRfh5faU+kyFVl0Oa0pt6XR2OH9o/rQRKGGHtrM3gY5syw7x06lRDYitpTEPRJfpN41OIR2qQVxSQhsyRCnqKnrWfkMQOGNlhXMQwfL9BXia2eV2tdfnkN6//c9D8lbsWac49MxL86FlwaklJTIxLYW4Dy563Pkf1gk0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603933150; 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=Gzm3It3VhdmB/CfwI0V8U1JjrVJq6RFiBk88TUQ9qJs=; b=h5HG6O7zdjzPPKcU/r4jEskMtlxEJaLTj8BCdEq6WseP9qNROrzDa4nYzzcKhtYFLTI9FkZJ6MzBaaNqlQGbPlUllZX/UhZNI5E5uz65/gnLaMDz0WZ4RHUAJGVbIIyk2h4pzeIZFlXV5ZxwOVx22+v7n7S4Z9zrvfOoXRSWUYo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66717+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 1603933150269713.8749301244368; Wed, 28 Oct 2020 17:59:10 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id vcY6YY1788612xj2yZLYRpNI; Wed, 28 Oct 2020 17:59:09 -0700 X-Received: from mga05.intel.com (mga05.intel.com []) by mx.groups.io with SMTP id smtpd.web12.2022.1603933147020428802 for ; Wed, 28 Oct 2020 17:59:07 -0700 IronPort-SDR: aXLM9ypSFILkNNHGCXak1ajcyBwpjSeZ0U0/1m3AlMbiNlNmmXQoLceF2W/XGnQ2ZpxXHwhPgz WYZkfSSfYMqA== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="253061061" X-IronPort-AV: E=Sophos;i="5.77,428,1596524400"; d="scan'208";a="253061061" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 17:59:06 -0700 IronPort-SDR: O+KNd+pc8a0cM/dtVFAiPdQkoAdZC08XX/faRHPlHL5fnaVMef8ZiKVNhw1AXdcYLQGmNsmX3r 2FMgQsBPXJQg== X-IronPort-AV: E=Sophos;i="5.77,428,1596524400"; d="scan'208";a="526540099" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.212.237.149]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 17:59:06 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian , Kilian Kegel Subject: [edk2-devel] [edk2-platforms][Patch 2/3] Vlv2TbltDevicePkg: Add missing FMP dependency libs Date: Wed, 28 Oct 2020 17:58:58 -0700 Message-Id: <20201029005859.1263-3-michael.d.kinney@intel.com> In-Reply-To: <20201029005859.1263-1-michael.d.kinney@intel.com> References: <20201029005859.1263-1-michael.d.kinney@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,michael.d.kinney@intel.com X-Gm-Message-State: huITHSZ0J0EOidfDsxWu6DR5x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603933149; bh=X/56sUcWhr+qYQnLTlc8HqDBgW6V6s7AOqvsHzYWM+s=; h=Cc:Date:From:Reply-To:Subject:To; b=ll1ZVRWGTjFzdZmSgdzD2MMjCUydnQJq9SdZzmCqCfamSh8z0OZj1wqIfxUH1CTqbBn JlydpWjq4xHZobbBatS3+edvyK8VvFiKywuhVQVYorAeclL2zHWnUHJH9rOslaVJo19Lw 7RlVxOpLRFxMYI8QB6WDEg3Pgf+U8cGfzT0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D2983 Cc: Zailiang Sun Cc: Yi Qian Cc: Kilian Kegel Signed-off-by: Michael D Kinney Reviewed-by: Zailiang Sun --- Platform/Intel/Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc | 5 ++++- Platform/Intel/Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc | 5 ++++- Platform/Intel/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc | 5 ++++- Platform/Intel/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc b/Pla= tform/Intel/Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc index 3bd9f150b3..d572f726c4 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/FmpBlueSampleDevice.dsc @@ -1,7 +1,7 @@ #/** @file # FmpDxe driver for Blue Sample device firmware update. # -# Copyright (c) 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -44,6 +44,9 @@ # FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPa= yloadHeaderLibV1.inf FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/F= mpAuthenticationLibPkcs7.inf + FmpDependencyLib|FmpDevicePkg/Library/FmpDependencyLib/FmpDependency= Lib.inf + FmpDependencyCheckLib|FmpDevicePkg/Library/FmpDependencyCheckLibNull= /FmpDependencyCheckLibNull.inf + FmpDependencyDeviceLib|FmpDevicePkg/Library/FmpDependencyDeviceLibNu= ll/FmpDependencyDeviceLibNull.inf # # Platform specific capsule policy library # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc b/Pl= atform/Intel/Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc index 61bdd36a96..5008532e3d 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/FmpGreenSampleDevice.dsc @@ -1,7 +1,7 @@ #/** @file # FmpDxe driver for Green Sample device firmware update. # -# Copyright (c) 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -44,6 +44,9 @@ # FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPa= yloadHeaderLibV1.inf FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/F= mpAuthenticationLibPkcs7.inf + FmpDependencyLib|FmpDevicePkg/Library/FmpDependencyLib/FmpDependency= Lib.inf + FmpDependencyCheckLib|FmpDevicePkg/Library/FmpDependencyCheckLibNull= /FmpDependencyCheckLibNull.inf + FmpDependencyDeviceLib|FmpDevicePkg/Library/FmpDependencyDeviceLibNu= ll/FmpDependencyDeviceLibNull.inf # # Platform specific capsule policy library # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc b/Plat= form/Intel/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc index 304519b294..ed7e3ec2e7 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/FmpMinnowMaxSystem.dsc @@ -1,7 +1,7 @@ #/** @file # FmpDxe driver for Minnow Max system firmware update. # -# Copyright (c) 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -48,6 +48,9 @@ # FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPa= yloadHeaderLibV1.inf FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/F= mpAuthenticationLibPkcs7.inf + FmpDependencyLib|FmpDevicePkg/Library/FmpDependencyLib/FmpDependency= Lib.inf + FmpDependencyCheckLib|FmpDevicePkg/Library/FmpDependencyCheckLibNull= /FmpDependencyCheckLibNull.inf + FmpDependencyDeviceLib|FmpDevicePkg/Library/FmpDependencyDeviceLibNu= ll/FmpDependencyDeviceLibNull.inf # # Platform specific capsule policy library # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc b/Plat= form/Intel/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc index 59851f2b41..e8771511bc 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/FmpRedSampleDevice.dsc @@ -1,7 +1,7 @@ #/** @file # FmpDxe driver for Red Sample device firmware update. # -# Copyright (c) 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -44,6 +44,9 @@ # FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPa= yloadHeaderLibV1.inf FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/F= mpAuthenticationLibPkcs7.inf + FmpDependencyLib|FmpDevicePkg/Library/FmpDependencyLib/FmpDependency= Lib.inf + FmpDependencyCheckLib|FmpDevicePkg/Library/FmpDependencyCheckLibNull= /FmpDependencyCheckLibNull.inf + FmpDependencyDeviceLib|FmpDevicePkg/Library/FmpDependencyDeviceLibNu= ll/FmpDependencyDeviceLibNull.inf # # Platform specific capsule policy library # --=20 2.28.0.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 (#66717): https://edk2.groups.io/g/devel/message/66717 Mute This Topic: https://groups.io/mt/77878164/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 Sun May 19 01:43:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+66718+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66718+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1603933149; cv=none; d=zohomail.com; s=zohoarc; b=ch5/aM/zjYUV1NPwAPLBNeonYeYkPQduekyhFIfrvVMPdRWVC7B8PrLmtvhIdiD7merHXbT4MPFxLkHoad7d84Z9Ho7ixOvvmxu97zA64PIe4Ac6YWk8TFUxwXQ8GjDN8kzRBGwLzZfIH2T/MnCPXU6QJFNjfQEDNBpJO25tzdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603933149; 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=lz3ms1AQisk5at9d8j5JTz/w3ZZwSgPHFqcezfpGs0M=; b=hLUrR/HyO0BaoCLCu9ECg9ZjvvhC/BaS0YHZxge19506lAgEkoyx0Nk5+AMfLOswf8mhcQhJ9IUamKLIZ3DeVqNPa3+uf9FbpzMWYVx0DC/M85bzkzgsju3pCK59121cqlnPCFXaz25Sam3Z1AvS6c1OppJwOM1/I55KzDu75tU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+66718+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 160393314925284.11552117363203; Wed, 28 Oct 2020 17:59:09 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 6GsBYY1788612xcmEkqzTwfH; Wed, 28 Oct 2020 17:59:08 -0700 X-Received: from mga05.intel.com (mga05.intel.com []) by mx.groups.io with SMTP id smtpd.web08.2012.1603933147078054841 for ; Wed, 28 Oct 2020 17:59:07 -0700 IronPort-SDR: upif/4cTmgfOKrirV+EI6EXwqxD0MnHyXNanQrxLuSKLLxdP+KR5ozKAcorynasZNMJGgVcKMl pW2L+fMudlhg== X-IronPort-AV: E=McAfee;i="6000,8403,9788"; a="253061062" X-IronPort-AV: E=Sophos;i="5.77,428,1596524400"; d="scan'208";a="253061062" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 17:59:06 -0700 IronPort-SDR: LR7S+pnYhNYr3ryLRPC0rVdblJQwqgTB1+WIHxLbn7O4TGePhia5GqwoBLPFVO4Ka+r5rPr14A a7Dtgkdcvd/Q== X-IronPort-AV: E=Sophos;i="5.77,428,1596524400"; d="scan'208";a="526540105" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.212.237.149]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 17:59:06 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms][Patch 3/3] Vlv2TbltDevicePkg: Add missing RngLib mapping Date: Wed, 28 Oct 2020 17:58:59 -0700 Message-Id: <20201029005859.1263-4-michael.d.kinney@intel.com> In-Reply-To: <20201029005859.1263-1-michael.d.kinney@intel.com> References: <20201029005859.1263-1-michael.d.kinney@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,michael.d.kinney@intel.com X-Gm-Message-State: tpQQGNyfl9Iz6fgMUTgJLTn0x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1603933148; bh=tZngGPsloGdXJu2muPfXDZZJkFRu0RTKB03lbLmdMQY=; h=Cc:Date:From:Reply-To:Subject:To; b=DFLvo/S6N4CxeXZ5MlzT+0H3K1DFq6ikYDRbNKn7cJV204PCOsj1JVCRTrQCRaUXshk MSnInCAmT6JclU8kzaOWaAH9AvS+RPALn0ZBueIjcxt54VQ+OWr7satNQY9V8nwzB+9Pp b5kX0rEm01QHXa597YY3DqzwLuU+dcVROwQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney Reviewed-by: Zailiang Sun --- Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 + Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 1 + 2 files changed, 2 insertions(+) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platfor= m/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc index 69758e8f36..8bfea0107b 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -234,6 +234,7 @@ [LibraryClasses.common] FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc index 86c73699a6..58ca9d9623 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -236,6 +236,7 @@ [LibraryClasses.common] FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf + RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf !if $(NETWORK_TLS_ENABLE) =3D=3D TRUE --=20 2.28.0.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 (#66718): https://edk2.groups.io/g/devel/message/66718 Mute This Topic: https://groups.io/mt/77878165/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-