Re: [edk2] [PATCH V3 17/17] MdeModulePkg: Remove EmuVariableRuntimeDxe

2019-01-15 Thread Wu, Hao A
Reviewed-by: Hao Wu 

Best Regards,
Hao Wu


> -Original Message-
> From: Zeng, Star
> Sent: Tuesday, January 15, 2019 6:30 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star; Wang, Jian J; Wu, Hao A
> Subject: [PATCH V3 17/17] MdeModulePkg: Remove
> EmuVariableRuntimeDxe
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1323
> Merge EmuVariable and Real variable driver.
> 
> The real variable driver has been updated to support emulated
> variable NV mode.
> This patch removes EmuVariableRuntimeDxe after platforms are
> migrated to use the merged variable driver.
> 
> Cc: Jian J Wang 
> Cc: Hao Wu 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng 
> ---
>  MdeModulePkg/MdeModulePkg.dsc  |5 +-
>  .../Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 1820 
> 
>  .../EmuRuntimeDxe/EmuVariableRuntimeDxe.inf|   88 -
>  .../EmuRuntimeDxe/EmuVariableRuntimeDxe.uni|   22 -
>  .../EmuRuntimeDxe/EmuVariableRuntimeDxeExtra.uni   |   19 -
>  .../Variable/EmuRuntimeDxe/InitVariable.c  |  259 ---
>  .../Universal/Variable/EmuRuntimeDxe/Variable.h|  277 ---
>  7 files changed, 1 insertion(+), 2489 deletions(-)
>  delete mode 100644
> MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
>  delete mode 100644
> MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntime
> Dxe.inf
>  delete mode 100644
> MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntime
> Dxe.uni
>  delete mode 100644
> MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntime
> DxeExtra.uni
>  delete mode 100644
> MdeModulePkg/Universal/Variable/EmuRuntimeDxe/InitVariable.c
>  delete mode 100644
> MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h
> 
> diff --git a/MdeModulePkg/MdeModulePkg.dsc
> b/MdeModulePkg/MdeModulePkg.dsc
> index 5d042be3a862..3186f35a1a48 100644
> --- a/MdeModulePkg/MdeModulePkg.dsc
> +++ b/MdeModulePkg/MdeModulePkg.dsc
> @@ -2,7 +2,7 @@
>  # EFI/PI Reference Module Package for All Architectures
>  #
>  # (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
> -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
>  #
>  #This program and the accompanying materials
>  #are licensed and made available under the terms and conditions of the
> BSD License
> @@ -433,9 +433,6 @@ [Components.IA32, Components.X64,
> Components.ARM, Components.AARCH64]
> 
> NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32G
> uidedSectionExtractLib.inf
>}
> 
> -[Components.IA32, Components.X64, Components.Ebc]
> -
> MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntime
> Dxe.inf
> -
>  [Components.IA32, Components.X64]
> 
> MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.
> inf
>MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
> diff --git
> a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
> b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
> deleted file mode 100644
> index 1bcf931b96a6..
> --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
> +++ /dev/null
> @@ -1,1820 +0,0 @@
> -/** @file
> -
> -  Emulation Variable services operate on the runtime volatile memory.
> -  The nonvolatile variable space doesn't exist.
> -
> -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> -This program and the accompanying materials
> -are licensed and made available under the terms and conditions of the BSD
> License
> -which accompanies this distribution.  The full text of the license may be
> found at
> -http://opensource.org/licenses/bsd-license.php
> -
> -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
> EXPRESS OR IMPLIED.
> -
> -**/
> -
> -#include "Variable.h"
> -
> -///
> -/// Don't use module globals after the SetVirtualAddress map is signaled
> -///
> -ESAL_VARIABLE_GLOBAL  *mVariableModuleGlobal;
> -
> -VARIABLE_INFO_ENTRY *gVariableInfo = NULL;
> -
> -///
> -/// The size of a 3 character ISO639 language code.
> -///
> -#define ISO_639_2_ENTRY_SIZE3
> -
> -/**
> -  Update the variable region with Variable information. These are the same
> -  arguments as the EFI Variable services.
> -
> -  @param[in] VariableName   Name of variable
> -
> -  @param[in] VendorGuid Guid of variable
> -
> -  @param[in] Data   Variable data
> -
> -  @param[in] DataSize   Size of data. 0 means delete
> -
> -  @param[in] Attributes Attribues of the variable
> -
> -  @param[in] Variable   The variable information which is used to 
> keep
> track of variable usage.
> -
> -  @retval EFI_SUCCESS   The update operation is success.
> -
> -  @retval EFI_OUT_OF_RESOURCES  Variable region is full, can not write
> other data into this region.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> 

[edk2] [PATCH V3 17/17] MdeModulePkg: Remove EmuVariableRuntimeDxe

2019-01-15 Thread Star Zeng
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1323
Merge EmuVariable and Real variable driver.

The real variable driver has been updated to support emulated
variable NV mode.
This patch removes EmuVariableRuntimeDxe after platforms are
migrated to use the merged variable driver.

Cc: Jian J Wang 
Cc: Hao Wu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng 
---
 MdeModulePkg/MdeModulePkg.dsc  |5 +-
 .../Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 1820 
 .../EmuRuntimeDxe/EmuVariableRuntimeDxe.inf|   88 -
 .../EmuRuntimeDxe/EmuVariableRuntimeDxe.uni|   22 -
 .../EmuRuntimeDxe/EmuVariableRuntimeDxeExtra.uni   |   19 -
 .../Variable/EmuRuntimeDxe/InitVariable.c  |  259 ---
 .../Universal/Variable/EmuRuntimeDxe/Variable.h|  277 ---
 7 files changed, 1 insertion(+), 2489 deletions(-)
 delete mode 100644 MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
 delete mode 100644 
MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
 delete mode 100644 
MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.uni
 delete mode 100644 
MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxeExtra.uni
 delete mode 100644 MdeModulePkg/Universal/Variable/EmuRuntimeDxe/InitVariable.c
 delete mode 100644 MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h

diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index 5d042be3a862..3186f35a1a48 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -2,7 +2,7 @@
 # EFI/PI Reference Module Package for All Architectures
 #
 # (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
-# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
 #
 #This program and the accompanying materials
 #are licensed and made available under the terms and conditions of the BSD 
License
@@ -433,9 +433,6 @@ [Components.IA32, Components.X64, Components.ARM, 
Components.AARCH64]
   
NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
   }
 
-[Components.IA32, Components.X64, Components.Ebc]
-  MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
-
 [Components.IA32, Components.X64]
   MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.inf
   MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c 
b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
deleted file mode 100644
index 1bcf931b96a6..
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
+++ /dev/null
@@ -1,1820 +0,0 @@
-/** @file
-
-  Emulation Variable services operate on the runtime volatile memory.
-  The nonvolatile variable space doesn't exist.
-
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
-This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD 
License
-which accompanies this distribution.  The full text of the license may be 
found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "Variable.h"
-
-///
-/// Don't use module globals after the SetVirtualAddress map is signaled
-///
-ESAL_VARIABLE_GLOBAL  *mVariableModuleGlobal;
-
-VARIABLE_INFO_ENTRY *gVariableInfo = NULL;
-
-///
-/// The size of a 3 character ISO639 language code.
-///
-#define ISO_639_2_ENTRY_SIZE3
-
-/**
-  Update the variable region with Variable information. These are the same
-  arguments as the EFI Variable services.
-
-  @param[in] VariableName   Name of variable
-
-  @param[in] VendorGuid Guid of variable
-
-  @param[in] Data   Variable data
-
-  @param[in] DataSize   Size of data. 0 means delete
-
-  @param[in] Attributes Attribues of the variable
-
-  @param[in] Variable   The variable information which is used to keep 
track of variable usage.
-
-  @retval EFI_SUCCESS   The update operation is success.
-
-  @retval EFI_OUT_OF_RESOURCES  Variable region is full, can not write other 
data into this region.
-
-**/
-EFI_STATUS
-EFIAPI
-UpdateVariable (
-  IN  CHAR16 *VariableName,
-  IN  EFI_GUID   *VendorGuid,
-  IN  VOID   *Data,
-  IN  UINTN  DataSize,
-  IN  UINT32 Attributes OPTIONAL,
-  IN  VARIABLE_POINTER_TRACK *Variable
-  );
-
-/**
-  Finds variable in storage blocks of volatile and non-volatile storage areas.
-
-  This code finds variable in storage blocks of volatile and non-volatile 
storage areas.
-  If VariableName is an empty string, then we just return