RedfishPkg/RedfishPlatformConfigDxe: Fix string assert issue

When calling SetValue() with string type input, there is
assertion of providing zero string ID to HII string function.
Fix this issue by creating string ID for input string buffer.
Fix Unicode and Ascii code convert issue together.
Add text op-code support

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
Reviewed-by: Igor Kulchytskyy <igork@ami.com>
This commit is contained in:
Nickle Wang
2023-05-08 18:22:42 +08:00
committed by mergify[bot]
parent ba2300f97b
commit 5258c4186f
4 changed files with 169 additions and 27 deletions

View File

@@ -78,4 +78,18 @@ typedef struct {
#define REDFISH_PLATFORM_CONFIG_DEBUG DEBUG_VERBOSE
#define REDFISH_MENU_PATH_SIZE 8
/**
Convert input unicode string to ascii string. It's caller's
responsibility to free returned buffer using FreePool().
@param[in] UnicodeString Unicode string to be converted.
@retval CHAR8 * Ascii string on return.
**/
CHAR8 *
StrToAsciiStr (
IN EFI_STRING UnicodeString
);
#endif