From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web09.7010.1604633725908021955 for ; Thu, 05 Nov 2020 19:35:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=c9xVSh5/; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=057929b778=abner.chang@hpe.com) Received: from pps.filterd (m0148664.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0A63HVxd030258; Fri, 6 Nov 2020 03:35:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pps0720; bh=K3tCG87cfEGFGLbSkui2RFlXCMQSxOigmZPFZA4Icj8=; b=c9xVSh5/CSg+FV3zJ8Vi8NrlLYqwLYHahIRcGTORa98bfVlCni1kGWML2AL0IVSesZgE p2Y07RdXPkaiWsalFcloH/6uQwfHMlrkO7dyho0tQhK4GsmTUsun/zuV0wL2k1fXWgx8 yFiAsz1KUyPnwyf6mIJtpjGgzDmpKZX0yl9utOvkm3GByHJy8mELJGUtPZ+2tnD02Ztb 9Tk5SufSFUamuh5OJnR4PVwEFRBUp8H8M26ilMdRqW/TrFF+mbj3uuhUNP0M23SuLmm/ 2MhPwJVdVMBe4+2xoQ0BV/noU04LUHJtOsnkRaenKajvwSjW5tU6nw2AP3AYz040n8Fd nA== Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) by mx0b-002e3701.pphosted.com with ESMTP id 34mcp6rnj2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Nov 2020 03:35:25 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id 4EC8077; Fri, 6 Nov 2020 03:35:24 +0000 (UTC) Received: from abner-virtual-machine.asiapacific.hpqcorp.net (abner-virtual-machine.asiapacific.hpqcorp.net [15.119.210.153]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 8DF5736; Fri, 6 Nov 2020 03:35:22 +0000 (UTC) From: "Abner Chang" To: devel@edk2.groups.io Cc: Jiaxin Wu , Siyuan Fu , Fan Wang , Jiewen Yao , Dandan Bi , Eric Dong , Nickle Wang Subject: [VFR support REST_STYLE PATCH v4 4/4] MdeModulePkg/DriverSampleDxe: Add HII sample options Date: Fri, 6 Nov 2020 10:49:39 +0800 Message-Id: <20201106024939.17761-5-abner.chang@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201106024939.17761-1-abner.chang@hpe.com> References: <20201106024939.17761-1-abner.chang@hpe.com> X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-11-06_01:2020-11-05,2020-11-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 mlxscore=0 clxscore=1015 mlxlogscore=999 bulkscore=0 suspectscore=1 adultscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011060022 Add x-uefi-ns keyword REST_STYLE HII option and non x-uefi keyword REST_STYLE HII option. Signed-off-by: Abner Chang Cc: Jiaxin Wu Cc: Siyuan Fu Cc: Fan Wang Cc: Jiewen Yao Cc: Dandan Bi Cc: Eric Dong Cc: Nickle Wang --- .../Universal/DriverSampleDxe/NVDataStruc.h | 5 ++- .../Universal/DriverSampleDxe/Vfr.vfr | 36 +++++++++++++++++++ .../Universal/DriverSampleDxe/VfrStrings.uni | 8 +++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h index 8617617684..a4ec1b4bd1 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h +++ b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h @@ -1,6 +1,7 @@ /** @file -Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
* +(C) Copyright 2020 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent Module Name: @@ -92,6 +93,8 @@ typedef struct { UINT16 BitNumeric : 12; MY_BITS_DATA MyBitData; MY_EFI_UNION_DATA MyUnionData; + UINT8 QuestionXUefiKeywordRestStyle; + UINT8 QuestionNonXUefiKeywordRestStyle; } DRIVER_SAMPLE_CONFIGURATION; // diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr index 65a65d4d1d..5323e2b411 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -3,6 +3,7 @@ // Sample Setup formset. // // Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+// (C) Copyright 2020 Hewlett Packard Enterprise Development LP
// SPDX-License-Identifier: BSD-2-Clause-Patent // //**/ @@ -289,6 +290,41 @@ formset option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 3, flags = 0; endoneof; + // + // This is an HII option which has REST_STYLE flag and x-UEFI namespace + // UNI string associated. This HII option could be configured by either in-band + // edk2 setup browser or the remote management in out-of-band such as Redfish + // service. This HII option is configured through EFI_KEYWORD_HANDLER_PROTOCOL. + // + oneof varid = MyIfrNVData.QuestionXUefiKeywordRestStyle, + prompt = STRING_TOKEN(STR_ONE_OF_PROMPT_X_UEFI), + help = STRING_TOKEN(STR_ONE_OF_PROMPT_X_UEFI_HELP), + flags = RESET_REQUIRED | REST_STYLE, + option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = 0; + option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = DEFAULT; + option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 3, flags = 0; + endoneof; + + + // + // This is a HII option which has REST_STYLE flag but without the x-UEFI namespace + // UNI string associated. This HII option could be configured by either + // setup browser or the remote management in out-of-band such as Redfish + // service. This HII option is configured through EFI HII Configuration Routing + // Protocol becasue it doesn't have x-UEFI namespace UNI string. + // + numeric varid = MyIfrNVData.QuestionNonXUefiKeywordRestStyle, + prompt = STRING_TOKEN(STR_ONE_OF_PROMPT_NON_X_UEFI), + help = STRING_TOKEN(STR_ONE_OF_PROMPT_NON_X_UEFI_HELP), + flags = RESET_REQUIRED | REST_STYLE, + minimum = 0, + maximum = 0xf0, + step = 0, // Stepping of 0 equates to a manual entering + // of a value, otherwise it will be adjusted by "+"/"-" + default = 0, // defaultstore could be used to specify the default type + // If no defaultstore is specified, it implies Standard Default + endnumeric; + // // Define a string (EFI_IFR_STRING) // diff --git a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni index bafa194c63..9587e935a6 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni +++ b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni @@ -1,6 +1,7 @@ // *++ // // Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+// (C) Copyright 2020 Hewlett Packard Enterprise Development LP
// SPDX-License-Identifier: BSD-2-Clause-Patent // // Module Name: @@ -56,6 +57,13 @@ #language x-UEFI-ns "iSCSIBootEnable" #string STR_CHECK_KEYWORD_SUPPORT #language en-US "Check iSCSI Boot Enable" #language fr-FR "Check iSCSI Boot Enable" +#string STR_ONE_OF_PROMPT_X_UEFI #language en-US "x-UEFI HII Option" + #language fr-FR "x-UEFI HII Option" + #language x-UEFI-ns "xUefiHiiOption" +#string STR_ONE_OF_PROMPT_X_UEFI_HELP #language en-US "This is an HII option which has REST_STYLE flag and x-UEFI namespace UNI string associated. This HII option could be configured by either in-band edk2 setup browser or the remote management in out-of-band such as Redfish service. This HII option is configured through EFI_KEYWORD_HANDLER_PROTOCOL." +#string STR_ONE_OF_PROMPT_NON_X_UEFI #language en-US "Non x-UEFI HII Option" + #language fr-FR "Non x-UEFI HII Option" +#string STR_ONE_OF_PROMPT_NON_X_UEFI_HELP #language en-US "This is a HII option which has REST_STYLE flag but without the x-UEFI namespace UNI string associated. This HII option could be configured by either setup browser or the remote management in out-of-band such as Redfish service. This HII option is configured through EFI HII Configuration Routing Protocol becasue it doesn't have x-UEFI namespace UNI string." #string STR_ONE_OF_HELP #language en-US "My one-of help is going to be a long string to test out the efficiency of the ability of the I am tired of typing capabilities" #language fr-FR "Mi uno- de ayuda va a ser una cadena larga a probar fuera de la eficacia de la capacidad del yo es cansada de capacidades el pulsar." #string STR_ONE_OF_TEXT1 #language en-US "My one-of text #1" -- 2.17.1