public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [VFR support REST_STYLE PATCH v3 0/4] VFR support REST_STYLE
@ 2020-11-04  6:35 Abner Chang
  2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 1/4] MdePkg: Add GUID for REST Style Formset Abner Chang
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Abner Chang @ 2020-11-04  6:35 UTC (permalink / raw)
  To: devel
  Cc: Jiaxin Wu, Siyuan Fu, Fan Wang, Jiewen Yao, Dandan Bi, Eric Dong,
	Nickle Wang, Bob Feng, Liming Gao, Yuwei Chen, Michael D Kinney,
	Zhiguang Liu

In v3, the patch includes the changes on HiiLib to support
REST_STYLE flag.

In v2, a typo found. Rename gEfiHiiResetStyleFormsetGuid to
gEfiHiiRestStyleFormsetGuid.

VFR compiler and other related changes to support REST_STYLE in VFR
language for HII options to be configured in out-of-band management
such as the Redfish service. Add two HII options in the Sample driver
for REST_STYLE use cases.

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>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>

Abner Chang (4):
  MdePkg: Add GUID for REST Style Formset
  BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
  MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
  MdeModulePkg/DriverSampleDxe: Add HII sample options

 BaseTools/Source/C/VfrCompile/VfrSyntax.g     | 25 +++++++++++++--
 MdeModulePkg/Library/UefiHiiLib/HiiLib.c      | 14 ++++----
 .../Universal/DriverSampleDxe/NVDataStruc.h   |  4 ++-
 .../Universal/DriverSampleDxe/Vfr.vfr         | 32 +++++++++++++++++--
 .../Universal/DriverSampleDxe/VfrStrings.uni  | 11 +++++--
 MdePkg/MdePkg.dec                             |  2 +-
 6 files changed, 70 insertions(+), 18 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [VFR support REST_STYLE PATCH v3 1/4] MdePkg: Add GUID for REST Style Formset
  2020-11-04  6:35 [VFR support REST_STYLE PATCH v3 0/4] VFR support REST_STYLE Abner Chang
@ 2020-11-04  6:35 ` Abner Chang
  2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 2/4] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option Abner Chang
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Abner Chang @ 2020-11-04  6:35 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Nickle Wang

BZ: 2916
https://bugzilla.tianocore.org/show_bug.cgi?id=2916

Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Signed-off-by: Ye Ting <ting.ye@intel.com>
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Signed-off-by: Wang Fan <fan.wang@intel.com>
Signed-off-by: Abner Chang <abner.chang@hpe.com>

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
---
 MdePkg/MdePkg.dec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 645f61b80e..3928db65d1 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -669,7 +669,7 @@
   gEfiJsonCapsuleIdGuid            = { 0x67d6f4cd, 0xd6b8, 0x4573, { 0xbf, 0x4a, 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }}
 
   ## Include/Guid/HiiPlatformSetupFormset.h
-  gEfiHiiResetStyleFormsetGuid     = { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }}
+  gEfiHiiRestStyleFormsetGuid      = { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }}
 
   # GUIDs defined in UEFI2.8a
   #
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [VFR support REST_STYLE PATCH v3 2/4] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
  2020-11-04  6:35 [VFR support REST_STYLE PATCH v3 0/4] VFR support REST_STYLE Abner Chang
  2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 1/4] MdePkg: Add GUID for REST Style Formset Abner Chang
@ 2020-11-04  6:35 ` Abner Chang
  2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 3/4] MdeModulePkg/Library: Revise HiiLib to support REST_STYLE Abner Chang
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Abner Chang @ 2020-11-04  6:35 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Nickle Wang

Add REST_STYLE support on VFR language

BZ: 2916
https://bugzilla.tianocore.org/show_bug.cgi?id=2916

Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Signed-off-by: Ye Ting <ting.ye@intel.com>
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Signed-off-by: Wang Fan <fan.wang@intel.com>

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
---
 BaseTools/Source/C/VfrCompile/VfrSyntax.g | 25 ++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index 127cb8b2b2..3f896c6f1a 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -192,6 +192,7 @@ VfrParserStart (
 #token LateCheckFlag("LATE_CHECK")              "LATE_CHECK"
 #token ReadOnlyFlag("READ_ONLY")                "READ_ONLY"
 #token OptionOnlyFlag("OPTIONS_ONLY")           "OPTIONS_ONLY"
+#token RestStyleFlag("REST_STYLE")              "REST_STYLE"
 #token Class("class")                           "class"
 #token Subclass("subclass")                     "subclass"
 #token ClassGuid("classguid")                   "classguid"
@@ -584,7 +585,7 @@ vfrFormSetDefinition :
   <<
      EFI_GUID    Guid;
      EFI_GUID    DefaultClassGuid = EFI_HII_PLATFORM_SETUP_FORMSET_GUID;
-     EFI_GUID    ClassGuid1, ClassGuid2, ClassGuid3;
+     EFI_GUID    ClassGuid1, ClassGuid2, ClassGuid3, ClassGuid4;
      UINT8       ClassGuidNum = 0;
      CIfrFormSet *FSObj = NULL;
      UINT16      C, SC;
@@ -600,13 +601,16 @@ vfrFormSetDefinition :
                      "\|" guidDefinition[ClassGuid2]  << ++ClassGuidNum; >>
                      {
                       "\|" guidDefinition[ClassGuid3]  << ++ClassGuidNum; >>
+                       {
+                         "\|" guidDefinition[ClassGuid4]  << ++ClassGuidNum; >>
+                       }
                      }
                   }
                   ","
   }
                                                     <<
-                                                      if (mOverrideClassGuid != NULL && ClassGuidNum >= 3) {
-                                                        _PCATCH (VFR_RETURN_INVALID_PARAMETER, L->getLine(), "Already has 3 class guids, can't add extra class guid!");
+                                                      if (mOverrideClassGuid != NULL && ClassGuidNum >= 4) {
+                                                        _PCATCH (VFR_RETURN_INVALID_PARAMETER, L->getLine(), "Already has 4 class guids, can't add extra class guid!");
                                                       }
                                                       switch (ClassGuidNum) {
                                                       case 0:
@@ -643,10 +647,23 @@ vfrFormSetDefinition :
                                                         }
                                                         break;
                                                       case 3:
+                                                        if (mOverrideClassGuid != NULL) {
+                                                          ClassGuidNum ++;
+                                                        }
+                                                        FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + ClassGuidNum * sizeof(EFI_GUID));
+                                                        FSObj->SetClassGuid(&ClassGuid1);
+                                                        FSObj->SetClassGuid(&ClassGuid2);
+                                                        FSObj->SetClassGuid(&ClassGuid3);
+                                                        if (mOverrideClassGuid != NULL) {
+                                                          FSObj->SetClassGuid(mOverrideClassGuid);
+                                                        }
+                                                        break;
+                                                      case 4:
                                                         FSObj = new CIfrFormSet(sizeof(EFI_IFR_FORM_SET) + ClassGuidNum * sizeof(EFI_GUID));
                                                         FSObj->SetClassGuid(&ClassGuid1);
                                                         FSObj->SetClassGuid(&ClassGuid2);
                                                         FSObj->SetClassGuid(&ClassGuid3);
+                                                        FSObj->SetClassGuid(&ClassGuid4);
                                                         break;
                                                       default:
                                                         break;
@@ -1321,6 +1338,7 @@ questionheaderFlagsField[UINT8 & Flags] :
     ReadOnlyFlag                                    << $Flags |= 0x01; >>
   | InteractiveFlag                                 << $Flags |= 0x04; >>
   | ResetRequiredFlag                               << $Flags |= 0x10; >>
+  | RestStyleFlag                                   << $Flags |= 0x20; >>
   | ReconnectRequiredFlag                           << $Flags |= 0x40; >>
   | O:OptionOnlyFlag                                <<
                                                        gCVfrErrorHandle.HandleWarning (
@@ -3766,6 +3784,7 @@ oneofoptionFlagsField [UINT8 & HFlags, UINT8 & LFlags] :
   | "OPTION_DEFAULT_MFG"                               << $LFlags |= 0x20; >>
   | InteractiveFlag                                    << $HFlags |= 0x04; >>
   | ResetRequiredFlag                                  << $HFlags |= 0x10; >>
+  | RestStyleFlag                                      << $HFlags |= 0x20; >>
   | ReconnectRequiredFlag                              << $HFlags |= 0x40; >>
   | ManufacturingFlag                                  << $LFlags |= 0x20; >>
   | DefaultFlag                                        << $LFlags |= 0x10; >>
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [VFR support REST_STYLE PATCH v3 3/4] MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
  2020-11-04  6:35 [VFR support REST_STYLE PATCH v3 0/4] VFR support REST_STYLE Abner Chang
  2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 1/4] MdePkg: Add GUID for REST Style Formset Abner Chang
  2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 2/4] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option Abner Chang
@ 2020-11-04  6:35 ` Abner Chang
  2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 4/4] MdeModulePkg/DriverSampleDxe: Add HII sample options Abner Chang
       [not found] ` <16443D0E1EA9DC18.19640@groups.io>
  4 siblings, 0 replies; 11+ messages in thread
From: Abner Chang @ 2020-11-04  6:35 UTC (permalink / raw)
  To: devel

Add REST_STYLE support

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Signed-off-by: Ting Ye <ting.ye@intel.com>
Signed-off-by: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Fan Wang <fan.wang@intel.com>
Signed-off-by: Abner Chang <abner.chang@hpe.com>
---
 MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
index 564169bc14..57602828fe 100644
--- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
+++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
@@ -3605,7 +3605,7 @@ HiiCreateCheckBoxOpCode (
   EFI_IFR_CHECKBOX  OpCode;
   UINTN             Position;
 
-  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
+  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE))) == 0);
 
   ZeroMem (&OpCode, sizeof (OpCode));
   OpCode.Question.QuestionId             = QuestionId;
@@ -3674,7 +3674,7 @@ HiiCreateNumericOpCode (
   UINTN            Position;
   UINTN            Length;
 
-  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
+  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE))) == 0);
 
   Length  = 0;
   ZeroMem (&OpCode, sizeof (OpCode));
@@ -3773,7 +3773,7 @@ HiiCreateStringOpCode (
   EFI_IFR_STRING  OpCode;
   UINTN           Position;
 
-  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
+  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE))) == 0);
 
   ZeroMem (&OpCode, sizeof (OpCode));
   OpCode.Question.Header.Prompt          = Prompt;
@@ -3841,7 +3841,7 @@ HiiCreateOneOfOpCode (
   UINTN           Length;
 
   ASSERT (OptionsOpCodeHandle != NULL);
-  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
+  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
 
   ZeroMem (&OpCode, sizeof (OpCode));
   OpCode.Question.Header.Prompt          = Prompt;
@@ -3912,7 +3912,7 @@ HiiCreateOrderedListOpCode (
   UINTN                 Position;
 
   ASSERT (OptionsOpCodeHandle != NULL);
-  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
+  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
 
   ZeroMem (&OpCode, sizeof (OpCode));
   OpCode.Question.Header.Prompt          = Prompt;
@@ -4009,7 +4009,7 @@ HiiCreateDateOpCode (
   EFI_IFR_DATE    OpCode;
   UINTN           Position;
 
-  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
+  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE))) == 0);
   ASSERT ((DateFlags & (~(EFI_QF_DATE_YEAR_SUPPRESS | EFI_QF_DATE_MONTH_SUPPRESS | EFI_QF_DATE_DAY_SUPPRESS | EFI_QF_DATE_STORAGE))) == 0);
 
   ZeroMem (&OpCode, sizeof (OpCode));
@@ -4074,7 +4074,7 @@ HiiCreateTimeOpCode (
   EFI_IFR_TIME    OpCode;
   UINTN           Position;
 
-  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
+  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_REST_STYLE))) == 0);
   ASSERT ((TimeFlags & (~(QF_TIME_HOUR_SUPPRESS | QF_TIME_MINUTE_SUPPRESS | QF_TIME_SECOND_SUPPRESS | QF_TIME_STORAGE))) == 0);
 
   ZeroMem (&OpCode, sizeof (OpCode));
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [VFR support REST_STYLE PATCH v3 4/4] MdeModulePkg/DriverSampleDxe: Add HII sample options
  2020-11-04  6:35 [VFR support REST_STYLE PATCH v3 0/4] VFR support REST_STYLE Abner Chang
                   ` (2 preceding siblings ...)
  2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 3/4] MdeModulePkg/Library: Revise HiiLib to support REST_STYLE Abner Chang
@ 2020-11-04  6:35 ` Abner Chang
  2020-11-05  1:45   ` 回复: [edk2-devel] " gaoliming
       [not found] ` <16443D0E1EA9DC18.19640@groups.io>
  4 siblings, 1 reply; 11+ messages in thread
From: Abner Chang @ 2020-11-04  6:35 UTC (permalink / raw)
  To: devel
  Cc: Jiaxin Wu, Siyuan Fu, Fan Wang, Jiewen Yao, Dandan Bi, Eric Dong,
	Nickle Wang

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>
---
 .../Universal/DriverSampleDxe/NVDataStruc.h   |  4 ++-
 .../Universal/DriverSampleDxe/Vfr.vfr         | 32 +++++++++++++++++--
 .../Universal/DriverSampleDxe/VfrStrings.uni  | 11 +++++--
 3 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
index 8617617684..761f5e169c 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.<BR>
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>*
+(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 Module Name:
@@ -92,6 +93,7 @@ typedef struct {
   UINT16  BitNumeric  : 12;
   MY_BITS_DATA  MyBitData;
   MY_EFI_UNION_DATA MyUnionData;
+  UINT8   QuestionNonXUefiKeywordRestStyle;
 } DRIVER_SAMPLE_CONFIGURATION;
 
 //
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
index 65a65d4d1d..eecb062320 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.<BR>
+// (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
 //  SPDX-License-Identifier: BSD-2-Clause-Patent
 //
 //**/
@@ -280,15 +281,40 @@ formset
 
     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.QuestionAboutTreeHugging,
-      prompt      = STRING_TOKEN(STR_ONE_OF_PROMPT_KEYWORD),
-      help        = STRING_TOKEN(STR_ONE_OF_HELP),
-      flags       = RESET_REQUIRED,
+      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..740b24cdc3 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.<BR>
+// (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
 // SPDX-License-Identifier: BSD-2-Clause-Patent
 //
 // Module Name:
@@ -51,9 +52,13 @@
                                        #language fr-FR "Check the input number, test the efi buffer varstore"
 #string STR_ONE_OF_PROMPT              #language en-US "My one-of prompt #1"
                                        #language fr-FR "Mi uno- de guía # 1"
-#string STR_ONE_OF_PROMPT_KEYWORD      #language en-US "My Keyword Namespace Test"
-                                       #language fr-FR "My Keyword Namespace Test"
-                                       #language x-UEFI-ns "iSCSIBootEnable"
+#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_CHECK_KEYWORD_SUPPORT      #language en-US "Check iSCSI Boot Enable"
                                        #language fr-FR "Check iSCSI Boot Enable"
 #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"
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4] MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
       [not found] ` <16443D0E1EA9DC18.19640@groups.io>
@ 2020-11-04  8:20   ` Abner Chang
  2020-11-05  1:42     ` 回复: " gaoliming
       [not found]   ` <16444047FB902DE3.7719@groups.io>
  1 sibling, 1 reply; 11+ messages in thread
From: Abner Chang @ 2020-11-04  8:20 UTC (permalink / raw)
  To: devel@edk2.groups.io, Chang, Abner (HPS SW/FW Technologist)
  Cc: 'Dandan Bi', 'Eric Dong', Gao, Liming

Sorry, forget to CC reviewers.

Abner

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Wednesday, November 4, 2020 2:36 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4]
> MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
> 
> Add REST_STYLE support
> 
> Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
> Signed-off-by: Ting Ye <ting.ye@intel.com>
> Signed-off-by: Siyuan Fu <siyuan.fu@intel.com>
> Signed-off-by: Fan Wang <fan.wang@intel.com>
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> ---
>  MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> index 564169bc14..57602828fe 100644
> --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> @@ -3605,7 +3605,7 @@ HiiCreateCheckBoxOpCode (
>    EFI_IFR_CHECKBOX  OpCode;
>    UINTN             Position;
> 
> -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> EFI_IFR_FLAG_REST_STYLE))) == 0);
> 
>    ZeroMem (&OpCode, sizeof (OpCode));
>    OpCode.Question.QuestionId             = QuestionId;
> @@ -3674,7 +3674,7 @@ HiiCreateNumericOpCode (
>    UINTN            Position;
>    UINTN            Length;
> 
> -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> EFI_IFR_FLAG_REST_STYLE))) == 0);
> 
>    Length  = 0;
>    ZeroMem (&OpCode, sizeof (OpCode));
> @@ -3773,7 +3773,7 @@ HiiCreateStringOpCode (
>    EFI_IFR_STRING  OpCode;
>    UINTN           Position;
> 
> -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> EFI_IFR_FLAG_REST_STYLE))) == 0);
> 
>    ZeroMem (&OpCode, sizeof (OpCode));
>    OpCode.Question.Header.Prompt          = Prompt;
> @@ -3841,7 +3841,7 @@ HiiCreateOneOfOpCode (
>    UINTN           Length;
> 
>    ASSERT (OptionsOpCodeHandle != NULL);
> -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> 
>    ZeroMem (&OpCode, sizeof (OpCode));
>    OpCode.Question.Header.Prompt          = Prompt;
> @@ -3912,7 +3912,7 @@ HiiCreateOrderedListOpCode (
>    UINTN                 Position;
> 
>    ASSERT (OptionsOpCodeHandle != NULL);
> -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> 
>    ZeroMem (&OpCode, sizeof (OpCode));
>    OpCode.Question.Header.Prompt          = Prompt;
> @@ -4009,7 +4009,7 @@ HiiCreateDateOpCode (
>    EFI_IFR_DATE    OpCode;
>    UINTN           Position;
> 
> -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> EFI_IFR_FLAG_REST_STYLE))) == 0);
>    ASSERT ((DateFlags & (~(EFI_QF_DATE_YEAR_SUPPRESS |
> EFI_QF_DATE_MONTH_SUPPRESS | EFI_QF_DATE_DAY_SUPPRESS |
> EFI_QF_DATE_STORAGE))) == 0);
> 
>    ZeroMem (&OpCode, sizeof (OpCode));
> @@ -4074,7 +4074,7 @@ HiiCreateTimeOpCode (
>    EFI_IFR_TIME    OpCode;
>    UINTN           Position;
> 
> -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> EFI_IFR_FLAG_REST_STYLE))) == 0);
>    ASSERT ((TimeFlags & (~(QF_TIME_HOUR_SUPPRESS |
> QF_TIME_MINUTE_SUPPRESS | QF_TIME_SECOND_SUPPRESS |
> QF_TIME_STORAGE))) == 0);
> 
>    ZeroMem (&OpCode, sizeof (OpCode));
> --
> 2.17.1
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4] MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
       [not found]   ` <16444047FB902DE3.7719@groups.io>
@ 2020-11-04  8:27     ` Abner Chang
  0 siblings, 0 replies; 11+ messages in thread
From: Abner Chang @ 2020-11-04  8:27 UTC (permalink / raw)
  To: devel@edk2.groups.io, Chang, Abner (HPS SW/FW Technologist)
  Cc: 'Dandan Bi', 'Eric Dong',
	gaoliming@byosoft.com.cn, Wang, Nickle (HPS SW)

Correct Liming's email.

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Wednesday, November 4, 2020 4:21 PM
> To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> <abner.chang@hpe.com>
> Cc: 'Dandan Bi' <dandan.bi@intel.com>; 'Eric Dong' <eric.dong@intel.com>;
> Gao, Liming <liming.gao@intel.com>
> Subject: Re: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4]
> MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
> 
> Sorry, forget to CC reviewers.
> 
> Abner
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > Abner Chang
> > Sent: Wednesday, November 4, 2020 2:36 PM
> > To: devel@edk2.groups.io
> > Subject: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4]
> > MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
> >
> > Add REST_STYLE support
> >
> > Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
> > Signed-off-by: Ting Ye <ting.ye@intel.com>
> > Signed-off-by: Siyuan Fu <siyuan.fu@intel.com>
> > Signed-off-by: Fan Wang <fan.wang@intel.com>
> > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> > ---
> >  MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > index 564169bc14..57602828fe 100644
> > --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > @@ -3605,7 +3605,7 @@ HiiCreateCheckBoxOpCode (
> >    EFI_IFR_CHECKBOX  OpCode;
> >    UINTN             Position;
> >
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode));
> >    OpCode.Question.QuestionId             = QuestionId;
> > @@ -3674,7 +3674,7 @@ HiiCreateNumericOpCode (
> >    UINTN            Position;
> >    UINTN            Length;
> >
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE))) == 0);
> >
> >    Length  = 0;
> >    ZeroMem (&OpCode, sizeof (OpCode)); @@ -3773,7 +3773,7 @@
> > HiiCreateStringOpCode (
> >    EFI_IFR_STRING  OpCode;
> >    UINTN           Position;
> >
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode));
> >    OpCode.Question.Header.Prompt          = Prompt;
> > @@ -3841,7 +3841,7 @@ HiiCreateOneOfOpCode (
> >    UINTN           Length;
> >
> >    ASSERT (OptionsOpCodeHandle != NULL);
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode));
> >    OpCode.Question.Header.Prompt          = Prompt;
> > @@ -3912,7 +3912,7 @@ HiiCreateOrderedListOpCode (
> >    UINTN                 Position;
> >
> >    ASSERT (OptionsOpCodeHandle != NULL);
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode));
> >    OpCode.Question.Header.Prompt          = Prompt;
> > @@ -4009,7 +4009,7 @@ HiiCreateDateOpCode (
> >    EFI_IFR_DATE    OpCode;
> >    UINTN           Position;
> >
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE))) == 0);
> >    ASSERT ((DateFlags & (~(EFI_QF_DATE_YEAR_SUPPRESS |
> > EFI_QF_DATE_MONTH_SUPPRESS | EFI_QF_DATE_DAY_SUPPRESS |
> > EFI_QF_DATE_STORAGE))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode)); @@ -4074,7 +4074,7 @@
> > HiiCreateTimeOpCode (
> >    EFI_IFR_TIME    OpCode;
> >    UINTN           Position;
> >
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE))) == 0);
> >    ASSERT ((TimeFlags & (~(QF_TIME_HOUR_SUPPRESS |
> > QF_TIME_MINUTE_SUPPRESS | QF_TIME_SECOND_SUPPRESS |
> > QF_TIME_STORAGE))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode));
> > --
> > 2.17.1
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* 回复: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4] MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
  2020-11-04  8:20   ` [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4] MdeModulePkg/Library: Revise HiiLib to support REST_STYLE Abner Chang
@ 2020-11-05  1:42     ` gaoliming
  2020-11-06  3:36       ` Abner Chang
  0 siblings, 1 reply; 11+ messages in thread
From: gaoliming @ 2020-11-05  1:42 UTC (permalink / raw)
  To: devel, abner.chang
  Cc: 'Dandan Bi', 'Eric Dong', 'Gao, Liming'

This patch is to check REST_STYLE flag. I think the commit message may be
check REST_STYLE flag.

> -----邮件原件-----
> 发件人: bounce+27952+66976+4905953+8761045@groups.io
> <bounce+27952+66976+4905953+8761045@groups.io> 代表 Abner Chang
> 发送时间: 2020年11月4日 16:21
> 收件人: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> <abner.chang@hpe.com>
> 抄送: 'Dandan Bi' <dandan.bi@intel.com>; 'Eric Dong'
<eric.dong@intel.com>;
> Gao, Liming <liming.gao@intel.com>
> 主题: Re: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4]
> MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
> 
> Sorry, forget to CC reviewers.
> 
> Abner
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > Abner Chang
> > Sent: Wednesday, November 4, 2020 2:36 PM
> > To: devel@edk2.groups.io
> > Subject: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4]
> > MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
> >
> > Add REST_STYLE support
> >
> > Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
> > Signed-off-by: Ting Ye <ting.ye@intel.com>
> > Signed-off-by: Siyuan Fu <siyuan.fu@intel.com>
> > Signed-off-by: Fan Wang <fan.wang@intel.com>
> > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> > ---
> >  MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 14 +++++++-------
> >  1 file changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > index 564169bc14..57602828fe 100644
> > --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > @@ -3605,7 +3605,7 @@ HiiCreateCheckBoxOpCode (
> >    EFI_IFR_CHECKBOX  OpCode;
> >    UINTN             Position;
> >
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode));
> >    OpCode.Question.QuestionId             = QuestionId;
> > @@ -3674,7 +3674,7 @@ HiiCreateNumericOpCode (
> >    UINTN            Position;
> >    UINTN            Length;
> >
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE))) == 0);
> >
> >    Length  = 0;
> >    ZeroMem (&OpCode, sizeof (OpCode));
> > @@ -3773,7 +3773,7 @@ HiiCreateStringOpCode (
> >    EFI_IFR_STRING  OpCode;
> >    UINTN           Position;
> >
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode));
> >    OpCode.Question.Header.Prompt          = Prompt;
> > @@ -3841,7 +3841,7 @@ HiiCreateOneOfOpCode (
> >    UINTN           Length;
> >
> >    ASSERT (OptionsOpCodeHandle != NULL);
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode));
> >    OpCode.Question.Header.Prompt          = Prompt;
> > @@ -3912,7 +3912,7 @@ HiiCreateOrderedListOpCode (
> >    UINTN                 Position;
> >
> >    ASSERT (OptionsOpCodeHandle != NULL);
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode));
> >    OpCode.Question.Header.Prompt          = Prompt;
> > @@ -4009,7 +4009,7 @@ HiiCreateDateOpCode (
> >    EFI_IFR_DATE    OpCode;
> >    UINTN           Position;
> >
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE))) == 0);
> >    ASSERT ((DateFlags & (~(EFI_QF_DATE_YEAR_SUPPRESS |
> > EFI_QF_DATE_MONTH_SUPPRESS | EFI_QF_DATE_DAY_SUPPRESS |
> > EFI_QF_DATE_STORAGE))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode));
> > @@ -4074,7 +4074,7 @@ HiiCreateTimeOpCode (
> >    EFI_IFR_TIME    OpCode;
> >    UINTN           Position;
> >
> > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > EFI_IFR_FLAG_REST_STYLE))) == 0);
> >    ASSERT ((TimeFlags & (~(QF_TIME_HOUR_SUPPRESS |
> > QF_TIME_MINUTE_SUPPRESS | QF_TIME_SECOND_SUPPRESS |
> > QF_TIME_STORAGE))) == 0);
> >
> >    ZeroMem (&OpCode, sizeof (OpCode));
> > --
> > 2.17.1
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* 回复: [edk2-devel] [VFR support REST_STYLE PATCH v3 4/4] MdeModulePkg/DriverSampleDxe: Add HII sample options
  2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 4/4] MdeModulePkg/DriverSampleDxe: Add HII sample options Abner Chang
@ 2020-11-05  1:45   ` gaoliming
  2020-11-06  3:38     ` Abner Chang
  0 siblings, 1 reply; 11+ messages in thread
From: gaoliming @ 2020-11-05  1:45 UTC (permalink / raw)
  To: devel, abner.chang
  Cc: 'Jiaxin Wu', 'Siyuan Fu', 'Fan Wang',
	'Jiewen Yao', 'Dandan Bi', 'Eric Dong',
	'Nickle Wang'

Abner:
  Please create new question for STR_ONE_OF_PROMPT_X_UEFI, and keep original QuestionAboutTreeHugging unchanged.

Thanks
Liming
> -----邮件原件-----
> 发件人: bounce+27952+66967+4905953+8761045@groups.io
> <bounce+27952+66967+4905953+8761045@groups.io> 代表 Abner Chang
> 发送时间: 2020年11月4日 14:36
> 收件人: devel@edk2.groups.io
> 抄送: Jiaxin Wu <jiaxin.wu@intel.com>; Siyuan Fu <siyuan.fu@intel.com>; Fan
> Wang <fan.wang@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Dandan
> Bi <dandan.bi@intel.com>; Eric Dong <eric.dong@intel.com>; Nickle Wang
> <nickle.wang@hpe.com>
> 主题: [edk2-devel] [VFR support REST_STYLE PATCH v3 4/4]
> 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 <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>
> ---
>  .../Universal/DriverSampleDxe/NVDataStruc.h   |  4 ++-
>  .../Universal/DriverSampleDxe/Vfr.vfr         | 32 +++++++++++++++++--
>  .../Universal/DriverSampleDxe/VfrStrings.uni  | 11 +++++--
>  3 files changed, 40 insertions(+), 7 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
> b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
> index 8617617684..761f5e169c 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.<BR>
> +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>*
> +(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  Module Name:
> @@ -92,6 +93,7 @@ typedef struct {
>    UINT16  BitNumeric  : 12;
>    MY_BITS_DATA  MyBitData;
>    MY_EFI_UNION_DATA MyUnionData;
> +  UINT8   QuestionNonXUefiKeywordRestStyle;
>  } DRIVER_SAMPLE_CONFIGURATION;
> 
>  //
> diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
> b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
> index 65a65d4d1d..eecb062320 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.<BR>
> +// (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
>  //  SPDX-License-Identifier: BSD-2-Clause-Patent
>  //
>  //**/
> @@ -280,15 +281,40 @@ formset
> 
>      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.QuestionAboutTreeHugging,
> -      prompt      =
> STRING_TOKEN(STR_ONE_OF_PROMPT_KEYWORD),
> -      help        = STRING_TOKEN(STR_ONE_OF_HELP),
> -      flags       = RESET_REQUIRED,
> +      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..740b24cdc3 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.<BR>
> +// (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
>  // SPDX-License-Identifier: BSD-2-Clause-Patent
>  //
>  // Module Name:
> @@ -51,9 +52,13 @@
>                                         #language fr-FR "Check the
> input number, test the efi buffer varstore"
>  #string STR_ONE_OF_PROMPT              #language en-US "My
> one-of prompt #1"
>                                         #language fr-FR "Mi uno-
> de guía # 1"
> -#string STR_ONE_OF_PROMPT_KEYWORD      #language en-US "My
> Keyword Namespace Test"
> -                                       #language fr-FR "My
> Keyword Namespace Test"
> -                                       #language x-UEFI-ns
> "iSCSIBootEnable"
> +#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_CHECK_KEYWORD_SUPPORT      #language en-US "Check
> iSCSI Boot Enable"
>                                         #language fr-FR "Check
> iSCSI Boot Enable"
>  #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"
> --
> 2.17.1
> 
> 
> 
> 
> 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4] MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
  2020-11-05  1:42     ` 回复: " gaoliming
@ 2020-11-06  3:36       ` Abner Chang
  0 siblings, 0 replies; 11+ messages in thread
From: Abner Chang @ 2020-11-06  3:36 UTC (permalink / raw)
  To: gaoliming, devel@edk2.groups.io
  Cc: 'Dandan Bi', 'Eric Dong', 'Gao, Liming'

Fixed in v4 patch set.

thanks

> -----Original Message-----
> From: gaoliming [mailto:gaoliming@byosoft.com.cn]
> Sent: Thursday, November 5, 2020 9:42 AM
> To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> <abner.chang@hpe.com>
> Cc: 'Dandan Bi' <dandan.bi@intel.com>; 'Eric Dong' <eric.dong@intel.com>;
> 'Gao, Liming' <liming.gao@intel.com>
> Subject: 回复: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4]
> MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
> 
> This patch is to check REST_STYLE flag. I think the commit message may be
> check REST_STYLE flag.
> 
> > -----邮件原件-----
> > 发件人: bounce+27952+66976+4905953+8761045@groups.io
> > <bounce+27952+66976+4905953+8761045@groups.io> 代表 Abner Chang
> > 发送时间: 2020年11月4日 16:21
> > 收件人: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> > <abner.chang@hpe.com>
> > 抄送: 'Dandan Bi' <dandan.bi@intel.com>; 'Eric Dong'
> <eric.dong@intel.com>;
> > Gao, Liming <liming.gao@intel.com>
> > 主题: Re: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4]
> > MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
> >
> > Sorry, forget to CC reviewers.
> >
> > Abner
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf
> > > Of Abner Chang
> > > Sent: Wednesday, November 4, 2020 2:36 PM
> > > To: devel@edk2.groups.io
> > > Subject: [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4]
> > > MdeModulePkg/Library: Revise HiiLib to support REST_STYLE
> > >
> > > Add REST_STYLE support
> > >
> > > Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
> > > Signed-off-by: Ting Ye <ting.ye@intel.com>
> > > Signed-off-by: Siyuan Fu <siyuan.fu@intel.com>
> > > Signed-off-by: Fan Wang <fan.wang@intel.com>
> > > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> > > ---
> > >  MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 14 +++++++-------
> > >  1 file changed, 7 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > > b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > > index 564169bc14..57602828fe 100644
> > > --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > > +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c
> > > @@ -3605,7 +3605,7 @@ HiiCreateCheckBoxOpCode (
> > >    EFI_IFR_CHECKBOX  OpCode;
> > >    UINTN             Position;
> > >
> > > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > > EFI_IFR_FLAG_REST_STYLE))) == 0);
> > >
> > >    ZeroMem (&OpCode, sizeof (OpCode));
> > >    OpCode.Question.QuestionId             = QuestionId;
> > > @@ -3674,7 +3674,7 @@ HiiCreateNumericOpCode (
> > >    UINTN            Position;
> > >    UINTN            Length;
> > >
> > > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > > EFI_IFR_FLAG_REST_STYLE))) == 0);
> > >
> > >    Length  = 0;
> > >    ZeroMem (&OpCode, sizeof (OpCode)); @@ -3773,7 +3773,7 @@
> > > HiiCreateStringOpCode (
> > >    EFI_IFR_STRING  OpCode;
> > >    UINTN           Position;
> > >
> > > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > > EFI_IFR_FLAG_REST_STYLE))) == 0);
> > >
> > >    ZeroMem (&OpCode, sizeof (OpCode));
> > >    OpCode.Question.Header.Prompt          = Prompt;
> > > @@ -3841,7 +3841,7 @@ HiiCreateOneOfOpCode (
> > >    UINTN           Length;
> > >
> > >    ASSERT (OptionsOpCodeHandle != NULL);
> > > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > > EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> > > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > > EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> > >
> > >    ZeroMem (&OpCode, sizeof (OpCode));
> > >    OpCode.Question.Header.Prompt          = Prompt;
> > > @@ -3912,7 +3912,7 @@ HiiCreateOrderedListOpCode (
> > >    UINTN                 Position;
> > >
> > >    ASSERT (OptionsOpCodeHandle != NULL);
> > > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > > EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> > > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > > EFI_IFR_FLAG_REST_STYLE | EFI_IFR_FLAG_OPTIONS_ONLY))) == 0);
> > >
> > >    ZeroMem (&OpCode, sizeof (OpCode));
> > >    OpCode.Question.Header.Prompt          = Prompt;
> > > @@ -4009,7 +4009,7 @@ HiiCreateDateOpCode (
> > >    EFI_IFR_DATE    OpCode;
> > >    UINTN           Position;
> > >
> > > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > > EFI_IFR_FLAG_REST_STYLE))) == 0);
> > >    ASSERT ((DateFlags & (~(EFI_QF_DATE_YEAR_SUPPRESS |
> > > EFI_QF_DATE_MONTH_SUPPRESS | EFI_QF_DATE_DAY_SUPPRESS |
> > > EFI_QF_DATE_STORAGE))) == 0);
> > >
> > >    ZeroMem (&OpCode, sizeof (OpCode)); @@ -4074,7 +4074,7 @@
> > > HiiCreateTimeOpCode (
> > >    EFI_IFR_TIME    OpCode;
> > >    UINTN           Position;
> > >
> > > -  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED))) == 0);
> > > +  ASSERT ((QuestionFlags & (~(EFI_IFR_FLAG_READ_ONLY |
> > > EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED |
> > > EFI_IFR_FLAG_REST_STYLE))) == 0);
> > >    ASSERT ((TimeFlags & (~(QF_TIME_HOUR_SUPPRESS |
> > > QF_TIME_MINUTE_SUPPRESS | QF_TIME_SECOND_SUPPRESS |
> > > QF_TIME_STORAGE))) == 0);
> > >
> > >    ZeroMem (&OpCode, sizeof (OpCode));
> > > --
> > > 2.17.1
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > 
> >
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [edk2-devel] [VFR support REST_STYLE PATCH v3 4/4] MdeModulePkg/DriverSampleDxe: Add HII sample options
  2020-11-05  1:45   ` 回复: [edk2-devel] " gaoliming
@ 2020-11-06  3:38     ` Abner Chang
  0 siblings, 0 replies; 11+ messages in thread
From: Abner Chang @ 2020-11-06  3:38 UTC (permalink / raw)
  To: gaoliming, devel@edk2.groups.io
  Cc: 'Jiaxin Wu', 'Siyuan Fu', 'Fan Wang',
	'Jiewen Yao', 'Dandan Bi', 'Eric Dong',
	Wang, Nickle (HPS SW)

Hi Liming,
In V4, 
QuestionAboutTreeHugging option is kept for the EFI keyword test.
QuestionXUefiKeywordRestStyle option is for the EFI keyword with REST_STYLE.
QuestionNonXUefiKeywordRestStyle option is for the non EFI keyword with  REST_STYLE.

Thanks for the feedback and v4 was just sent to mailing list.

> -----Original Message-----
> From: gaoliming [mailto:gaoliming@byosoft.com.cn]
> Sent: Thursday, November 5, 2020 9:46 AM
> To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> <abner.chang@hpe.com>
> Cc: 'Jiaxin Wu' <jiaxin.wu@intel.com>; 'Siyuan Fu' <siyuan.fu@intel.com>;
> 'Fan Wang' <fan.wang@intel.com>; 'Jiewen Yao' <jiewen.yao@intel.com>;
> 'Dandan Bi' <dandan.bi@intel.com>; 'Eric Dong' <eric.dong@intel.com>;
> Wang, Nickle (HPS SW) <nickle.wang@hpe.com>
> Subject: 回复: [edk2-devel] [VFR support REST_STYLE PATCH v3 4/4]
> MdeModulePkg/DriverSampleDxe: Add HII sample options
> 
> Abner:
>   Please create new question for STR_ONE_OF_PROMPT_X_UEFI, and keep
> original QuestionAboutTreeHugging unchanged.
> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: bounce+27952+66967+4905953+8761045@groups.io
> > <bounce+27952+66967+4905953+8761045@groups.io> 代表 Abner Chang
> > 发送时间: 2020年11月4日 14:36
> > 收件人: devel@edk2.groups.io
> > 抄送: Jiaxin Wu <jiaxin.wu@intel.com>; Siyuan Fu <siyuan.fu@intel.com>;
> > Fan Wang <fan.wang@intel.com>; Jiewen Yao <jiewen.yao@intel.com>;
> > Dandan Bi <dandan.bi@intel.com>; Eric Dong <eric.dong@intel.com>;
> > Nickle Wang <nickle.wang@hpe.com>
> > 主题: [edk2-devel] [VFR support REST_STYLE PATCH v3 4/4]
> > 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 <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>
> > ---
> >  .../Universal/DriverSampleDxe/NVDataStruc.h   |  4 ++-
> >  .../Universal/DriverSampleDxe/Vfr.vfr         | 32 +++++++++++++++++--
> >  .../Universal/DriverSampleDxe/VfrStrings.uni  | 11 +++++--
> >  3 files changed, 40 insertions(+), 7 deletions(-)
> >
> > diff --git a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
> > b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
> > index 8617617684..761f5e169c 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.<BR>
> > +Copyright (c) 2007 - 2018, Intel Corporation. All rights
> > +reserved.<BR>*
> > +(C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
> >  SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >  Module Name:
> > @@ -92,6 +93,7 @@ typedef struct {
> >    UINT16  BitNumeric  : 12;
> >    MY_BITS_DATA  MyBitData;
> >    MY_EFI_UNION_DATA MyUnionData;
> > +  UINT8   QuestionNonXUefiKeywordRestStyle;
> >  } DRIVER_SAMPLE_CONFIGURATION;
> >
> >  //
> > diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
> > b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
> > index 65a65d4d1d..eecb062320 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.<BR>
> > +// (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
> >  //  SPDX-License-Identifier: BSD-2-Clause-Patent  //  //**/ @@
> > -280,15 +281,40 @@ formset
> >
> >      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.QuestionAboutTreeHugging,
> > -      prompt      =
> > STRING_TOKEN(STR_ONE_OF_PROMPT_KEYWORD),
> > -      help        = STRING_TOKEN(STR_ONE_OF_HELP),
> > -      flags       = RESET_REQUIRED,
> > +      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..740b24cdc3 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.<BR>
> > +// (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
> >  // SPDX-License-Identifier: BSD-2-Clause-Patent  //  // Module Name:
> > @@ -51,9 +52,13 @@
> >                                         #language fr-FR "Check the
> > input number, test the efi buffer varstore"
> >  #string STR_ONE_OF_PROMPT              #language en-US "My
> > one-of prompt #1"
> >                                         #language fr-FR "Mi uno- de
> > guía # 1"
> > -#string STR_ONE_OF_PROMPT_KEYWORD      #language en-US "My
> > Keyword Namespace Test"
> > -                                       #language fr-FR "My
> > Keyword Namespace Test"
> > -                                       #language x-UEFI-ns
> > "iSCSIBootEnable"
> > +#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_CHECK_KEYWORD_SUPPORT      #language en-US "Check
> > iSCSI Boot Enable"
> >                                         #language fr-FR "Check iSCSI
> > Boot Enable"
> >  #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"
> > --
> > 2.17.1
> >
> >
> >
> > 
> >
> 
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-11-06  3:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-04  6:35 [VFR support REST_STYLE PATCH v3 0/4] VFR support REST_STYLE Abner Chang
2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 1/4] MdePkg: Add GUID for REST Style Formset Abner Chang
2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 2/4] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option Abner Chang
2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 3/4] MdeModulePkg/Library: Revise HiiLib to support REST_STYLE Abner Chang
2020-11-04  6:35 ` [VFR support REST_STYLE PATCH v3 4/4] MdeModulePkg/DriverSampleDxe: Add HII sample options Abner Chang
2020-11-05  1:45   ` 回复: [edk2-devel] " gaoliming
2020-11-06  3:38     ` Abner Chang
     [not found] ` <16443D0E1EA9DC18.19640@groups.io>
2020-11-04  8:20   ` [edk2-devel] [VFR support REST_STYLE PATCH v3 3/4] MdeModulePkg/Library: Revise HiiLib to support REST_STYLE Abner Chang
2020-11-05  1:42     ` 回复: " gaoliming
2020-11-06  3:36       ` Abner Chang
     [not found]   ` <16444047FB902DE3.7719@groups.io>
2020-11-04  8:27     ` Abner Chang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox