public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Dong, Eric" <eric.dong@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [patch 06/11] MdeModulePkg/Setup: Remove PcdFrameworkCompatibilitySupport usage
Date: Tue, 7 May 2019 06:13:01 +0000	[thread overview]
Message-ID: <ED077930C258884BBCB450DB737E662259E237F9@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20190429021607.11304-7-dandan.bi@intel.com>

Reviewed-by: Eric Dong <eric.dong@intel.com>

> -----Original Message-----
> From: Bi, Dandan
> Sent: Monday, April 29, 2019 10:16 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>
> Subject: [patch 06/11] MdeModulePkg/Setup: Remove
> PcdFrameworkCompatibilitySupport usage
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464
> 
> Currently Framework compatibility support is not needed and
> PcdFrameworkCompatibilitySupport will be removed from edk2.
> So remove the usage of this PCD firstly.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  .../Universal/SetupBrowserDxe/IfrParse.c      | 86 +------------------
>  .../SetupBrowserDxe/SetupBrowserDxe.inf       |  6 +-
>  2 files changed, 2 insertions(+), 90 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
> b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
> index 034edb51a7..891b95cf9f 100644
> --- a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
> +++ b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
> @@ -1,9 +1,9 @@
>  /** @file
>  Parser for IFR binary encoding.
> 
> -Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> 
>  #include "Setup.h"
> @@ -82,80 +82,10 @@ CreateStatement (
>      InsertTailList (&Form->StatementListHead, &Statement->Link);
>    }
>    return Statement;
>  }
> 
> -/**
> -  Convert a numeric value to a Unicode String and insert it to String Package.
> -  This string is used as the Unicode Name for the EFI Variable. This is to support
> -  the deprecated vareqval opcode.
> -
> -  @param FormSet        The FormSet.
> -  @param Statement      The numeric question whose VarStoreInfo.VarName is
> the
> -                        numeric value which is used to produce the Unicode Name
> -                        for the EFI Variable.
> -
> -  If the Statement is NULL, the ASSERT.
> -  If the opcode is not Numeric, then ASSERT.
> -
> -  @retval EFI_SUCCESS The funtion always succeeds.
> -**/
> -EFI_STATUS
> -UpdateCheckBoxStringToken (
> -  IN CONST FORM_BROWSER_FORMSET *FormSet,
> -  IN       FORM_BROWSER_STATEMENT *Statement
> -  )
> -{
> -  CHAR16                  Str[MAXIMUM_VALUE_CHARACTERS];
> -  EFI_STRING_ID           Id;
> -
> -  ASSERT (Statement != NULL);
> -  ASSERT (Statement->Operand == EFI_IFR_NUMERIC_OP);
> -
> -  UnicodeValueToStringS (Str, sizeof (Str), 0, Statement->VarStoreInfo.VarName,
> MAXIMUM_VALUE_CHARACTERS - 1);
> -
> -  Id = HiiSetString (FormSet->HiiHandle, 0, Str, NULL);
> -  if (Id == 0) {
> -    return EFI_OUT_OF_RESOURCES;
> -  }
> -
> -  Statement->VarStoreInfo.VarName = Id;
> -
> -  return EFI_SUCCESS;
> -}
> -
> -/**
> -  Check if the next opcode is the EFI_IFR_EXTEND_OP_VAREQNAME.
> -
> -  @param OpCodeData     The current opcode.
> -
> -  @retval TRUE Yes.
> -  @retval FALSE No.
> -**/
> -BOOLEAN
> -IsNextOpCodeGuidedVarEqName (
> -  IN UINT8 *OpCodeData
> -  )
> -{
> -  //
> -  // Get next opcode
> -  //
> -  OpCodeData += ((EFI_IFR_OP_HEADER *) OpCodeData)->Length;
> -  if (*OpCodeData == EFI_IFR_GUID_OP) {
> -    if (CompareGuid (&gEfiIfrFrameworkGuid, (EFI_GUID *)(OpCodeData + sizeof
> (EFI_IFR_OP_HEADER)))) {
> -      //
> -      // Specific GUIDed opcodes to support IFR generated from Framework HII
> VFR
> -      //
> -      if ((((EFI_IFR_GUID_VAREQNAME *) OpCodeData)->ExtendOpCode) ==
> EFI_IFR_EXTEND_OP_VAREQNAME) {
> -        return TRUE;
> -      }
> -    }
> -  }
> -
> -  return FALSE;
> -}
> -
>  /**
>    Initialize Question's members.
> 
>    @param  OpCodeData             Pointer of the raw OpCode data.
>    @param  FormSet                Pointer of the current FormSet.
> @@ -174,11 +104,10 @@ CreateQuestion (
>    FORM_BROWSER_STATEMENT   *Statement;
>    EFI_IFR_QUESTION_HEADER  *QuestionHdr;
>    LIST_ENTRY               *Link;
>    FORMSET_STORAGE          *Storage;
>    NAME_VALUE_NODE          *NameValueNode;
> -  EFI_STATUS               Status;
>    BOOLEAN                  Find;
> 
>    Statement = CreateStatement (OpCodeData, FormSet, Form);
>    if (Statement == NULL) {
>      return NULL;
> @@ -196,23 +125,10 @@ CreateQuestion (
>      // VarStoreId of zero indicates no variable storage
>      //
>      return Statement;
>    }
> 
> -  //
> -  // Take a look at next OpCode to see whether it is a GUIDed opcode to
> support
> -  // Framework Compatibility
> -  //
> -  if (FeaturePcdGet (PcdFrameworkCompatibilitySupport)) {
> -    if ((*OpCodeData == EFI_IFR_NUMERIC_OP) &&
> IsNextOpCodeGuidedVarEqName (OpCodeData)) {
> -      Status = UpdateCheckBoxStringToken (FormSet, Statement);
> -      if (EFI_ERROR (Status)) {
> -        return NULL;
> -      }
> -    }
> -  }
> -
>    //
>    // Find Storage for this Question
>    //
>    Link = GetFirstNode (&FormSet->StorageListHead);
>    while (!IsNull (&FormSet->StorageListHead, Link)) { diff --git
> a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
> b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
> index a6b9402daa..82db7c1ef1 100644
> --- a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
> +++ b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
> @@ -1,11 +1,11 @@
>  ## @file
>  # The DXE driver produces FORM BROWSER2 protocol defined in UEFI
> specification.
>  #
>  # It also produces FormBrowserEx(2) protocol to let user register the different
> Hot key service.
>  #
> -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2007 - 2019, Intel Corporation. All rights
> +reserved.<BR>
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  #  #  ## @@ -50,11 +50,10
> @@
>    DevicePathLib
>    PcdLib
>    UefiLib
> 
>  [Guids]
> -  gEfiIfrFrameworkGuid                          ## SOMETIMES_CONSUMES  ## GUID
>    gEfiHiiPlatformSetupFormsetGuid               ## SOMETIMES_CONSUMES  ##
> GUID
>    gEfiHiiStandardFormGuid                       ## SOMETIMES_CONSUMES  ## GUID
>    gZeroGuid                                     ## SOMETIMES_CONSUMES  ## GUID
>    gEdkiiIfrBitVarstoreGuid                      ## SOMETIMES_CONSUMES  ## GUID
> 
> @@ -71,13 +70,10 @@
>    ## NOTIFY
>    gEdkiiFormDisplayEngineProtocolGuid
>    gEdkiiFormBrowserExProtocolGuid               ## PRODUCES
>    gEfiRegularExpressionProtocolGuid             ## SOMETIMES_CONSUMES
> 
> -[FeaturePcd]
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport
> ## CONSUMES
> -
>  [Depex]
>    gEfiHiiDatabaseProtocolGuid AND gEfiHiiConfigRoutingProtocolGuid
> 
>  [UserExtensions.TianoCore."ExtraFiles"]
>    SetupBrowserExtra.uni
> --
> 2.18.0.windows.1


  reply	other threads:[~2019-05-07  6:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29  2:15 [patch 00/11] Remove PcdFrameworkCompatibilitySupport Dandan Bi
2019-04-29  2:15 ` [patch 01/11] BaseTools/VfrCompile: Remove framework VFR support Dandan Bi
2019-05-07  5:52   ` [edk2-devel] " Bob Feng
2019-05-07  6:00   ` Liming Gao
2019-04-29  2:15 ` [patch 02/11] FatPkg/FatPei: Remove PcdFrameworkCompatibilitySupport usage Dandan Bi
2019-05-05  3:25   ` [edk2-devel] " Ni, Ray
2019-04-29  2:15 ` [patch 03/11] IntelFrameworkModulePkg: " Dandan Bi
2019-05-07  5:59   ` Liming Gao
2019-04-29  2:16 ` [patch 04/11] MdeModulePkg/Core: " Dandan Bi
2019-05-06  1:22   ` [edk2-devel] " Wu, Hao A
2019-05-06  2:48     ` Dandan Bi
2019-05-06  2:54       ` Wu, Hao A
2019-05-07  7:08         ` Dandan Bi
2019-05-08  8:23           ` Liming Gao
2019-04-29  2:16 ` [patch 05/11] MdeModulePkg/CdExpress: " Dandan Bi
2019-05-06  1:05   ` Wu, Hao A
2019-04-29  2:16 ` [patch 06/11] MdeModulePkg/Setup: " Dandan Bi
2019-05-07  6:13   ` Dong, Eric [this message]
2019-04-29  2:16 ` [patch 07/11] QuarkPlatformPkg: " Dandan Bi
2019-05-07  5:58   ` [edk2-devel] " Liming Gao
2019-04-29  2:16 ` [patch 08/11] SignedCapsulePkg: " Dandan Bi
2019-04-29  2:16 ` [patch 09/11] UefiCpuPkg: " Dandan Bi
2019-04-29 15:15   ` Laszlo Ersek
2019-04-29  2:16 ` [patch 10/11] Vlv2TbltDevicePkg: " Dandan Bi
2019-05-07  8:35   ` Sun, Zailiang
2019-04-29  2:16 ` [patch 11/11] MdeModulePkg: Remove PcdFrameworkCompatibilitySupport Dandan Bi
2019-05-06  1:25   ` Wu, Hao A
     [not found] ` <1599D055711F0B7C.4588@groups.io>
     [not found]   ` <3C0D5C461C9E904E8F62152F6274C0BB40BD01BF@SHSMSX104.ccr.corp.intel.com>
2019-05-07  6:02     ` [edk2-devel] [patch 08/11] SignedCapsulePkg: Remove PcdFrameworkCompatibilitySupport usage Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ED077930C258884BBCB450DB737E662259E237F9@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox