edk2/MdeModulePkg
Hao Wu e43adbafe8 MdeModulePkg: Add the EFI_PRINT2S_PROTOCOL
Add the EFI_PRINT2S_PROTOCOL as a safe version of the EFI_PRINT2_PROTOCOL,
the EFI_PRINT2S_PROTOCOL replaces the following 2 services in
EFI_PRINT2_PROTOCOL:
UNICODE_VALUE_TO_STRING
ASCII_VALUE_TO_STRING

with:
UNICODE_VALUE_TO_STRING_S
ASCII_VALUE_TO_STRING_S

The 2 new services perform checks to the input parameters and will return
relative status to reflect the check result.

Return RETURN_INVALID_PARAMETER when:
1). The input Buffer is NULL.
2). The input BufferSize is greater than (PcdMaximumUnicodeStringLength *
sizeof (CHAR16) + 1) for UnicodeValueToStringS or greater than
PcdMaximumAsciiStringLength for AsciiValueToStringS.
3). The input Flags is not set properly.
4). The input Width is not smaller than MAXIMUM_VALUE_CHARACTERS.

Return RETURN_BUFFER_TOO_SMALL when:
1). The input BufferSize cannot hold the converted value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-02-21 13:56:22 +08:00
..
Application MdeModulePkg/CapsuleApp: Dump capsule name in record. 2016-12-23 10:08:04 +08:00
Bus MdeModulePkg/PciBusDxe: Refine code to make it more readable 2017-02-21 11:16:01 +08:00
Core MdeModulePkg PiSmmIpl: Update SmmCommunication comments to match code logic 2017-02-10 11:18:34 +08:00
Include MdeModulePkg: Add the EFI_PRINT2S_PROTOCOL 2017-02-21 13:56:22 +08:00
Library MdeModulePkg/PrintLib: Refine the SPrint functions 2017-02-21 13:55:20 +08:00
Logo MdeModulePkg/Logo: rebase to ARRAY_SIZE() 2016-10-27 11:10:57 +02:00
Universal MdeModulePkg: Add the EFI_PRINT2S_PROTOCOL 2017-02-21 13:56:22 +08:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
MdeModulePkg.dec MdeModulePkg: Add the EFI_PRINT2S_PROTOCOL 2017-02-21 13:56:22 +08:00
MdeModulePkg.dsc MdeModulePkg: implement generic PCI I/O driver for non-discoverable devices 2016-12-07 09:45:56 +00:00
MdeModulePkg.uni MdeModulePkg: Add missing info string for PCDs 2016-12-14 21:34:46 +08:00
MdeModulePkgExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00