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.web10.5090.1604373998622550241 for ; Mon, 02 Nov 2020 19:26:38 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@hpe.com header.s=pps0720 header.b=dg9379FA; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0576d3f819=abner.chang@hpe.com) Received: from pps.filterd (m0150244.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0A33HTS7009192; Tue, 3 Nov 2020 03:26:38 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 : mime-version : content-type : content-transfer-encoding; s=pps0720; bh=Q6RcwltQ54K+iytT4afH4ahK+ezctN5YlzFQuONFHxs=; b=dg9379FAHBnvcqHNSLORbOwywr33QR0xDxui8kst56JMavYMbFjQBgIpomzV6bf9H+3+ gR5iIXEEQTfCk3KIGTIIFyNLqDQAZojPUU8M2jc25FiI8e/Ne3qAKnSbDxG5vMdAk9wx PoV6DeMKiAOKRW1Up2/fMm6EIfDp9cRsz9XFM5zXAJpv9HBPjrkf9njmfCnH+A8D9NKy GjzKHXQgGwF1M0g1Rdn+vd5kgv94sY/tEsQ37z1D+Iz1cN/4WlwYfHAfhtXZld0KKONH 7s7GrmaqosJXNlshF4ry21Ur8NL0sinupUzLzgDW5mmoNYs2W9Z5CBujotM7mW2ogOq3 bQ== Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0b-002e3701.pphosted.com with ESMTP id 34h0k249gw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Nov 2020 03:26:37 +0000 Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2352.austin.hpe.com (Postfix) with ESMTP id 13CF685; Tue, 3 Nov 2020 03:26:37 +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 5F9BC37; Tue, 3 Nov 2020 03:26:35 +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 v2 3/3] MdeModulePkg/DriverSampleDxe: Add HII sample options Date: Tue, 3 Nov 2020 10:41:00 +0800 Message-Id: <20201103024100.7733-4-abner.chang@hpe.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201103024100.7733-1-abner.chang@hpe.com> References: <20201103024100.7733-1-abner.chang@hpe.com> MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-11-02_16:2020-11-02,2020-11-02 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=1 adultscore=0 clxscore=1015 mlxlogscore=999 lowpriorityscore=0 mlxscore=0 spamscore=0 malwarescore=0 phishscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011030022 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-002e3701.pphosted.com id 0A33HTS7009192 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 | 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/MdeMo= dulePkg/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 =20 -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 =20 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; =20 // diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePk= g/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. +// (C) Copyright 2020 Hewlett Packard Enterprise Development LP
// SPDX-License-Identifier: BSD-2-Clause-Patent // //**/ @@ -280,15 +281,40 @@ formset =20 endoneof; =20 + // + // This is an HII option which has REST_STYLE flag and x-UEFI namesp= ace + // UNI string associated. This HII option could be configured by eit= her in-band + // edk2 setup browser or the remote management in out-of-band such a= s Redfish + // service. This HII option is configured through EFI_KEYWORD_HANDLE= R_PROTOCOL. + // oneof varid =3D MyIfrNVData.QuestionAboutTreeHugging, - prompt =3D STRING_TOKEN(STR_ONE_OF_PROMPT_KEYWORD), - help =3D STRING_TOKEN(STR_ONE_OF_HELP), - flags =3D RESET_REQUIRED, + prompt =3D STRING_TOKEN(STR_ONE_OF_PROMPT_X_UEFI), + help =3D STRING_TOKEN(STR_ONE_OF_PROMPT_X_UEFI_HELP), + flags =3D RESET_REQUIRED | REST_STYLE, option text =3D STRING_TOKEN(STR_ONE_OF_TEXT1), value =3D 0, flags= =3D 0; option text =3D STRING_TOKEN(STR_ONE_OF_TEXT2), value =3D 1, flags= =3D DEFAULT; option text =3D STRING_TOKEN(STR_ONE_OF_TEXT3), value =3D 3, flags= =3D 0; endoneof; =20 + // + // 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 eit= her + // setup browser or the remote management in out-of-band such as Red= fish + // service. This HII option is configured through EFI HII Configurat= ion Routing + // Protocol becasue it doesn't have x-UEFI namespace UNI string. + // + numeric varid =3D MyIfrNVData.QuestionNonXUefiKeywordRestStyle, + prompt =3D STRING_TOKEN(STR_ONE_OF_PROMPT_NON_X_UEFI), + help =3D STRING_TOKEN(STR_ONE_OF_PROMPT_NON_X_UEFI_HELP), + flags =3D RESET_REQUIRED | REST_STYLE, + minimum =3D 0, + maximum =3D 0xf0, + step =3D 0, // Stepping of 0 equates to a manual = entering + // of a value, otherwise it will be adj= usted by "+"/"-" + default =3D 0, // defaultstore could be used to spec= ify 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/MdeM= odulePkg/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. +# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
// 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=C3= =ADa # 1" -#string STR_ONE_OF_PROMPT_KEYWORD #language en-US "My Keyword Names= pace Test" - #language fr-FR "My Keyword Names= pace Test" - #language x-UEFI-ns "iSCSIBootEna= ble" +#string STR_ONE_OF_PROMPT_X_UEFI #language en-US "x-UEFI HII Optio= n" + #language fr-FR "x-UEFI HII Optio= n" + #language x-UEFI-ns "xUefiHiiOpti= on" +#string STR_ONE_OF_PROMPT_X_UEFI_HELP #language en-US "This is an HII o= ption which has REST_STYLE flag and x-UEFI namespace UNI string associate= d. This HII option could be configured by either in-band edk2 setup brows= er 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 H= II Option" + #language fr-FR "Non x-UEFI H= II Option" +#string STR_ONE_OF_PROMPT_NON_X_UEFI_HELP #language en-US "This is a HI= I option which has REST_STYLE flag but without the x-UEFI namespace UNI s= tring associated. This HII option could be configured by either setup bro= wser or the remote management in out-of-band such as Redfish service. Thi= s 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 i= s going to be a long string to test out the efficiency of the ability of = the I am tired of typing capabilities" --=20 2.17.1