From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.6728.1591708110302367097 for ; Tue, 09 Jun 2020 06:08:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=KNzuhiOA; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: liming.gao@intel.com) IronPort-SDR: q9mkYBVt/xPRe1nuoHEVFl4UB7vxqDX8HMVUlesl4tUE2kQRNnGsBpm198aGZL1d8m4R4LCkDV zLyF2NNrnkTw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2020 06:08:29 -0700 IronPort-SDR: mUkAcO6M1u3DZwwWOh43OIEhsbjmLWzTlXDkD5J5FFl2w3eRfDOeUeBSheKN2AIJFJ2mtn0LgW a5inkgTE9LTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,492,1583222400"; d="scan'208";a="379730782" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by fmsmga001.fm.intel.com with ESMTP; 09 Jun 2020 06:08:28 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 9 Jun 2020 06:08:28 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 9 Jun 2020 06:08:27 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 9 Jun 2020 06:08:27 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 9 Jun 2020 06:08:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zp4hxRxPKycsQxHi1Sb3MJikNg6WTDVUjyY/w9wXtp8tiatwWUyrstNmbpY1bVgnlhz4+XUucdMKyGPOa8wlN1YQvQy8v01ITL4IbaZKFQL9sh8018EmL5BRLPgkudgja+7gmVsxnGq4ExN+zuN4KJ/bygk2kG1ifIy4SusQgFcSomBwExK6hbLKNEsWPt7TRWK4BciYQM0Rx+9U3QefTiaz/sziKuzi2rCr5zTHTCLlOaKZk+zVAq2YQJHyqv8l8J/pOesEl3i4fBpzblcsgNT+9ceQRl8bc0urXbA54NztKUW82gRWsmR5Y6ThTn+JCcL+4UWGqnJlDgThAsYVSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r+t15s4AhnZBLF3V5B0KWLtqujWBr+jmvFu7CJfAVhM=; b=IilbC0rcOjW+tLveCCK51rVHOElIGY4DRgshmlnWLOdqnod/B+gaFKIVN7KxWlasWBJlP8KuX0ZIIZDvwPR7wQ7fvaVtX3tQTXGG2rJhlb+kWuESzgbyNQdvqJa99V7FgOCgIA43WrfJKjdQXw/kXxFGOw6OxFhbGI5vEDHA7+ZfB9XQAIxVAub+LmwXtUfKiWXB56pn0+CVNnuqS9JxVijKcDZM8jMkOzULMDr4HH4unirpoXB4tnk3DwXyfac02Wd5aAPaIdcbHyVU5mNtoJHPiySfJZzKSi3uheRCOsmGs/l6g84wlB5drBYwnWYcYfWDAivefCUn6uc1CPqJTQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r+t15s4AhnZBLF3V5B0KWLtqujWBr+jmvFu7CJfAVhM=; b=KNzuhiOAZoS1J/rkdkjkHZxVsrKsiyuEebh625cQxRIQ58p7xDReObiVIa/vjRSdYmKgtxYNXvkkuIPPWpy5vtiLoAFF/DITDHv4K8F1lXFgzVzgFzFQxyJFN8SEcSV2JXS5YI6HLA6kVCmTcThjvmlNWfJo0fs4hlm7HRgWW7s= Received: from MWHPR11MB1630.namprd11.prod.outlook.com (2603:10b6:301:e::7) by MWHPR11MB1918.namprd11.prod.outlook.com (2603:10b6:300:110::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Tue, 9 Jun 2020 13:08:23 +0000 Received: from MWHPR11MB1630.namprd11.prod.outlook.com ([fe80::50fb:d63c:5958:a67e]) by MWHPR11MB1630.namprd11.prod.outlook.com ([fe80::50fb:d63c:5958:a67e%7]) with mapi id 15.20.3066.023; Tue, 9 Jun 2020 13:08:22 +0000 From: "Liming Gao" To: "Zhang, Shenglei" , "devel@edk2.groups.io" CC: "Kinney, Michael D" Subject: Re: [PATCH] MdePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES Thread-Topic: [PATCH] MdePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES Thread-Index: AQHWOxEaixzocQtXeEudRUS81s42ZajQR8pg Date: Tue, 9 Jun 2020 13:08:22 +0000 Message-ID: References: <20200605081233.20400-1-shenglei.zhang@intel.com> In-Reply-To: <20200605081233.20400-1-shenglei.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.52.206] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: acc3e4fc-06f5-45d0-0fbc-08d80c76305c x-ms-traffictypediagnostic: MWHPR11MB1918: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 042957ACD7 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: esEEHOltSnXfelGDUjr4ZkmpeiCoeyosT9LSO82SYjVeRefJe1cGx3eLtzC0kTC65d/7V/wZ2xVw5aFDb8hJs8uSKZM4De4ZtCVyWbbtRfVb7tKweN3KoaNciTc0PKXuTgpykJKuJRrXZpPwLojLX34kPQokqibAjeCCtUzZrfYfUbiUUOBR0WoVCv5biO3P9T+VKL/SDPjnGxdwUtK9emYHDmPU07C55S8z6jNaHYz07kHBvWeSPldAYsZQgeaHKF/3Xo80hpLX7Xhj9qFWI9hmKZzMgKuI4o1VZuZo7K8GZzF9c5FlM6cjS94OtFyLrO4cF+4YTQVARqd0p7pVOCmB3yo0/DqfUdRTTaR+Hyg1njvcreQotl3w5ZFSi9cSje7sCYRuCEGkKfIp5smGQHvTl0LNf5gwVjpOa8/mEyKLUH65hCB2on144cJ+JzlaiCZhyqGdmTADCkFTizzTnA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1630.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(136003)(346002)(396003)(376002)(366004)(39860400002)(107886003)(6506007)(26005)(76116006)(966005)(52536014)(53546011)(86362001)(8676002)(7696005)(64756008)(66556008)(5660300002)(186003)(66446008)(33656002)(66946007)(55016002)(9686003)(316002)(71200400001)(8936002)(30864003)(110136005)(19627235002)(66476007)(83380400001)(4326008)(478600001)(2906002)(579004)(559001)(569008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: x+mi791U0brZCIGvwcbq4k2pekZTu8KQsttqxtg63BNh7nltEzMOf2N6w3LvN/z2XF0cTvrCw/J7sM9TTnOZXneGxs6zCKK2NNB/MQmj46IQOwvrbCMCUAyO/N/0U5Tk73O4Yv6/Onoif8cku0czshcV5UmT7dQRRqIfs7isZ7UYruR8HwXc6Hfe2X06OLHKYRshDPBmwkPW/uRa+c3WMaExsZ16HPeSF5nul6O8wKgj27MILTm5cAAc2YFsUAaep+TQcEEsOrLYUibtfCyKv2UTYR+ZjlM6q239pmTZfujM6o7r7HUhKluIW/RMM+jfR94IU9WzNdtx5OIwnKDhIRVHGRa7JoGv7CH1+D8d5fTY2HvIL+MqNezGTix74nCJPOZwRG3ho0rJiATlIGf4qLedCv7IjX79ZmqnwUbB4tQmhcf9lONSeCE2AMd4UQ5OxlMqur22br0co46dm2bVFx3bNByhbbhtJZPoQW+E/ddLv/ylLok3P1PJsrlQDlK9 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: acc3e4fc-06f5-45d0-0fbc-08d80c76305c X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jun 2020 13:08:22.8599 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OgtcvD651IMQePqOj7E/5F03k6otxAPEtrplJBM4h7oFVOM9YU13cItIUtv4tBSBqUIJSjQ75+tKDc6u6QFX2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1918 Return-Path: liming.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Shenglei: Please also remove the deprecated code in MdeModulePkg. Thanks Liming > -----Original Message----- > From: Zhang, Shenglei > Sent: Friday, June 5, 2020 4:13 PM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Gao, Liming > Subject: [PATCH] MdePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_IN= TERFACES >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2777 > Code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES is deprecated. > So remove it. >=20 > Cc: Michael D Kinney > Cc: Liming Gao > Signed-off-by: Shenglei Zhang > --- > MdePkg/Library/BaseLib/String.c | 626 ------------------------- > MdePkg/Library/BasePcdLibNull/PcdLib.c | 361 -------------- > MdePkg/Library/BasePrintLib/PrintLib.c | 118 ----- > MdePkg/Library/DxePcdLib/DxePcdLib.c | 399 ---------------- > MdePkg/Library/PeiPcdLib/PeiPcdLib.c | 397 ---------------- > MdePkg/Library/UefiLib/UefiLib.c | 92 ---- > MdePkg/Include/Library/BaseLib.h | 409 ---------------- > MdePkg/Include/Library/PcdLib.h | 520 -------------------- > MdePkg/Include/Library/PrintLib.h | 110 ----- > MdePkg/Include/Library/UefiLib.h | 53 --- > MdePkg/MdePkg.dsc | 1 - > 11 files changed, 3086 deletions(-) >=20 > diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/Str= ing.c > index 45198373f25c..f4854f357e3a 100644 > --- a/MdePkg/Library/BaseLib/String.c > +++ b/MdePkg/Library/BaseLib/String.c > @@ -8,135 +8,6 @@ >=20 > #include "BaseLibInternals.h" >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Copies one Null-terminated Unicode string to another Null-terminated U= nicode > - string and returns the new Unicode string. > - > - This function copies the contents of the Unicode string Source to the = Unicode > - string Destination, and returns Destination. If Source and Destination > - overlap, then the results are undefined. > - > - If Destination is NULL, then ASSERT(). > - If Destination is not aligned on a 16-bit boundary, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source is not aligned on a 16-bit boundary, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Source contains more= than > - PcdMaximumUnicodeStringLength Unicode characters, not including the > - Null-terminator, then ASSERT(). > - > - @param Destination A pointer to a Null-terminated Unicode string. > - @param Source A pointer to a Null-terminated Unicode string. > - > - @return Destination. > - > -**/ > -CHAR16 * > -EFIAPI > -StrCpy ( > - OUT CHAR16 *Destination, > - IN CONST CHAR16 *Source > - ) > -{ > - CHAR16 *ReturnValue; > - > - // > - // Destination cannot be NULL > - // > - ASSERT (Destination !=3D NULL); > - ASSERT (((UINTN) Destination & BIT0) =3D=3D 0); > - > - // > - // Destination and source cannot overlap > - // > - ASSERT ((UINTN)(Destination - Source) > StrLen (Source)); > - ASSERT ((UINTN)(Source - Destination) > StrLen (Source)); > - > - ReturnValue =3D Destination; > - while (*Source !=3D 0) { > - *(Destination++) =3D *(Source++); > - } > - *Destination =3D 0; > - return ReturnValue; > -} > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Copies up to a specified length from one Null-terminated Unicode strin= g to > - another Null-terminated Unicode string and returns the new Unicode str= ing. > - > - This function copies the contents of the Unicode string Source to the = Unicode > - string Destination, and returns Destination. At most, Length Unicode > - characters are copied from Source to Destination. If Length is 0, then > - Destination is returned unmodified. If Length is greater that the numb= er of > - Unicode characters in Source, then Destination is padded with Null Uni= code > - characters. If Source and Destination overlap, then the results are > - undefined. > - > - If Length > 0 and Destination is NULL, then ASSERT(). > - If Length > 0 and Destination is not aligned on a 16-bit boundary, the= n ASSERT(). > - If Length > 0 and Source is NULL, then ASSERT(). > - If Length > 0 and Source is not aligned on a 16-bit boundary, then ASS= ERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Length is greater th= an > - PcdMaximumUnicodeStringLength, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Source contains more= than > - PcdMaximumUnicodeStringLength Unicode characters, not including the Nu= ll-terminator, > - then ASSERT(). > - > - @param Destination A pointer to a Null-terminated Unicode string. > - @param Source A pointer to a Null-terminated Unicode string. > - @param Length The maximum number of Unicode characters to copy. > - > - @return Destination. > - > -**/ > -CHAR16 * > -EFIAPI > -StrnCpy ( > - OUT CHAR16 *Destination, > - IN CONST CHAR16 *Source, > - IN UINTN Length > - ) > -{ > - CHAR16 *ReturnValue; > - > - if (Length =3D=3D 0) { > - return Destination; > - } > - > - // > - // Destination cannot be NULL if Length is not zero > - // > - ASSERT (Destination !=3D NULL); > - ASSERT (((UINTN) Destination & BIT0) =3D=3D 0); > - > - // > - // Destination and source cannot overlap > - // > - ASSERT ((UINTN)(Destination - Source) > StrLen (Source)); > - ASSERT ((UINTN)(Source - Destination) >=3D Length); > - > - if (PcdGet32 (PcdMaximumUnicodeStringLength) !=3D 0) { > - ASSERT (Length <=3D PcdGet32 (PcdMaximumUnicodeStringLength)); > - } > - > - ReturnValue =3D Destination; > - > - while ((*Source !=3D L'\0') && (Length > 0)) { > - *(Destination++) =3D *(Source++); > - Length--; > - } > - > - ZeroMem (Destination, Length * sizeof (*Destination)); > - return ReturnValue; > -} > -#endif >=20 > /** > Returns the length of a Null-terminated Unicode string. > @@ -320,121 +191,6 @@ StrnCmp ( > return *FirstString - *SecondString; > } >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Concatenates one Null-terminated Unicode string to another Null-termin= ated > - Unicode string, and returns the concatenated Unicode string. > - > - This function concatenates two Null-terminated Unicode strings. The co= ntents > - of Null-terminated Unicode string Source are concatenated to the end o= f > - Null-terminated Unicode string Destination. The Null-terminated concat= enated > - Unicode String is returned. If Source and Destination overlap, then th= e > - results are undefined. > - > - If Destination is NULL, then ASSERT(). > - If Destination is not aligned on a 16-bit boundary, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source is not aligned on a 16-bit boundary, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Destination contains= more > - than PcdMaximumUnicodeStringLength Unicode characters, not including t= he > - Null-terminator, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Source contains more= than > - PcdMaximumUnicodeStringLength Unicode characters, not including the > - Null-terminator, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and concatenating Destin= ation > - and Source results in a Unicode string with more than > - PcdMaximumUnicodeStringLength Unicode characters, not including the > - Null-terminator, then ASSERT(). > - > - @param Destination A pointer to a Null-terminated Unicode string. > - @param Source A pointer to a Null-terminated Unicode string. > - > - @return Destination. > - > -**/ > -CHAR16 * > -EFIAPI > -StrCat ( > - IN OUT CHAR16 *Destination, > - IN CONST CHAR16 *Source > - ) > -{ > - StrCpy (Destination + StrLen (Destination), Source); > - > - // > - // Size of the resulting string should never be zero. > - // PcdMaximumUnicodeStringLength is tested inside StrLen(). > - // > - ASSERT (StrSize (Destination) !=3D 0); > - return Destination; > -} > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Concatenates up to a specified length one Null-terminated Unicode to t= he end > - of another Null-terminated Unicode string, and returns the concatenate= d > - Unicode string. > - > - This function concatenates two Null-terminated Unicode strings. The co= ntents > - of Null-terminated Unicode string Source are concatenated to the end o= f > - Null-terminated Unicode string Destination, and Destination is returne= d. At > - most, Length Unicode characters are concatenated from Source to the en= d of > - Destination, and Destination is always Null-terminated. If Length is 0= , then > - Destination is returned unmodified. If Source and Destination overlap,= then > - the results are undefined. > - > - If Destination is NULL, then ASSERT(). > - If Length > 0 and Destination is not aligned on a 16-bit boundary, the= n ASSERT(). > - If Length > 0 and Source is NULL, then ASSERT(). > - If Length > 0 and Source is not aligned on a 16-bit boundary, then ASS= ERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Length is greater th= an > - PcdMaximumUnicodeStringLength, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Destination contains= more > - than PcdMaximumUnicodeStringLength Unicode characters, not including t= he > - Null-terminator, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Source contains more= than > - PcdMaximumUnicodeStringLength Unicode characters, not including the > - Null-terminator, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and concatenating Destin= ation > - and Source results in a Unicode string with more than PcdMaximumUnicod= eStringLength > - Unicode characters, not including the Null-terminator, then ASSERT(). > - > - @param Destination A pointer to a Null-terminated Unicode string. > - @param Source A pointer to a Null-terminated Unicode string. > - @param Length The maximum number of Unicode characters to concat= enate from > - Source. > - > - @return Destination. > - > -**/ > -CHAR16 * > -EFIAPI > -StrnCat ( > - IN OUT CHAR16 *Destination, > - IN CONST CHAR16 *Source, > - IN UINTN Length > - ) > -{ > - UINTN DestinationLen; > - > - DestinationLen =3D StrLen (Destination); > - StrnCpy (Destination + DestinationLen, Source, Length); > - Destination[DestinationLen + Length] =3D L'\0'; > - > - // > - // Size of the resulting string should never be zero. > - // PcdMaximumUnicodeStringLength is tested inside StrLen(). > - // > - ASSERT (StrSize (Destination) !=3D 0); > - return Destination; > -} > -#endif >=20 > /** > Returns the first occurrence of a Null-terminated Unicode sub-string > @@ -845,208 +601,6 @@ InternalAsciiIsHexaDecimalDigitCharacter ( > (Char >=3D 'a' && Char <=3D 'f')); > } >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Convert a Null-terminated Unicode string to a Null-terminated > - ASCII string and returns the ASCII string. > - > - This function converts the content of the Unicode string Source > - to the ASCII string Destination by copying the lower 8 bits of > - each Unicode character. It returns Destination. > - > - The caller is responsible to make sure Destination points to a buffer = with size > - equal or greater than ((StrLen (Source) + 1) * sizeof (CHAR8)) in byte= s. > - > - If any Unicode characters in Source contain non-zero value in > - the upper 8 bits, then ASSERT(). > - > - If Destination is NULL, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source is not aligned on a 16-bit boundary, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - > - If PcdMaximumUnicodeStringLength is not zero, and Source contains > - more than PcdMaximumUnicodeStringLength Unicode characters, not includ= ing > - the Null-terminator, then ASSERT(). > - > - If PcdMaximumAsciiStringLength is not zero, and Source contains more > - than PcdMaximumAsciiStringLength Unicode characters, not including the > - Null-terminator, then ASSERT(). > - > - @param Source A pointer to a Null-terminated Unicode string. > - @param Destination A pointer to a Null-terminated ASCII string. > - > - @return Destination. > - > -**/ > -CHAR8 * > -EFIAPI > -UnicodeStrToAsciiStr ( > - IN CONST CHAR16 *Source, > - OUT CHAR8 *Destination > - ) > -{ > - CHAR8 *ReturnValue; > - > - ASSERT (Destination !=3D NULL); > - > - // > - // ASSERT if Source is long than PcdMaximumUnicodeStringLength. > - // Length tests are performed inside StrLen(). > - // > - ASSERT (StrSize (Source) !=3D 0); > - > - // > - // Source and Destination should not overlap > - // > - ASSERT ((UINTN) (Destination - (CHAR8 *) Source) >=3D StrSize (Source)= ); > - ASSERT ((UINTN) ((CHAR8 *) Source - Destination) > StrLen (Source)); > - > - > - ReturnValue =3D Destination; > - while (*Source !=3D '\0') { > - // > - // If any Unicode characters in Source contain > - // non-zero value in the upper 8 bits, then ASSERT(). > - // > - ASSERT (*Source < 0x100); > - *(Destination++) =3D (CHAR8) *(Source++); > - } > - > - *Destination =3D '\0'; > - > - // > - // ASSERT Original Destination is less long than PcdMaximumAsciiString= Length. > - // Length tests are performed inside AsciiStrLen(). > - // > - ASSERT (AsciiStrSize (ReturnValue) !=3D 0); > - > - return ReturnValue; > -} > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Copies one Null-terminated ASCII string to another Null-terminated ASC= II > - string and returns the new ASCII string. > - > - This function copies the contents of the ASCII string Source to the AS= CII > - string Destination, and returns Destination. If Source and Destination > - overlap, then the results are undefined. > - > - If Destination is NULL, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero and Source contains more th= an > - PcdMaximumAsciiStringLength ASCII characters, not including the Null-t= erminator, > - then ASSERT(). > - > - @param Destination A pointer to a Null-terminated ASCII string. > - @param Source A pointer to a Null-terminated ASCII string. > - > - @return Destination > - > -**/ > -CHAR8 * > -EFIAPI > -AsciiStrCpy ( > - OUT CHAR8 *Destination, > - IN CONST CHAR8 *Source > - ) > -{ > - CHAR8 *ReturnValue; > - > - // > - // Destination cannot be NULL > - // > - ASSERT (Destination !=3D NULL); > - > - // > - // Destination and source cannot overlap > - // > - ASSERT ((UINTN)(Destination - Source) > AsciiStrLen (Source)); > - ASSERT ((UINTN)(Source - Destination) > AsciiStrLen (Source)); > - > - ReturnValue =3D Destination; > - while (*Source !=3D 0) { > - *(Destination++) =3D *(Source++); > - } > - *Destination =3D 0; > - return ReturnValue; > -} > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Copies up to a specified length one Null-terminated ASCII string to an= other > - Null-terminated ASCII string and returns the new ASCII string. > - > - This function copies the contents of the ASCII string Source to the AS= CII > - string Destination, and returns Destination. At most, Length ASCII cha= racters > - are copied from Source to Destination. If Length is 0, then Destinatio= n is > - returned unmodified. If Length is greater that the number of ASCII cha= racters > - in Source, then Destination is padded with Null ASCII characters. If S= ource > - and Destination overlap, then the results are undefined. > - > - If Destination is NULL, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Length is greater than > - PcdMaximumAsciiStringLength, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Source contains more t= han > - PcdMaximumAsciiStringLength ASCII characters, not including the Null-t= erminator, > - then ASSERT(). > - > - @param Destination A pointer to a Null-terminated ASCII string. > - @param Source A pointer to a Null-terminated ASCII string. > - @param Length The maximum number of ASCII characters to copy. > - > - @return Destination > - > -**/ > -CHAR8 * > -EFIAPI > -AsciiStrnCpy ( > - OUT CHAR8 *Destination, > - IN CONST CHAR8 *Source, > - IN UINTN Length > - ) > -{ > - CHAR8 *ReturnValue; > - > - if (Length =3D=3D 0) { > - return Destination; > - } > - > - // > - // Destination cannot be NULL > - // > - ASSERT (Destination !=3D NULL); > - > - // > - // Destination and source cannot overlap > - // > - ASSERT ((UINTN)(Destination - Source) > AsciiStrLen (Source)); > - ASSERT ((UINTN)(Source - Destination) >=3D Length); > - > - if (PcdGet32 (PcdMaximumAsciiStringLength) !=3D 0) { > - ASSERT (Length <=3D PcdGet32 (PcdMaximumAsciiStringLength)); > - } > - > - ReturnValue =3D Destination; > - > - while (*Source !=3D 0 && Length > 0) { > - *(Destination++) =3D *(Source++); > - Length--; > - } > - > - ZeroMem (Destination, Length * sizeof (*Destination)); > - return ReturnValue; > -} > -#endif >=20 > /** > Returns the length of a Null-terminated ASCII string. > @@ -1329,114 +883,6 @@ AsciiStrnCmp ( > return *FirstString - *SecondString; > } >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Concatenates one Null-terminated ASCII string to another Null-terminat= ed > - ASCII string, and returns the concatenated ASCII string. > - > - This function concatenates two Null-terminated ASCII strings. The cont= ents of > - Null-terminated ASCII string Source are concatenated to the end of Nul= l- > - terminated ASCII string Destination. The Null-terminated concatenated = ASCII > - String is returned. > - > - If Destination is NULL, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero and Destination contains mo= re than > - PcdMaximumAsciiStringLength ASCII characters, not including the Null-t= erminator, > - then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero and Source contains more th= an > - PcdMaximumAsciiStringLength ASCII characters, not including the Null-t= erminator, > - then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero and concatenating Destinati= on and > - Source results in a ASCII string with more than PcdMaximumAsciiStringL= ength > - ASCII characters, then ASSERT(). > - > - @param Destination A pointer to a Null-terminated ASCII string. > - @param Source A pointer to a Null-terminated ASCII string. > - > - @return Destination > - > -**/ > -CHAR8 * > -EFIAPI > -AsciiStrCat ( > - IN OUT CHAR8 *Destination, > - IN CONST CHAR8 *Source > - ) > -{ > - AsciiStrCpy (Destination + AsciiStrLen (Destination), Source); > - > - // > - // Size of the resulting string should never be zero. > - // PcdMaximumUnicodeStringLength is tested inside StrLen(). > - // > - ASSERT (AsciiStrSize (Destination) !=3D 0); > - return Destination; > -} > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Concatenates up to a specified length one Null-terminated ASCII string= to > - the end of another Null-terminated ASCII string, and returns the > - concatenated ASCII string. > - > - This function concatenates two Null-terminated ASCII strings. The cont= ents > - of Null-terminated ASCII string Source are concatenated to the end of = Null- > - terminated ASCII string Destination, and Destination is returned. At m= ost, > - Length ASCII characters are concatenated from Source to the end of > - Destination, and Destination is always Null-terminated. If Length is 0= , then > - Destination is returned unmodified. If Source and Destination overlap,= then > - the results are undefined. > - > - If Length > 0 and Destination is NULL, then ASSERT(). > - If Length > 0 and Source is NULL, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Length is greater than > - PcdMaximumAsciiStringLength, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Destination contains m= ore than > - PcdMaximumAsciiStringLength ASCII characters, not including the Null-t= erminator, > - then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Source contains more t= han > - PcdMaximumAsciiStringLength ASCII characters, not including the Null-t= erminator, > - then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and concatenating Destinat= ion and > - Source results in a ASCII string with more than PcdMaximumAsciiStringL= ength > - ASCII characters, not including the Null-terminator, then ASSERT(). > - > - @param Destination A pointer to a Null-terminated ASCII string. > - @param Source A pointer to a Null-terminated ASCII string. > - @param Length The maximum number of ASCII characters to concaten= ate from > - Source. > - > - @return Destination > - > -**/ > -CHAR8 * > -EFIAPI > -AsciiStrnCat ( > - IN OUT CHAR8 *Destination, > - IN CONST CHAR8 *Source, > - IN UINTN Length > - ) > -{ > - UINTN DestinationLen; > - > - DestinationLen =3D AsciiStrLen (Destination); > - AsciiStrnCpy (Destination + DestinationLen, Source, Length); > - Destination[DestinationLen + Length] =3D '\0'; > - > - // > - // Size of the resulting string should never be zero. > - // PcdMaximumUnicodeStringLength is tested inside StrLen(). > - // > - ASSERT (AsciiStrSize (Destination) !=3D 0); > - return Destination; > -} > -#endif >=20 > /** > Returns the first occurrence of a Null-terminated ASCII sub-string > @@ -1684,78 +1130,6 @@ AsciiStrHexToUint64 ( > return Result; > } >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Convert one Null-terminated ASCII string to a Null-terminated > - Unicode string and returns the Unicode string. > - > - This function converts the contents of the ASCII string Source to the = Unicode > - string Destination, and returns Destination. The function terminates = the > - Unicode string Destination by appending a Null-terminator character at= the end. > - The caller is responsible to make sure Destination points to a buffer = with size > - equal or greater than ((AsciiStrLen (Source) + 1) * sizeof (CHAR16)) i= n bytes. > - > - If Destination is NULL, then ASSERT(). > - If Destination is not aligned on a 16-bit boundary, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Source contains more t= han > - PcdMaximumAsciiStringLength ASCII characters not including the Null-te= rminator, > - then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Source contains more= than > - PcdMaximumUnicodeStringLength ASCII characters not including the > - Null-terminator, then ASSERT(). > - > - @param Source A pointer to a Null-terminated ASCII string. > - @param Destination A pointer to a Null-terminated Unicode string. > - > - @return Destination. > - > -**/ > -CHAR16 * > -EFIAPI > -AsciiStrToUnicodeStr ( > - IN CONST CHAR8 *Source, > - OUT CHAR16 *Destination > - ) > -{ > - CHAR16 *ReturnValue; > - > - ASSERT (Destination !=3D NULL); > - > - // > - // ASSERT Source is less long than PcdMaximumAsciiStringLength > - // > - ASSERT (AsciiStrSize (Source) !=3D 0); > - > - // > - // Source and Destination should not overlap > - // > - ASSERT ((UINTN) ((CHAR8 *) Destination - Source) > AsciiStrLen (Source= )); > - ASSERT ((UINTN) (Source - (CHAR8 *) Destination) >=3D (AsciiStrSize (S= ource) * sizeof (CHAR16))); > - > - > - ReturnValue =3D Destination; > - while (*Source !=3D '\0') { > - *(Destination++) =3D (CHAR16)(UINT8) *(Source++); > - } > - // > - // End the Destination with a NULL. > - // > - *Destination =3D '\0'; > - > - // > - // ASSERT Original Destination is less long than PcdMaximumUnicodeStri= ngLength > - // > - ASSERT (StrSize (ReturnValue) !=3D 0); > - > - return ReturnValue; > -} > - > -#endif >=20 > STATIC CHAR8 EncodingTable[] =3D "ABCDEFGHIJKLMNOPQRSTUVWXYZ" > "abcdefghijklmnopqrstuvwxyz" > diff --git a/MdePkg/Library/BasePcdLibNull/PcdLib.c b/MdePkg/Library/Base= PcdLibNull/PcdLib.c > index 49447880ae8b..265fae5d7368 100644 > --- a/MdePkg/Library/BasePcdLibNull/PcdLib.c > +++ b/MdePkg/Library/BasePcdLibNull/PcdLib.c > @@ -386,367 +386,6 @@ LibPcdGetExSize ( > } >=20 >=20 > - > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 8-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 8-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT8 > -EFIAPI > -LibPcdSet8 ( > - IN UINTN TokenNumber, > - IN UINT8 Value > - ) > -{ > - ASSERT (FALSE); > - > - return 0; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 16-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 16-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT16 > -EFIAPI > -LibPcdSet16 ( > - IN UINTN TokenNumber, > - IN UINT16 Value > - ) > -{ > - ASSERT (FALSE); > - > - return 0; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 32-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 32-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT32 > -EFIAPI > -LibPcdSet32 ( > - IN UINTN TokenNumber, > - IN UINT32 Value > - ) > -{ > - ASSERT (FALSE); > - > - return 0; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 64-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 64-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT64 > -EFIAPI > -LibPcdSet64 ( > - IN UINTN TokenNumber, > - IN UINT64 Value > - ) > -{ > - ASSERT (FALSE); > - > - return 0; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets a buffer for the token specified by TokenNumber to the value > - specified by Buffer and SizeOfBuffer. Buffer is returned. > - If SizeOfBuffer is greater than the maximum size support by TokenNumbe= r, > - then set SizeOfBuffer to the maximum size supported by TokenNumber and > - return NULL to indicate that the set operation was not actually perfor= med. > - > - If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set t= o the > - maximum size supported by TokenName and NULL must be returned. > - > - If SizeOfBuffer is NULL, then ASSERT(). > - If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). > - > - @param[in] TokenNumber The PCD token number to set a current va= lue for. > - @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. > - @param[in] Buffer A pointer to the buffer to set. > - > - @return Return the pointer for the buffer been set. > - > -**/ > -VOID * > -EFIAPI > -LibPcdSetPtr ( > - IN UINTN TokenNumber, > - IN OUT UINTN *SizeOfBuffer, > - IN CONST VOID *Buffer > - ) > -{ > - ASSERT (FALSE); > - > - return NULL; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the Boolean value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The boolean value to set. > - > - @return Return the value that was set. > - > -**/ > -BOOLEAN > -EFIAPI > -LibPcdSetBool ( > - IN UINTN TokenNumber, > - IN BOOLEAN Value > - ) > -{ > - ASSERT (FALSE); > - > - return FALSE; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 8-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 8-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT8 > -EFIAPI > -LibPcdSetEx8 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT8 Value > - ) > -{ > - ASSERT (FALSE); > - > - return 0; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 16-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 16-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT16 > -EFIAPI > -LibPcdSetEx16 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT16 Value > - ) > -{ > - ASSERT (FALSE); > - > - return 0; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 32-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 32-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT32 > -EFIAPI > -LibPcdSetEx32 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT32 Value > - ) > -{ > - ASSERT (FALSE); > - > - return 0; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 64-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 64-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT64 > -EFIAPI > -LibPcdSetEx64 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT64 Value > - ) > -{ > - ASSERT (FALSE); > - > - return 0; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets a buffer for the token specified by TokenNumber to the value spec= ified by > - Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is grea= ter than > - the maximum size support by TokenNumber, then set SizeOfBuffer to the = maximum size > - supported by TokenNumber and return NULL to indicate that the set oper= ation > - was not actually performed. > - > - If Guid is NULL, then ASSERT(). > - If SizeOfBuffer is NULL, then ASSERT(). > - If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value th= at > - designates which namespace to set a valu= e from. > - @param[in] TokenNumber The PCD token number to set a current va= lue for. > - @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. > - @param[in] Buffer A pointer to the buffer to set. > - > - @return Return the pinter to the buffer been set. > - > -**/ > -VOID * > -EFIAPI > -LibPcdSetExPtr ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN OUT UINTN *SizeOfBuffer, > - IN VOID *Buffer > - ) > -{ > - ASSERT (FALSE); > - > - return NULL; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the Boolean value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The Boolean value to set. > - > - @return Return the value that was set. > - > -**/ > -BOOLEAN > -EFIAPI > -LibPcdSetExBool ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN BOOLEAN Value > - ) > -{ > - ASSERT (FALSE); > - > - return FALSE; > -} > -#endif > - > /** > This function provides a means by which to set a value for a given PCD= token. >=20 > diff --git a/MdePkg/Library/BasePrintLib/PrintLib.c b/MdePkg/Library/Base= PrintLib/PrintLib.c > index af771652e4b0..8bfbab05f58c 100644 > --- a/MdePkg/Library/BasePrintLib/PrintLib.c > +++ b/MdePkg/Library/BasePrintLib/PrintLib.c > @@ -343,65 +343,6 @@ UnicodeSPrintAsciiFormat ( > return NumberOfPrinted; > } >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Converts a decimal value to a Null-terminated Unicode string. > - > - Converts the decimal number specified by Value to a Null-terminated Un= icode > - string specified by Buffer containing at most Width characters. No pad= ding of spaces > - is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACT= ERS is assumed. > - The number of Unicode characters in Buffer is returned not including t= he Null-terminator. > - If the conversion contains more than Width characters, then only the f= irst > - Width characters are returned, and the total number of characters > - required to perform the conversion is returned. > - Additional conversion parameters are specified in Flags. > - > - The Flags bit LEFT_JUSTIFY is always ignored. > - All conversions are left justified in Buffer. > - If Width is 0, PREFIX_ZERO is ignored in Flags. > - If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, a= nd commas > - are inserted every 3rd digit starting from the right. > - If RADIX_HEX is set in Flags, then the output buffer will be > - formatted in hexadecimal format. > - If Value is < 0 and RADIX_HEX is not set in Flags, then the fist chara= cter in Buffer is a '-'. > - If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, > - then Buffer is padded with '0' characters so the combination of the op= tional '-' > - sign character, '0' characters, digit characters for Value, and the Nu= ll-terminator > - add up to Width characters. > - If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT(). > - If Buffer is NULL, then ASSERT(). > - If Buffer is not aligned on a 16-bit boundary, then ASSERT(). > - If unsupported bits are set in Flags, then ASSERT(). > - If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT(). > - If Width >=3D MAXIMUM_VALUE_CHARACTERS, then ASSERT() > - > - @param Buffer The pointer to the output buffer for the produced Null= -terminated > - Unicode string. > - @param Flags The bitmask of flags that specify left justification, = zero pad, and commas. > - @param Value The 64-bit signed value to convert to a string. > - @param Width The maximum number of Unicode characters to place in B= uffer, not including > - the Null-terminator. > - > - @return The number of Unicode characters in Buffer not including the N= ull-terminator. > - > -**/ > -UINTN > -EFIAPI > -UnicodeValueToString ( > - IN OUT CHAR16 *Buffer, > - IN UINTN Flags, > - IN INT64 Value, > - IN UINTN Width > - ) > -{ > - ASSERT_UNICODE_BUFFER(Buffer); > - return BasePrintLibConvertValueToString ((CHAR8 *)Buffer, Flags, Value= , Width, 2); > -} > - > -#endif >=20 > /** > Converts a decimal value to a Null-terminated Unicode string. > @@ -780,65 +721,6 @@ AsciiSPrintUnicodeFormat ( > return NumberOfPrinted; > } >=20 > - > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Converts a decimal value to a Null-terminated ASCII string. > - > - Converts the decimal number specified by Value to a Null-terminated AS= CII string > - specified by Buffer containing at most Width characters. No padding of= spaces > - is ever performed. > - If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed. > - The number of ASCII characters in Buffer is returned not including the= Null-terminator. > - If the conversion contains more than Width characters, then only the f= irst Width > - characters are returned, and the total number of characters required t= o perform > - the conversion is returned. > - Additional conversion parameters are specified in Flags. > - The Flags bit LEFT_JUSTIFY is always ignored. > - All conversions are left justified in Buffer. > - If Width is 0, PREFIX_ZERO is ignored in Flags. > - If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, a= nd commas > - are inserted every 3rd digit starting from the right. > - If RADIX_HEX is set in Flags, then the output buffer will be > - formatted in hexadecimal format. > - If Value is < 0 and RADIX_HEX is not set in Flags, then the fist chara= cter in Buffer is a '-'. > - If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, > - then Buffer is padded with '0' characters so the combination of the op= tional '-' > - sign character, '0' characters, digit characters for Value, and the Nu= ll-terminator > - add up to Width characters. > - > - If Buffer is NULL, then ASSERT(). > - If unsupported bits are set in Flags, then ASSERT(). > - If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT(). > - If Width >=3D MAXIMUM_VALUE_CHARACTERS, then ASSERT() > - > - @param Buffer The pointer to the output buffer for the produced Null= -terminated > - ASCII string. > - @param Flags The bitmask of flags that specify left justification, = zero pad, and commas. > - @param Value The 64-bit signed value to convert to a string. > - @param Width The maximum number of ASCII characters to place in Buf= fer, not including > - the Null-terminator. > - > - @return The number of ASCII characters in Buffer not including the Nul= l-terminator. > - > -**/ > -UINTN > -EFIAPI > -AsciiValueToString ( > - OUT CHAR8 *Buffer, > - IN UINTN Flags, > - IN INT64 Value, > - IN UINTN Width > - ) > -{ > - return BasePrintLibConvertValueToString (Buffer, Flags, Value, Width, = 1); > -} > - > -#endif > - > /** > Converts a decimal value to a Null-terminated Ascii string. >=20 > diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.c b/MdePkg/Library/DxePcd= Lib/DxePcdLib.c > index 6e3e4e70697f..2accaeda2cd6 100644 > --- a/MdePkg/Library/DxePcdLib/DxePcdLib.c > +++ b/MdePkg/Library/DxePcdLib/DxePcdLib.c > @@ -474,405 +474,6 @@ LibPcdGetExSize ( > } >=20 >=20 > - > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 8-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 8-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT8 > -EFIAPI > -LibPcdSet8 ( > - IN UINTN TokenNumber, > - IN UINT8 Value > - ) > -{ > - GetPcdProtocol()->Set8 (TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 16-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 16-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT16 > -EFIAPI > -LibPcdSet16 ( > - IN UINTN TokenNumber, > - IN UINT16 Value > - ) > -{ > - GetPcdProtocol()->Set16 (TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 32-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 32-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT32 > -EFIAPI > -LibPcdSet32 ( > - IN UINTN TokenNumber, > - IN UINT32 Value > - ) > -{ > - GetPcdProtocol()->Set32 (TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 64-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 64-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT64 > -EFIAPI > -LibPcdSet64 ( > - IN UINTN TokenNumber, > - IN UINT64 Value > - ) > -{ > - GetPcdProtocol()->Set64 (TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets a buffer for the token specified by TokenNumber to the value > - specified by Buffer and SizeOfBuffer. Buffer is returned. > - If SizeOfBuffer is greater than the maximum size support by TokenNumbe= r, > - then set SizeOfBuffer to the maximum size supported by TokenNumber and > - return NULL to indicate that the set operation was not actually perfor= med. > - > - If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set t= o the > - maximum size supported by TokenName and NULL must be returned. > - > - If SizeOfBuffer is NULL, then ASSERT(). > - If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). > - > - @param[in] TokenNumber The PCD token number to set a current va= lue for. > - @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. > - @param[in] Buffer A pointer to the buffer to set. > - > - @return Return the pointer for the buffer been set. > - > -**/ > -VOID * > -EFIAPI > -LibPcdSetPtr ( > - IN UINTN TokenNumber, > - IN OUT UINTN *SizeOfBuffer, > - IN CONST VOID *Buffer > - ) > -{ > - EFI_STATUS Status; > - UINTN InputSizeOfBuffer; > - > - ASSERT (SizeOfBuffer !=3D NULL); > - > - if (*SizeOfBuffer > 0) { > - ASSERT (Buffer !=3D NULL); > - } > - > - InputSizeOfBuffer =3D *SizeOfBuffer; > - Status =3D GetPcdProtocol()->SetPtr (TokenNumber, SizeOfBuffer, (VOID = *) Buffer); > - if (EFI_ERROR (Status) && (*SizeOfBuffer < InputSizeOfBuffer)) { > - return NULL; > - } > - > - return (VOID *)Buffer; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the Boolean value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The boolean value to set. > - > - @return Return the value that was set. > - > -**/ > -BOOLEAN > -EFIAPI > -LibPcdSetBool ( > - IN UINTN TokenNumber, > - IN BOOLEAN Value > - ) > -{ > - GetPcdProtocol()->SetBool (TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 8-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 8-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT8 > -EFIAPI > -LibPcdSetEx8 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT8 Value > - ) > -{ > - ASSERT (Guid !=3D NULL); > - > - GetPiPcdProtocol()->Set8 (Guid, TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 16-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 16-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT16 > -EFIAPI > -LibPcdSetEx16 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT16 Value > - ) > -{ > - ASSERT (Guid !=3D NULL); > - > - GetPiPcdProtocol()->Set16 (Guid, TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 32-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 32-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT32 > -EFIAPI > -LibPcdSetEx32 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT32 Value > - ) > -{ > - ASSERT (Guid !=3D NULL); > - > - GetPiPcdProtocol()->Set32 (Guid, TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 64-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 64-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT64 > -EFIAPI > -LibPcdSetEx64 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT64 Value > - ) > -{ > - ASSERT (Guid !=3D NULL); > - > - GetPiPcdProtocol()->Set64 (Guid, TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets a buffer for the token specified by TokenNumber to the value spec= ified by > - Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is grea= ter than > - the maximum size support by TokenNumber, then set SizeOfBuffer to the = maximum size > - supported by TokenNumber and return NULL to indicate that the set oper= ation > - was not actually performed. > - > - If Guid is NULL, then ASSERT(). > - If SizeOfBuffer is NULL, then ASSERT(). > - If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value th= at > - designates which namespace to set a valu= e from. > - @param[in] TokenNumber The PCD token number to set a current va= lue for. > - @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. > - @param[in] Buffer A pointer to the buffer to set. > - > - @return Return the pointer to the buffer been set. > - > -**/ > -VOID * > -EFIAPI > -LibPcdSetExPtr ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN OUT UINTN *SizeOfBuffer, > - IN VOID *Buffer > - ) > -{ > - EFI_STATUS Status; > - UINTN InputSizeOfBuffer; > - > - ASSERT (Guid !=3D NULL); > - > - ASSERT (SizeOfBuffer !=3D NULL); > - > - if (*SizeOfBuffer > 0) { > - ASSERT (Buffer !=3D NULL); > - } > - > - InputSizeOfBuffer =3D *SizeOfBuffer; > - Status =3D GetPiPcdProtocol()->SetPtr (Guid, TokenNumber, SizeOfBuffer= , Buffer); > - if (EFI_ERROR (Status) && (*SizeOfBuffer < InputSizeOfBuffer)) { > - return NULL; > - } > - > - return Buffer; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the Boolean value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The Boolean value to set. > - > - @return Return the value that was set. > - > -**/ > -BOOLEAN > -EFIAPI > -LibPcdSetExBool ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN BOOLEAN Value > - ) > -{ > - ASSERT (Guid !=3D NULL); > - > - GetPiPcdProtocol()->SetBool (Guid, TokenNumber, Value); > - > - return Value; > -} > -#endif > - > /** > This function provides a means by which to set a value for a given PCD= token. >=20 > diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c b/MdePkg/Library/PeiPcd= Lib/PeiPcdLib.c > index 916a2c0844eb..d979b28cc8dd 100644 > --- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c > +++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c > @@ -474,403 +474,6 @@ LibPcdGetExSize ( > } >=20 >=20 > - > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 8-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 8-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT8 > -EFIAPI > -LibPcdSet8 ( > - IN UINTN TokenNumber, > - IN UINT8 Value > - ) > -{ > - (GetPcdPpiPointer ())->Set8 (TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 16-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 16-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT16 > -EFIAPI > -LibPcdSet16 ( > - IN UINTN TokenNumber, > - IN UINT16 Value > - ) > -{ > - (GetPcdPpiPointer ())->Set16 (TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 32-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 32-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT32 > -EFIAPI > -LibPcdSet32 ( > - IN UINTN TokenNumber, > - IN UINT32 Value > - ) > -{ > - (GetPcdPpiPointer ())->Set32 (TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 64-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 64-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT64 > -EFIAPI > -LibPcdSet64 ( > - IN UINTN TokenNumber, > - IN UINT64 Value > - ) > -{ > - (GetPcdPpiPointer ())->Set64 (TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets a buffer for the token specified by TokenNumber to the value > - specified by Buffer and SizeOfBuffer. Buffer is returned. > - If SizeOfBuffer is greater than the maximum size support by TokenNumbe= r, > - then set SizeOfBuffer to the maximum size supported by TokenNumber and > - return NULL to indicate that the set operation was not actually perfor= med. > - > - If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set t= o the > - maximum size supported by TokenName and NULL must be returned. > - > - If SizeOfBuffer is NULL, then ASSERT(). > - If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). > - > - @param[in] TokenNumber The PCD token number to set a current va= lue for. > - @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. > - @param[in] Buffer A pointer to the buffer to set. > - > - @return Return the pointer for the buffer been set. > - > -**/ > -VOID * > -EFIAPI > -LibPcdSetPtr ( > - IN UINTN TokenNumber, > - IN OUT UINTN *SizeOfBuffer, > - IN CONST VOID *Buffer > - ) > -{ > - EFI_STATUS Status; > - UINTN InputSizeOfBuffer; > - > - ASSERT (SizeOfBuffer !=3D NULL); > - > - if (*SizeOfBuffer > 0) { > - ASSERT (Buffer !=3D NULL); > - } > - > - InputSizeOfBuffer =3D *SizeOfBuffer; > - Status =3D (GetPcdPpiPointer ())->SetPtr (TokenNumber, SizeOfBuffer, (= VOID *) Buffer); > - if (EFI_ERROR (Status) && (*SizeOfBuffer < InputSizeOfBuffer)) { > - return NULL; > - } > - > - return (VOID *) Buffer; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the Boolean value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The boolean value to set. > - > - @return Return the value that was set. > - > -**/ > -BOOLEAN > -EFIAPI > -LibPcdSetBool ( > - IN UINTN TokenNumber, > - IN BOOLEAN Value > - ) > -{ > - (GetPcdPpiPointer ())->SetBool (TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 8-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 8-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT8 > -EFIAPI > -LibPcdSetEx8 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT8 Value > - ) > -{ > - ASSERT (Guid !=3D NULL); > - > - (GetPiPcdPpiPointer ())->Set8 (Guid, TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 16-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 16-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT16 > -EFIAPI > -LibPcdSetEx16 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT16 Value > - ) > -{ > - ASSERT (Guid !=3D NULL); > - > - (GetPiPcdPpiPointer ())->Set16 (Guid, TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 32-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 32-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT32 > -EFIAPI > -LibPcdSetEx32 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT32 Value > - ) > -{ > - ASSERT (Guid !=3D NULL); > - > - (GetPiPcdPpiPointer ())->Set32 (Guid, TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 64-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 64-bit value to set. > - > - @return Return the value that was set. > - > -**/ > -UINT64 > -EFIAPI > -LibPcdSetEx64 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT64 Value > - ) > -{ > - ASSERT (Guid !=3D NULL); > - > - (GetPiPcdPpiPointer ())->Set64 (Guid, TokenNumber, Value); > - > - return Value; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets a buffer for the token specified by TokenNumber to the value spec= ified by > - Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is grea= ter than > - the maximum size support by TokenNumber, then set SizeOfBuffer to the = maximum size > - supported by TokenNumber and return NULL to indicate that the set oper= ation > - was not actually performed. > - > - If Guid is NULL, then ASSERT(). > - If SizeOfBuffer is NULL, then ASSERT(). > - If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value th= at > - designates which namespace to set a valu= e from. > - @param[in] TokenNumber The PCD token number to set a current va= lue for. > - @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. > - @param[in] Buffer A pointer to the buffer to set. > - > - @return Return the pinter to the buffer been set. > - > -**/ > -VOID * > -EFIAPI > -LibPcdSetExPtr ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN OUT UINTN *SizeOfBuffer, > - IN VOID *Buffer > - ) > -{ > - EFI_STATUS Status; > - UINTN InputSizeOfBuffer; > - > - ASSERT (SizeOfBuffer !=3D NULL); > - if (*SizeOfBuffer > 0) { > - ASSERT (Buffer !=3D NULL); > - } > - ASSERT (Guid !=3D NULL); > - > - InputSizeOfBuffer =3D *SizeOfBuffer; > - Status =3D (GetPiPcdPpiPointer ())->SetPtr (Guid, TokenNumber, SizeOfB= uffer, Buffer); > - if (EFI_ERROR (Status) && (*SizeOfBuffer < InputSizeOfBuffer)) { > - return NULL; > - } > - > - return Buffer; > -} > - > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the Boolean value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid The pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The Boolean value to set. > - > - @return Return the value that was set. > - > -**/ > -BOOLEAN > -EFIAPI > -LibPcdSetExBool ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN BOOLEAN Value > - ) > -{ > - ASSERT (Guid !=3D NULL); > - > - (GetPiPcdPpiPointer ())->SetBool (Guid, TokenNumber, Value); > - > - return Value; > -} > -#endif > - > /** > This function provides a means by which to set a value for a given PCD= token. >=20 > diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/Ue= fiLib.c > index 07c45d1e91ff..835218f9824f 100644 > --- a/MdePkg/Library/UefiLib/UefiLib.c > +++ b/MdePkg/Library/UefiLib/UefiLib.c > @@ -1285,98 +1285,6 @@ FreeUnicodeStringTable ( > return EFI_SUCCESS; > } >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Returns a pointer to an allocated buffer that contains the contents of= a > - variable retrieved through the UEFI Runtime Service GetVariable(). Th= e > - returned buffer is allocated using AllocatePool(). The caller is resp= onsible > - for freeing this buffer with FreePool(). > - > - If Name is NULL, then ASSERT(). > - If Guid is NULL, then ASSERT(). > - > - @param[in] Name The pointer to a Null-terminated Unicode string. > - @param[in] Guid The pointer to an EFI_GUID structure > - > - @retval NULL The variable could not be retrieved. > - @retval NULL There are not enough resources available for the variab= le contents. > - @retval Other A pointer to allocated buffer containing the variable c= ontents. > - > -**/ > -VOID * > -EFIAPI > -GetVariable ( > - IN CONST CHAR16 *Name, > - IN CONST EFI_GUID *Guid > - ) > -{ > - EFI_STATUS Status; > - UINTN Size; > - VOID *Value; > - > - ASSERT (Name !=3D NULL); > - ASSERT (Guid !=3D NULL); > - > - // > - // Try to get the variable size. > - // > - Value =3D NULL; > - Size =3D 0; > - Status =3D gRT->GetVariable ((CHAR16 *) Name, (EFI_GUID *) Guid, NULL,= &Size, Value); > - if (Status !=3D EFI_BUFFER_TOO_SMALL) { > - return NULL; > - } > - > - // > - // Allocate buffer to get the variable. > - // > - Value =3D AllocatePool (Size); > - if (Value =3D=3D NULL) { > - return NULL; > - } > - > - // > - // Get the variable data. > - // > - Status =3D gRT->GetVariable ((CHAR16 *) Name, (EFI_GUID *) Guid, NULL,= &Size, Value); > - if (EFI_ERROR (Status)) { > - FreePool(Value); > - return NULL; > - } > - > - return Value; > -} > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Returns a pointer to an allocated buffer that contains the contents of= a > - variable retrieved through the UEFI Runtime Service GetVariable(). Th= is > - function always uses the EFI_GLOBAL_VARIABLE GUID to retrieve variable= s. > - The returned buffer is allocated using AllocatePool(). The caller is > - responsible for freeing this buffer with FreePool(). > - > - If Name is NULL, then ASSERT(). > - > - @param[in] Name The pointer to a Null-terminated Unicode string. > - > - @retval NULL The variable could not be retrieved. > - @retval NULL There are not enough resources available for the variab= le contents. > - @retval Other A pointer to allocated buffer containing the variable c= ontents. > - > -**/ > -VOID * > -EFIAPI > -GetEfiGlobalVariable ( > - IN CONST CHAR16 *Name > - ) > -{ > - return GetVariable (Name, &gEfiGlobalVariableGuid); > -} > -#endif >=20 > /** > Returns the status whether get the variable success. The function retr= ieves > diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/Ba= seLib.h > index 8e7b87cbda4e..b92a1a3a4028 100644 > --- a/MdePkg/Include/Library/BaseLib.h > +++ b/MdePkg/Include/Library/BaseLib.h > @@ -962,82 +962,6 @@ AsciiStrHexToUint64S ( > ); >=20 >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Copies one Null-terminated Unicode string to another Null-terminated U= nicode > - string and returns the new Unicode string. > - > - This function copies the contents of the Unicode string Source to the = Unicode > - string Destination, and returns Destination. If Source and Destination > - overlap, then the results are undefined. > - > - If Destination is NULL, then ASSERT(). > - If Destination is not aligned on a 16-bit boundary, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source is not aligned on a 16-bit boundary, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Source contains more= than > - PcdMaximumUnicodeStringLength Unicode characters not including the > - Null-terminator, then ASSERT(). > - > - @param Destination The pointer to a Null-terminated Unicode string. > - @param Source The pointer to a Null-terminated Unicode string. > - > - @return Destination. > - > -**/ > -CHAR16 * > -EFIAPI > -StrCpy ( > - OUT CHAR16 *Destination, > - IN CONST CHAR16 *Source > - ); > - > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Copies up to a specified length from one Null-terminated Unicode strin= g to > - another Null-terminated Unicode string and returns the new Unicode str= ing. > - > - This function copies the contents of the Unicode string Source to the = Unicode > - string Destination, and returns Destination. At most, Length Unicode > - characters are copied from Source to Destination. If Length is 0, then > - Destination is returned unmodified. If Length is greater that the numb= er of > - Unicode characters in Source, then Destination is padded with Null Uni= code > - characters. If Source and Destination overlap, then the results are > - undefined. > - > - If Length > 0 and Destination is NULL, then ASSERT(). > - If Length > 0 and Destination is not aligned on a 16-bit boundary, the= n ASSERT(). > - If Length > 0 and Source is NULL, then ASSERT(). > - If Length > 0 and Source is not aligned on a 16-bit boundary, then ASS= ERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Length is greater th= an > - PcdMaximumUnicodeStringLength, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Source contains more= than > - PcdMaximumUnicodeStringLength Unicode characters, not including the Nu= ll-terminator, > - then ASSERT(). > - > - @param Destination The pointer to a Null-terminated Unicode string. > - @param Source The pointer to a Null-terminated Unicode string. > - @param Length The maximum number of Unicode characters to copy. > - > - @return Destination. > - > -**/ > -CHAR16 * > -EFIAPI > -StrnCpy ( > - OUT CHAR16 *Destination, > - IN CONST CHAR16 *Source, > - IN UINTN Length > - ); > -#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES) > - > /** > Returns the length of a Null-terminated Unicode string. >=20 > @@ -1164,99 +1088,6 @@ StrnCmp ( > ); >=20 >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Concatenates one Null-terminated Unicode string to another Null-termin= ated > - Unicode string, and returns the concatenated Unicode string. > - > - This function concatenates two Null-terminated Unicode strings. The co= ntents > - of Null-terminated Unicode string Source are concatenated to the end o= f > - Null-terminated Unicode string Destination. The Null-terminated concat= enated > - Unicode String is returned. If Source and Destination overlap, then th= e > - results are undefined. > - > - If Destination is NULL, then ASSERT(). > - If Destination is not aligned on a 16-bit boundary, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source is not aligned on a 16-bit boundary, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Destination contains= more > - than PcdMaximumUnicodeStringLength Unicode characters, not including t= he > - Null-terminator, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Source contains more= than > - PcdMaximumUnicodeStringLength Unicode characters, not including the > - Null-terminator, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and concatenating Destin= ation > - and Source results in a Unicode string with more than > - PcdMaximumUnicodeStringLength Unicode characters, not including the > - Null-terminator, then ASSERT(). > - > - @param Destination The pointer to a Null-terminated Unicode string. > - @param Source The pointer to a Null-terminated Unicode string. > - > - @return Destination. > - > -**/ > -CHAR16 * > -EFIAPI > -StrCat ( > - IN OUT CHAR16 *Destination, > - IN CONST CHAR16 *Source > - ); > - > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Concatenates up to a specified length one Null-terminated Unicode to t= he end > - of another Null-terminated Unicode string, and returns the concatenate= d > - Unicode string. > - > - This function concatenates two Null-terminated Unicode strings. The co= ntents > - of Null-terminated Unicode string Source are concatenated to the end o= f > - Null-terminated Unicode string Destination, and Destination is returne= d. At > - most, Length Unicode characters are concatenated from Source to the en= d of > - Destination, and Destination is always Null-terminated. If Length is 0= , then > - Destination is returned unmodified. If Source and Destination overlap,= then > - the results are undefined. > - > - If Destination is NULL, then ASSERT(). > - If Length > 0 and Destination is not aligned on a 16-bit boundary, the= n ASSERT(). > - If Length > 0 and Source is NULL, then ASSERT(). > - If Length > 0 and Source is not aligned on a 16-bit boundary, then ASS= ERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Length is greater th= an > - PcdMaximumUnicodeStringLength, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Destination contains= more > - than PcdMaximumUnicodeStringLength Unicode characters, not including t= he > - Null-terminator, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Source contains more= than > - PcdMaximumUnicodeStringLength Unicode characters, not including the > - Null-terminator, then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and concatenating Destin= ation > - and Source results in a Unicode string with more than PcdMaximumUnicod= eStringLength > - Unicode characters, not including the Null-terminator, then ASSERT(). > - > - @param Destination The pointer to a Null-terminated Unicode string. > - @param Source The pointer to a Null-terminated Unicode string. > - @param Length The maximum number of Unicode characters to concat= enate from > - Source. > - > - @return Destination. > - > -**/ > -CHAR16 * > -EFIAPI > -StrnCat ( > - IN OUT CHAR16 *Destination, > - IN CONST CHAR16 *Source, > - IN UINTN Length > - ); > -#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES) > - > /** > Returns the first occurrence of a Null-terminated Unicode sub-string > in a Null-terminated Unicode string. > @@ -1655,51 +1486,6 @@ StrHexToBytes ( > IN UINTN MaxBufferSize > ); >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Convert a Null-terminated Unicode string to a Null-terminated > - ASCII string and returns the ASCII string. > - > - This function converts the content of the Unicode string Source > - to the ASCII string Destination by copying the lower 8 bits of > - each Unicode character. It returns Destination. > - > - The caller is responsible to make sure Destination points to a buffer = with size > - equal or greater than ((StrLen (Source) + 1) * sizeof (CHAR8)) in byte= s. > - > - If any Unicode characters in Source contain non-zero value in > - the upper 8 bits, then ASSERT(). > - > - If Destination is NULL, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source is not aligned on a 16-bit boundary, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - > - If PcdMaximumUnicodeStringLength is not zero, and Source contains > - more than PcdMaximumUnicodeStringLength Unicode characters not includi= ng > - the Null-terminator, then ASSERT(). > - > - If PcdMaximumAsciiStringLength is not zero, and Source contains more > - than PcdMaximumAsciiStringLength Unicode characters not including the > - Null-terminator, then ASSERT(). > - > - @param Source The pointer to a Null-terminated Unicode string. > - @param Destination The pointer to a Null-terminated ASCII string. > - > - @return Destination. > - > -**/ > -CHAR8 * > -EFIAPI > -UnicodeStrToAsciiStr ( > - IN CONST CHAR16 *Source, > - OUT CHAR8 *Destination > - ); > - > -#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES) >=20 > /** > Convert a Null-terminated Unicode string to a Null-terminated > @@ -1802,76 +1588,6 @@ UnicodeStrnToAsciiStrS ( > OUT UINTN *DestinationLength > ); >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Copies one Null-terminated ASCII string to another Null-terminated ASC= II > - string and returns the new ASCII string. > - > - This function copies the contents of the ASCII string Source to the AS= CII > - string Destination, and returns Destination. If Source and Destination > - overlap, then the results are undefined. > - > - If Destination is NULL, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero and Source contains more th= an > - PcdMaximumAsciiStringLength ASCII characters not including the Null-te= rminator, > - then ASSERT(). > - > - @param Destination The pointer to a Null-terminated ASCII string. > - @param Source The pointer to a Null-terminated ASCII string. > - > - @return Destination > - > -**/ > -CHAR8 * > -EFIAPI > -AsciiStrCpy ( > - OUT CHAR8 *Destination, > - IN CONST CHAR8 *Source > - ); > - > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Copies up to a specified length one Null-terminated ASCII string to an= other > - Null-terminated ASCII string and returns the new ASCII string. > - > - This function copies the contents of the ASCII string Source to the AS= CII > - string Destination, and returns Destination. At most, Length ASCII cha= racters > - are copied from Source to Destination. If Length is 0, then Destinatio= n is > - returned unmodified. If Length is greater that the number of ASCII cha= racters > - in Source, then Destination is padded with Null ASCII characters. If S= ource > - and Destination overlap, then the results are undefined. > - > - If Destination is NULL, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Length is greater than > - PcdMaximumAsciiStringLength, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Source contains more t= han > - PcdMaximumAsciiStringLength ASCII characters, not including the Null-t= erminator, > - then ASSERT(). > - > - @param Destination The pointer to a Null-terminated ASCII string. > - @param Source The pointer to a Null-terminated ASCII string. > - @param Length The maximum number of ASCII characters to copy. > - > - @return Destination > - > -**/ > -CHAR8 * > -EFIAPI > -AsciiStrnCpy ( > - OUT CHAR8 *Destination, > - IN CONST CHAR8 *Source, > - IN UINTN Length > - ); > -#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES) >=20 > /** > Returns the length of a Null-terminated ASCII string. > @@ -2031,92 +1747,6 @@ AsciiStrnCmp ( > ); >=20 >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Concatenates one Null-terminated ASCII string to another Null-terminat= ed > - ASCII string, and returns the concatenated ASCII string. > - > - This function concatenates two Null-terminated ASCII strings. The cont= ents of > - Null-terminated ASCII string Source are concatenated to the end of Nul= l- > - terminated ASCII string Destination. The Null-terminated concatenated = ASCII > - String is returned. > - > - If Destination is NULL, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero and Destination contains mo= re than > - PcdMaximumAsciiStringLength ASCII characters not including the Null-te= rminator, > - then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero and Source contains more th= an > - PcdMaximumAsciiStringLength ASCII characters not including the Null-te= rminator, > - then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero and concatenating Destinati= on and > - Source results in a ASCII string with more than PcdMaximumAsciiStringL= ength > - ASCII characters, then ASSERT(). > - > - @param Destination The pointer to a Null-terminated ASCII string. > - @param Source The pointer to a Null-terminated ASCII string. > - > - @return Destination > - > -**/ > -CHAR8 * > -EFIAPI > -AsciiStrCat ( > - IN OUT CHAR8 *Destination, > - IN CONST CHAR8 *Source > - ); > - > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Concatenates up to a specified length one Null-terminated ASCII string= to > - the end of another Null-terminated ASCII string, and returns the > - concatenated ASCII string. > - > - This function concatenates two Null-terminated ASCII strings. The cont= ents > - of Null-terminated ASCII string Source are concatenated to the end of = Null- > - terminated ASCII string Destination, and Destination is returned. At m= ost, > - Length ASCII characters are concatenated from Source to the end of > - Destination, and Destination is always Null-terminated. If Length is 0= , then > - Destination is returned unmodified. If Source and Destination overlap,= then > - the results are undefined. > - > - If Length > 0 and Destination is NULL, then ASSERT(). > - If Length > 0 and Source is NULL, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Length is greater than > - PcdMaximumAsciiStringLength, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Destination contains m= ore than > - PcdMaximumAsciiStringLength ASCII characters, not including the Null-t= erminator, > - then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Source contains more t= han > - PcdMaximumAsciiStringLength ASCII characters, not including the Null-t= erminator, > - then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and concatenating Destinat= ion and > - Source results in a ASCII string with more than PcdMaximumAsciiStringL= ength > - ASCII characters, not including the Null-terminator, then ASSERT(). > - > - @param Destination The pointer to a Null-terminated ASCII string. > - @param Source The pointer to a Null-terminated ASCII string. > - @param Length The maximum number of ASCII characters to concaten= ate from > - Source. > - > - @return Destination > - > -**/ > -CHAR8 * > -EFIAPI > -AsciiStrnCat ( > - IN OUT CHAR8 *Destination, > - IN CONST CHAR8 *Source, > - IN UINTN Length > - ); > -#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES) > - > /** > Returns the first occurrence of a Null-terminated ASCII sub-string > in a Null-terminated ASCII string. > @@ -2496,45 +2126,6 @@ AsciiStrHexToBytes ( > IN UINTN MaxBufferSize > ); >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Convert one Null-terminated ASCII string to a Null-terminated > - Unicode string and returns the Unicode string. > - > - This function converts the contents of the ASCII string Source to the = Unicode > - string Destination, and returns Destination. The function terminates = the > - Unicode string Destination by appending a Null-terminator character at= the end. > - The caller is responsible to make sure Destination points to a buffer = with size > - equal or greater than ((AsciiStrLen (Source) + 1) * sizeof (CHAR16)) i= n bytes. > - > - If Destination is NULL, then ASSERT(). > - If Destination is not aligned on a 16-bit boundary, then ASSERT(). > - If Source is NULL, then ASSERT(). > - If Source and Destination overlap, then ASSERT(). > - If PcdMaximumAsciiStringLength is not zero, and Source contains more t= han > - PcdMaximumAsciiStringLength ASCII characters not including the Null-te= rminator, > - then ASSERT(). > - If PcdMaximumUnicodeStringLength is not zero, and Source contains more= than > - PcdMaximumUnicodeStringLength ASCII characters not including the > - Null-terminator, then ASSERT(). > - > - @param Source The pointer to a Null-terminated ASCII string. > - @param Destination The pointer to a Null-terminated Unicode string. > - > - @return Destination. > - > -**/ > -CHAR16 * > -EFIAPI > -AsciiStrToUnicodeStr ( > - IN CONST CHAR8 *Source, > - OUT CHAR16 *Destination > - ); > - > -#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES) >=20 > /** > Convert one Null-terminated ASCII string to a Null-terminated > diff --git a/MdePkg/Include/Library/PcdLib.h b/MdePkg/Include/Library/Pcd= Lib.h > index f09053e3cb86..71738857ad19 100644 > --- a/MdePkg/Include/Library/PcdLib.h > +++ b/MdePkg/Include/Library/PcdLib.h > @@ -481,106 +481,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > **/ > #define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenE= x(Guid,TokenName)) >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > -/** > - Sets an 8-bit PCD token value based on a token name. > - > - Sets the 8-bit value for the token specified by TokenName. Value is re= turned. > - If TokenName is not a valid token in the token space, then the module = will not build. > - > - @param TokenName The name of the PCD token to retrieve a current va= lue for. > - @param Value The 8-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -#define PcdSet8(TokenName, Value) _PCD_SET_MODE_8_##TokenName = ((Value)) > - > - > -/** > - Sets a 16-bit PCD token value based on a token name. > - > - Sets the 16-bit value for the token specified by TokenName. Value is r= eturned. > - If TokenName is not a valid token in the token space, then the module = will not build. > - > - @param TokenName The name of the PCD token to retrieve a current va= lue for. > - @param Value The 16-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -#define PcdSet16(TokenName, Value) _PCD_SET_MODE_16_##TokenName= ((Value)) > - > - > -/** > - Sets a 32-bit PCD token value based on a token name. > - > - Sets the 32-bit value for the token specified by TokenName. Value is r= eturned. > - If TokenName is not a valid token in the token space, then the module = will not build. > - > - @param TokenName The name of the PCD token to retrieve a current va= lue for. > - @param Value The 32-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -#define PcdSet32(TokenName, Value) _PCD_SET_MODE_32_##TokenName= ((Value)) > - > - > -/** > - Sets a 64-bit PCD token value based on a token name. > - > - Sets the 64-bit value for the token specified by TokenName. Value is r= eturned. > - If TokenName is not a valid token in the token space, then the module = will not build. > - > - @param TokenName The name of the PCD token to retrieve a current va= lue for. > - @param Value The 64-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -#define PcdSet64(TokenName, Value) _PCD_SET_MODE_64_##TokenName= ((Value)) > - > - > -/** > - Sets a pointer to a PCD token buffer based on a token name. > - > - Sets the buffer for the token specified by TokenName. Buffer is return= ed. > - If SizeOfBuffer is greater than the maximum size supported by TokenNam= e, > - then set SizeOfBuffer to the maximum size supported by TokenName and r= eturn NULL > - to indicate that the set operation was not actually performed. If Siz= eOfBuffer > - is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum si= ze supported > - by TokenName and NULL must be returned. > - If TokenName is not a valid token in the token space, then the module = will not build. > - > - If SizeOfBuffer is NULL, then ASSERT(). > - If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). > - > - @param TokenName The name of the PCD token to set the current v= alue for. > - @param SizeOfBuffer A pointer to the size, in bytes, of Buffer. > - @param Buffer A pointer to the buffer to set. > - > - @return Return the pointer to the Buffer that was set. > - > -**/ > -#define PcdSetPtr(TokenName, SizeOfBuffer, Buffer) \ > - _PCD_SET_MODE_PTR_##TokenNam= e ((SizeOfBuffer), (Buffer)) > - > -/** > - Sets a Boolean PCD token value based on a token name. > - > - Sets the Boolean value for the token specified by TokenName. Value is = returned. > - If TokenName is not a valid token in the token space, then the module = will not build. > - > - @param TokenName The name of the PCD token to set the current v= alue for. > - @param Buffer The Boolean value to set. > - > - @return Return the Value that was set. > - > -**/ > -#define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenNa= me ((Value)) > -#endif > - > /** > Sets a 8-bit PCD token value based on a token name. >=20 > @@ -806,137 +706,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent >=20 >=20 >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > -/** > - Sets an 8-bit PCD token value based on a GUID and a token name. > - > - Sets the 8-bit value for the token specified by Guid and TokenName. Va= lue is returned. > - If TokenName is not a valid token in the token space specified by Guid= , > - then the module will not build. > - > - If Guid is NULL, then ASSERT(). > - > - @param Guid Pointer to a 128-bit unique value that designates > - which namespace to retrieve a value from. > - @param TokenName The name of the PCD token to set the current valu= e for. > - @param Value The 8-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -#define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), PcdT= okenEx(Guid,TokenName), (Value)) > - > - > -/** > - Sets a 16-bit PCD token value based on a GUID and a token name. > - > - Sets the 16-bit value for the token specified by Guid and TokenName. V= alue is returned. > - If TokenName is not a valid token in the token space specified by Guid= , > - then the module will not build. > - > - If Guid is NULL, then ASSERT(). > - > - @param Guid Pointer to a 128-bit unique value that designates > - which namespace to retrieve a value from. > - @param TokenName The name of the PCD token to set the current valu= e for. > - @param Value The 16-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -#define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), PcdT= okenEx(Guid,TokenName), (Value)) > - > - > -/** > - Sets a 32-bit PCD token value based on a GUID and a token name. > - > - Sets the 32-bit value for the token specified by Guid and TokenName. V= alue is returned. > - If TokenName is not a valid token in the token space specified by Guid= , > - then the module will not build. > - > - If Guid is NULL, then ASSERT(). > - > - @param Guid Pointer to a 128-bit unique value that designates > - which namespace to retrieve a value from. > - @param TokenName The name of the PCD token to set the current valu= e for. > - @param Value The 32-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -#define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), PcdT= okenEx(Guid,TokenName), (Value)) > - > - > -/** > - Sets a 64-bit PCD token value based on a GUID and a token name. > - > - Sets the 64-bit value for the token specified by Guid and TokenName. V= alue is returned. > - If TokenName is not a valid token in the token space specified by Guid= , > - then the module will not build. > - > - If Guid is NULL, then ASSERT(). > - > - @param Guid Pointer to a 128-bit unique value that designates > - which namespace to retrieve a value from. > - @param TokenName The name of the PCD token to set the current valu= e for. > - @param Value The 64-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -#define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), PcdT= okenEx(Guid,TokenName), (Value)) > - > - > -/** > - Sets a pointer to a PCD token buffer based on a GUID and a token name. > - > - Sets the buffer for the token specified by Guid and TokenName. Buffer = is returned. > - If SizeOfBuffer is greater than the maximum size supported by Guid and= TokenName, > - then set SizeOfBuffer to the maximum size supported by Guid and TokenN= ame and return > - NULL to indicate that the set operation was not actually performed. If= SizeOfBuffer > - is set to MAX_ADDRESS, then SizeOfBuffer must be set to the maximum si= ze supported by > - Guid and TokenName and NULL must be returned. > - If TokenName is not a valid token in the token space specified by Guid= , > - then the module will not build. > - > - If Guid is NULL, then ASSERT(). > - If SizeOfBuffer is NULL, then ASSERT(). > - If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). > - > - @param Guid Pointer to a 128-bit unique value that designa= tes > - which namespace to retrieve a value from. > - @param TokenName The name of the PCD token to set the current v= alue for. > - @param SizeOfBuffer A pointer to the size, in bytes, of Buffer. > - @param Buffer Pointer to the buffer to set. > - > - @return Return the pointer to the Buffer that was set. > - > -**/ > -#define PcdSetExPtr(Guid, TokenName, SizeOfBuffer, Buffer) \ > - LibPcdSetExPtr ((Guid), PcdT= okenEx(Guid,TokenName), (SizeOfBuffer), (Buffer)) > - > - > -/** > - Sets a Boolean PCD token value based on a GUID and a token name. > - > - Sets the Boolean value for the token specified by Guid and TokenName. = Value is returned. > - If TokenName is not a valid token in the token space specified by Guid= , > - then the module will not build. > - > - If Guid is NULL, then ASSERT(). > - > - @param Guid Pointer to a 128-bit unique value that designa= tes > - which namespace to retrieve a value from. > - @param TokenName The name of the PCD token to set the current v= alue for. > - @param Value The Boolean value to set. > - > - @return Return the Value that was set. > - > -**/ > -#define PcdSetExBool(Guid, TokenName, Value) \ > - LibPcdSetExBool((Guid), PcdT= okenEx(Guid,TokenName), (Value)) > -#endif > - > /** > Sets an 8-bit PCD token value based on a GUID and a token name. >=20 > @@ -1348,295 +1117,6 @@ LibPcdGetExSize ( > ); >=20 >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 8-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 8-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -UINT8 > -EFIAPI > -LibPcdSet8 ( > - IN UINTN TokenNumber, > - IN UINT8 Value > - ); > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 16-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 16-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -UINT16 > -EFIAPI > -LibPcdSet16 ( > - IN UINTN TokenNumber, > - IN UINT16 Value > - ); > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 32-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 32-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -UINT32 > -EFIAPI > -LibPcdSet32 ( > - IN UINTN TokenNumber, > - IN UINT32 Value > - ); > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 64-bit value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 64-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -UINT64 > -EFIAPI > -LibPcdSet64 ( > - IN UINTN TokenNumber, > - IN UINT64 Value > - ); > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets a buffer for the token specified by TokenNumber to the value > - specified by Buffer and SizeOfBuffer. Buffer is returned. > - If SizeOfBuffer is greater than the maximum size support by TokenNumbe= r, > - then set SizeOfBuffer to the maximum size supported by TokenNumber and > - return NULL to indicate that the set operation was not actually perfor= med. > - > - If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set t= o the > - maximum size supported by TokenName and NULL must be returned. > - > - If SizeOfBuffer is NULL, then ASSERT(). > - If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). > - > - @param[in] TokenNumber The PCD token number to set a current va= lue for. > - @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. > - @param[in] Buffer A pointer to the buffer to set. > - > - @return Return the pointer for the Buffer that was set. > - > -**/ > -VOID * > -EFIAPI > -LibPcdSetPtr ( > - IN UINTN TokenNumber, > - IN OUT UINTN *SizeOfBuffer, > - IN CONST VOID *Buffer > - ); > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the Boolean value for the token specified by TokenNumber > - to the value specified by Value. Value is returned. > - > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The boolean value to set. > - > - @return Return the Value that was set. > - > -**/ > -BOOLEAN > -EFIAPI > -LibPcdSetBool ( > - IN UINTN TokenNumber, > - IN BOOLEAN Value > - ); > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 8-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid Pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 8-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -UINT8 > -EFIAPI > -LibPcdSetEx8 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT8 Value > - ); > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 16-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid Pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 16-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -UINT16 > -EFIAPI > -LibPcdSetEx16 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT16 Value > - ); > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 32-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid Pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 32-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -UINT32 > -EFIAPI > -LibPcdSetEx32 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT32 Value > - ); > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the 64-bit value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid Pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The 64-bit value to set. > - > - @return Return the Value that was set. > - > -**/ > -UINT64 > -EFIAPI > -LibPcdSetEx64 ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN UINT64 Value > - ); > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets a buffer for the token specified by TokenNumber to the value spec= ified by > - Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is grea= ter than > - the maximum size support by TokenNumber, then set SizeOfBuffer to the = maximum size > - supported by TokenNumber and return NULL to indicate that the set oper= ation > - was not actually performed. > - > - If Guid is NULL, then ASSERT(). > - If SizeOfBuffer is NULL, then ASSERT(). > - If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). > - > - @param[in] Guid Pointer to a 128-bit unique value that > - designates which namespace to set a valu= e from. > - @param[in] TokenNumber The PCD token number to set a current va= lue for. > - @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. > - @param[in] Buffer A pointer to the buffer to set. > - > - @return Return the pointer to the Buffer that was set. > - > -**/ > -VOID * > -EFIAPI > -LibPcdSetExPtr ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN OUT UINTN *SizeOfBuffer, > - IN VOID *Buffer > - ); > - > - > -/** > - This function provides a means by which to set a value for a given PCD= token. > - > - Sets the Boolean value for the token specified by TokenNumber and > - Guid to the value specified by Value. Value is returned. > - > - If Guid is NULL, then ASSERT(). > - > - @param[in] Guid Pointer to a 128-bit unique value that > - designates which namespace to set a value fr= om. > - @param[in] TokenNumber The PCD token number to set a current value = for. > - @param[in] Value The Boolean value to set. > - > - @return Return the Value that was set. > - > -**/ > -BOOLEAN > -EFIAPI > -LibPcdSetExBool ( > - IN CONST GUID *Guid, > - IN UINTN TokenNumber, > - IN BOOLEAN Value > - ); > -#endif > - > /** > This function provides a means by which to set a value for a given PCD= token. >=20 > diff --git a/MdePkg/Include/Library/PrintLib.h b/MdePkg/Include/Library/P= rintLib.h > index dfbcd1b340be..0b38da6084e1 100644 > --- a/MdePkg/Include/Library/PrintLib.h > +++ b/MdePkg/Include/Library/PrintLib.h > @@ -485,62 +485,6 @@ UnicodeSPrintAsciiFormat ( > ... > ); >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Converts a decimal value to a Null-terminated Unicode string. > - > - Converts the decimal number specified by Value to a Null-terminated Un= icode > - string specified by Buffer containing at most Width characters. No pad= ding of spaces > - is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACT= ERS is assumed. > - The number of Unicode characters in Buffer is returned, not including = the Null-terminator. > - If the conversion contains more than Width characters, then only the f= irst > - Width characters are returned, and the total number of characters > - required to perform the conversion is returned. > - Additional conversion parameters are specified in Flags. > - > - The Flags bit LEFT_JUSTIFY is always ignored. > - All conversions are left justified in Buffer. > - If Width is 0, PREFIX_ZERO is ignored in Flags. > - If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, a= nd commas > - are inserted every 3rd digit starting from the right. > - If RADIX_HEX is set in Flags, then the output buffer will be > - formatted in hexadecimal format. > - If Value is < 0 and RADIX_HEX is not set in Flags, then the fist chara= cter in Buffer is a '-'. > - If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, > - then Buffer is padded with '0' characters so the combination of the op= tional '-' > - sign character, '0' characters, digit characters for Value, and the Nu= ll-terminator > - add up to Width characters. > - If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT(). > - If Buffer is NULL, then ASSERT(). > - If Buffer is not aligned on a 16-bit boundary, then ASSERT(). > - If unsupported bits are set in Flags, then ASSERT(). > - If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT(). > - If Width >=3D MAXIMUM_VALUE_CHARACTERS, then ASSERT() > - > - @param Buffer The pointer to the output buffer for the produced Null= -terminated > - Unicode string. > - @param Flags The bitmask of flags that specify left justification, = zero pad, and commas. > - @param Value The 64-bit signed value to convert to a string. > - @param Width The maximum number of Unicode characters to place in B= uffer, not including > - the Null-terminator. > - > - @return The number of Unicode characters in Buffer, not including the = Null-terminator. > - > -**/ > -UINTN > -EFIAPI > -UnicodeValueToString ( > - IN OUT CHAR16 *Buffer, > - IN UINTN Flags, > - IN INT64 Value, > - IN UINTN Width > - ); > - > -#endif > - > /** > Converts a decimal value to a Null-terminated Unicode string. >=20 > @@ -882,60 +826,6 @@ AsciiSPrintUnicodeFormat ( > ... > ); >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function is deprecated for security reason. > - > - Converts a decimal value to a Null-terminated ASCII string. > - > - Converts the decimal number specified by Value to a Null-terminated AS= CII string > - specified by Buffer containing at most Width characters. No padding of= spaces > - is ever performed. > - If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed. > - The number of ASCII characters in Buffer is returned, not including th= e Null-terminator. > - If the conversion contains more than Width characters, then only the f= irst Width > - characters are returned, and the total number of characters required t= o perform > - the conversion is returned. > - Additional conversion parameters are specified in Flags. > - The Flags bit LEFT_JUSTIFY is always ignored. > - All conversions are left justified in Buffer. > - If Width is 0, PREFIX_ZERO is ignored in Flags. > - If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, a= nd commas > - are inserted every 3rd digit starting from the right. > - If RADIX_HEX is set in Flags, then the output buffer will be > - formatted in hexadecimal format. > - If Value is < 0 and RADIX_HEX is not set in Flags, then the fist chara= cter in Buffer is a '-'. > - If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, > - then Buffer is padded with '0' characters so the combination of the op= tional '-' > - sign character, '0' characters, digit characters for Value, and the Nu= ll-terminator > - add up to Width characters. > - > - If Buffer is NULL, then ASSERT(). > - If unsupported bits are set in Flags, then ASSERT(). > - If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT(). > - If Width >=3D MAXIMUM_VALUE_CHARACTERS, then ASSERT() > - > - @param Buffer A pointer to the output buffer for the produced Null-t= erminated > - ASCII string. > - @param Flags The bitmask of flags that specify left justification, = zero pad, and commas. > - @param Value The 64-bit signed value to convert to a string. > - @param Width The maximum number of ASCII characters to place in Buf= fer, not including > - the Null-terminator. > - > - @return The number of ASCII characters in Buffer, not including the Nu= ll-terminator. > - > -**/ > -UINTN > -EFIAPI > -AsciiValueToString ( > - OUT CHAR8 *Buffer, > - IN UINTN Flags, > - IN INT64 Value, > - IN UINTN Width > - ); > - > -#endif >=20 > /** > Converts a decimal value to a Null-terminated Ascii string. > diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/Ue= fiLib.h > index 0abb40d6ecbd..f56ffde1230e 100644 > --- a/MdePkg/Include/Library/UefiLib.h > +++ b/MdePkg/Include/Library/UefiLib.h > @@ -680,59 +680,6 @@ FreeUnicodeStringTable ( > IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable > ); >=20 > -#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Returns a pointer to an allocated buffer that contains the contents of= a > - variable retrieved through the UEFI Runtime Service GetVariable(). Th= e > - returned buffer is allocated using AllocatePool(). The caller is resp= onsible > - for freeing this buffer with FreePool(). > - > - If Name is NULL, then ASSERT(). > - If Guid is NULL, then ASSERT(). > - > - @param[in] Name The pointer to a Null-terminated Unicode string. > - @param[in] Guid The pointer to an EFI_GUID structure. > - > - @retval NULL The variable could not be retrieved. > - @retval NULL There are not enough resources available for the variab= le contents. > - @retval Other A pointer to allocated buffer containing the variable c= ontents. > - > -**/ > -VOID * > -EFIAPI > -GetVariable ( > - IN CONST CHAR16 *Name, > - IN CONST EFI_GUID *Guid > - ); > - > -/** > - [ATTENTION] This function will be deprecated for security reason. > - > - Returns a pointer to an allocated buffer that contains the contents of= a > - variable retrieved through the UEFI Runtime Service GetVariable(). Th= is > - function always uses the EFI_GLOBAL_VARIABLE GUID to retrieve variable= s. > - The returned buffer is allocated using AllocatePool(). The caller is > - responsible for freeing this buffer with FreePool(). > - > - If Name is NULL, then ASSERT(). > - > - @param[in] Name The pointer to a Null-terminated Unicode string. > - > - @retval NULL The variable could not be retrieved. > - @retval NULL There are not enough resources available for the variab= le contents. > - @retval Other A pointer to allocated buffer containing the variable c= ontents. > - > -**/ > -VOID * > -EFIAPI > -GetEfiGlobalVariable ( > - IN CONST CHAR16 *Name > - ); > -#endif > - >=20 > /** > Returns the status whether get the variable success. The function retr= ieves > diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc > index 6cd38e7ec3c9..0477e0205188 100644 > --- a/MdePkg/MdePkg.dsc > +++ b/MdePkg/MdePkg.dsc > @@ -172,4 +172,3 @@ [Components.ARM, Components.AARCH64] > MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf >=20 > [BuildOptions] > - *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES > -- > 2.18.0.windows.1