* [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
@ 2020-08-05 6:08 Zhang, Shenglei
2020-08-05 6:08 ` [PATCH 1/2] MdePkg: " Zhang, Shenglei
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Zhang, Shenglei @ 2020-08-05 6:08 UTC (permalink / raw)
To: devel; +Cc: Jian J Wang, Hao A Wu, Michael D Kinney, Liming Gao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2777
Code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES is deprecated.
So remove it from MdePkg and MdeModulePkg.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Shenglei Zhang (2):
MdePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
MdeModulePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
.../DxePrintLibPrint2Protocol/PrintLib.c | 145 ----
MdeModulePkg/Universal/PrintDxe/Print.c | 37 +-
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 ---
MdeModulePkg/MdeModulePkg.dsc | 1 -
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 -
14 files changed, 6 insertions(+), 3263 deletions(-)
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] MdePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
2020-08-05 6:08 [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES Zhang, Shenglei
@ 2020-08-05 6:08 ` Zhang, Shenglei
2020-08-05 6:08 ` [PATCH 2/2] MdeModulePkg: " Zhang, Shenglei
2020-08-14 2:09 ` [PATCH 0/2] " Liming Gao
2 siblings, 0 replies; 7+ messages in thread
From: Zhang, Shenglei @ 2020-08-05 6:08 UTC (permalink / raw)
To: devel; +Cc: Michael D Kinney, Liming Gao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2777
Code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES is deprecated.
So remove it.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
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(-)
diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c
index 45198373f25c..f4854f357e3a 100644
--- a/MdePkg/Library/BaseLib/String.c
+++ b/MdePkg/Library/BaseLib/String.c
@@ -8,135 +8,6 @@
#include "BaseLibInternals.h"
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function will be deprecated for security reason.
-
- Copies one Null-terminated Unicode string to another Null-terminated Unicode
- 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 != NULL);
- ASSERT (((UINTN) Destination & BIT0) == 0);
-
- //
- // Destination and source cannot overlap
- //
- ASSERT ((UINTN)(Destination - Source) > StrLen (Source));
- ASSERT ((UINTN)(Source - Destination) > StrLen (Source));
-
- ReturnValue = Destination;
- while (*Source != 0) {
- *(Destination++) = *(Source++);
- }
- *Destination = 0;
- return ReturnValue;
-}
-
-/**
- [ATTENTION] This function will be deprecated for security reason.
-
- Copies up to a specified length from one Null-terminated Unicode string to
- another Null-terminated Unicode 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. 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 number of
- Unicode characters in Source, then Destination is padded with Null Unicode
- 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, then ASSERT().
- If Length > 0 and Source is NULL, then ASSERT().
- If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
- PcdMaximumUnicodeStringLength, 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.
- @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 == 0) {
- return Destination;
- }
-
- //
- // Destination cannot be NULL if Length is not zero
- //
- ASSERT (Destination != NULL);
- ASSERT (((UINTN) Destination & BIT0) == 0);
-
- //
- // Destination and source cannot overlap
- //
- ASSERT ((UINTN)(Destination - Source) > StrLen (Source));
- ASSERT ((UINTN)(Source - Destination) >= Length);
-
- if (PcdGet32 (PcdMaximumUnicodeStringLength) != 0) {
- ASSERT (Length <= PcdGet32 (PcdMaximumUnicodeStringLength));
- }
-
- ReturnValue = Destination;
-
- while ((*Source != L'\0') && (Length > 0)) {
- *(Destination++) = *(Source++);
- Length--;
- }
-
- ZeroMem (Destination, Length * sizeof (*Destination));
- return ReturnValue;
-}
-#endif
/**
Returns the length of a Null-terminated Unicode string.
@@ -320,121 +191,6 @@ StrnCmp (
return *FirstString - *SecondString;
}
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function will be deprecated for security reason.
-
- Concatenates one Null-terminated Unicode string to another Null-terminated
- Unicode string, and returns the concatenated Unicode string.
-
- This function concatenates two Null-terminated Unicode strings. The contents
- of Null-terminated Unicode string Source are concatenated to the end of
- Null-terminated Unicode string Destination. The Null-terminated concatenated
- Unicode String is returned. 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 Destination contains more
- than PcdMaximumUnicodeStringLength Unicode characters, not including the
- 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 Destination
- 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) != 0);
- return Destination;
-}
-
-/**
- [ATTENTION] This function will be deprecated for security reason.
-
- Concatenates up to a specified length one Null-terminated Unicode to the end
- of another Null-terminated Unicode string, and returns the concatenated
- Unicode string.
-
- This function concatenates two Null-terminated Unicode strings. The contents
- of Null-terminated Unicode string Source are concatenated to the end of
- Null-terminated Unicode string Destination, and Destination is returned. At
- most, Length Unicode 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 Destination is NULL, then ASSERT().
- If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
- If Length > 0 and Source is NULL, then ASSERT().
- If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
- PcdMaximumUnicodeStringLength, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Destination contains more
- than PcdMaximumUnicodeStringLength Unicode characters, not including the
- 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 Destination
- 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.
- @param Length The maximum number of Unicode characters to concatenate from
- Source.
-
- @return Destination.
-
-**/
-CHAR16 *
-EFIAPI
-StrnCat (
- IN OUT CHAR16 *Destination,
- IN CONST CHAR16 *Source,
- IN UINTN Length
- )
-{
- UINTN DestinationLen;
-
- DestinationLen = StrLen (Destination);
- StrnCpy (Destination + DestinationLen, Source, Length);
- Destination[DestinationLen + Length] = L'\0';
-
- //
- // Size of the resulting string should never be zero.
- // PcdMaximumUnicodeStringLength is tested inside StrLen().
- //
- ASSERT (StrSize (Destination) != 0);
- return Destination;
-}
-#endif
/**
Returns the first occurrence of a Null-terminated Unicode sub-string
@@ -845,208 +601,6 @@ InternalAsciiIsHexaDecimalDigitCharacter (
(Char >= 'a' && Char <= 'f'));
}
-#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 bytes.
-
- 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 including
- 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 != NULL);
-
- //
- // ASSERT if Source is long than PcdMaximumUnicodeStringLength.
- // Length tests are performed inside StrLen().
- //
- ASSERT (StrSize (Source) != 0);
-
- //
- // Source and Destination should not overlap
- //
- ASSERT ((UINTN) (Destination - (CHAR8 *) Source) >= StrSize (Source));
- ASSERT ((UINTN) ((CHAR8 *) Source - Destination) > StrLen (Source));
-
-
- ReturnValue = Destination;
- while (*Source != '\0') {
- //
- // If any Unicode characters in Source contain
- // non-zero value in the upper 8 bits, then ASSERT().
- //
- ASSERT (*Source < 0x100);
- *(Destination++) = (CHAR8) *(Source++);
- }
-
- *Destination = '\0';
-
- //
- // ASSERT Original Destination is less long than PcdMaximumAsciiStringLength.
- // Length tests are performed inside AsciiStrLen().
- //
- ASSERT (AsciiStrSize (ReturnValue) != 0);
-
- return ReturnValue;
-}
-
-/**
- [ATTENTION] This function will be deprecated for security reason.
-
- Copies one Null-terminated ASCII string to another Null-terminated ASCII
- string and returns the new ASCII string.
-
- This function copies the contents of the ASCII string Source to the ASCII
- 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 than
- PcdMaximumAsciiStringLength 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.
-
- @return Destination
-
-**/
-CHAR8 *
-EFIAPI
-AsciiStrCpy (
- OUT CHAR8 *Destination,
- IN CONST CHAR8 *Source
- )
-{
- CHAR8 *ReturnValue;
-
- //
- // Destination cannot be NULL
- //
- ASSERT (Destination != NULL);
-
- //
- // Destination and source cannot overlap
- //
- ASSERT ((UINTN)(Destination - Source) > AsciiStrLen (Source));
- ASSERT ((UINTN)(Source - Destination) > AsciiStrLen (Source));
-
- ReturnValue = Destination;
- while (*Source != 0) {
- *(Destination++) = *(Source++);
- }
- *Destination = 0;
- return ReturnValue;
-}
-
-/**
- [ATTENTION] This function will be deprecated for security reason.
-
- Copies up to a specified length one Null-terminated ASCII string to another
- Null-terminated ASCII string and returns the new ASCII string.
-
- This function copies the contents of the ASCII string Source to the ASCII
- string Destination, and returns Destination. At most, Length ASCII characters
- are copied from Source to Destination. If Length is 0, then Destination is
- returned unmodified. If Length is greater that the number of ASCII characters
- in Source, then Destination is padded with Null ASCII characters. 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 Length is greater than
- PcdMaximumAsciiStringLength, then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and Source contains more than
- PcdMaximumAsciiStringLength 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 copy.
-
- @return Destination
-
-**/
-CHAR8 *
-EFIAPI
-AsciiStrnCpy (
- OUT CHAR8 *Destination,
- IN CONST CHAR8 *Source,
- IN UINTN Length
- )
-{
- CHAR8 *ReturnValue;
-
- if (Length == 0) {
- return Destination;
- }
-
- //
- // Destination cannot be NULL
- //
- ASSERT (Destination != NULL);
-
- //
- // Destination and source cannot overlap
- //
- ASSERT ((UINTN)(Destination - Source) > AsciiStrLen (Source));
- ASSERT ((UINTN)(Source - Destination) >= Length);
-
- if (PcdGet32 (PcdMaximumAsciiStringLength) != 0) {
- ASSERT (Length <= PcdGet32 (PcdMaximumAsciiStringLength));
- }
-
- ReturnValue = Destination;
-
- while (*Source != 0 && Length > 0) {
- *(Destination++) = *(Source++);
- Length--;
- }
-
- ZeroMem (Destination, Length * sizeof (*Destination));
- return ReturnValue;
-}
-#endif
/**
Returns the length of a Null-terminated ASCII string.
@@ -1329,114 +883,6 @@ AsciiStrnCmp (
return *FirstString - *SecondString;
}
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function will be deprecated for security reason.
-
- Concatenates one Null-terminated ASCII string to another Null-terminated
- ASCII string, and returns the concatenated ASCII string.
-
- This function concatenates two Null-terminated ASCII strings. The contents of
- Null-terminated ASCII string Source are concatenated to the end of Null-
- 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 more than
- PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero and Source contains more than
- PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero and concatenating Destination and
- Source results in a ASCII string with more than PcdMaximumAsciiStringLength
- 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) != 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 contents
- of Null-terminated ASCII string Source are concatenated to the end of Null-
- terminated ASCII string Destination, and Destination is returned. At most,
- 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 more than
- PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and Source contains more than
- PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and concatenating Destination and
- Source results in a ASCII string with more than PcdMaximumAsciiStringLength
- 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 concatenate from
- Source.
-
- @return Destination
-
-**/
-CHAR8 *
-EFIAPI
-AsciiStrnCat (
- IN OUT CHAR8 *Destination,
- IN CONST CHAR8 *Source,
- IN UINTN Length
- )
-{
- UINTN DestinationLen;
-
- DestinationLen = AsciiStrLen (Destination);
- AsciiStrnCpy (Destination + DestinationLen, Source, Length);
- Destination[DestinationLen + Length] = '\0';
-
- //
- // Size of the resulting string should never be zero.
- // PcdMaximumUnicodeStringLength is tested inside StrLen().
- //
- ASSERT (AsciiStrSize (Destination) != 0);
- return Destination;
-}
-#endif
/**
Returns the first occurrence of a Null-terminated ASCII sub-string
@@ -1684,78 +1130,6 @@ AsciiStrHexToUint64 (
return Result;
}
-#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)) in 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 than
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
- 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 != NULL);
-
- //
- // ASSERT Source is less long than PcdMaximumAsciiStringLength
- //
- ASSERT (AsciiStrSize (Source) != 0);
-
- //
- // Source and Destination should not overlap
- //
- ASSERT ((UINTN) ((CHAR8 *) Destination - Source) > AsciiStrLen (Source));
- ASSERT ((UINTN) (Source - (CHAR8 *) Destination) >= (AsciiStrSize (Source) * sizeof (CHAR16)));
-
-
- ReturnValue = Destination;
- while (*Source != '\0') {
- *(Destination++) = (CHAR16)(UINT8) *(Source++);
- }
- //
- // End the Destination with a NULL.
- //
- *Destination = '\0';
-
- //
- // ASSERT Original Destination is less long than PcdMaximumUnicodeStringLength
- //
- ASSERT (StrSize (ReturnValue) != 0);
-
- return ReturnValue;
-}
-
-#endif
STATIC CHAR8 EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
diff --git a/MdePkg/Library/BasePcdLibNull/PcdLib.c b/MdePkg/Library/BasePcdLibNull/PcdLib.c
index 49447880ae8b..265fae5d7368 100644
--- a/MdePkg/Library/BasePcdLibNull/PcdLib.c
+++ b/MdePkg/Library/BasePcdLibNull/PcdLib.c
@@ -386,367 +386,6 @@ LibPcdGetExSize (
}
-
-#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 TokenNumber,
- then set SizeOfBuffer to the maximum size supported by TokenNumber 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 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 value 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 from.
- @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 from.
- @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 from.
- @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 from.
- @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 specified by
- Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater 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 operation
- 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 that
- designates which namespace to set a value from.
- @param[in] TokenNumber The PCD token number to set a current value 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 from.
- @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.
diff --git a/MdePkg/Library/BasePrintLib/PrintLib.c b/MdePkg/Library/BasePrintLib/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;
}
-#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 Unicode
- 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 Unicode characters in Buffer is returned not including the Null-terminator.
- If the conversion contains more than Width characters, then only the first
- 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, and 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 character 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 optional '-'
- sign character, '0' characters, digit characters for Value, and the Null-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 >= 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 Buffer, 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
- )
-{
- ASSERT_UNICODE_BUFFER(Buffer);
- return BasePrintLibConvertValueToString ((CHAR8 *)Buffer, Flags, Value, Width, 2);
-}
-
-#endif
/**
Converts a decimal value to a Null-terminated Unicode string.
@@ -780,65 +721,6 @@ AsciiSPrintUnicodeFormat (
return NumberOfPrinted;
}
-
-#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 ASCII 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 first 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, and 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 character 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 optional '-'
- sign character, '0' characters, digit characters for Value, and the Null-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 >= 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 Buffer, not including
- the Null-terminator.
-
- @return The number of ASCII characters in Buffer not including the Null-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.
diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.c b/MdePkg/Library/DxePcdLib/DxePcdLib.c
index 6e3e4e70697f..2accaeda2cd6 100644
--- a/MdePkg/Library/DxePcdLib/DxePcdLib.c
+++ b/MdePkg/Library/DxePcdLib/DxePcdLib.c
@@ -474,405 +474,6 @@ LibPcdGetExSize (
}
-
-#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 TokenNumber,
- then set SizeOfBuffer to the maximum size supported by TokenNumber 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 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 value 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 != NULL);
-
- if (*SizeOfBuffer > 0) {
- ASSERT (Buffer != NULL);
- }
-
- InputSizeOfBuffer = *SizeOfBuffer;
- Status = 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 from.
- @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 != 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 from.
- @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 != 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 from.
- @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 != 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 from.
- @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 != 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 specified by
- Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater 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 operation
- 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 that
- designates which namespace to set a value from.
- @param[in] TokenNumber The PCD token number to set a current value 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 != NULL);
-
- ASSERT (SizeOfBuffer != NULL);
-
- if (*SizeOfBuffer > 0) {
- ASSERT (Buffer != NULL);
- }
-
- InputSizeOfBuffer = *SizeOfBuffer;
- Status = 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 from.
- @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 != 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.
diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
index 916a2c0844eb..d979b28cc8dd 100644
--- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
+++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c
@@ -474,403 +474,6 @@ LibPcdGetExSize (
}
-
-#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 TokenNumber,
- then set SizeOfBuffer to the maximum size supported by TokenNumber 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 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 value 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 != NULL);
-
- if (*SizeOfBuffer > 0) {
- ASSERT (Buffer != NULL);
- }
-
- InputSizeOfBuffer = *SizeOfBuffer;
- Status = (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 from.
- @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 != 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 from.
- @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 != 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 from.
- @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 != 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 from.
- @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 != 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 specified by
- Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater 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 operation
- 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 that
- designates which namespace to set a value from.
- @param[in] TokenNumber The PCD token number to set a current value 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 != NULL);
- if (*SizeOfBuffer > 0) {
- ASSERT (Buffer != NULL);
- }
- ASSERT (Guid != NULL);
-
- InputSizeOfBuffer = *SizeOfBuffer;
- Status = (GetPiPcdPpiPointer ())->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 from.
- @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 != 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.
diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.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;
}
-#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(). The
- returned buffer is allocated using AllocatePool(). The caller is responsible
- 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 variable contents.
- @retval Other A pointer to allocated buffer containing the variable contents.
-
-**/
-VOID *
-EFIAPI
-GetVariable (
- IN CONST CHAR16 *Name,
- IN CONST EFI_GUID *Guid
- )
-{
- EFI_STATUS Status;
- UINTN Size;
- VOID *Value;
-
- ASSERT (Name != NULL);
- ASSERT (Guid != NULL);
-
- //
- // Try to get the variable size.
- //
- Value = NULL;
- Size = 0;
- Status = gRT->GetVariable ((CHAR16 *) Name, (EFI_GUID *) Guid, NULL, &Size, Value);
- if (Status != EFI_BUFFER_TOO_SMALL) {
- return NULL;
- }
-
- //
- // Allocate buffer to get the variable.
- //
- Value = AllocatePool (Size);
- if (Value == NULL) {
- return NULL;
- }
-
- //
- // Get the variable data.
- //
- Status = 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(). This
- function always uses the EFI_GLOBAL_VARIABLE GUID to retrieve variables.
- 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 variable contents.
- @retval Other A pointer to allocated buffer containing the variable contents.
-
-**/
-VOID *
-EFIAPI
-GetEfiGlobalVariable (
- IN CONST CHAR16 *Name
- )
-{
- return GetVariable (Name, &gEfiGlobalVariableGuid);
-}
-#endif
/**
Returns the status whether get the variable success. The function retrieves
diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
index 8e7b87cbda4e..b92a1a3a4028 100644
--- a/MdePkg/Include/Library/BaseLib.h
+++ b/MdePkg/Include/Library/BaseLib.h
@@ -962,82 +962,6 @@ AsciiStrHexToUint64S (
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Copies one Null-terminated Unicode string to another Null-terminated Unicode
- 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 string to
- another Null-terminated Unicode 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. 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 number of
- Unicode characters in Source, then Destination is padded with Null Unicode
- 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, then ASSERT().
- If Length > 0 and Source is NULL, then ASSERT().
- If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
- PcdMaximumUnicodeStringLength, 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.
- @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.
@@ -1164,99 +1088,6 @@ StrnCmp (
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Concatenates one Null-terminated Unicode string to another Null-terminated
- Unicode string, and returns the concatenated Unicode string.
-
- This function concatenates two Null-terminated Unicode strings. The contents
- of Null-terminated Unicode string Source are concatenated to the end of
- Null-terminated Unicode string Destination. The Null-terminated concatenated
- Unicode String is returned. 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 Destination contains more
- than PcdMaximumUnicodeStringLength Unicode characters, not including the
- 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 Destination
- 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 the end
- of another Null-terminated Unicode string, and returns the concatenated
- Unicode string.
-
- This function concatenates two Null-terminated Unicode strings. The contents
- of Null-terminated Unicode string Source are concatenated to the end of
- Null-terminated Unicode string Destination, and Destination is returned. At
- most, Length Unicode 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 Destination is NULL, then ASSERT().
- If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
- If Length > 0 and Source is NULL, then ASSERT().
- If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
- If Source and Destination overlap, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
- PcdMaximumUnicodeStringLength, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and Destination contains more
- than PcdMaximumUnicodeStringLength Unicode characters, not including the
- 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 Destination
- 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.
- @param Length The maximum number of Unicode characters to concatenate 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
);
-#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 bytes.
-
- 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 including
- 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)
/**
Convert a Null-terminated Unicode string to a Null-terminated
@@ -1802,76 +1588,6 @@ UnicodeStrnToAsciiStrS (
OUT UINTN *DestinationLength
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Copies one Null-terminated ASCII string to another Null-terminated ASCII
- string and returns the new ASCII string.
-
- This function copies the contents of the ASCII string Source to the ASCII
- 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 than
- PcdMaximumAsciiStringLength 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.
-
- @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 another
- Null-terminated ASCII string and returns the new ASCII string.
-
- This function copies the contents of the ASCII string Source to the ASCII
- string Destination, and returns Destination. At most, Length ASCII characters
- are copied from Source to Destination. If Length is 0, then Destination is
- returned unmodified. If Length is greater that the number of ASCII characters
- in Source, then Destination is padded with Null ASCII characters. 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 Length is greater than
- PcdMaximumAsciiStringLength, then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and Source contains more than
- PcdMaximumAsciiStringLength 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 copy.
-
- @return Destination
-
-**/
-CHAR8 *
-EFIAPI
-AsciiStrnCpy (
- OUT CHAR8 *Destination,
- IN CONST CHAR8 *Source,
- IN UINTN Length
- );
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)
/**
Returns the length of a Null-terminated ASCII string.
@@ -2031,92 +1747,6 @@ AsciiStrnCmp (
);
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
-
-/**
- [ATTENTION] This function is deprecated for security reason.
-
- Concatenates one Null-terminated ASCII string to another Null-terminated
- ASCII string, and returns the concatenated ASCII string.
-
- This function concatenates two Null-terminated ASCII strings. The contents of
- Null-terminated ASCII string Source are concatenated to the end of Null-
- 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 more than
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero and Source contains more than
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero and concatenating Destination and
- Source results in a ASCII string with more than PcdMaximumAsciiStringLength
- 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 contents
- of Null-terminated ASCII string Source are concatenated to the end of Null-
- terminated ASCII string Destination, and Destination is returned. At most,
- 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 more than
- PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and Source contains more than
- PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
- then ASSERT().
- If PcdMaximumAsciiStringLength is not zero, and concatenating Destination and
- Source results in a ASCII string with more than PcdMaximumAsciiStringLength
- 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 concatenate 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
);
-#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)) in 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 than
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,
- 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)
/**
Convert one Null-terminated ASCII string to a Null-terminated
diff --git a/MdePkg/Include/Library/PcdLib.h b/MdePkg/Include/Library/PcdLib.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), PcdTokenEx(Guid,TokenName))
-#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 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 retrieve a current value 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 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 retrieve a current value 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 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 retrieve a current value 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 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 retrieve a current value 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 returned.
- If SizeOfBuffer is greater than the maximum size supported by TokenName,
- then set SizeOfBuffer to the maximum size supported by TokenName 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 size 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 value 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_##TokenName ((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 value for.
- @param Buffer The Boolean value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetBool(TokenName, Value) _PCD_SET_MODE_BOOL_##TokenName ((Value))
-#endif
-
/**
Sets a 8-bit PCD token value based on a token name.
@@ -806,137 +706,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
-#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. 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 designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value for.
- @param Value The 8-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetEx8(Guid, TokenName, Value) LibPcdSetEx8 ((Guid), PcdTokenEx(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. 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 designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value for.
- @param Value The 16-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetEx16(Guid, TokenName, Value) LibPcdSetEx16 ((Guid), PcdTokenEx(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. 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 designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value for.
- @param Value The 32-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetEx32(Guid, TokenName, Value) LibPcdSetEx32 ((Guid), PcdTokenEx(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. 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 designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value for.
- @param Value The 64-bit value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetEx64(Guid, TokenName, Value) LibPcdSetEx64 ((Guid), PcdTokenEx(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 TokenName 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 size 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 designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value 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), PcdTokenEx(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 designates
- which namespace to retrieve a value from.
- @param TokenName The name of the PCD token to set the current value for.
- @param Value The Boolean value to set.
-
- @return Return the Value that was set.
-
-**/
-#define PcdSetExBool(Guid, TokenName, Value) \
- LibPcdSetExBool((Guid), PcdTokenEx(Guid,TokenName), (Value))
-#endif
-
/**
Sets an 8-bit PCD token value based on a GUID and a token name.
@@ -1348,295 +1117,6 @@ LibPcdGetExSize (
);
-#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 TokenNumber,
- then set SizeOfBuffer to the maximum size supported by TokenNumber 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 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 value 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 from.
- @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 from.
- @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 from.
- @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 from.
- @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 specified by
- Buffer and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater 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 operation
- 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 value from.
- @param[in] TokenNumber The PCD token number to set a current value 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 from.
- @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.
diff --git a/MdePkg/Include/Library/PrintLib.h b/MdePkg/Include/Library/PrintLib.h
index dfbcd1b340be..0b38da6084e1 100644
--- a/MdePkg/Include/Library/PrintLib.h
+++ b/MdePkg/Include/Library/PrintLib.h
@@ -485,62 +485,6 @@ UnicodeSPrintAsciiFormat (
...
);
-#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 Unicode
- 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 Unicode characters in Buffer is returned, not including the Null-terminator.
- If the conversion contains more than Width characters, then only the first
- 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, and 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 character 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 optional '-'
- sign character, '0' characters, digit characters for Value, and the Null-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 >= 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 Buffer, 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.
@@ -882,60 +826,6 @@ AsciiSPrintUnicodeFormat (
...
);
-#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 ASCII 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 first 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, and 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 character 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 optional '-'
- sign character, '0' characters, digit characters for Value, and the Null-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 >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
-
- @param Buffer A 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 Buffer, not including
- the Null-terminator.
-
- @return The number of ASCII characters in Buffer, not including the Null-terminator.
-
-**/
-UINTN
-EFIAPI
-AsciiValueToString (
- OUT CHAR8 *Buffer,
- IN UINTN Flags,
- IN INT64 Value,
- IN UINTN Width
- );
-
-#endif
/**
Converts a decimal value to a Null-terminated Ascii string.
diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.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
);
-#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(). The
- returned buffer is allocated using AllocatePool(). The caller is responsible
- 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 variable contents.
- @retval Other A pointer to allocated buffer containing the variable contents.
-
-**/
-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(). This
- function always uses the EFI_GLOBAL_VARIABLE GUID to retrieve variables.
- 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 variable contents.
- @retval Other A pointer to allocated buffer containing the variable contents.
-
-**/
-VOID *
-EFIAPI
-GetEfiGlobalVariable (
- IN CONST CHAR16 *Name
- );
-#endif
-
/**
Returns the status whether get the variable success. The function retrieves
diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc
index 472fa3777412..c867ec043506 100644
--- a/MdePkg/MdePkg.dsc
+++ b/MdePkg/MdePkg.dsc
@@ -174,4 +174,3 @@ [Components.ARM, Components.AARCH64]
MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
[BuildOptions]
- *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
2.18.0.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] MdeModulePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
2020-08-05 6:08 [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES Zhang, Shenglei
2020-08-05 6:08 ` [PATCH 1/2] MdePkg: " Zhang, Shenglei
@ 2020-08-05 6:08 ` Zhang, Shenglei
2020-08-14 2:09 ` [PATCH 0/2] " Liming Gao
2 siblings, 0 replies; 7+ messages in thread
From: Zhang, Shenglei @ 2020-08-05 6:08 UTC (permalink / raw)
To: devel; +Cc: Jian J Wang, Hao A Wu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2777
Code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES is deprecated.
So remove it.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
.../DxePrintLibPrint2Protocol/PrintLib.c | 145 ------------------
MdeModulePkg/Universal/PrintDxe/Print.c | 37 +----
MdeModulePkg/MdeModulePkg.dsc | 1 -
3 files changed, 6 insertions(+), 177 deletions(-)
diff --git a/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c b/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c
index 3a051fd58003..edd6572578dd 100644
--- a/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c
+++ b/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c
@@ -592,79 +592,6 @@ UnicodeSPrintAsciiFormat (
return NumberOfPrinted;
}
-#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 Unicode
- 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 Unicode characters in Buffer is returned not including the Null-terminator.
- If the conversion contains more than Width characters, then only the first
- 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, and 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 character 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 optional '-'
- sign character, '0' characters, digit characters for Value, and the Null-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 >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
-
- @param Buffer 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 Buffer, 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
- )
-{
- RETURN_STATUS Status;
- UINTN BufferSize;
-
- if (Width == 0) {
- BufferSize = (MAXIMUM_VALUE_CHARACTERS + 1) * sizeof (CHAR16);
- } else {
- BufferSize = (Width + 1) * sizeof (CHAR16);
- }
-
- Status = mPrint2SProtocol->UnicodeValueToStringS (Buffer, BufferSize, Flags, Value, Width);
- if (RETURN_ERROR (Status)) {
- return 0;
- }
-
- return StrnLenS (Buffer, BufferSize / sizeof (CHAR16));
-}
-
-#endif
-
/**
Converts a decimal value to a Null-terminated Unicode string.
@@ -1071,78 +998,6 @@ AsciiSPrintUnicodeFormat (
}
-#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 ASCII 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 first 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, and 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 character 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 optional '-'
- sign character, '0' characters, digit characters for Value, and the Null-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 >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
-
- @param Buffer 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 Buffer, not including
- the Null-terminator.
-
- @return The number of ASCII characters in Buffer not including the Null-terminator.
-
-**/
-UINTN
-EFIAPI
-AsciiValueToString (
- OUT CHAR8 *Buffer,
- IN UINTN Flags,
- IN INT64 Value,
- IN UINTN Width
- )
-{
- RETURN_STATUS Status;
- UINTN BufferSize;
-
- if (Width == 0) {
- BufferSize = (MAXIMUM_VALUE_CHARACTERS + 1) * sizeof (CHAR8);
- } else {
- BufferSize = (Width + 1) * sizeof (CHAR8);
- }
-
- Status = mPrint2SProtocol->AsciiValueToStringS (Buffer, BufferSize, Flags, Value, Width);
- if (RETURN_ERROR (Status)) {
- return 0;
- }
-
- return AsciiStrnLenS (Buffer, BufferSize / sizeof (CHAR8));
-}
-
-#endif
-
/**
Converts a decimal value to a Null-terminated Ascii string.
diff --git a/MdeModulePkg/Universal/PrintDxe/Print.c b/MdeModulePkg/Universal/PrintDxe/Print.c
index c417a2c811de..636aa5716228 100644
--- a/MdeModulePkg/Universal/PrintDxe/Print.c
+++ b/MdeModulePkg/Universal/PrintDxe/Print.c
@@ -17,7 +17,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
/**
Implementaion of the UnicodeValueToString service in EFI_PRINT2_PROTOCOL.
- If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, then ASSERT().
@param Buffer The pointer to the output buffer for the produced
Null-terminated Unicode string.
@@ -27,9 +26,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
@param Width The maximum number of Unicode characters to place in Buffer,
not including the Null-terminator.
- @return If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, return 0.
- Otherwise, return the number of Unicode characters in Buffer not
- including the Null-terminator.
+ @return 0.
+
**/
UINTN
@@ -41,28 +39,16 @@ PrintDxeUnicodeValueToString (
IN UINTN Width
)
{
-#ifdef DISABLE_NEW_DEPRECATED_INTERFACES
- //
- // If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, then the
- // PrintLib API UnicodeValueToString is already deprecated.
- // In this case, ASSERT will be triggered and zero will be returned for the
- // implementation of the UnicodeValueToString service in EFI_PRINT2_PROTOCOL
- // to indicate that the service is no longer supported.
- //
DEBUG ((DEBUG_ERROR, "PrintDxe: The UnicodeValueToString service in EFI_PRINT2_PROTOCOL is no longer supported for security reason.\n"));
DEBUG ((DEBUG_ERROR, "PrintDxe: Please consider using the UnicodeValueToStringS service in EFI_PRINT2S_PROTOCOL.\n"));
ASSERT (FALSE);
return 0;
-#else
- return UnicodeValueToString (Buffer, Flags, Value, Width);
-#endif
+
}
/**
Implementaion of the AsciiValueToString service in EFI_PRINT2_PROTOCOL.
- If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, then ASSERT().
-
@param Buffer A pointer to the output buffer for the produced
Null-terminated ASCII string.
@param Flags The bitmask of flags that specify left justification, zero
@@ -71,9 +57,7 @@ PrintDxeUnicodeValueToString (
@param Width The maximum number of ASCII characters to place in Buffer,
not including the Null-terminator.
- @return If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, return 0.
- Otherwise, return the number of ASCII characters in Buffer not
- including the Null-terminator.
+ @return 0.
**/
UINTN
@@ -85,21 +69,12 @@ PrintDxeAsciiValueToString (
IN UINTN Width
)
{
-#ifdef DISABLE_NEW_DEPRECATED_INTERFACES
- //
- // If the macro DISABLE_NEW_DEPRECATED_INTERFACES is defined, then the
- // PrintLib API AsciiValueToString is already deprecated.
- // In this case, ASSERT will be triggered and zero will be returned for the
- // implementation of the AsciiValueToString service in EFI_PRINT2_PROTOCOL
- // to indicate that the service is no longer supported.
- //
+
DEBUG ((DEBUG_ERROR, "PrintDxe: The AsciiValueToString service in EFI_PRINT2_PROTOCOL is no longer supported for security reason.\n"));
DEBUG ((DEBUG_ERROR, "PrintDxe: Please consider using the AsciiValueToStringS service in EFI_PRINT2S_PROTOCOL.\n"));
ASSERT (FALSE);
return 0;
-#else
- return AsciiValueToString (Buffer, Flags, Value, Width);
-#endif
+
}
EFI_HANDLE mPrintThunkHandle = NULL;
diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index 25aea3e2a481..fbbc9933f5e8 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -491,5 +491,4 @@ [Components.X64]
MdeModulePkg/Universal/CapsulePei/CapsuleX64.inf
[BuildOptions]
- *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
--
2.18.0.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
2020-08-05 6:08 [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES Zhang, Shenglei
2020-08-05 6:08 ` [PATCH 1/2] MdePkg: " Zhang, Shenglei
2020-08-05 6:08 ` [PATCH 2/2] MdeModulePkg: " Zhang, Shenglei
@ 2020-08-14 2:09 ` Liming Gao
2020-09-07 1:06 ` [edk2-devel] " gaoliming
2 siblings, 1 reply; 7+ messages in thread
From: Liming Gao @ 2020-08-14 2:09 UTC (permalink / raw)
To: Zhang, Shenglei, devel@edk2.groups.io
Cc: Wang, Jian J, Wu, Hao A, Kinney, Michael D, Leif Lindholm,
Ard Biesheuvel
Shenglei:
Thanks for your update. The change is good. Reviewed-by: Liming Gao <liming.gao@intel.com>
Per Leif change, this patch will be merged after stable tag 202008 is created.
Thanks
Liming
-----Original Message-----
From: Zhang, Shenglei <shenglei.zhang@intel.com>
Sent: 2020年8月5日 14:08
To: devel@edk2.groups.io
Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2777
Code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES is deprecated.
So remove it from MdePkg and MdeModulePkg.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Shenglei Zhang (2):
MdePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
MdeModulePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
.../DxePrintLibPrint2Protocol/PrintLib.c | 145 ----
MdeModulePkg/Universal/PrintDxe/Print.c | 37 +-
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 ---
MdeModulePkg/MdeModulePkg.dsc | 1 -
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 -
14 files changed, 6 insertions(+), 3263 deletions(-)
--
2.18.0.windows.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [edk2-devel] [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
2020-08-14 2:09 ` [PATCH 0/2] " Liming Gao
@ 2020-09-07 1:06 ` gaoliming
2020-10-12 5:25 ` 回复: " gaoliming
[not found] ` <163D276172A67C0B.1945@groups.io>
0 siblings, 2 replies; 7+ messages in thread
From: gaoliming @ 2020-09-07 1:06 UTC (permalink / raw)
To: Gao, Liming, devel
[-- Attachment #1: Type: text/plain, Size: 111 bytes --]
Now, stable tag 202008 is created. I plan to merge this patch set before end of this month.
Thanks
Liming
[-- Attachment #2: Type: text/html, Size: 173 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* 回复: [edk2-devel] [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
2020-09-07 1:06 ` [edk2-devel] " gaoliming
@ 2020-10-12 5:25 ` gaoliming
[not found] ` <163D276172A67C0B.1945@groups.io>
1 sibling, 0 replies; 7+ messages in thread
From: gaoliming @ 2020-10-12 5:25 UTC (permalink / raw)
To: devel, gaoliming
[-- Attachment #1: Type: text/plain, Size: 786 bytes --]
Hi, all
I create PR https://github.com/tianocore/edk2/pull/1002 to verify this patch set. It can pass CI. I will merge it tomorrow.
With this change, the deprecated interfaces will not exist. If you meet with the platform build failure, please update the platform code to consume new interface.
Thanks
Liming
发件人: bounce+27952+65066+4905953+8761045@groups.io <bounce+27952+65066+4905953+8761045@groups.io> 代表 gaoliming
发送时间: 2020年9月7日 9:07
收件人: Gao; Liming <liming.gao@intel.com>; devel@edk2.groups.io
主题: Re: [edk2-devel] [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
Now, stable tag 202008 is created. I plan to merge this patch set before end of this month.
Thanks
Liming
[-- Attachment #2: Type: text/html, Size: 4446 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* 回复: [edk2-devel] [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
[not found] ` <163D276172A67C0B.1945@groups.io>
@ 2020-10-13 1:59 ` gaoliming
0 siblings, 0 replies; 7+ messages in thread
From: gaoliming @ 2020-10-13 1:59 UTC (permalink / raw)
To: devel, gaoliming
[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]
Hi, all
I have merged this patch set https://github.com/tianocore/edk2/pull/1002
Thanks
Liming
发件人: bounce+27952+66120+4905953+8761045@groups.io <bounce+27952+66120+4905953+8761045@groups.io> 代表 gaoliming
发送时间: 2020年10月12日 13:26
收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn
主题: 回复: [edk2-devel] [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
Hi, all
I create PR https://github.com/tianocore/edk2/pull/1002 to verify this patch set. It can pass CI. I will merge it tomorrow.
With this change, the deprecated interfaces will not exist. If you meet with the platform build failure, please update the platform code to consume new interface.
Thanks
Liming
发件人: bounce+27952+65066+4905953+8761045@groups.io <mailto:bounce+27952+65066+4905953+8761045@groups.io> <bounce+27952+65066+4905953+8761045@groups.io <mailto:bounce+27952+65066+4905953+8761045@groups.io> > 代表 gaoliming
发送时间: 2020年9月7日 9:07
收件人: Gao; Liming <liming.gao@intel.com <mailto:liming.gao@intel.com> >; devel@edk2.groups.io <mailto:devel@edk2.groups.io>
主题: Re: [edk2-devel] [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
Now, stable tag 202008 is created. I plan to merge this patch set before end of this month.
Thanks
Liming
[-- Attachment #2: Type: text/html, Size: 6627 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-10-13 1:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-05 6:08 [PATCH 0/2] Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES Zhang, Shenglei
2020-08-05 6:08 ` [PATCH 1/2] MdePkg: " Zhang, Shenglei
2020-08-05 6:08 ` [PATCH 2/2] MdeModulePkg: " Zhang, Shenglei
2020-08-14 2:09 ` [PATCH 0/2] " Liming Gao
2020-09-07 1:06 ` [edk2-devel] " gaoliming
2020-10-12 5:25 ` 回复: " gaoliming
[not found] ` <163D276172A67C0B.1945@groups.io>
2020-10-13 1:59 ` gaoliming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox