From nobody Fri Mar 29 07:00:21 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+65022+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+65022+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1599184864; cv=none; d=zohomail.com; s=zohoarc; b=GejD1NfZQZm/x0CqQ0l0bKuqdRgVB5Xu5MXV4CxbP3KYB6pkeEKJjVTQ4ckIEDpE3Rvn19NdCaqt9lmR3DjTj1HMlWL3u6CugQQD+iMf9t3OIzgYXjzNMhuGO1Vzciuo7a2eQ8NuM+9GJk+p5RZDgNH8v99PrXxsRwtNZLP6Njc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599184864; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=klbWHfV4D4SOSq5ljMOpYUud2VaE1oXgsbbT4eTO20k=; b=OQEqFWl7SVH0ZB3lbFrLxk88uhF15KAYgogEHk/IHBBSbijas0cbJKY6XRcEkf/eL00raCGEn5qjm62xzUN8C4szFqWVh3ES15eRuFBlXVb+U0P2vivDuaOFt7DNPb9gPHTI5O0sLB7rFyrtPDeNl8QGKZflDMQScSsVopk8Vug= 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+65022+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1599184864248805.4342057365368; Thu, 3 Sep 2020 19:01:04 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id blb5YY1788612xVQJa4MK2oY; Thu, 03 Sep 2020 19:01:03 -0700 X-Received: from huawei.com (huawei.com [45.249.212.190]) by mx.groups.io with SMTP id smtpd.web11.29579.1599184862065360728 for ; Thu, 03 Sep 2020 19:01:02 -0700 X-Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 35EF42E2CA898034480F; Fri, 4 Sep 2020 10:01:00 +0800 (CST) X-Received: from HGH1000039998.huawei.com (10.184.68.188) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 4 Sep 2020 10:00:49 +0800 From: "wenyi,xie via groups.io" To: , , CC: , , , Subject: [edk2-devel] [PATCH edk2-Platform 1/1] Hisilicon/Smbios: Replace DEPRECATED code with S-suffixed one Date: Fri, 4 Sep 2020 09:55:13 +0800 Message-ID: <1599184513-33121-2-git-send-email-xiewenyi2@huawei.com> In-Reply-To: <1599184513-33121-1-git-send-email-xiewenyi2@huawei.com> References: <1599184513-33121-1-git-send-email-xiewenyi2@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.184.68.188] X-CFilter-Loop: Reflected 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,xiewenyi2@huawei.com X-Gm-Message-State: QM7A77Iqka5FApwYv0X981o2x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1599184863; bh=jrloHjlrfsBcmBE5FAJoii71k81Tb3YxgCDmADLOAdU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=qMXULuQGM30YRqrDvvL5Mc++IKGFcuYB6kJd3byfvKzL0bsOKMH1KXISlgiLXS+IkcI kgzIkQTKhjZXoq9+TRKM6B3ogRmX6IzMrn8hR7NnrtRyp/Fh6/mutCXD6WC591cWD7PCT GXMWoGBYa+E++nZQT0NUbei1EdvvaJebgrE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" According to the bug: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2777 the deprecated code under DISABLE_NEW_DEPRECATED_INTERFACES will be removed, which will result in compilation breakage of the Hisilicon platforms. Prevent that by switching to S-suffixed one. Cc: Leif Lindholm Cc: Ard Biesheuvel Signed-off-by: Wenyi Xie --- .../Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c | 2 +- .../Smbios/MemorySubClassDxe/MemorySubClass.c | 12 ++++++------ .../ProcessorSubClassDxe/ProcessorSubClass.c | 14 +++++++------- .../SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c | 6 +++--- .../Type01/MiscSystemManufacturerFunction.c | 12 ++++++------ .../Type02/MiscBaseBoardManufacturerFunction.c | 12 ++++++------ .../Type03/MiscChassisManufacturerFunction.c | 10 +++++----- .../Type09/MiscSystemSlotDesignationFunction.c | 2 +- 8 files changed, 35 insertions(+), 35 deletions(-) diff --git a/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9= .c b/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c index 57e049a41da0..4c8c693db039 100644 --- a/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c +++ b/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c @@ -135,7 +135,7 @@ AddSmbiosType9Record ( (VOID)CopyMem (SmbiosRecord, Type9Record, sizeof (SMBIOS_TABLE_TYPE9)); SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE9); OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - (VOID)UnicodeStrToAsciiStr (SlotDesignation, OptionalStrStart); + UnicodeStrToAsciiStrS (SlotDesignation, OptionalStrStart, SlotStrLen + 1= ); =20 // // Now we have got the full smbios record, call smbios protocol to add t= his record. diff --git a/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubCl= ass.c b/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.c index a1af02047409..f438ddcb5dd6 100644 --- a/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.c +++ b/Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClass.c @@ -625,12 +625,12 @@ SmbiosAddType17Table ( SmbiosGetDimmVoltageInfo (pGblData, Skt, Ch, Dimm, Type17Record); =20 OptionalStrStart =3D (CHAR8 *) (Type17Record + 1); - UnicodeStrToAsciiStr (DeviceLocatorStr, OptionalStrStart); - UnicodeStrToAsciiStr (BankLocatorStr, OptionalStrStart + DeviceLocator= StrLen + 1); - UnicodeStrToAsciiStr (ManufactureStr, OptionalStrStart + DeviceLocator= StrLen + 1 + BankLocatorStrLen + 1); - UnicodeStrToAsciiStr (SerialNumberStr, OptionalStrStart + DeviceLocato= rStrLen + 1 + BankLocatorStrLen + 1 + ManufactureStrLen + 1); - UnicodeStrToAsciiStr (AssertTagStr, OptionalStrStart + DeviceLocatorSt= rLen + 1 + BankLocatorStrLen + 1 + ManufactureStrLen + 1 + SerialNumberStrL= en + 1); - UnicodeStrToAsciiStr (PartNumberStr, OptionalStrStart + DeviceLocatorS= trLen + 1 + BankLocatorStrLen + 1 + ManufactureStrLen + 1 + SerialNumberStr= Len + 1 + AssertTagStrLen + 1); + UnicodeStrToAsciiStrS (DeviceLocatorStr, OptionalStrStart, DeviceLocat= orStrLen + 1); + UnicodeStrToAsciiStrS (BankLocatorStr, OptionalStrStart + DeviceLocato= rStrLen + 1, BankLocatorStrLen + 1); + UnicodeStrToAsciiStrS (ManufactureStr, OptionalStrStart + DeviceLocato= rStrLen + 1 + BankLocatorStrLen + 1, ManufactureStrLen + 1); + UnicodeStrToAsciiStrS (SerialNumberStr, OptionalStrStart + DeviceLocat= orStrLen + 1 + BankLocatorStrLen + 1 + ManufactureStrLen + 1, SerialNumberS= trLen + 1); + UnicodeStrToAsciiStrS (AssertTagStr, OptionalStrStart + DeviceLocatorS= trLen + 1 + BankLocatorStrLen + 1 + ManufactureStrLen + 1 + SerialNumberStr= Len + 1, AssertTagStrLen + 1); + UnicodeStrToAsciiStrS (PartNumberStr, OptionalStrStart + DeviceLocator= StrLen + 1 + BankLocatorStrLen + 1 + ManufactureStrLen + 1 + SerialNumberSt= rLen + 1 + AssertTagStrLen + 1, PartNumberStrLen + 1); =20 MemDevSmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; Status =3D mSmbios->Add (mSmbios, NULL, &MemDevSmbiosHandle, (EFI_SMBI= OS_TABLE_HEADER*) Type17Record); diff --git a/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/Processo= rSubClass.c b/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/Process= orSubClass.c index 647632f15ac2..0aa206d79cbb 100644 --- a/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubCla= ss.c +++ b/Silicon/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubCla= ss.c @@ -391,7 +391,7 @@ AddSmbiosCacheTypeTable ( (VOID)CopyMem(Type7Record, &mSmbiosCacheTable[CacheLevel], sizeof = (SMBIOS_TABLE_TYPE7)); =20 OptionalStrStart =3D (CHAR8 *) (Type7Record + 1); - UnicodeStrToAsciiStr (CacheSocketStr, OptionalStrStart); + UnicodeStrToAsciiStrS (CacheSocketStr, OptionalStrStart, CacheSock= etStrLen + 1); =20 SmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; Status =3D mSmbios->Add (mSmbios, NULL, &SmbiosHandle, (EFI_SMBIOS= _TABLE_HEADER *)Type7Record); @@ -610,12 +610,12 @@ AddSmbiosProcessorTypeTable ( *ProcessorId =3D ArmReadMidr(); =20 OptionalStrStart =3D (CHAR8 *) (Type4Record + 1); - UnicodeStrToAsciiStr (ProcessorSocketStr, OptionalStrStart); - UnicodeStrToAsciiStr (ProcessorManuStr, OptionalStrStart + ProcessorSo= cketStrLen + 1); - UnicodeStrToAsciiStr (ProcessorVersionStr, OptionalStrStart + Processo= rSocketStrLen + 1 + ProcessorManuStrLen + 1); - UnicodeStrToAsciiStr (SerialNumberStr, OptionalStrStart + ProcessorSoc= ketStrLen + 1 + ProcessorManuStrLen + 1 + ProcessorVersionStrLen + 1); - UnicodeStrToAsciiStr (AssetTagStr, OptionalStrStart + ProcessorSocketS= trLen + 1 + ProcessorManuStrLen + 1 + ProcessorVersionStrLen + 1 + SerialNu= mberStrLen + 1); - UnicodeStrToAsciiStr (PartNumberStr, OptionalStrStart + ProcessorSocke= tStrLen + 1 + ProcessorManuStrLen + 1 + ProcessorVersionStrLen + 1 + Serial= NumberStrLen + 1 + AssetTagStrLen + 1); + UnicodeStrToAsciiStrS (ProcessorSocketStr, OptionalStrStart, Processor= SocketStrLen + 1); + UnicodeStrToAsciiStrS (ProcessorManuStr, OptionalStrStart + ProcessorS= ocketStrLen + 1, ProcessorManuStrLen + 1); + UnicodeStrToAsciiStrS (ProcessorVersionStr, OptionalStrStart + Process= orSocketStrLen + 1 + ProcessorManuStrLen + 1, ProcessorVersionStrLen + 1); + UnicodeStrToAsciiStrS (SerialNumberStr, OptionalStrStart + ProcessorSo= cketStrLen + 1 + ProcessorManuStrLen + 1 + ProcessorVersionStrLen + 1, Seri= alNumberStrLen + 1); + UnicodeStrToAsciiStrS (AssetTagStr, OptionalStrStart + ProcessorSocket= StrLen + 1 + ProcessorManuStrLen + 1 + ProcessorVersionStrLen + 1 + SerialN= umberStrLen + 1, AssetTagStrLen + 1); + UnicodeStrToAsciiStrS (PartNumberStr, OptionalStrStart + ProcessorSock= etStrLen + 1 + ProcessorManuStrLen + 1 + ProcessorVersionStrLen + 1 + Seria= lNumberStrLen + 1 + AssetTagStrLen + 1, PartNumberStrLen + 1); =20 SmbiosHandle =3D SMBIOS_HANDLE_PI_RESERVED; Status =3D mSmbios->Add (mSmbios, NULL, &SmbiosHandle, (EFI_SMBIOS_TAB= LE_HEADER *)Type4Record); diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type00/MiscBios= VendorFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type00/Mi= scBiosVendorFunction.c index b62ec1dd8fdf..abd766ac8ad9 100644 --- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorF= unction.c +++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorF= unction.c @@ -213,9 +213,9 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor) SmbiosRecord->BiosSize =3D Base2ToByteWith64KUnit(BiosPhysicalSizeHexV= alue) - 1; =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(Vendor, OptionalStrStart); - UnicodeStrToAsciiStr(Version, OptionalStrStart + VendorStrLen + 1); - UnicodeStrToAsciiStr(ReleaseDate, OptionalStrStart + VendorStrLen + 1 = + VerStrLen + 1); + UnicodeStrToAsciiStrS (Vendor, OptionalStrStart, VendorStrLen + 1); + UnicodeStrToAsciiStrS (Version, OptionalStrStart + VendorStrLen + 1, V= erStrLen + 1); + UnicodeStrToAsciiStrS (ReleaseDate, OptionalStrStart + VendorStrLen + = 1 + VerStrLen + 1, DateStrLen + 1); // // Now we have got the full smbios record, call smbios protocol to add= this record. // diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type01/MiscSyst= emManufacturerFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/T= ype01/MiscSystemManufacturerFunction.c index f829b09d9cb7..4c16afa04206 100644 --- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type01/MiscSystemManuf= acturerFunction.c +++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type01/MiscSystemManuf= acturerFunction.c @@ -135,12 +135,12 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemManufacturer) } =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(Manufacturer, OptionalStrStart); - UnicodeStrToAsciiStr(ProductName, OptionalStrStart + ManuStrLen + 1); - UnicodeStrToAsciiStr(Version, OptionalStrStart + ManuStrLen + 1 += PdNameStrLen + 1); - UnicodeStrToAsciiStr(SerialNumber, OptionalStrStart + ManuStrLen + 1 += PdNameStrLen + 1 + VerStrLen + 1); - UnicodeStrToAsciiStr(SKUNumber, OptionalStrStart + ManuStrLen + 1 += PdNameStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1); - UnicodeStrToAsciiStr(Family, OptionalStrStart + ManuStrLen + 1 += PdNameStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + SKUNumStrLen + 1); + UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + 1); + UnicodeStrToAsciiStrS (ProductName, OptionalStrStart + ManuStrLen + 1= , PdNameStrLen + 1); + UnicodeStrToAsciiStrS (Version, OptionalStrStart + ManuStrLen + 1= + PdNameStrLen + 1, VerStrLen + 1); + UnicodeStrToAsciiStrS (SerialNumber, OptionalStrStart + ManuStrLen + 1= + PdNameStrLen + 1 + VerStrLen + 1, SerialNumStrLen + 1); + UnicodeStrToAsciiStrS (SKUNumber, OptionalStrStart + ManuStrLen + 1= + PdNameStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1, SKUNumStrLen + 1= ); + UnicodeStrToAsciiStrS (Family, OptionalStrStart + ManuStrLen + 1= + PdNameStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + SKUNumStrLen + = 1, FamilyStrLen + 1); =20 // // Now we have got the full smbios record, call smbios protocol to add= this record. diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type02/MiscBase= BoardManufacturerFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDx= e/Type02/MiscBaseBoardManufacturerFunction.c index 3834bf93f70b..20bb001bb33c 100644 --- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardMa= nufacturerFunction.c +++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardMa= nufacturerFunction.c @@ -142,12 +142,12 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer) FreePool(HandleArray); =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(BaseBoardManufacturer, OptionalStrStart); - UnicodeStrToAsciiStr(BaseBoardProductName, OptionalStrStart + ManuStr= Len + 1); - UnicodeStrToAsciiStr(Version, OptionalStrStart + ManuStr= Len + 1 + ProductNameStrLen + 1); - UnicodeStrToAsciiStr(SerialNumber, OptionalStrStart + ManuStr= Len + 1 + ProductNameStrLen + 1 + VerStrLen + 1); - UnicodeStrToAsciiStr(AssetTag, OptionalStrStart + ManuStr= Len + 1 + ProductNameStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 ); - UnicodeStrToAsciiStr(ChassisLocation, OptionalStrStart + ManuStr= Len + 1 + ProductNameStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + Ass= etTagStrLen + 1); + UnicodeStrToAsciiStrS (BaseBoardManufacturer, OptionalStrStart, ManuSt= rLen + 1); + UnicodeStrToAsciiStrS (BaseBoardProductName, OptionalStrStart + ManuS= trLen + 1, ProductNameStrLen + 1); + UnicodeStrToAsciiStrS (Version, OptionalStrStart + ManuS= trLen + 1 + ProductNameStrLen + 1, VerStrLen + 1); + UnicodeStrToAsciiStrS (SerialNumber, OptionalStrStart + ManuS= trLen + 1 + ProductNameStrLen + 1 + VerStrLen + 1, SerialNumStrLen + 1); + UnicodeStrToAsciiStrS (AssetTag, OptionalStrStart + ManuS= trLen + 1 + ProductNameStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1, As= setTagStrLen + 1); + UnicodeStrToAsciiStrS (ChassisLocation, OptionalStrStart + ManuS= trLen + 1 + ProductNameStrLen + 1 + VerStrLen + 1 + SerialNumStrLen + 1 + A= ssetTagStrLen + 1, ChassisLocaStrLen + 1); =20 Status =3D LogSmbiosData( (UINT8*)SmbiosRecord, &SmbiosHandle); if(EFI_ERROR(Status)) diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type03/MiscChas= sisManufacturerFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/= Type03/MiscChassisManufacturerFunction.c index ec00e1cd10ad..cd98cc966322 100644 --- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type03/MiscChassisManu= facturerFunction.c +++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type03/MiscChassisManu= facturerFunction.c @@ -147,11 +147,11 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscChassisManufacturer) *((UINT8 *)SmbiosRecord + sizeof (SMBIOS_TABLE_TYPE3) + ExtendLength) = =3D 5; =20 OptionalStrStart =3D (CHAR8 *)((UINT8 *)SmbiosRecord + sizeof (SMBIOS_= TABLE_TYPE3) + ExtendLength + 1); - UnicodeStrToAsciiStr(Manufacturer, OptionalStrStart); - UnicodeStrToAsciiStr(Version, OptionalStrStart + ManuStrLen += 1); - UnicodeStrToAsciiStr(SerialNumber, OptionalStrStart + ManuStrLen += 1 + VerStrLen + 1); - UnicodeStrToAsciiStr(AssertTag, OptionalStrStart + ManuStrLen += 1 + VerStrLen + 1 + SerialNumStrLen + 1); - UnicodeStrToAsciiStr(ChassisSkuNumber, OptionalStrStart + ManuStrLen += 1 + VerStrLen + 1 + SerialNumStrLen +1 + AssertTagStrLen + 1); + UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen = + 1); + UnicodeStrToAsciiStrS (Version, OptionalStrStart + ManuStrLen= + 1, VerStrLen + 1); + UnicodeStrToAsciiStrS (SerialNumber, OptionalStrStart + ManuStrLen= + 1 + VerStrLen + 1, SerialNumStrLen + 1); + UnicodeStrToAsciiStrS (AssertTag, OptionalStrStart + ManuStrLen= + 1 + VerStrLen + 1 + SerialNumStrLen + 1, AssertTagStrLen + 1); + UnicodeStrToAsciiStrS (ChassisSkuNumber, OptionalStrStart + ManuStrLen= + 1 + VerStrLen + 1 + SerialNumStrLen +1 + AssertTagStrLen + 1, ChaNumStrL= en + 1); // // Now we have got the full smbios record, call smbios protocol to add= this record. // diff --git a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSyst= emSlotDesignationFunction.c b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDx= e/Type09/MiscSystemSlotDesignationFunction.c index ca1a7a2c0055..e03b28d2f6aa 100644 --- a/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotD= esignationFunction.c +++ b/Silicon/Hisilicon/Drivers/Smbios/SmbiosMiscDxe/Type09/MiscSystemSlotD= esignationFunction.c @@ -172,7 +172,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemSlotDesignation) SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE9); =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); - UnicodeStrToAsciiStr(SlotDesignation, OptionalStrStart); + UnicodeStrToAsciiStrS (SlotDesignation, OptionalStrStart, SlotDesignat= ionStrLen + 1); // // Now we have got the full smbios record, call smbios protocol to add= this record. // --=20 2.20.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65022): https://edk2.groups.io/g/devel/message/65022 Mute This Topic: https://groups.io/mt/76621598/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-