public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [VFR support REST_STYLE PATCH v2 0/3] VFR support REST_STYLE
@ 2020-11-03  2:40 Abner Chang
  2020-11-03  2:40 ` [VFR support REST_STYLE PATCH v2 1/3] MdePkg: Add GUID for REST Style Formset Abner Chang
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Abner Chang @ 2020-11-03  2:40 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 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 (3):
  MdePkg: Add GUID for REST Style Formset
  BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
  MdeModulePkg/DriverSampleDxe: Add HII sample options

 BaseTools/Source/C/VfrCompile/VfrSyntax.g     | 25 +++++++++++++--
 .../Universal/DriverSampleDxe/NVDataStruc.h   |  4 ++-
 .../Universal/DriverSampleDxe/Vfr.vfr         | 32 +++++++++++++++++--
 .../Universal/DriverSampleDxe/VfrStrings.uni  | 11 +++++--
 MdePkg/MdePkg.dec                             |  2 +-
 5 files changed, 63 insertions(+), 11 deletions(-)

-- 
2.17.1


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

* [VFR support REST_STYLE PATCH v2 1/3] MdePkg: Add GUID for REST Style Formset
  2020-11-03  2:40 [VFR support REST_STYLE PATCH v2 0/3] VFR support REST_STYLE Abner Chang
@ 2020-11-03  2:40 ` Abner Chang
  2020-11-04  5:15   ` 回复: " gaoliming
  2020-11-03  2:40 ` [VFR support REST_STYLE PATCH v2 2/3] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option Abner Chang
  2020-11-03  2:41 ` [VFR support REST_STYLE PATCH v2 3/3] MdeModulePkg/DriverSampleDxe: Add HII sample options Abner Chang
  2 siblings, 1 reply; 11+ messages in thread
From: Abner Chang @ 2020-11-03  2:40 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Nickle Wang

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>
---
 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 v2 2/3] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
  2020-11-03  2:40 [VFR support REST_STYLE PATCH v2 0/3] VFR support REST_STYLE Abner Chang
  2020-11-03  2:40 ` [VFR support REST_STYLE PATCH v2 1/3] MdePkg: Add GUID for REST Style Formset Abner Chang
@ 2020-11-03  2:40 ` Abner Chang
  2020-11-04  5:17   ` 回复: [edk2-devel] " gaoliming
  2020-11-03  2:41 ` [VFR support REST_STYLE PATCH v2 3/3] MdeModulePkg/DriverSampleDxe: Add HII sample options Abner Chang
  2 siblings, 1 reply; 11+ messages in thread
From: Abner Chang @ 2020-11-03  2:40 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Nickle Wang

Add REST_STYLE support on VFR language

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>
---
 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 v2 3/3] MdeModulePkg/DriverSampleDxe: Add HII sample options
  2020-11-03  2:40 [VFR support REST_STYLE PATCH v2 0/3] VFR support REST_STYLE Abner Chang
  2020-11-03  2:40 ` [VFR support REST_STYLE PATCH v2 1/3] MdePkg: Add GUID for REST Style Formset Abner Chang
  2020-11-03  2:40 ` [VFR support REST_STYLE PATCH v2 2/3] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option Abner Chang
@ 2020-11-03  2:41 ` Abner Chang
  2020-11-04  5:19   ` 回复: [edk2-devel] " gaoliming
  2 siblings, 1 reply; 11+ messages in thread
From: Abner Chang @ 2020-11-03  2:41 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..e67b888783 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

* 回复: [VFR support REST_STYLE PATCH v2 1/3] MdePkg: Add GUID for REST Style Formset
  2020-11-03  2:40 ` [VFR support REST_STYLE PATCH v2 1/3] MdePkg: Add GUID for REST Style Formset Abner Chang
@ 2020-11-04  5:15   ` gaoliming
  0 siblings, 0 replies; 11+ messages in thread
From: gaoliming @ 2020-11-04  5:15 UTC (permalink / raw)
  To: 'Abner Chang', devel
  Cc: 'Michael D Kinney', 'Zhiguang Liu',
	'Nickle Wang'

Anber:
 This patch set is related to BZ
https://bugzilla.tianocore.org/show_bug.cgi?id=2916. Please include BZ in
the commit message. 
 With this change, Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

Thanks
Liming
> -----邮件原件-----
> 发件人: Abner Chang <abner.chang@hpe.com>
> 发送时间: 2020年11月3日 10:41
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Nickle
> Wang <nickle.wang@hpe.com>
> 主题: [VFR support REST_STYLE PATCH v2 1/3] MdePkg: Add GUID for REST
> Style Formset
> 
> 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>
> ---
>  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	[flat|nested] 11+ messages in thread

* 回复: [edk2-devel] [VFR support REST_STYLE PATCH v2 2/3] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
  2020-11-03  2:40 ` [VFR support REST_STYLE PATCH v2 2/3] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option Abner Chang
@ 2020-11-04  5:17   ` gaoliming
  2020-11-06  7:09     ` Abner Chang
  0 siblings, 1 reply; 11+ messages in thread
From: gaoliming @ 2020-11-04  5:17 UTC (permalink / raw)
  To: devel, abner.chang
  Cc: 'Bob Feng', 'Yuwei Chen', 'Nickle Wang'

Anber:
 This patch set is related to BZ
https://bugzilla.tianocore.org/show_bug.cgi?id=2916. Please include BZ in
the commit message. 
 With this change, Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

 Besides, please also submit the patch to update VFR spec
https://github.com/tianocore-docs/edk2-VfrSpecification

Thanks
Liming
> -----邮件原件-----
> 发件人: bounce+27952+66901+4905953+8761045@groups.io
> <bounce+27952+66901+4905953+8761045@groups.io> 代表 Abner Chang
> 发送时间: 2020年11月3日 10:41
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>; Nickle
> Wang <nickle.wang@hpe.com>
> 主题: [edk2-devel] [VFR support REST_STYLE PATCH v2 2/3]
> BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
> 
> Add REST_STYLE support on VFR language
> 
> 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>
> ---
>  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	[flat|nested] 11+ messages in thread

* 回复: [edk2-devel] [VFR support REST_STYLE PATCH v2 3/3] MdeModulePkg/DriverSampleDxe: Add HII sample options
  2020-11-03  2:41 ` [VFR support REST_STYLE PATCH v2 3/3] MdeModulePkg/DriverSampleDxe: Add HII sample options Abner Chang
@ 2020-11-04  5:19   ` gaoliming
  2020-11-04  6:40     ` Abner Chang
       [not found]     ` <16443AD1740FEC1A.12282@groups.io>
  0 siblings, 2 replies; 11+ messages in thread
From: gaoliming @ 2020-11-04  5:19 UTC (permalink / raw)
  To: devel, abner.chang
  Cc: 'Jiaxin Wu', 'Siyuan Fu', 'Fan Wang',
	'Jiewen Yao', 'Dandan Bi', 'Eric Dong',
	'Nickle Wang'

Abner:
  I can't apply this patch in edk2. Have you try it?

  Besides, this patch set supports rest option generation. Is SetupBrowser required to handle it?

Thanks
Liming
> -----邮件原件-----
> 发件人: bounce+27952+66902+4905953+8761045@groups.io
> <bounce+27952+66902+4905953+8761045@groups.io> 代表 Abner Chang
> 发送时间: 2020年11月3日 10:41
> 收件人: 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 v2 3/3]
> 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..e67b888783 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 v2 3/3] MdeModulePkg/DriverSampleDxe: Add HII sample options
  2020-11-04  5:19   ` 回复: [edk2-devel] " gaoliming
@ 2020-11-04  6:40     ` Abner Chang
       [not found]     ` <16443AD1740FEC1A.12282@groups.io>
  1 sibling, 0 replies; 11+ messages in thread
From: Abner Chang @ 2020-11-04  6:40 UTC (permalink / raw)
  To: devel@edk2.groups.io, gaoliming@byosoft.com.cn
  Cc: 'Jiaxin Wu', 'Siyuan Fu', 'Fan Wang',
	'Jiewen Yao', 'Dandan Bi', 'Eric Dong',
	Wang, Nickle (HPS SW)

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> gaoliming
> Sent: Wednesday, November 4, 2020 1:20 PM
> 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 v2 3/3]
> MdeModulePkg/DriverSampleDxe: Add HII sample options
> 
> Abner:
>   I can't apply this patch in edk2. Have you try it?
Hmm...I just tried CI on this patch and it was passed.
https://github.com/tianocore/edk2/pull/1074


> 
>   Besides, this patch set supports rest option generation. Is SetupBrowser
> required to handle it?
Yes, we do have another change for HiiLib and was thought to send the separate patch for it. I  will include it in v3 patch set, stay tune.
Thanks

> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: bounce+27952+66902+4905953+8761045@groups.io
> > <bounce+27952+66902+4905953+8761045@groups.io> 代表 Abner Chang
> > 发送时间: 2020年11月3日 10:41
> > 收件人: 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 v2 3/3]
> > 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..e67b888783 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 v2 3/3] MdeModulePkg/DriverSampleDxe: Add HII sample options
       [not found]     ` <16443AD1740FEC1A.12282@groups.io>
@ 2020-11-04  7:26       ` Abner Chang
  0 siblings, 0 replies; 11+ messages in thread
From: Abner Chang @ 2020-11-04  7:26 UTC (permalink / raw)
  To: devel@edk2.groups.io, Chang, Abner (HPS SW/FW Technologist),
	gaoliming@byosoft.com.cn
  Cc: 'Jiaxin Wu', 'Siyuan Fu', 'Fan Wang',
	'Jiewen Yao', 'Dandan Bi', 'Eric Dong',
	Wang, Nickle (HPS SW)

Hi Liming,
v3 patch set was sent. Please check if you can apply 4/4 patch.
Thanks
Abner

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Wednesday, November 4, 2020 2:40 PM
> To: devel@edk2.groups.io; gaoliming@byosoft.com.cn
> 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: Re: [edk2-devel] [VFR support REST_STYLE PATCH v2 3/3]
> MdeModulePkg/DriverSampleDxe: Add HII sample options
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > gaoliming
> > Sent: Wednesday, November 4, 2020 1:20 PM
> > 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 v2 3/3]
> > MdeModulePkg/DriverSampleDxe: Add HII sample options
> >
> > Abner:
> >   I can't apply this patch in edk2. Have you try it?
> Hmm...I just tried CI on this patch and it was passed.
> https://github.com/tianocore/edk2/pull/1074
> 
> 
> >
> >   Besides, this patch set supports rest option generation. Is SetupBrowser
> > required to handle it?
> Yes, we do have another change for HiiLib and was thought to send the
> separate patch for it. I  will include it in v3 patch set, stay tune.
> Thanks
> 
> >
> > Thanks
> > Liming
> > > -----邮件原件-----
> > > 发件人: bounce+27952+66902+4905953+8761045@groups.io
> > > <bounce+27952+66902+4905953+8761045@groups.io> 代表 Abner Chang
> > > 发送时间: 2020年11月3日 10:41
> > > 收件人: 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 v2 3/3]
> > > 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..e67b888783 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 v2 2/3] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
  2020-11-04  5:17   ` 回复: [edk2-devel] " gaoliming
@ 2020-11-06  7:09     ` Abner Chang
  2020-11-09  1:01       ` 回复: " gaoliming
  0 siblings, 1 reply; 11+ messages in thread
From: Abner Chang @ 2020-11-06  7:09 UTC (permalink / raw)
  To: gaoliming, devel@edk2.groups.io
  Cc: 'Bob Feng', 'Yuwei Chen', Wang, Nickle (HPS SW)



> -----Original Message-----
> From: gaoliming [mailto:gaoliming@byosoft.com.cn]
> Sent: Wednesday, November 4, 2020 1:18 PM
> To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> <abner.chang@hpe.com>
> Cc: 'Bob Feng' <bob.c.feng@intel.com>; 'Yuwei Chen'
> <yuwei.chen@intel.com>; Wang, Nickle (HPS SW) <nickle.wang@hpe.com>
> Subject: 回复: [edk2-devel] [VFR support REST_STYLE PATCH v2 2/3]
> BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
> 
> Anber:
>  This patch set is related to BZ
> INVALID URI REMOVED
> 3A__bugzilla.tianocore.org_show-5Fbug.cgi-3Fid-
> 3D2916&d=DwIFbw&c=C5b8zRQO1miGmBeVZ2LFWg&r=_SN6FZBN4Vgi4Ulks
> kz6qU3NYRO03nHp9P7Z5q59A3E&m=RhXI_8zZpu44C2PjRLMwse05Y7MB8xy
> QQKdX1wW9akk&s=5QKMzaPNf9J7qWrRj5Of2TA8g2ZwdxmQtj8QPn0xaXc&
> e= . Please include BZ in the commit message.
>  With this change, Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> 
>  Besides, please also submit the patch to update VFR spec
> https://github.com/tianocore-docs/edk2-VfrSpecification

Hi Liming,
The patch for VFR spec change should be sent to mailing list or just create a PR on Github?
Thanks

Abner

> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: bounce+27952+66901+4905953+8761045@groups.io
> > <bounce+27952+66901+4905953+8761045@groups.io> 代表 Abner Chang
> > 发送时间: 2020年11月3日 10:41
> > 收件人: devel@edk2.groups.io
> > 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> > <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>;
> Nickle
> > Wang <nickle.wang@hpe.com>
> > 主题: [edk2-devel] [VFR support REST_STYLE PATCH v2 2/3]
> > BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
> >
> > Add REST_STYLE support on VFR language
> >
> > 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>
> > ---
> >  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	[flat|nested] 11+ messages in thread

* 回复: [edk2-devel] [VFR support REST_STYLE PATCH v2 2/3] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
  2020-11-06  7:09     ` Abner Chang
@ 2020-11-09  1:01       ` gaoliming
  0 siblings, 0 replies; 11+ messages in thread
From: gaoliming @ 2020-11-09  1:01 UTC (permalink / raw)
  To: devel, abner.chang
  Cc: 'Bob Feng', 'Yuwei Chen',
	'Wang, Nickle (HPS SW)'

Abner:
  Also send the patch to edk2 mail list for the change in VFR spec. 

Thanks
Liming
> -----邮件原件-----
> 发件人: bounce+27952+67081+4905953+8761045@groups.io
> <bounce+27952+67081+4905953+8761045@groups.io> 代表 Abner Chang
> 发送时间: 2020年11月6日 15:09
> 收件人: gaoliming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io
> 抄送: 'Bob Feng' <bob.c.feng@intel.com>; 'Yuwei Chen'
> <yuwei.chen@intel.com>; Wang, Nickle (HPS SW) <nickle.wang@hpe.com>
> 主题: Re: [edk2-devel] [VFR support REST_STYLE PATCH v2 2/3]
> BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
> 
> 
> 
> > -----Original Message-----
> > From: gaoliming [mailto:gaoliming@byosoft.com.cn]
> > Sent: Wednesday, November 4, 2020 1:18 PM
> > To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
> > <abner.chang@hpe.com>
> > Cc: 'Bob Feng' <bob.c.feng@intel.com>; 'Yuwei Chen'
> > <yuwei.chen@intel.com>; Wang, Nickle (HPS SW) <nickle.wang@hpe.com>
> > Subject: 回复: [edk2-devel] [VFR support REST_STYLE PATCH v2 2/3]
> > BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
> >
> > Anber:
> >  This patch set is related to BZ
> > INVALID URI REMOVED
> > 3A__bugzilla.tianocore.org_show-5Fbug.cgi-3Fid-
> >
> 3D2916&d=DwIFbw&c=C5b8zRQO1miGmBeVZ2LFWg&r=_SN6FZBN4Vgi4Ulk
> s
> >
> kz6qU3NYRO03nHp9P7Z5q59A3E&m=RhXI_8zZpu44C2PjRLMwse05Y7MB8xy
> >
> QQKdX1wW9akk&s=5QKMzaPNf9J7qWrRj5Of2TA8g2ZwdxmQtj8QPn0xaXc&
> > e= . Please include BZ in the commit message.
> >  With this change, Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> >
> >  Besides, please also submit the patch to update VFR spec
> > https://github.com/tianocore-docs/edk2-VfrSpecification
> 
> Hi Liming,
> The patch for VFR spec change should be sent to mailing list or just
create a
> PR on Github?
> Thanks
> 
> Abner
> 
> >
> > Thanks
> > Liming
> > > -----邮件原件-----
> > > 发件人: bounce+27952+66901+4905953+8761045@groups.io
> > > <bounce+27952+66901+4905953+8761045@groups.io> 代表 Abner
> Chang
> > > 发送时间: 2020年11月3日 10:41
> > > 收件人: devel@edk2.groups.io
> > > 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> > > <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>;
> > Nickle
> > > Wang <nickle.wang@hpe.com>
> > > 主题: [edk2-devel] [VFR support REST_STYLE PATCH v2 2/3]
> > > BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option
> > >
> > > Add REST_STYLE support on VFR language
> > >
> > > 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>
> > > ---
> > >  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	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-11-09  1:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-03  2:40 [VFR support REST_STYLE PATCH v2 0/3] VFR support REST_STYLE Abner Chang
2020-11-03  2:40 ` [VFR support REST_STYLE PATCH v2 1/3] MdePkg: Add GUID for REST Style Formset Abner Chang
2020-11-04  5:15   ` 回复: " gaoliming
2020-11-03  2:40 ` [VFR support REST_STYLE PATCH v2 2/3] BaseTools/VfrCompile: VFR compiler supports REST_STYLE in HII option Abner Chang
2020-11-04  5:17   ` 回复: [edk2-devel] " gaoliming
2020-11-06  7:09     ` Abner Chang
2020-11-09  1:01       ` 回复: " gaoliming
2020-11-03  2:41 ` [VFR support REST_STYLE PATCH v2 3/3] MdeModulePkg/DriverSampleDxe: Add HII sample options Abner Chang
2020-11-04  5:19   ` 回复: [edk2-devel] " gaoliming
2020-11-04  6:40     ` Abner Chang
     [not found]     ` <16443AD1740FEC1A.12282@groups.io>
2020-11-04  7:26       ` Abner Chang

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