]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/DriverSampleDxe: Add HII sample options
authorAbner Chang <abner.chang@hpe.com>
Fri, 6 Nov 2020 02:49:39 +0000 (10:49 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 11 Nov 2020 00:53:00 +0000 (00:53 +0000)
Add x-uefi-ns keyword REST_STYLE HII option and non
x-uefi keyword REST_STYLE HII option.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Fan Wang <fan.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni

index 86176176842579fc38ffd39aec68efa4413e9f72..a4ec1b4bd16717976c0dcb7a60b54be882cf5493 100644 (file)
@@ -1,6 +1,7 @@
 /** @file\r
 \r
-Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>*\r
+(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 Module Name:\r
@@ -92,6 +93,8 @@ typedef struct {
   UINT16  BitNumeric  : 12;\r
   MY_BITS_DATA  MyBitData;\r
   MY_EFI_UNION_DATA MyUnionData;\r
+  UINT8   QuestionXUefiKeywordRestStyle;\r
+  UINT8   QuestionNonXUefiKeywordRestStyle;\r
 } DRIVER_SAMPLE_CONFIGURATION;\r
 \r
 //\r
index 65a65d4d1dc463bd632fe9cdacf52662a8664b75..5323e2b411bafdeafa5bc570836727352d11e425 100644 (file)
@@ -3,6 +3,7 @@
 //    Sample Setup formset.\r
 //\r
 //  Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+// (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r
 //  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 //\r
 //**/\r
@@ -289,6 +290,41 @@ formset
       option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 3, flags = 0;\r
     endoneof;\r
 \r
+    //\r
+    // This is an HII option which has REST_STYLE flag and x-UEFI namespace\r
+    // UNI string associated. This HII option could be configured by either in-band\r
+    // edk2 setup browser or the remote management in out-of-band such as Redfish\r
+    // service. This HII option is configured through EFI_KEYWORD_HANDLER_PROTOCOL.\r
+    //\r
+    oneof varid  = MyIfrNVData.QuestionXUefiKeywordRestStyle,\r
+      prompt      = STRING_TOKEN(STR_ONE_OF_PROMPT_X_UEFI),\r
+      help        = STRING_TOKEN(STR_ONE_OF_PROMPT_X_UEFI_HELP),\r
+      flags       = RESET_REQUIRED | REST_STYLE,\r
+      option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = 0;\r
+      option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = DEFAULT;\r
+      option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 3, flags = 0;\r
+    endoneof;\r
+\r
+\r
+    //\r
+    // This is a HII option which has REST_STYLE flag but without the x-UEFI namespace\r
+    // UNI string associated. This HII option could be configured by either\r
+    // setup browser or the remote management in out-of-band such as Redfish\r
+    // service. This HII option is configured through EFI HII Configuration Routing\r
+    // Protocol becasue it doesn't have x-UEFI namespace UNI string.\r
+    //\r
+    numeric varid  = MyIfrNVData.QuestionNonXUefiKeywordRestStyle,\r
+      prompt       = STRING_TOKEN(STR_ONE_OF_PROMPT_NON_X_UEFI),\r
+      help         = STRING_TOKEN(STR_ONE_OF_PROMPT_NON_X_UEFI_HELP),\r
+      flags        = RESET_REQUIRED | REST_STYLE,\r
+      minimum      = 0,\r
+      maximum      = 0xf0,\r
+      step         = 0,          // Stepping of 0 equates to a manual entering\r
+                                 // of a value, otherwise it will be adjusted by "+"/"-"\r
+      default      = 0,          // defaultstore could be used to specify the default type\r
+                                 // If no defaultstore is specified, it implies Standard Default\r
+    endnumeric;\r
+\r
     //\r
     // Define a string (EFI_IFR_STRING)\r
     //\r
index bafa194c638e0227fa216acb82ec9c04350e5aaf..9587e935a6edfbffc8a8b0e36945bb137eaa8a98 100644 (file)
@@ -1,6 +1,7 @@
 // *++\r
   //\r
 // Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+// (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>\r
 // SPDX-License-Identifier: BSD-2-Clause-Patent\r
 //\r
 // Module Name:\r
                                        #language x-UEFI-ns "iSCSIBootEnable"\r
 #string STR_CHECK_KEYWORD_SUPPORT      #language en-US "Check iSCSI Boot Enable"\r
                                        #language fr-FR "Check iSCSI Boot Enable"\r
+#string STR_ONE_OF_PROMPT_X_UEFI       #language en-US "x-UEFI HII Option"\r
+                                       #language fr-FR "x-UEFI HII Option"\r
+                                       #language x-UEFI-ns "xUefiHiiOption"\r
+#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."\r
+#string STR_ONE_OF_PROMPT_NON_X_UEFI       #language en-US "Non x-UEFI HII Option"\r
+                                           #language fr-FR "Non x-UEFI HII Option"\r
+#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."\r
 #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"\r
                                        #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."\r
 #string STR_ONE_OF_TEXT1               #language en-US "My one-of text #1"\r