From 36c50bd5d5ead2a00bfe26a53a8763f8115e4762 Mon Sep 17 00:00:00 2001 From: Abner Chang Date: Fri, 6 Nov 2020 10:49:39 +0800 Subject: [PATCH] MdeModulePkg/DriverSampleDxe: Add HII sample options Add x-uefi-ns keyword REST_STYLE HII option and non x-uefi keyword REST_STYLE HII option. Signed-off-by: Abner Chang Cc: Jiaxin Wu Cc: Siyuan Fu Cc: Fan Wang Cc: Jiewen Yao Cc: Dandan Bi Cc: Eric Dong Cc: Nickle Wang Reviewed-by: Liming Gao --- .../Universal/DriverSampleDxe/NVDataStruc.h | 5 ++- .../Universal/DriverSampleDxe/Vfr.vfr | 36 +++++++++++++++++++ .../Universal/DriverSampleDxe/VfrStrings.uni | 8 +++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h index 8617617684..a4ec1b4bd1 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h +++ b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h @@ -1,6 +1,7 @@ /** @file -Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
* +(C) Copyright 2020 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent Module Name: @@ -92,6 +93,8 @@ typedef struct { UINT16 BitNumeric : 12; MY_BITS_DATA MyBitData; MY_EFI_UNION_DATA MyUnionData; + UINT8 QuestionXUefiKeywordRestStyle; + UINT8 QuestionNonXUefiKeywordRestStyle; } DRIVER_SAMPLE_CONFIGURATION; // diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr index 65a65d4d1d..5323e2b411 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -3,6 +3,7 @@ // Sample Setup formset. // // Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+// (C) Copyright 2020 Hewlett Packard Enterprise Development LP
// SPDX-License-Identifier: BSD-2-Clause-Patent // //**/ @@ -289,6 +290,41 @@ formset option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 3, flags = 0; endoneof; + // + // This is an HII option which has REST_STYLE flag and x-UEFI namespace + // UNI string associated. This HII option could be configured by either in-band + // edk2 setup browser or the remote management in out-of-band such as Redfish + // service. This HII option is configured through EFI_KEYWORD_HANDLER_PROTOCOL. + // + oneof varid = MyIfrNVData.QuestionXUefiKeywordRestStyle, + prompt = STRING_TOKEN(STR_ONE_OF_PROMPT_X_UEFI), + help = STRING_TOKEN(STR_ONE_OF_PROMPT_X_UEFI_HELP), + flags = RESET_REQUIRED | REST_STYLE, + option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = 0; + option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = DEFAULT; + option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 3, flags = 0; + endoneof; + + + // + // This is a HII option which has REST_STYLE flag but without the x-UEFI namespace + // UNI string associated. This HII option could be configured by either + // setup browser or the remote management in out-of-band such as Redfish + // service. This HII option is configured through EFI HII Configuration Routing + // Protocol becasue it doesn't have x-UEFI namespace UNI string. + // + numeric varid = MyIfrNVData.QuestionNonXUefiKeywordRestStyle, + prompt = STRING_TOKEN(STR_ONE_OF_PROMPT_NON_X_UEFI), + help = STRING_TOKEN(STR_ONE_OF_PROMPT_NON_X_UEFI_HELP), + flags = RESET_REQUIRED | REST_STYLE, + minimum = 0, + maximum = 0xf0, + step = 0, // Stepping of 0 equates to a manual entering + // of a value, otherwise it will be adjusted by "+"/"-" + default = 0, // defaultstore could be used to specify the default type + // If no defaultstore is specified, it implies Standard Default + endnumeric; + // // Define a string (EFI_IFR_STRING) // diff --git a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni index bafa194c63..9587e935a6 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni +++ b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni @@ -1,6 +1,7 @@ // *++ // // Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+// (C) Copyright 2020 Hewlett Packard Enterprise Development LP
// SPDX-License-Identifier: BSD-2-Clause-Patent // // Module Name: @@ -56,6 +57,13 @@ #language x-UEFI-ns "iSCSIBootEnable" #string STR_CHECK_KEYWORD_SUPPORT #language en-US "Check iSCSI Boot Enable" #language fr-FR "Check iSCSI Boot Enable" +#string STR_ONE_OF_PROMPT_X_UEFI #language en-US "x-UEFI HII Option" + #language fr-FR "x-UEFI HII Option" + #language x-UEFI-ns "xUefiHiiOption" +#string STR_ONE_OF_PROMPT_X_UEFI_HELP #language en-US "This is an HII option which has REST_STYLE flag and x-UEFI namespace UNI string associated. This HII option could be configured by either in-band edk2 setup browser or the remote management in out-of-band such as Redfish service. This HII option is configured through EFI_KEYWORD_HANDLER_PROTOCOL." +#string STR_ONE_OF_PROMPT_NON_X_UEFI #language en-US "Non x-UEFI HII Option" + #language fr-FR "Non x-UEFI HII Option" +#string STR_ONE_OF_PROMPT_NON_X_UEFI_HELP #language en-US "This is a HII option which has REST_STYLE flag but without the x-UEFI namespace UNI string associated. This HII option could be configured by either setup browser or the remote management in out-of-band such as Redfish service. This HII option is configured through EFI HII Configuration Routing Protocol becasue it doesn't have x-UEFI namespace UNI string." #string STR_ONE_OF_HELP #language en-US "My one-of help is going to be a long string to test out the efficiency of the ability of the I am tired of typing capabilities" #language fr-FR "Mi uno- de ayuda va a ser una cadena larga a probar fuera de la eficacia de la capacidad del yo es cansada de capacidades el pulsar." #string STR_ONE_OF_TEXT1 #language en-US "My one-of text #1" -- 2.39.2