[edk2-devel] [PATCH] UefiPayloadPkg: Not use BaseCpuTimerLib by default.

2022-01-13 Thread Zhiguang Liu
For recent X86 CPU, 0x15 CPUID instruction will return Time Stamp
Counter. This is recommended way to get the time, and also how
BaseCpuTimerLib works However, some CPU doesn't support this feature,
so disable it by default.

Cc: Guo Dong 
Cc: Ray Ni 
Cc: Maurice Ma 
Cc: Benjamin You 
Signed-off-by: Zhiguang Liu 
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc 
b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 3d08edfe31..65c1bd610e 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -111,6 +111,11 @@
   DEFINE SERIAL_DRIVER_ENABLE = TRUE
   DEFINE PERFORMANCE_MEASUREMENT_ENABLE  = FALSE
 
+  # For recent X86 CPU, 0x15 CPUID instruction will return Time Stamp Counter.
+  # This is recommended way to get the time, and also how BaseCpuTimerLib 
works.
+  # However, some CPU doesn't support this feature, so disable it by default.
+  DEFINE CPU_TIMER_LIB_ENABLE  = FALSE
+
 [BuildOptions]
   *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
   GCC:*_UNIXGCC_*_CC_FLAGS   = -DMDEPKG_NDEBUG
@@ -217,7 +222,7 @@
   #
   # Platform
   #
-!if $(UNIVERSAL_PAYLOAD) == TRUE
+!if $(CPU_TIMER_LIB_ENABLE) == TRUE
   TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
 !else
   TimerLib|UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
-- 
2.32.0.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85709): https://edk2.groups.io/g/devel/message/85709
Mute This Topic: https://groups.io/mt/88415742/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel][PATCH] BaseTools/GenFw: Enhance to add export table in PE-COFF

2022-01-13 Thread Bob Feng
Hi Lixia,

This patch introduce a new command line option --PRM. Could you add the help 
information about --PRM?

Could you provide more information about the below change? Would there be 
side-effect?

@@ -750,7 +818,7 @@ ScanSections64 (
 if (shdr->sh_addralign <= mCoffAlignment) {
   continue;
 }
-if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr) || 
IsSymbolShdr(shdr)) {
   mCoffAlignment = (UINT32)shdr->sh_addralign;
 }
   }



Thanks,
Bob 

-Original Message-
From: Huang, Li-Xia  
Sent: Wednesday, January 12, 2022 3:44 PM
To: devel@edk2.groups.io
Cc: Huang, Li-Xia ; Gao, Liming 
; Feng, Bob C ; Chen, Christine 

Subject: [edk2-devel][PATCH] BaseTools/GenFw: Enhance to add export table in 
PE-COFF

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3802
Since PRM module needs to support export table in PE-COFF, we'll enhance GenFw 
tool to support this.

Add one export flag in GenFw tool. If export flag is set:
Step1: Scan ELF symbol table based on PRM module descriptor to get descriptor 
offset address;
Step2: Find PRM handlers number and name in COFF file based on the address from 
step1;
Step3: Write PRM info such as handler name and export RVA into COFF export 
table.

Cc: Liming Gao 
Cc: Bob Feng 
Cc: Yuwei Chen 
Signed-off-by: Lixia Huang 
---
 BaseTools/Source/C/GenFw/Elf64Convert.c   | 254 +-
 BaseTools/Source/C/GenFw/ElfConvert.c |  10 +
 BaseTools/Source/C/GenFw/ElfConvert.h |  42 ++-
 BaseTools/Source/C/GenFw/GenFw.c  |  11 +-
 .../C/Include/IndustryStandard/PeImage.h  |   7 +
 5 files changed, 318 insertions(+), 6 deletions(-)

diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c 
b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 0bb3ead228..0079507356 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -56,6 +56,18 @@ WriteDebug64 (
   VOID   ); +STATIC+VOID+ScanSymbol64 (+  VOID+  );++STATIC+VOID+WriteExport64 
(+  VOID+  );+ STATIC VOID SetImageSize64 (@@ -122,7 +134,7 @@ STATIC UINT32 
mDataOffset;
 STATIC UINT32 mHiiRsrcOffset; STATIC UINT32 mRelocOffset; STATIC UINT32 
mDebugOffset;-+STATIC UINT32 mExportOffset; // // Used for RISC-V relocations. 
//@@ -132,6 +144,14 @@ STATIC Elf64_Half  mRiscVPass1SymSecIndex = 0;
 STATIC INT32   mRiscVPass1Offset; STATIC INT32   mRiscVPass1GotFixup; 
+//+// Used for Export section.+//+STATIC UINT32  mExportSize;+STATIC 
UINT32  mExportRVA[PRM_MODULE_EXPORT_SYMBOL_NUM];+STATIC UINT32  
mExportSymNum;+STATIC CHAR8   
mExportSymName[PRM_MODULE_EXPORT_SYMBOL_NUM][PRM_HANDLER_NAME_MAXIMUM_LENGTH];+ 
// // Initialization Function //@@ -200,6 +220,10 @@ InitializeElf64 (
   ElfFunctions->SetImageSize = SetImageSize64;   ElfFunctions->CleanUp = 
CleanUp64; +  if (mExportFlag) {+ElfFunctions->ScanSymbol = ScanSymbol64;+  
  ElfFunctions->WriteExport = WriteExport64;+  }   return TRUE; } @@ -263,6 
+287,17 @@ IsHiiRsrcShdr (
   return (BOOLEAN) (strcmp((CHAR8*)mEhdr + Namedr->sh_offset + Shdr->sh_name, 
ELF_HII_SECTION_NAME) == 0); } +STATIC+BOOLEAN+IsSymbolShdr (+  Elf_Shdr *Shdr+ 
 )+{+  Elf_Shdr *Namehdr = GetShdrByIndex(mEhdr->e_shstrndx);++  return 
(BOOLEAN) (strcmp((CHAR8*)mEhdr + Namehdr->sh_offset + Shdr->sh_name, 
ELF_SYMBOL_SECTION_NAME) == 0);+}+ STATIC BOOLEAN IsDataShdr (@@ -335,6 +370,38 
@@ GetSymName (
   return StrtabContents + Sym->st_name; } +//+// Get Prm Handler number and 
name+//+STATIC+VOID+FindPrmHandler (+  UINT64 Offset+  )+{+  
PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER *PrmExport;+  UINT32   NameOffset;+  
UINT32   HandlerNum;+  UINT32   Index;+  UINT8
SymName[PRM_HANDLER_NAME_MAXIMUM_LENGTH];++  PrmExport = 
(PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER*)(mCoffFile + Offset);+  NameOffset 
= sizeof(PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER) + sizeof(EFI_GUID);++  for 
(HandlerNum = 0; HandlerNum < PrmExport->NumberPrmHandlers; HandlerNum++) {+
for (Index = 0; Index < PRM_HANDLER_NAME_MAXIMUM_LENGTH; Index++) {+  
SymName[Index] = *((UINT8 *)PrmExport + NameOffset + Index);+  if 
(SymName[Index] == 0) {+break;+  }+}++
strcpy(mExportSymName[mExportSymNum], (CHAR8*)SymName);+NameOffset += 
PRM_HANDLER_NAME_MAXIMUM_LENGTH + sizeof(EFI_GUID);+mExportSymNum ++;+  
}+}+ // // Find the ELF section hosting the GOT from an ELF Rva //   of a 
single GOT entry.  Normally, GOT is placed in@@ -717,6 +784,7 @@ ScanSections64 
(
   UINT32  CoffEntry;   UINT32  
SectionCount;   BOOLEAN FoundSection;+  UINT32  
Offset;CoffEntry = 0;   mCoffOffset = 0;@@ -750,7 +818,7 @@ 
ScanSections64 (
 if (shdr->sh_addralign <= mCoffAlignment) {   continue; }-if 
(IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {+if 
(IsTextShdr(shdr) || 

Re: [edk2-devel][edk2-platforms][PATCH V1 20/27] SpcrFeaturePkg: Use MinPlatform build include files

2022-01-13 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming 
Subject: [edk2-devel][edk2-platforms][PATCH V1 20/27] SpcrFeaturePkg: Use 
MinPlatform build include files

Also added feature enable flag

Cc: Sai Chaganty 
Cc: Liming Gao 

Signed-off-by: Isaac Oram 
---
 
Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h
 |  2 +-
 Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemory.fdf   
   | 13 
 Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemory.fdf
   | 11 
 Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc  
   | 62 
 Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md
   | 12 ++--
 Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec   
   |  6 ++
 Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc   
   | 18 ++
 7 files changed, 55 insertions(+), 69 deletions(-)

diff --git 
a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h
 
b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h
index 947813815e..2e50270ee6 100644
--- 
a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/
+++ SpcrDeviceLib.h
@@ -12,7 +12,7 @@
 
 /**
   Get a Serial Port device used for SPCR.
-  The caller should call FreePool() to free the memory if return value is not 
NULL.
+  The caller should call FreePool () to free the memory if return value is not 
NULL.
 
   @retval NULL  Can not get device.
   @retval OthersA serial port device path.
diff --git 
a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemory.fdf 
b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemory.fdf
new file mode 100644
index 00..f963f567c2
--- /dev/null
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemo
+++ ry.fdf
@@ -0,0 +1,13 @@
+## @file
+#  FDF file for post-memory SpcrFeature advanced feature.
+#
+#  This file is intended to be included into another package so 
+advanced features #  can be conditionally included in the flash image 
+by enabling the respective #  feature via its FeaturePCD.
+#
+# Copyright (C) 2022 Intel Corporation.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent ##
+
+INF SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf
diff --git 
a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemory.fdf 
b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemory.fdf
new file mode 100644
index 00..3c461e7fbc
--- /dev/null
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemor
+++ y.fdf
@@ -0,0 +1,11 @@
+## @file
+#  FDF file for pre-memory SpcrFeature advanced feature.
+#
+#  This file is intended to be included into another package so 
+advanced features #  can be conditionally included in the flash image 
+by enabling the respective #  feature via its FeaturePCD.
+#
+# Copyright (C) 2022 Intel Corporation.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent ##
diff --git 
a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc 
b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc
index c51e552df5..b06ddf4fe6 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeat
+++ ure.dsc
@@ -25,40 +25,9 @@
   !error "DXE_ARCH must be specified to build this feature!"
 !endif
 
-
-#
-# Library Class section - list of all Library Classes needed by this feature.
-#
-
-
-!include MdePkg/MdeLibs.dsc.inc
-
 [LibraryClasses]
-  ###
-  # Edk2 Packages
-  ###
-  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
-  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
-  
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
-  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
-  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-  
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-
-  ###
-  # SpcrFeaturePkg Packages
-  

Re: [edk2-devel][edk2-platforms][PATCH V1 21/27] TemplateFeaturePkg: Use MinPlatform build include files

2022-01-13 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming 
Subject: [edk2-devel][edk2-platforms][PATCH V1 21/27] TemplateFeaturePkg: Use 
MinPlatform build include files

Extend the template to leverage common library build files.

Cc: Sai Chaganty 
Cc: Liming Gao 

Signed-off-by: Isaac Oram 
---
 Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc |  2 +-
 Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc  | 18 
++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc 
b/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc
index 6742eddcf9..dd6d033aca 100644
--- a/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc
+++ b/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc
@@ -73,7 +73,7 @@
 #is completed.
 [Components.IA32]
   #
-  #  Feature Package
+  #  Feature Package
   #
 
   # Add library instances here that are not included in package components and 
should be tested diff --git 
a/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc 
b/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
index 0ce8debee0..03657047dc 100644
--- a/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
+++ b/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
@@ -24,6 +24,24 @@
   PEI_ARCH   = IA32
   DXE_ARCH   = X64
 
+[Packages]
+  MinPlatformPkg/MinPlatformPkg.dec
+
+[PcdsFeatureFlag]
+  #
+  # PCD needed for MinPlatform build includes
+  #
+  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable
|FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable   
|FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable  
|FALSE
+
+#
+# Include common libraries
+#
+!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+
 #
 # This package always builds the feature.
 #
--
2.27.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85706): https://edk2.groups.io/g/devel/message/85706
Mute This Topic: https://groups.io/mt/88365331/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel][edk2-platforms][PATCH V1 24/27] MinPlatformPkg/Build: Add an include file for the common SPI FV info

2022-01-13 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Desimone, Nathaniel L 
; Gao, Liming ; Dong, 
Eric 
Subject: [edk2-devel][edk2-platforms][PATCH V1 24/27] MinPlatformPkg/Build: Add 
an include file for the common SPI FV info

This include file allows for elimination of a lot of duplicate code and makes 
FDF files more readable.

Cc: Sai Chaganty 
Cc: Nate DeSimone 
Cc: Liming Gao 
Cc: Eric Dong 
Signed-off-by: Isaac Oram 
---
 Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf | 24 

 1 file changed, 24 insertions(+)

diff --git 
a/Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf 
b/Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
new file mode 100644
index 00..fdda085a41
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fd
+++ f
@@ -0,0 +1,24 @@
+## @file CommonSpiFvHeaderInfo.fdf
+#
+# @copyright
+# Copyright (C) 2020 - 2021 Intel Corporation # # 
+SPDX-License-Identifier: BSD-2-Clause-Patent ##
+
+FvAlignment= 16 #FV alignment and FV attributes setting.
+ERASE_POLARITY = 1
+MEMORY_MAPPED  = TRUE
+STICKY_WRITE   = TRUE
+LOCK_CAP   = TRUE
+LOCK_STATUS= TRUE
+WRITE_DISABLED_CAP = TRUE
+WRITE_ENABLED_CAP  = TRUE
+WRITE_STATUS   = TRUE
+WRITE_LOCK_CAP = TRUE
+WRITE_LOCK_STATUS  = TRUE
+READ_DISABLED_CAP  = TRUE
+READ_ENABLED_CAP   = TRUE
+READ_STATUS= TRUE
+READ_LOCK_CAP  = TRUE
+READ_LOCK_STATUS   = TRUE
--
2.27.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85705): https://edk2.groups.io/g/devel/message/85705
Mute This Topic: https://groups.io/mt/88365353/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel][edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files

2022-01-13 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming 
Subject: [edk2-devel][edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use 
MinPlatformPkg build include files

Standalong build was not working due to missing libraries.
Leverage MinPlatformPkg common includes for core libraries.

Cc: Sai Chaganty 
Cc: Liming Gao 

Signed-off-by: Isaac Oram 
---
 Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc | 89 
++--
 Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc  | 18 
 2 files changed, 24 insertions(+), 83 deletions(-)

diff --git 
a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc 
b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
index bbc91ecbb1..ca151b4e33 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
+++ b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
@@ -18,12 +18,12 @@
 #
 

 [Defines]
-!ifndef $(PEI_ARCH)
-  !error "PEI_ARCH must be specified to build this feature!"
-!endif
-!ifndef $(DXE_ARCH)
-  !error "DXE_ARCH must be specified to build this feature!"
-!endif
+  !ifndef $(PEI_ARCH)
+!error "PEI_ARCH must be specified to build this feature!"
+  !endif
+  !ifndef $(DXE_ARCH)
+!error "DXE_ARCH must be specified to build this feature!"
+  !endif
 
   !include NetworkPkg/NetworkDefines.dsc.inc
 
@@ -41,56 +41,9 @@
 #
 

 
-!include MdePkg/MdeLibs.dsc.inc
-
 [LibraryClasses]
   !include NetworkPkg/NetworkLibs.dsc.inc
-
-  ###
-  # Edk2 Packages
-  ###
-  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
-  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
-  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
-  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-  FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
-  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
-  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
-  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
-  PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
-  
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
-  PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-  
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
-  SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
-  SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
-  TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
   TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
-  
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
-  
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-  
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
-  
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
-  UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
-  
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-
-[LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
-  ###
-  # Edk2 Packages
-  ###
-  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
-  
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
-  PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-
-[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
-  ###
-  # Edk2 Packages
-  ###
-  DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
-  
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
-  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
 
 

 #
@@ -106,21 +59,6 @@
 #   generated for it, but the binary will not be put into any firmware 
volume.
 #
 

Re: [edk2-devel][edk2-platforms][PATCH V1 22/27] AdvancedFeaturePkg: Fix all relative package paths

2022-01-13 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming 
Subject: [edk2-devel][edk2-platforms][PATCH V1 22/27] AdvancedFeaturePkg: Fix 
all relative package paths

Packages should be at the root of a PACKAGES_PATH entry.
At some point, paths were relative to edk2-platforms/Features/Intel which was 
functional, but interferes with the proper functioning of packaging tools.

Cc: Sai Chaganty 
Cc: Liming Gao 

Signed-off-by: Isaac Oram 
---
 Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc | 15 
---
 Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf   | 15 
---
 Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf| 15 
---
 3 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc 
b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
index ac9ab80e8e..874b8ce7db 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
@@ -14,45 +14,46 @@
 # Debug Advanced Features
 #
 !if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable == TRUE
-  !include Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
+  !include AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
 !endif
+
 !if gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable == TRUE
-  !include Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc
+  !include Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc
 !endif
 
 #
 # Network Advanced Features
 #
 !if gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable == TRUE
-  !include Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
+  !include NetworkFeaturePkg/Include/NetworkFeature.dsc
 !endif
 
 #
 # Out-of-Band Management Advanced Features  #  !if 
gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
-  !include OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc
+  !include IpmiFeaturePkg/Include/IpmiFeature.dsc
 !endif
 
 #
 # Power Management Advanced Features
 #
 !if gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable == TRUE
-  !include PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
+  !include S3FeaturePkg/Include/S3Feature.dsc
 !endif
 
 #
 # System Information Advanced Features
 #
 !if gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable == TRUE
-  !include SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc
+  !include SmbiosFeaturePkg/Include/SmbiosFeature.dsc
 !endif
 
 #
 # User Interface Advanced Features
 #
 !if gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable == 
TRUE
-  !include UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
+  !include UserAuthFeaturePkg/Include/UserAuthFeature.dsc
 !endif
 
 !if gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable == TRUE diff --git 
a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf 
b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
index c49a0fd875..e710fe7f01 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
@@ -15,45 +15,46 @@
 # Debug Advanced Features
 #
 !if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable == TRUE
-  !include Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf
+  !include AcpiDebugFeaturePkg/Include/PostMemory.fdf
 !endif
+
 !if gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable == TRUE
-  !include Debugging/Usb3DebugFeaturePkg/Include/PostMemory.fdf
+  !include Usb3DebugFeaturePkg/Include/PostMemory.fdf
 !endif
 
 #
 # Network Advanced Features
 #
 !if gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable == TRUE
-  !include Network/NetworkFeaturePkg/Include/PostMemory.fdf
+  !include NetworkFeaturePkg/Include/PostMemory.fdf
 !endif
 
 #
 # Out-of-Band Management Advanced Features  #  !if 
gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
-  !include OutOfBandManagement/IpmiFeaturePkg/Include/PostMemory.fdf
+  !include IpmiFeaturePkg/Include/PostMemory.fdf
 !endif
 
 #
 # Power Management Advanced Features
 #
 !if gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable == TRUE
-  !include PowerManagement/S3FeaturePkg/Include/PostMemory.fdf
+  !include S3FeaturePkg/Include/PostMemory.fdf
 !endif
 
 #
 # System Information Advanced Features
 #
 !if gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable == TRUE
-  !include SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf
+  !include SmbiosFeaturePkg/Include/PostMemory.fdf
 !endif
 
 #
 # User Interface Advanced Features
 #
 !if gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable == 
TRUE
-  !include UserInterface/UserAuthFeaturePkg/Include/PostMemory.fdf
+  !include UserAuthFeaturePkg/Include/PostMemory.fdf
 !endif
 
 !if gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable == 

Re: [edk2-devel][edk2-platforms][PATCH V1 23/27] AdvancedFeaturePkg: Add missing features

2022-01-13 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming 
Subject: [edk2-devel][edk2-platforms][PATCH V1 23/27] AdvancedFeaturePkg: Add 
missing features

The AdvancedFeaturePkg is supposed to include all features.
Add Beep Debug feature to include DSC and FDF.

Order features based on their domains.

Cc: Sai Chaganty 
Cc: Liming Gao 

Signed-off-by: Isaac Oram 
---
 Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc  | 66 

 Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc| 36 
---
 Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc | 64 
+++
 Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf  | 36 
---
 Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf   | 36 
---
 Features/Intel/Readme.md  | 49 
++-
 6 files changed, 219 insertions(+), 68 deletions(-)

diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc 
b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index 0c7a29cc75..02636da916 100644
--- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -36,7 +36,6 @@
 
 !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
 
-
 

 #
 # Advanced Feature Enable section - all advanced features are enabling for the 
@@ -44,26 +43,71 @@  #  

 [PcdsFeatureFlag]
-  gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable|TRUE
-  gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable  |TRUE
-  gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable|TRUE
-  gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable  |TRUE
-  gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable  |TRUE
-  gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable|TRUE
-  gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable|TRUE
-  gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable  |TRUE
-  gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable  
|FALSE
+  #
+  # Debugging features
+  #
+  gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable  
|TRUE
+  gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable  
|TRUE
+  gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEnable  
|TRUE
+  gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable  
|TRUE
+
+  #
+  # Network features
+  #
+  gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable  
|TRUE
+
+  #
+  # OutOfBandManagement features
+  #
+  gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable
|TRUE
+  gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable
|TRUE
+
+  #
+  # PowerManagement features
+  #
+  gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable
|TRUE
+
+  #
+  # SystemInformation features
+  #
+  gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable
|TRUE
+
+  #
+  # UserInterface features
+  #
+  gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable
|TRUE
+  gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable  
|TRUE
+  
+ gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEnab
+ le  |TRUE
+
+#
+# PCD that are required to be set by the build target should be 
+configured here for test purposes # These settings are only for the purposes 
of buildings, boards should follow instructions in Readme files.
+#
+
+[PcdsFixedAtBuild]
+  gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugPortLibInstance|1
+
+[PcdsFeatureFlag]
+  #
+  # MinPlatform common include currently required PCD
+  #
   gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable
|FALSE
   gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable   
|FALSE
   gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable  
|FALSE
 
 #
-# Include common library
+# Include common libraries
 #
 !include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
 !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
 !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
 
+#
+# Libraries required to be specified by the build target # 
+[LibraryClasses.Common]
+  
+PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfo
+rmHookLibNull.inf # Required by BeepDebugFeature
+
 #
 # This package builds all advanced features.
 #
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc 

Re: [edk2-devel][edk2-platforms][PATCH V1 08/27] SmbiosFeaturePkg: Fix all relative package paths

2022-01-13 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming 
Subject: [edk2-devel][edk2-platforms][PATCH V1 08/27] SmbiosFeaturePkg: Fix all 
relative package paths

Packages should be at the root of a PACKAGES_PATH entry.
At some point, paths were relative to edk2-platforms/Features/Intel which was 
functional, but interferes with the proper functioning of packaging tools.

Cc: Sai Chaganty 
Cc: Liming Gao 

Signed-off-by: Isaac Oram 
---
 Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf   
 |  2 +-
 Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc
 |  2 +-
 
Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
 |  2 +-
 Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec 
 | 10 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf 
b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf
index 3ed23bd937..c3a3e81503 100644
--- a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemo
+++ ry.fdf
@@ -7,4 +7,4 @@
 #
 ##
 
-  INF SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
+  INF SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
diff --git 
a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc 
b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc
index 31d44b68b3..094dd957b8 100644
--- 
a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc
+++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFe
+++ ature.dsc
@@ -100,7 +100,7 @@
   # in the package build.
 
   # Add components here that should be included in the package build.
-  SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
+  SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
 
 
###
 #
diff --git 
a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
 
b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
index bd8736b621..8e530c4945 100644
--- 
a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
+++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/S
+++ mbiosBasicDxe.inf
@@ -33,7 +33,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+  SmbiosFeaturePkg/SmbiosFeaturePkg.dec
 
 [LibraryClasses]
   BaseLib
diff --git 
a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec 
b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
index 6170f37969..db3cdbb0d0 100644
--- a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg
+++ .dec
@@ -38,7 +38,7 @@
   IndustryStandard/SmBios.h
 
   MdePkg/MdePkg.dec
-  SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+  SmbiosFeaturePkg/SmbiosFeaturePkg.dec
   }
   gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.Vendor|0x1
   gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosVersion|0x2
@@ -71,7 +71,7 @@
   IndustryStandard/SmBios.h
 
   MdePkg/MdePkg.dec
-  SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+  SmbiosFeaturePkg/SmbiosFeaturePkg.dec
   }
   
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Manufacturer|0x1
   
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.ProductName|0x2
@@ -87,7 +87,7 @@
   IndustryStandard/SmBios.h
 
   MdePkg/MdePkg.dec
-  SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+  SmbiosFeaturePkg/SmbiosFeaturePkg.dec
   }
 
   #
@@ -111,7 +111,7 @@
   IndustryStandard/SmBios.h
 
   MdePkg/MdePkg.dec
-  SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+  SmbiosFeaturePkg/SmbiosFeaturePkg.dec
   }
   
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.Manufacturer|0x1
   
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.Type|MiscChassisTypeRackMountChassis
@@ -131,7 +131,7 @@
   IndustryStandard/SmBios.h
 
   MdePkg/MdePkg.dec
-  SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+  SmbiosFeaturePkg/SmbiosFeaturePkg.dec
   }
   
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType32SystemBootInformation.BootStatus|BootInformationStatusNoError
 
--
2.27.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online 

Re: [edk2-devel][edk2-platforms][PATCH V1 07/27] S3FeaturePkg: Use MinPlatformPkg build include files

2022-01-13 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming 
Subject: [edk2-devel][edk2-platforms][PATCH V1 07/27] S3FeaturePkg: Use 
MinPlatformPkg build include files

Use the MinPlatformPkg common core build files to build libraries needed by 
this feature.

Cc: Sai Chaganty 
Cc: Liming Gao 

Signed-off-by: Isaac Oram 
---
 Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf |  2 +-  
Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc | 72 
++--
 Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc  | 18 +
 3 files changed, 26 insertions(+), 66 deletions(-)

diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf 
b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
index 34caf3dacc..fdd16a4e03 100644
--- a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
@@ -7,4 +7,4 @@
 #
 ##
 
-  INF S3FeaturePkg/S3Pei/S3Pei.inf
+INF S3FeaturePkg/S3Pei/S3Pei.inf
diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc 
b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
index f94bd2b431..cc34e78507 100644
--- a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
+++ b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
@@ -18,12 +18,12 @@
 #
 

 [Defines]
-!ifndef $(PEI_ARCH)
-  !error "PEI_ARCH must be specified to build this feature!"
-!endif
-!ifndef $(DXE_ARCH)
-  !error "DXE_ARCH must be specified to build this feature!"
-!endif
+  !ifndef $(PEI_ARCH)
+!error "PEI_ARCH must be specified to build this feature!"
+  !endif
+  !ifndef $(DXE_ARCH)
+!error "DXE_ARCH must be specified to build this feature!"
+  !endif
 
 

 #
@@ -31,34 +31,7 @@
 #
 

 
-!include MdePkg/MdeLibs.dsc.inc
-
-[LibraryClasses]
-  ###
-  # Edk2 Packages
-  ###
-  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
-  BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
-  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
-  IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
-  PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
-  PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
-  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
-
-[LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
-  ###
-  # Edk2 Packages
-  ###
-  HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
-  
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
-  PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-  PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
-  PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
-  
PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
-
-  ###
-  # Silicon Initialization Package
-  ###
+[LibraryClasses.common.PEIM]
   
SmmAccessLib|IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.inf
 
 

@@ -92,34 +65,3 @@
 
   # Add components here that should be included in the package build.
   S3FeaturePkg/S3Pei/S3Pei.inf
-
-#
-# Feature DXE Components
-#
-
-# @todo: Change below line to [Components.$(DXE_ARCH)] after 
https://bugzilla.tianocore.org/show_bug.cgi?id=2308
-#is completed.
-[Components.X64]
-  #
-  # S3 Feature Package
-  #
-
-  # Add library instances here that are not included in package components and 
should be tested
-  # in the package build.
-
-  # Add components here that should be included in the package build.
-
-###
-#
-# BuildOptions Section - Define the module specific tool chain flags that 
should be used as
-#the default flags for a module. These flags are 
appended to any
-#standard flags that are defined by the build process. 
They can be
-#applied for any modules or only those modules with 
the specific
-#module style (EDK or EDKII) specified in [Components] 
section.
-#
-#For advanced features, it is 

Re: [edk2-devel][edk2-platforms][PATCH V1 02/27] BeepDebugFeaturePkg: Fix all relative package paths

2022-01-13 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming ; Dong, 
Eric 
Subject: [edk2-devel][edk2-platforms][PATCH V1 02/27] BeepDebugFeaturePkg: Fix 
all relative package paths

Packages should be at the root of a PACKAGES_PATH entry.
At some point, paths were relative to edk2-platforms/Features/Intel which was 
functional, but interferes with the proper functioning of packaging tools.

Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Eric Dong 

Signed-off-by: Isaac Oram 
---
 Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc | 16 

 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc 
b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc
index 251de6932b..00ef022657 100644
--- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc
+++ b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeat
+++ ure.dsc
@@ -54,17 +54,17 @@
   gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep
 
 [LibraryClasses.Common]
-  BeepLib|Debugging/BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf
-  BeepMapLib|Debugging/BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib.inf
+  BeepLib|BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf
+  BeepMapLib|BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib.inf
 
 [LibraryClasses.PEIM, LibraryClasses.PEI_CORE]
-  
StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepStatusCodeHandlerLib.inf
+  
+ StatusCodeHandlerLib|BeepDebugFeaturePkg/Library/BeepStatusCodeHandler
+ Lib/PeiBeepStatusCodeHandlerLib.inf
 
 [LibraryClasses.DXE_RUNTIME_DRIVER]
-  
StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf
+  
+ StatusCodeHandlerLib|BeepDebugFeaturePkg/Library/BeepStatusCodeHandler
+ Lib/RuntimeDxeBeepStatusCodeHandlerLib.inf
 
 [LibraryClasses.DXE_SMM_DRIVER]
-  
StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeepStatusCodeHandlerLib.inf
+  
+ StatusCodeHandlerLib|BeepDebugFeaturePkg/Library/BeepStatusCodeHandler
+ Lib/SmmBeepStatusCodeHandlerLib.inf
 
 [Components.IA32]
 
@@ -77,7 +77,7 @@
   #
   FILE_GUID = $(BEEP_PEIM_FILENAME)
 
-  
NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepStatusCodeHandlerLib.inf
+  
+ NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepStatu
+ sCodeHandlerLib.inf
   }
 
 [Components.X64]
@@ -90,7 +90,7 @@
   #
   FILE_GUID = $(BEEP_DXE_FILENAME)
 
-  
NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf
+  
+ NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBe
+ epStatusCodeHandlerLib.inf
   }
 
   MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf { @@ 
-102,5 +102,5 @@
   #
   FILE_GUID = $(BEEP_SMM_FILENAME)
 
-  
NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeepStatusCodeHandlerLib.inf
+  
+ NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeepStatu
+ sCodeHandlerLib.inf
   }
--
2.27.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85699): https://edk2.groups.io/g/devel/message/85699
Mute This Topic: https://groups.io/mt/88365329/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel][edk2-platforms][PATCH V1 06/27] S3FeaturePkg: Fix all relative package paths

2022-01-13 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming 
Subject: [edk2-devel][edk2-platforms][PATCH V1 06/27] S3FeaturePkg: Fix all 
relative package paths

Packages should be at the root of a PACKAGES_PATH entry.
At some point, paths were relative to edk2-platforms/Features/Intel which was 
functional, but interferes with the proper functioning of packaging tools.

Cc: Sai Chaganty 
Cc: Liming Gao 

Signed-off-by: Isaac Oram 
---
 Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf | 2 +-  
Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc | 2 +-
 Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf 
b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
index 3cd5cd9628..34caf3dacc 100644
--- a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
@@ -7,4 +7,4 @@
 #
 ##
 
-  INF PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf
+  INF S3FeaturePkg/S3Pei/S3Pei.inf
diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc 
b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
index 312870981e..f94bd2b431 100644
--- a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
+++ b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
@@ -91,7 +91,7 @@
   # in the package build.
 
   # Add components here that should be included in the package build.
-  PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf
+  S3FeaturePkg/S3Pei/S3Pei.inf
 
 #
 # Feature DXE Components
diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf 
b/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf
index 46fbb62a46..e485eac952 100644
--- a/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf
+++ b/Features/Intel/PowerManagement/S3FeaturePkg/S3Pei/S3Pei.inf
@@ -23,7 +23,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   IntelSiliconPkg/IntelSiliconPkg.dec
-  PowerManagement/S3FeaturePkg/S3FeaturePkg.dec
+  S3FeaturePkg/S3FeaturePkg.dec
 
 [Sources]
   S3Pei.c
--
2.27.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85698): https://edk2.groups.io/g/devel/message/85698
Mute This Topic: https://groups.io/mt/88365334/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel][edk2-platforms][PATCH V1 03/27] AcpiDebugFeaturePkg: Fix all relative package paths

2022-01-13 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty 

-Original Message-
From: Oram, Isaac W  
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W ; Chaganty, Rangasai V 
; Gao, Liming ; Dong, 
Eric 
Subject: [edk2-devel][edk2-platforms][PATCH V1 03/27] AcpiDebugFeaturePkg: Fix 
all relative package paths

Packages should be at the root of a PACKAGES_PATH entry.
At some point, paths were relative to edk2-platforms/Features/Intel which was 
functional, but interferes with the proper functioning of packaging tools.

Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Eric Dong 

Signed-off-by: Isaac Oram 
---
 Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf 
| 2 +-  
Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf | 
2 +-
 Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec  
| 2 +-
 Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc 
| 4 ++--
 Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf   
| 4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf 
b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf
index b293d83cd9..04b5953bf6 100644
--- 
a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf
+++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiD
+++ ebugDxe.inf
@@ -32,7 +32,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
+  AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
 
 [Pcd]
   gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureActive  ## CONSUMES 
diff --git 
a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf 
b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf
index dbb33e4ae2..a0058b51ab 100644
--- 
a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf
+++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiD
+++ ebugSmm.inf
@@ -33,7 +33,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
+  AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
 
 [Pcd]
   gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureActive  ## CONSUMES 
diff --git 
a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec 
b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
index c3bd89fe2b..9159231007 100644
--- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
+++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.d
+++ ec
@@ -29,7 +29,7 @@
 [PcdsFeatureFlag]
   
gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable|FALSE|BOOLEAN|0xA001
 
-[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx]
+[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
   ## This PCD specifies the ACPI debug message buffer size.
   
gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize|0x1|UINT32|0xF001
 
diff --git 
a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc 
b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
index 856222a53d..b142978be1 100644
--- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
+++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeat
+++ ure.dsc
@@ -109,8 +109,8 @@
   # in the package build.
 
   # Add components here that should be included in the package build.
-  Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf
-  Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf
+  AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf
+  AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf
 
 
###
 #
diff --git 
a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf 
b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf
index bbd6eca87b..84560dae50 100644
--- a/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fd
+++ f
@@ -7,5 +7,5 @@
 #
 ##
 
-  INF RuleOverride = DRIVER_ACPITABLE 
Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf
-  INF RuleOverride = DRIVER_ACPITABLE 
Debugging/AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf
+  INF RuleOverride = DRIVER_ACPITABLE 
+ AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugDxe.inf
+  INF RuleOverride = DRIVER_ACPITABLE 
+ AcpiDebugFeaturePkg/AcpiDebugDxeSmm/AcpiDebugSmm.inf
--
2.27.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85697): https://edk2.groups.io/g/devel/message/85697
Mute This Topic: 

[edk2-devel] Event: TianoCore Community Meeting - APAC/NAMO - 01/13/2022 #cal-reminder

2022-01-13 Thread devel@edk2.groups.io Calendar
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Groups.io Inc//Groups.io Calendar//EN
METHOD:PUBLISH
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-PUBLISHED-TTL:PT1H
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
LAST-MODIFIED:20201011T015911Z
TZURL:http://tzurl.org/zoneinfo-outlook/America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles
BEGIN:DAYLIGHT
TZNAME:PDT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
DTSTART:19700308T02
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:PST
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
DTSTART:19701101T02
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
X-GIOIDS:Event:1238704 
UID:ybft.1625609771060160028.z...@groups.io
DTSTAMP:20220114T032502Z
ORGANIZER;CN=Soumya Guptha:mailto:devel@edk2.groups.io
DTSTART:20220114T033000Z
DTEND:20220114T043000Z
SUMMARY:TianoCore Community Meeting - APAC/NAMO
DESCRIPTION:Microsoft Teams meeting\n\n*Join on your computer or mobile a
 pp*\n\nClick here to join the meeting ( https://teams.microsoft.com/l/mee
 tup-join/19%3ameeting_ZWNiZWM1MzgtNWEzMy00MTgwLTgwNjAtNWQ1ZWUwZmQzNjVh%40
 thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255
 d%22%2c%22Oid%22%3a%22b286b53a-1218-4db3-bfc9-3d4c5aa7669e%22%7d )\n\n*Jo
 in with a video conferencing device*\n\nte...@conf.intel.com\n\nVideo Con
 ference ID: 119 132 712 6\n\nAlternate VTC dialing instructions ( https:/
 /conf.intel.com/teams/?conf=1191327126=teams=conf.intel.com=te
 st_call )\n\n*Or call in (audio only)*\n\n+1 916-245-6934\,\,494156131# (
  tel:+19162456934\,\,494156131# ) United States\, Sacramento\n\nPhone Con
 ference ID: 494 156 131#\n\nFind a local number ( https://dialin.teams.mi
 crosoft.com/d195d438-2daa-420e-b9ea-da26f9d1d6d5?id=494156131 ) | Reset P
 IN ( https://mysettings.lync.com/pstnconferencing )\n\nLearn More ( https
 ://aka.ms/JoinTeamsMeeting ) | Meeting options ( https://teams.microsoft.
 com/meetingOptions/?organizerId=b286b53a-1218-4db3-bfc9-3d4c5aa7669e
 ntId=46c98d88-e344-4ed4-8496-4ed7712e255d=19_meeting_ZWNiZWM1Mzg
 tNWEzMy00MTgwLTgwNjAtNWQ1ZWUwZmQzNjVh@thread.v2=0=en-U
 S )
LOCATION:https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZWNiZWM1M
 zgtNWEzMy00MTgwLTgwNjAtNWQ1ZWUwZmQzNjVh%40thread.v2/0?context=%7b%22Tid%2
 2%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%22b286b53a-
 1218-4db3-bfc9-3d4c5aa7669e%22%7d
SEQUENCE:1
END:VEVENT
END:VCALENDAR


invite.ics
Description: application/ics


[edk2-devel] Event: TianoCore Community Meeting - APAC/NAMO - 01/13/2022 #cal-reminder

2022-01-13 Thread devel@edk2.groups.io Calendar
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Groups.io Inc//Groups.io Calendar//EN
METHOD:PUBLISH
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-PUBLISHED-TTL:PT1H
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
LAST-MODIFIED:20201011T015911Z
TZURL:http://tzurl.org/zoneinfo-outlook/America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles
BEGIN:DAYLIGHT
TZNAME:PDT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
DTSTART:19700308T02
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:PST
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
DTSTART:19701101T02
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
X-GIOIDS:Event:1238704 
UID:ybft.1625609771060160028.z...@groups.io
DTSTAMP:20220114T031501Z
ORGANIZER;CN=Soumya Guptha:mailto:devel@edk2.groups.io
DTSTART:20220114T033000Z
DTEND:20220114T043000Z
SUMMARY:TianoCore Community Meeting - APAC/NAMO
DESCRIPTION:Microsoft Teams meeting\n\n*Join on your computer or mobile a
 pp*\n\nClick here to join the meeting ( https://teams.microsoft.com/l/mee
 tup-join/19%3ameeting_ZWNiZWM1MzgtNWEzMy00MTgwLTgwNjAtNWQ1ZWUwZmQzNjVh%40
 thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255
 d%22%2c%22Oid%22%3a%22b286b53a-1218-4db3-bfc9-3d4c5aa7669e%22%7d )\n\n*Jo
 in with a video conferencing device*\n\nte...@conf.intel.com\n\nVideo Con
 ference ID: 119 132 712 6\n\nAlternate VTC dialing instructions ( https:/
 /conf.intel.com/teams/?conf=1191327126=teams=conf.intel.com=te
 st_call )\n\n*Or call in (audio only)*\n\n+1 916-245-6934\,\,494156131# (
  tel:+19162456934\,\,494156131# ) United States\, Sacramento\n\nPhone Con
 ference ID: 494 156 131#\n\nFind a local number ( https://dialin.teams.mi
 crosoft.com/d195d438-2daa-420e-b9ea-da26f9d1d6d5?id=494156131 ) | Reset P
 IN ( https://mysettings.lync.com/pstnconferencing )\n\nLearn More ( https
 ://aka.ms/JoinTeamsMeeting ) | Meeting options ( https://teams.microsoft.
 com/meetingOptions/?organizerId=b286b53a-1218-4db3-bfc9-3d4c5aa7669e
 ntId=46c98d88-e344-4ed4-8496-4ed7712e255d=19_meeting_ZWNiZWM1Mzg
 tNWEzMy00MTgwLTgwNjAtNWQ1ZWUwZmQzNjVh@thread.v2=0=en-U
 S )
LOCATION:https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZWNiZWM1M
 zgtNWEzMy00MTgwLTgwNjAtNWQ1ZWUwZmQzNjVh%40thread.v2/0?context=%7b%22Tid%2
 2%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%22b286b53a-
 1218-4db3-bfc9-3d4c5aa7669e%22%7d
SEQUENCE:1
END:VEVENT
END:VCALENDAR


invite.ics
Description: application/ics


Re: [edk2-devel] [PATCH V4 22/31] OvmfPkg: Update PlatformPei to support TDX

2022-01-13 Thread Min Xu
Thanks for reminder. It is in-consistent implementation between config-A and 
config-B. I will fix it in the next version.

From: devel@edk2.groups.io  On Behalf Of Vishal Annapurve 
via groups.io
Sent: Friday, January 14, 2022 10:37 AM
To: Xu, Min M ; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH V4 22/31] OvmfPkg: Update PlatformPei to 
support TDX

Thanks Min for the reference of the firmware design guide.

If VMM is expected to set it then issue I mentioned with 
CoreInitializeMemoryServices can be ignored.

Though its mentioned in the design guide, I was confused by the current 
implementation of TDX Qemu as per:
https://github.com/intel/qemu-tdx/blob/tdx/hw/i386/tdvf-hob.c#L169
https://github.com/intel/qemu-tdx/blob/852a069e739a6ffae4f9dec17607a74690b0e4af/hw/i386/tdvf-hob.h#L15

and config B patches:
https://github.com/mxu9/edk2/commit/c5d5786290b2455c5a0a7e3515cf04ec2218d8a4#diff-7cb0d3ac758c9b92166d03049917116ca4a5cb012db99deb491f63c5c5562e0aR124

It's possible that I have incomplete view of Qemu implementation or Config B 
patches.

Regards,
Vishal



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85694): https://edk2.groups.io/g/devel/message/85694
Mute This Topic: https://groups.io/mt/87696595/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH V4 22/31] OvmfPkg: Update PlatformPei to support TDX

2022-01-13 Thread Vishal Annapurve via groups.io
Thanks Min for the reference of the firmware design guide.

If VMM is expected to set it then issue I mentioned with 
CoreInitializeMemoryServices can be ignored.

Though its mentioned in the design guide, I was confused by the current 
implementation of TDX Qemu as per:
https://github.com/intel/qemu-tdx/blob/tdx/hw/i386/tdvf-hob.c#L169
https://github.com/intel/qemu-tdx/blob/852a069e739a6ffae4f9dec17607a74690b0e4af/hw/i386/tdvf-hob.h#L15

and config B patches:
https://github.com/mxu9/edk2/commit/c5d5786290b2455c5a0a7e3515cf04ec2218d8a4#diff-7cb0d3ac758c9b92166d03049917116ca4a5cb012db99deb491f63c5c5562e0aR124

It's possible that I have incomplete view of Qemu implementation or Config B 
patches.

Regards,
Vishal


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85693): https://edk2.groups.io/g/devel/message/85693
Mute This Topic: https://groups.io/mt/87696595/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH V4 22/31] OvmfPkg: Update PlatformPei to support TDX

2022-01-13 Thread Min Xu
Hi, Vishal
TESTED_MEMORY_ATTRIBUTES is expected to be set by host VMM. Please see [TDVF] 
Table 7-1
[TDVF] 
https://www.intel.com/content/dam/develop/external/us/en/documents/tdx-virtual-firmware-design-guide-rev-1.01.pdf

Below is the TDVF log (in the very beginning).
   1 Intel Tdx Started with (GPAW: 52, Cpus: 8)
   2
   3 ResourceType: 0x0   <-- EFI_RESOURCE_SYSTEM_MEMORY
   4 ResourceAttribute: 0x407  <-- 7 is TESTED_MEMORY_ATTRIBUTES
   5 PhysicalStart: 0x0
   6 ResourceLength: 0x80

TransferTdxHobList just copy the ResourceAttribute from host Vmm.

In your mail you mentioned “Function CoreInitializeMemoryServices (from 
./MdeModulePkg/Core/Dxe/Gcd/Gcd.c) is not able to find any resources with 
TESTED_MEMORY_ATTRIBUTES set”.  Can you explain more about it? Have you added 
some logs?

From: devel@edk2.groups.io  On Behalf Of Vishal Annapurve 
via groups.io
Sent: Friday, January 14, 2022 3:19 AM
To: Xu, Min M ; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH V4 22/31] OvmfPkg: Update PlatformPei to 
support TDX

Hi Min,
+/**
+ Transfer the incoming HobList for the TD to the final HobList for Dxe.
+ The Hobs transferred in this function are ResourceDescriptor hob and
+ MemoryAllocation hob.
+
+ @param[in] VmmHobList The Hoblist pass the firmware
+
+**/
+VOID
+EFIAPI
+TransferTdxHobList (
+ VOID
+ )
+{
+ EFI_PEI_HOB_POINTERS Hob;
+ EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;
+
+ //
+ // PcdOvmfSecGhcbBase is used as the TD_HOB in Tdx guest.
+ //
+ Hob.Raw = (UINT8 *)(UINTN)PcdGet32 (PcdOvmfSecGhcbBase);
+ while (!END_OF_HOB_LIST (Hob)) {
+ switch (Hob.Header->HobType) {
+ case EFI_HOB_TYPE_RESOURCE_DESCRIPTOR:
+ ResourceAttribute = Hob.ResourceDescriptor->ResourceAttribute;
+
I am trying to test TDX functionality with config A patches (Wave1 + Wave2.v4) 
and with the above function passing the memory attributes of the resources in 
TD HOB list (Originally populated by VMM) as is to DXE phase,
Function CoreInitializeMemoryServices (from ./MdeModulePkg/Core/Dxe/Gcd/Gcd.c) 
is not able to find any resources with TESTED_MEMORY_ATTRIBUTES set.

For config A, Is there an expectation from VMM to set TESTED_MEMORY_ATTRIBUTES 
for each System Memory resource passed via TD HOB list or should this function
be appending TESTED_MEMORY_ATTRIBUTES to existing resource attributes?

Regards,
Vishal



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85692): https://edk2.groups.io/g/devel/message/85692
Mute This Topic: https://groups.io/mt/87696595/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH 08/10] OvmfPkg: Update Sec to support Tdvf Config-B

2022-01-13 Thread Min Xu
On January 11, 2022 5:23 PM, Gerd Hoffmann wrote:
> 
> > > Well, if you want avoid the refactoring because of the risk there is
> > > still the option to have tdx config-b use the normal PEI boot flow.
> > > Then revisit refactoring and adding support for PEI-less boot later.
> > >
> > I think it still makes sense (Adding a basic PlatformInitLib which
> > brings up tdx guest and legacy guest in Pei-less boot, but not touch
> > PlatformPei).
> 
> > 1. The goal of TDVF-Config-B is to bring up tdx guest and legacy guest
> > without PEI. So that attack surface can be reduced.
> 
> Hmm?  Isn't the main goal of config-b to support the advanced tdx features
> (attestation etc)?
PEI-less boot is one of the main goal of Config-B. Actually PEI-less boot is in 
the original design of TDVF. RTMR-based measurement and measure boot are 
another important goals.
> 
> I don't see that PEI-less boot is required for that.  Sure, when stripping 
> down
> the build and removing all the features which require PEIMs there isn't much
> left to do for the PEI phase.  So it makes sense to look into dropping PEI
> altogether.  But it's more a "nice to have"
> than a hard requirement, no?
No. I have to say PEI-less boot in Config-B is a hard requirement.
> 
> > 2. There are common functions when bring up tdx guest and legacy guest
> > in Config-B. So PlatformInitLib is necessary.
> 
> Sure.
> 
> > 3. As I explained there are many if-else checks in PlatformPei and the
> > logics are rather complicated (because PlatformPei serves
> > S3/SMM/SEV/TDX/Legacy/Microvm/CloudHypervisor, etc). To be honest I
> > have not so much confidence to abstract PlatformPei's common function
> > to PlatformInitLib.
> 
> What is the problem with moving code?  After some preparing steps (add
> platform info hob, move global variables to the hob) it should be possible to
> move the code needed by config-b (memory detection via fw_cfg or tdx hob,
> pci init, ...) from PlatformPei to PlatformInitLib and (also) use it in the 
> SEC
> phase.  Likewise for code which runs in DXE in PEI-less mode (setting PCDs).
> 
> The code not needed by config-b (smm, s3, ...) can stay in PlatformPei.
Yes, PlatformPei can be refactored in this way.
> 
> > 4. But a basic version of PlatformInitLib is a good start.
> 
> Yes.  Having initially only the functions needed by config-b in 
> PlatformInitLib
> is perfectly fine, but this should be a code *move* not a copy.
> 
> > During the development and community review, we can understand better
> > what functions should be wrapped into PlatformInitLib. After that
> > PlatformInitLib can be evolved for OvmfPkg/PlatformPei,
> > Bhyve/PlatformPei, XenPlatformPei.
> 
> Yes, most likely there are a number of opportunities to reduce code
> duplication in the three PlatformPei variants we have by moving code to the
> (shared) PlatformInitLib.
> 
> That can be looked at later.

So let me summarize the discussion about PlatformInitLib.
1. PlatformInitLib wraps the common functions in OvmfPkg/PlatformPei. These 
common functions covers the memory detection via fw_cfg, pci init, cmos, 
(MemDetect.c/Platform.c/Cmos.c). And PlatformInitLib will not handle the S3/SMM 
variants.
2. OvmfPkg/PlatformPei will be refactored with PlatformInitLib. The functions 
not needed by config-b stay in PlatformPei.
3. Config-B support PEI-less boot for both legacy guest and td guest.

If you agree, then I will update the patch-sets based on above discussions.

Thanks
Min


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85691): https://edk2.groups.io/g/devel/message/85691
Mute This Topic: https://groups.io/mt/87720802/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] Wiki: Add optional steps for developer to run CI test before sending

2022-01-13 Thread Zhiguang Liu
Hi Liming,
Could you help merge this change?
This change also get Guomin's reviewed-by.

Thanks
Zhiguang

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of
> gaoliming
> Sent: Tuesday, January 11, 2022 9:19 AM
> To: devel@edk2.groups.io; Liu, Zhiguang 
> Subject: 回复: [edk2-devel] [PATCH] Wiki: Add optional steps for developer
> to run CI test before sending
> 
> Zhiguang:
>   Thanks for your update. Reviewed-by: Liming Gao
> 
> 
> Thanks
> Liming
> > -邮件原件-
> > 发件人: devel@edk2.groups.io  代表 Zhiguang Liu
> > 发送时间: 2022年1月10日 11:26
> > 收件人: devel@edk2.groups.io
> > 抄送: Liming Gao 
> > 主题: [edk2-devel] [PATCH] Wiki: Add optional steps for developer to run
> CI
> > test before sending
> >
> > Cc: Liming Gao 
> > Signed-off-by: Zhiguang Liu 
> > ---
> >  EDK-II-Development-Process.md | 60
> > +---
> >  1 file changed, 45 insertions(+), 15 deletions(-)
> >
> > diff --git a/EDK-II-Development-Process.md
> > b/EDK-II-Development-Process.md index 469a979..747c6e1 100644
> > --- a/EDK-II-Development-Process.md
> > +++ b/EDK-II-Development-Process.md
> > @@ -59,20 +59,50 @@ The developer process for the EDK II project
> >
> >  `$ git rebase origin/master`
> >
> > -9. Run the automated code formatting tool (Uncrustify) against your
> changes
> >
> > -
> >
> > -   - [EDK-II-Code-Formatting](EDK-II-Code-Formatting "wikilink")
> >
> > -
> >
> > -   - The changes must pass local CI which includes a code formatting
> check
> >
> > - in order to be merged into the code base.
> >
> > -
> >
> > -   - It is strongly recommended that you format the code after each
> commit.
> >
> > - The code can then be easily amended with the formatted output.
> > Some
> >
> > - developers might also prefer to format frequently while writing the
> >
> > - code using the plugin instructions described in the code formatting
> >
> > - wiki page.
> >
> > -
> >
> > -10. Create patch (serial) to the [[edk2-devel]] mailing list
> >
> > +9. Run the automated code formatting tool (Uncrustify) against your
> changes
> > +
> > +   - [EDK-II-Code-Formatting](EDK-II-Code-Formatting "wikilink")
> > +
> > +   - The changes must pass local CI which includes a code formatting
> check
> > + in order to be merged into the code base.
> > +
> > +   - It is strongly recommended that you format the code after each
> > commit.
> > + The code can then be easily amended with the formatted output.
> > Some
> > + developers might also prefer to format frequently while writing the
> > + code using the plugin instructions described in the code formatting
> > + wiki page.
> > +
> > +10. (Optional) Push changes to the developer's fork of the EDK II project
> > +repository.
> > +
> > +- How to create a [GitHub
> >
> fork](https://help.github.com/en/github/getting-started-with-github/fork-
> a-r
> > epo)
> > +  - **NOTE:** A GitHub fork can also be created using the command
> > line
> > +utility called [`hub`](https://github.com/github/hub/releases).
> > The
> > +`hub` usage information can be found
> > [here](https://hub.github.com/hub.1.html).
> > +
> > +- Add remote to the developer's fork of the EDK II project
> > +
> > +`$ git remote add 
> > https://github.com//edk2.git`
> > +
> > +- Push the integration branch.
> > +
> > +`$ git push  `
> > +
> > +11. (Optional) Create a GitHub pull request from the developer's
> > + to edk2/master to run CI check.
> > +
> > +- How to create a [GitHub pull
> >
> request](https://help.github.com/en/github/collaborating-with-issues-and-
> pu
> > ll-requests/creating-a-pull-request)
> > +  - **NOTE:** A GitHub pull request can also be created using the
> > command
> > +line utility called
> [`hub`](https://github.com/github/hub/releases).
> > +The `hub` usage information can be found
> > [here](https://hub.github.com/hub.1.html).
> > +
> > +- Declare that it is for CI check test in the pull request title and
> > +  description.
> > +
> > +- Resolve GitHub pull request issues if it fails. Please refrence
> step 8
> > +  in the below **The maintainer process for the EDK II project**
> > +
> > +12. Create patch (serial) to the [[edk2-devel]] mailing list
> >
> >  - Clean out any old patches: `$ rm *.patch`
> >
> > @@ -86,7 +116,7 @@ The developer process for the EDK II project
> >
> >  - `$ git send-email *.patch`
> >
> > -11. Modify local commits based on the review feedbacks and repeat
> > steps
> >
> > +13. Modify local commits based on the review feedbacks and repeat
> > +steps
> >  3 to 9
> >
> >  - For the latest commit, you can use `$ git commit --amend`
> > --
> > 2.32.0.windows.2
> >
> >
> >
> > -=-=-=-=-=-=
> > Groups.io Links: You receive all messages sent to this group.
> > View/Reply Online (#85435):
> > https://edk2.groups.io/g/devel/message/85435
> > Mute This Topic: 

Re: [edk2-devel][edk2-platforms][PATCH V1 1/1] WhitleyOpenBoardPkg/Include: Remove duplicate file

2022-01-13 Thread Oram, Isaac W
Pushed as 60bb320b9e..73d1067db3

-Original Message-
From: Desimone, Nathaniel L  
Sent: Wednesday, January 12, 2022 6:54 PM
To: Oram, Isaac W ; devel@edk2.groups.io
Cc: Chiu, Chasel 
Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 1/1] 
WhitleyOpenBoardPkg/Include: Remove duplicate file

Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Oram, Isaac W 
> Sent: Monday, January 10, 2022 2:41 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W ; Desimone, Nathaniel L 
> ; Chiu, Chasel 
> Subject: [edk2-devel][edk2-platforms][PATCH V1 1/1]
> WhitleyOpenBoardPkg/Include: Remove duplicate file
> 
> Switch to using the IntelSiliconPkg version of the file as both were 
> identical.
> 
> Cc: Nate DeSimone 
> Cc: Chasel Chiu 
> 
> Signed-off-by: Isaac Oram 
> ---
> 
> Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonLib.h
> | 98 
> 
> Platform/Intel/WhitleyOpenBoardPkg/Library/SmmSpiFlashCommonLib/Sm
> mSpiFlashCommonLib.inf |  1 +
>  2 files changed, 1 insertion(+), 98 deletions(-)
> 
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonLi
> b.h
> b/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonLi
> b.h
> deleted file mode 100644
> index ef62ba238d..00
> ---
> a/Platform/Intel/WhitleyOpenBoardPkg/Include/Library/SpiFlashCommonLi
> b.h
> +++ /dev/null
> @@ -1,98 +0,0 @@
> -/** @file
> -  The header file includes the common header files, defines
> -  internal structure and functions used by SpiFlashCommonLib.
> -
> -  Copyright (c) 2019 Intel Corporation. All rights reserved. 
> -  SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -
> -#ifndef __SPI_FLASH_COMMON_LIB_H__
> -#define __SPI_FLASH_COMMON_LIB_H__
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include  -#include 
>  -#include 
> 
> -
> -#define SECTOR_SIZE_4KB   0x1000  // Common 4kBytes sector size
> -/**
> -  Enable block protection on the Serial Flash device.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashLock (
> -  VOID
> -  );
> -
> -/**
> -  Read NumBytes bytes of data from the address specified by
> -  PAddress into Buffer.
> -
> -  @param[in]  Address   The starting physical address of the read.
> -  @param[in,out]  NumBytes  On input, the number of bytes to read. On
> output, the number
> -of bytes actually read.
> -  @param[out] BufferThe destination data buffer for the read.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashRead (
> -  IN UINTNAddress,
> -  IN OUT UINT32   *NumBytes,
> - OUT UINT8*Buffer
> -  );
> -
> -/**
> -  Write NumBytes bytes of data from Buffer to the address specified 
> by
> -  PAddresss.
> -
> -  @param[in]  Address The starting physical address of the write.
> -  @param[in,out]  NumBytesOn input, the number of bytes to write. On
> output,
> -  the actual number of bytes written.
> -  @param[in]  Buffer  The source data buffer for the write.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashWrite (
> -  IN UINTN  Address,
> -  IN OUT UINT32 *NumBytes,
> -  IN UINT8  *Buffer
> -  );
> -
> -/**
> -  Erase the block starting at Address.
> -
> -  @param[in]  Address The starting physical address of the block to 
> be
> erased.
> -  This library assume that caller garantee that 
> the PAddress
> -  is at the starting address of this block.
> -  @param[in]  NumBytesOn input, the number of bytes of the logical
> block to be erased.
> -  On output, the actual number of bytes erased.
> -
> -  @retval EFI_SUCCESS.  Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashBlockErase (
> -  INUINTN Address,
> -  INUINTN *NumBytes
> -  );
> -
> -#endif
> diff --git
> a/Platform/Intel/WhitleyOpenBoardPkg/Library/SmmSpiFlashCommonLib/S
> mmSpiFlashCommonLib.inf
> b/Platform/Intel/WhitleyOpenBoardPkg/Library/SmmSpiFlashCommonLib/S
> mmSpiFlashCommonLib.inf
> index a5bcb5e2f2..b1e0896c7c 100644
> ---
> a/Platform/Intel/WhitleyOpenBoardPkg/Library/SmmSpiFlashCommonLib/S
> mmSpiFlashCommonLib.inf
> +++
> b/Platform/Intel/WhitleyOpenBoardPkg/Library/SmmSpiFlashCommonLib/S
> m
> +++ mSpiFlashCommonLib.inf
> @@ 

[edk2-devel] [PATCH 11/11] MdePkg: Remove All UGA Support

2022-01-13 Thread Guomin Jiang
From: GuoMinJ 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove All UGA Support in MdePkg.

Signed-off-by: Guomin Jiang 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
---
 MdePkg/MdePkg.dec|  12 --
 MdePkg/MdePkg.dsc|   3 -
 MdePkg/Library/UefiLib/UefiLib.inf   |   2 -
 MdePkg/Include/Protocol/UgaDraw.h| 159 ---
 MdePkg/Include/Protocol/UgaIo.h  | 189 ---
 MdePkg/Library/UefiLib/UefiLibInternal.h |   1 -
 MdePkg/Library/UefiLib/UefiLibPrint.c|  89 ---
 MdePkg/MdePkg.uni|   6 -
 8 files changed, 461 deletions(-)
 delete mode 100644 MdePkg/Include/Protocol/UgaDraw.h
 delete mode 100644 MdePkg/Include/Protocol/UgaIo.h

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 59b405928bf8..9960c44754bc 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -1446,12 +1446,6 @@ [Protocols]
   ## Include/Protocol/EdidOverride.h
   gEfiEdidOverrideProtocolGuid   = { 0x48ECB431, 0xFB72, 0x45C0, { 0xA9, 0x22, 
0xF4, 0x58, 0xFE, 0x04, 0x0B, 0xD5 }}
 
-  ## Include/Protocol/UgaIo.h
-  gEfiUgaIoProtocolGuid  = { 0x61A4D49E, 0x6F68, 0x4F1B, { 0xB9, 0x22, 
0xA8, 0x6E, 0xED, 0x0B, 0x07, 0xA2 }}
-
-  ## Include/Protocol/UgaDraw.h
-  gEfiUgaDrawProtocolGuid= { 0x982C298B, 0xF4FA, 0x41CB, { 0xB8, 0x38, 
0x77, 0xAA, 0x68, 0x8F, 0xB8, 0x39 }}
-
   ## Include/Protocol/LoadedImage.h
   gEfiLoadedImageProtocolGuid= { 0x5B1B31A1, 0x9562, 0x11D2, { 0x8E, 0x3F, 
0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }}
 
@@ -1942,12 +1936,6 @@ [PcdsFeatureFlag]
   # @Prompt Deprecate Global Variable LangCodes.
   
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangDeprecate|FALSE|BOOLEAN|0x0012
 
-  ## Indicates if UGA Draw Protocol is still consumed.
-  #   TRUE  - Consume UGA Draw protocol.
-  #   FALSE - Does not consume UGA Draw protocol.
-  # @Prompt Consume UGA Draw Protocol.
-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport|TRUE|BOOLEAN|0x0027
-
   ## Indicates if a check will be made to see if a specified node is a member 
of linked list
   #  in the following BaseLib functions: GetNextNode(), IsNull(), 
IsNodeAtEnd(), SwapListEntries().
   #   TRUE  - Verify a specified node is a member of linked list.
diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc
index a94959169b2f..939e1a7b5299 100644
--- a/MdePkg/MdePkg.dsc
+++ b/MdePkg/MdePkg.dsc
@@ -23,9 +23,6 @@ [Defines]
 
 !include MdePkg/MdeLibs.dsc.inc
 
-[PcdsFeatureFlag]
-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport|TRUE
-
 [PcdsFixedAtBuild]
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0f
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000
diff --git a/MdePkg/Library/UefiLib/UefiLib.inf 
b/MdePkg/Library/UefiLib/UefiLib.inf
index 01ed92092da2..9f3863787833 100644
--- a/MdePkg/Library/UefiLib/UefiLib.inf
+++ b/MdePkg/Library/UefiLib/UefiLib.inf
@@ -67,7 +67,6 @@ [Protocols]
   gEfiGraphicsOutputProtocolGuid  ## SOMETIMES_CONSUMES
   gEfiHiiFontProtocolGuid ## SOMETIMES_CONSUMES
   gEfiSimpleFileSystemProtocolGuid## SOMETIMES_CONSUMES
-  gEfiUgaDrawProtocolGuid | gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport  
   ## SOMETIMES_CONSUMES # Consumes if gEfiGraphicsOutputProtocolGuid 
uninstalled
   gEfiComponentNameProtocolGuid  | NOT 
gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable   ## SOMETIMES_PRODUCES # User 
chooses to produce it
   gEfiComponentName2ProtocolGuid | NOT 
gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable  ## SOMETIMES_PRODUCES # User 
chooses to produce it
   gEfiDriverConfigurationProtocolGuid## 
SOMETIMES_PRODUCES # User chooses to produce it
@@ -84,5 +83,4 @@ [FeaturePcd]
   gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable## CONSUMES
   gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable   ## CONSUMES
   gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable   ## CONSUMES
-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport   ## CONSUMES
 
diff --git a/MdePkg/Include/Protocol/UgaDraw.h 
b/MdePkg/Include/Protocol/UgaDraw.h
deleted file mode 100644
index 8d33bf873cad..
--- a/MdePkg/Include/Protocol/UgaDraw.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/** @file
-  UGA Draw protocol from the EFI 1.10 specification.
-
-  Abstraction of a very simple graphics device.
-
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __UGA_DRAW_H__
-#define __UGA_DRAW_H__
-
-#define EFI_UGA_DRAW_PROTOCOL_GUID \
-  { \
-0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 
0x39 } \
-  }
-
-typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL;
-
-/**
-  Return the current video mode information.
-
-  @param  This  The EFI_UGA_DRAW_PROTOCOL instance.
-  @param  HorizontalResolution  The size of video screen in pixels in the X 
dimension.
-  @param 

[edk2-devel] [PATCH 10/11] BaseTools: Remove All UGA Support

2022-01-13 Thread Guomin Jiang
From: GuoMinJ 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove all UGA support in BaseTools package.

Signed-off-by: Guomin Jiang 
Cc: Bob Feng 
Cc: Liming Gao 
Cc: Yuwei Chen 
---
 .../Source/C/Include/Protocol/HiiFramework.h  |  53 +-
 BaseTools/Source/C/Include/Protocol/UgaDraw.h | 161 --
 2 files changed, 1 insertion(+), 213 deletions(-)
 delete mode 100644 BaseTools/Source/C/Include/Protocol/UgaDraw.h

diff --git a/BaseTools/Source/C/Include/Protocol/HiiFramework.h 
b/BaseTools/Source/C/Include/Protocol/HiiFramework.h
index 448350967bbf..8cd2cb80c01c 100644
--- a/BaseTools/Source/C/Include/Protocol/HiiFramework.h
+++ b/BaseTools/Source/C/Include/Protocol/HiiFramework.h
@@ -6,7 +6,7 @@
   @par Revision Reference:
   This protocol is defined in HII spec 0.92.
 
-  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -28,20 +28,6 @@
 0xd7ad636e, 0xb997, 0x459b, {0xbf, 0x3f, 0x88, 0x46, 0x89, 0x79, 0x80, 
0xe1} \
   }
 
-// BugBug:
-//
-// If UGA goes away we need to put this some place. I'm not sure where?
-//
-//typedef struct {
-//  UINT8 Blue;
-//  UINT8 Green;
-//  UINT8 Red;
-//  UINT8 Reserved;
-//} EFI_UGA_PIXEL;
-
-//
-//
-
 typedef struct _EFI_HII_PROTOCOL  EFI_HII_PROTOCOL;
 
 //
@@ -575,39 +561,6 @@ EFI_STATUS
   IN OUT UINT32*InternalStatus
   );
 
-/**
-  Translates a glyph into the format required for input to the Universal
-  Graphics Adapter (UGA) Block Transfer (BLT) routines.
-
-  @param  This  A pointer to the EFI_HII_PROTOCOL instance.
-  @param  GlyphBuffer   A pointer to the buffer that contains glyph 
data.
-  @param  ForegroundThe foreground setting requested to be used 
for the
-generated BltBuffer data.
-  @param  BackgroundThe background setting requested to be used 
for the
-generated BltBuffer data.
-  @param  Count The entry in the BltBuffer upon which to act.
-  @param  Width The width in bits of the glyph being converted.
-  @param  HeightThe height in bits of the glyph being converted
-  @param  BltBuffer A pointer to the buffer that contains the data 
that is
-ready to be used by the UGA BLT routines.
-
-  @retval EFI_SUCCESS   It worked.
-  @retval EFI_NOT_FOUND A glyph for a character was not found.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HII_GLYPH_TO_BLT) (
-  IN EFI_HII_PROTOCOL *This,
-  IN UINT8*GlyphBuffer,
-  IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground,
-  IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background,
-  IN UINTN Count,
-  IN UINTN Width,
-  IN UINTN Height,
-  IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer
-  );
-
 /**
   Allows a new string to be added to an already existing string package.
 
@@ -878,9 +831,6 @@ EFI_STATUS
   @param GetGlyph
   Translates a Unicode character into the corresponding font glyph.
 
-  @param GlyphToBlt
-  Converts a glyph value into a format that is ready for a UGA BLT command.
-
   @param NewString
   Allows a new string to be added to an already existing string package.
 
@@ -924,7 +874,6 @@ struct _EFI_HII_PROTOCOL {
 
   EFI_HII_TEST_STRING TestString;
   EFI_HII_GET_GLYPH   GetGlyph;
-  EFI_HII_GLYPH_TO_BLTGlyphToBlt;
 
   EFI_HII_NEW_STRING  NewString;
   EFI_HII_GET_PRI_LANGUAGES   GetPrimaryLanguages;
diff --git a/BaseTools/Source/C/Include/Protocol/UgaDraw.h 
b/BaseTools/Source/C/Include/Protocol/UgaDraw.h
deleted file mode 100644
index 412b000aeb6b..
--- a/BaseTools/Source/C/Include/Protocol/UgaDraw.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/** @file
-  UGA Draw protocol from the EFI 1.1 specification.
-
-  Abstraction of a very simple graphics device.
-
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
-
-  SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-#ifndef __UGA_DRAW_H__
-#define __UGA_DRAW_H__
-
-#define EFI_UGA_DRAW_PROTOCOL_GUID \
-  { \
-0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 
0x39 } \
-  }
-
-typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL;
-
-/**
-  Return the current video mode information.
-
-  @param  This  Protocol instance pointer.
-  @param  HorizontalResolution  Current video horizontal resolution in pixels
-  @param  VerticalResolutionCurrent video vertical resolution in pixels
-  @param  ColorDepthCurrent video color depth in bits per pixel
-  @param  RefreshRate   

[edk2-devel] [PATCH 09/11] MdeModulePkg: Remove All UGA Support

2022-01-13 Thread Guomin Jiang
From: GuoMinJ 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove All UGA Support in MdeModulePkg, first remove from library.
Remove the PcdConOutGopSupport definition.

Signed-off-by: Guomin Jiang 
Cc: Jian J Wang 
Cc: Liming Gao 
Cc: Zhichao Gao 
Cc: Ray Ni 
Cc: Hao A Wu 
---
 MdeModulePkg/MdeModulePkg.dec |  14 --
 .../Library/BootLogoLib/BootLogoLib.inf   |   4 -
 MdeModulePkg/Include/Library/BootLogoLib.h|   4 +-
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c   |   4 +-
 .../Library/BootLogoLib/BootLogoLib.c | 228 +-
 MdeModulePkg/MdeModulePkg.uni |  12 -
 6 files changed, 60 insertions(+), 206 deletions(-)

diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 463e889e9a68..21e037269cce 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -726,20 +726,6 @@ [PcdsFeatureFlag]
   # @Prompt Enable Unicode Collation 2 support.
   
gEfiMdeModulePkgTokenSpaceGuid.PcdUnicodeCollation2Support|TRUE|BOOLEAN|0x00010041
 
-  ## Indicates if Graphics Output Protocol will be installed on virtual handle 
created by ConsplitterDxe.
-  #  It could be set FALSE to save size.
-  #   TRUE  - Installs Graphics Output Protocol on virtual handle created by 
ConsplitterDxe.
-  #   FALSE - Does not install Graphics Output Protocol on virtual handle 
created by ConsplitterDxe.
-  # @Prompt Enable ConOut GOP support.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE|BOOLEAN|0x00010042
-
-  ## Indicates if UGA Draw Protocol will be installed on virtual handle 
created by ConsplitterDxe.
-  #  It could be set FALSE to save size.
-  #   TRUE  - Installs UGA Draw Protocol on virtual handle created by 
ConsplitterDxe.
-  #   FALSE - Does not install UGA Draw Protocol on virtual handle created by 
ConsplitterDxe.
-  # @Prompt Enable ConOut UGA support.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|TRUE|BOOLEAN|0x00010043
-
   ## Indicates PeiCore will first search TE section from the PEIM to load the 
image, or PE32 section, when PeiCore dispatches a PEI module.
   #  This PCD is used to tune PEI phase performance to reduce the search image 
time.
   #  It can be set according to the generated image section type.
diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf 
b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
index 7d50f2dfa3ab..03fd70451bc6 100644
--- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
+++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
@@ -42,11 +42,7 @@ [LibraryClasses]
 
 [Protocols]
   gEfiGraphicsOutputProtocolGuid## SOMETIMES_CONSUMES
-  gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport ## SOMETIMES_CONSUMES
   gEfiBootLogoProtocolGuid  ## SOMETIMES_CONSUMES
   gEdkiiBootLogo2ProtocolGuid   ## SOMETIMES_CONSUMES
   gEfiUserManagerProtocolGuid   ## CONSUMES
   gEdkiiPlatformLogoProtocolGuid## CONSUMES
-
-[FeaturePcd]
-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES
diff --git a/MdeModulePkg/Include/Library/BootLogoLib.h 
b/MdeModulePkg/Include/Library/BootLogoLib.h
index 2d6209a2789b..a774a7392590 100644
--- a/MdeModulePkg/Include/Library/BootLogoLib.h
+++ b/MdeModulePkg/Include/Library/BootLogoLib.h
@@ -2,7 +2,7 @@
   This library is only intended to be used by PlatformBootManagerLib
   to show progress bar and LOGO.
 
-Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2021, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -26,7 +26,7 @@ BootLogoEnableLogo (
   Use SystemTable ConOut to turn on video based Simple Text Out consoles. The
   Simple Text Out screens will now be synced up with all non-video output 
devices.
 
-  @retval EFI_SUCCESS UGA devices are back in text mode and synced up.
+  @retval EFI_SUCCESS Graphic device are back in text mode and synced up.
 
 **/
 EFI_STATUS
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c 
b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
index 337b2090d98e..c4e45c2d3de9 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
@@ -8,7 +8,7 @@
   PCI Root Bridges. So it means platform needs install PCI Root Bridge IO 
protocol for each
   PCI Root Bus and install PCI Host Bridge Resource Allocation Protocol.
 
-Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -49,7 +49,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED 
EFI_PCI_HOTPLUG_REQUEST_PROTOCOL  mPciHotPlugReque
   Installs driver module protocols and. Creates virtual device handles for 
ConIn,
   ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex 
protocol,
   Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.
-  Installs Graphics Output protocol and/or 

[edk2-devel] [PATCH 08/11] MdeModulePkg/GraphicsConsoleDxe: Remove All UGA Support

2022-01-13 Thread Guomin Jiang
From: GuoMinJ 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove All UGA Support in GraphicsConsoleDxe, remove comment about UGA
in HiiDatabaseDxe.

Signed-off-by: Guomin Jiang 
Cc: Jian J Wang 
Cc: Liming Gao 
Cc: Zhichao Gao 
Cc: Ray Ni 
Cc: Dandan Bi 
Cc: Eric Dong 
---
 .../GraphicsConsoleDxe/GraphicsConsoleDxe.inf |   8 +-
 .../GraphicsConsoleDxe/GraphicsConsole.h  |  21 +-
 .../GraphicsConsoleDxe/GraphicsConsole.c  | 302 +-
 MdeModulePkg/Universal/HiiDatabaseDxe/Image.c |   4 +-
 .../GraphicsConsoleDxe/GraphicsConsoleDxe.uni |   6 +-
 5 files changed, 24 insertions(+), 317 deletions(-)

diff --git 
a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf 
b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
index bcfd306eee13..67c6e878efbb 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
@@ -2,9 +2,9 @@
 #  Console support on graphic devices.
 #
 #  This driver will install Simple Text Output protocol by consuming Graphices 
Output
-#  protocol or UGA Draw protocol on graphic devices.
+#  protocol on graphic devices.
 #
-#  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+#  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 #
@@ -53,15 +53,11 @@ [Protocols]
   gEfiDevicePathProtocolGuid## TO_START
   gEfiSimpleTextOutProtocolGuid ## BY_START
   gEfiGraphicsOutputProtocolGuid## TO_START
-  gEfiUgaDrawProtocolGuid   ## TO_START
   gEfiHiiFontProtocolGuid   ## TO_START
   ## TO_START
   ## NOTIFY
   gEfiHiiDatabaseProtocolGuid
 
-[FeaturePcd]
-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES
-
 [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution ## 
SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution   ## 
SOMETIMES_CONSUMES
diff --git 
a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h 
b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
index e4abad40f49a..ab700f31aa97 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
@@ -1,7 +1,7 @@
 /** @file
   Header file for GraphicsConsole driver.
 
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -12,7 +12,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -59,7 +58,6 @@ typedef struct {
 typedef struct {
   UINTN  Signature;
   EFI_GRAPHICS_OUTPUT_PROTOCOL   *GraphicsOutput;
-  EFI_UGA_DRAW_PROTOCOL  *UgaDraw;
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOLSimpleTextOutput;
   EFI_SIMPLE_TEXT_OUTPUT_MODESimpleTextOutputMode;
   GRAPHICS_CONSOLE_MODE_DATA *ModeData;
@@ -417,9 +415,8 @@ GraphicsConsoleConOutEnableCursor (
 /**
   Test to see if Graphics Console could be supported on the Controller.
 
-  Graphics Console could be supported if Graphics Output Protocol or UGADraw
-  Protocol exists on the Controller. (UGA Draw Protocol could be skipped
-  if PcdUgaConsumeSupport is set to FALSE.)
+  Graphics Console could be supported if Graphics Output Protocol
+  exists on the Controller.
 
   @param  ThisProtocol instance pointer.
   @param  Controller  Handle of device to test.
@@ -439,9 +436,8 @@ GraphicsConsoleControllerDriverSupported (
   );
 
 /**
-  Start this driver on Controller by opening Graphics Output protocol or
-  UGA Draw protocol, and installing Simple Text Out protocol on Controller.
-  (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)
+  Start this driver on Controller by opening Graphics Output protocol
+  and installing Simple Text Out protocol on Controller.
 
   @param  This Protocol instance pointer.
   @param  Controller   Handle of device to bind driver to
@@ -462,9 +458,7 @@ GraphicsConsoleControllerDriverStart (
 
 /**
   Stop this driver on Controller by removing Simple Text Out protocol
-  and closing the Graphics Output Protocol or UGA Draw protocol on Controller.
-  (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)
-
+  and closing the Graphics Output Protocol on Controller.
 
   @param  This  Protocol instance pointer.
   @param  ControllerHandle of device to stop driver on
@@ -526,8 +520,7 @@ GetTextColors (
   @param  Count The count of Unicode string.
 
   @retval EFI_OUT_OF_RESOURCES  If no memory resource to use.
-  @retval EFI_UNSUPPORTED   If no 

[edk2-devel] [PATCH 07/11] MdeModulePkg/ConSplitterDxe: Remove All UGA Support

2022-01-13 Thread Guomin Jiang
From: GuoMinJ 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove the PcdConOutGopSupport, it is unnecessary any more.
Remove All UGA Support in ConSplitterDxe component.

Signed-off-by: Guomin Jiang 
Cc: Jian J Wang 
Cc: Liming Gao 
Cc: Zhichao Gao 
Cc: Ray Ni 
---
 .../Console/ConSplitterDxe/ConSplitterDxe.inf |  17 +-
 .../Console/ConSplitterDxe/ConSplitter.h  | 138 +-
 .../Console/ConSplitterDxe/ConSplitter.c  | 405 +++---
 .../ConSplitterDxe/ConSplitterGraphics.c  | 310 +-
 .../Console/ConSplitterDxe/ConSplitterDxe.uni |  12 +-
 5 files changed, 80 insertions(+), 802 deletions(-)

diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf 
b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
index 9aa1dade752a..c0c57193b04d 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
@@ -3,14 +3,9 @@
 #
 # This driver acts as a virtual console, takes over the console I/O control 
from selected
 # standard console devices, and transmits console I/O to related console 
device drivers.
-# Consplitter could install Graphics Output protocol and/or UGA Draw protocol 
in system
-# table according PCD settings(PcdConOutGopSupport, and PcdConOutUgaSupport). 
It always
-# consumes Graphics Output protocol which is produced by display device, and 
consumes UGA Draw
-# protocol which is produced by display device according to 
PcdUgaConsumeSupport value.
-# Note: If only UGA Draw protocol is installed in system, PcdUgaConsumeSupport 
should be
-# set to TRUE.
+# It always consumes Graphics Output protocol which is produced by display 
device
 #
-# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -92,14 +87,6 @@ [Protocols]
   ## SOMETIMES_PRODUCES
   ## SOMETIMES_CONSUMES
   gEfiGraphicsOutputProtocolGuid
-  ## SOMETIMES_PRODUCES
-  ## SOMETIMES_CONSUMES
-  gEfiUgaDrawProtocolGuid
-
-[FeaturePcd]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport   ## CONSUMES
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport   ## CONSUMES
-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport## CONSUMES
 
 [Pcd]
   ## SOMETIMES_PRODUCES
diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h 
b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
index a1fe74726058..ec74415a2fb1 100644
--- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
+++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
@@ -1,7 +1,7 @@
 /** @file
   Private data structures for the Console Splitter driver
 
-Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -21,7 +21,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -182,7 +181,6 @@ typedef struct {
 
 typedef struct {
   EFI_GRAPHICS_OUTPUT_PROTOCOL   *GraphicsOutput;
-  EFI_UGA_DRAW_PROTOCOL  *UgaDraw;
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL*TextOut;
 } TEXT_OUT_AND_GOP_DATA;
 
@@ -195,16 +193,9 @@ typedef struct {
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut;
   EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode;
 
-  EFI_UGA_DRAW_PROTOCOL   UgaDraw;
-  UINT32  UgaHorizontalResolution;
-  UINT32  UgaVerticalResolution;
-  UINT32  UgaColorDepth;
-  UINT32  UgaRefreshRate;
-
   EFI_GRAPHICS_OUTPUT_PROTOCOLGraphicsOutput;
   EFI_GRAPHICS_OUTPUT_MODE_INFORMATION*GraphicsOutputModeBuffer;
   UINTN   CurrentNumberOfGraphicsOutput;
-  UINTN   CurrentNumberOfUgaDraw;
 
   UINTN   CurrentNumberOfConsoles;
   TEXT_OUT_AND_GOP_DATA   *TextOutList;
@@ -230,13 +221,6 @@ typedef struct {
   TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE  \
   )
 
-#define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \
-  CR ((a),  \
-  TEXT_OUT_SPLITTER_PRIVATE_DATA,   \
-  UgaDraw,  \
-  TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE  \
-  )
-
 #define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a)  \
   CR ((a),  \
   TEXT_OUT_SPLITTER_PRIVATE_DATA,   \
@@ -254,7 +238,7 @@ typedef struct {
   Installs driver module protocols and. Creates virtual device handles for 
ConIn,
   ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex 
protocol,
   Simple Pointer 

[edk2-devel] [PATCH 06/11] OvmfPkg: Remove All UGA Support

2022-01-13 Thread Guomin Jiang
From: GuoMinJ 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Delete PcdConOutGopSupport, it is unnecessary any more.

Signed-off-by: Guomin Jiang 
Cc: Ard Biesheuvel 
Cc: Jiewen Yao 
Cc: Jordan Justen 
Cc: Gerd Hoffmann 
Cc: Anthony Perard 
Cc: Julien Grall 
---
 OvmfPkg/AmdSev/AmdSevX64.dsc   | 2 --
 OvmfPkg/Bhyve/BhyveX64.dsc | 2 --
 OvmfPkg/Microvm/MicrovmX64.dsc | 2 --
 OvmfPkg/OvmfPkgIa32.dsc| 2 --
 OvmfPkg/OvmfPkgIa32X64.dsc | 2 --
 OvmfPkg/OvmfPkgX64.dsc | 2 --
 OvmfPkg/OvmfXen.dsc| 2 --
 7 files changed, 14 deletions(-)

diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc
index 04ae61cf69d8..bf649cc3796a 100644
--- a/OvmfPkg/AmdSev/AmdSevX64.dsc
+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
@@ -423,8 +423,6 @@ [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
 
 [PcdsFixedAtBuild]
diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc
index 5fa08bebd73c..df417365aab3 100644
--- a/OvmfPkg/Bhyve/BhyveX64.dsc
+++ b/OvmfPkg/Bhyve/BhyveX64.dsc
@@ -412,8 +412,6 @@ [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
 
 [PcdsFixedAtBuild]
diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
index 1c2e600febee..6a66f4fbf6d9 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -435,8 +435,6 @@ [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
 
 [PcdsFixedAtBuild]
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 085cc7ece15d..28ef361f5316 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -454,8 +454,6 @@ [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
 !ifdef $(CSM_ENABLE)
   gUefiOvmfPkgTokenSpaceGuid.PcdCsmEnable|TRUE
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index 0ce122ddb50c..f93675fcfba3 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -458,8 +458,6 @@ [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
 !ifdef $(CSM_ENABLE)
   gUefiOvmfPkgTokenSpaceGuid.PcdCsmEnable|TRUE
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 4589adff388d..79740c04457f 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -459,8 +459,6 @@ [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
 !ifdef $(CSM_ENABLE)
   gUefiOvmfPkgTokenSpaceGuid.PcdCsmEnable|TRUE
diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc
index de0d30bfb807..83114e7f7ee8 100644
--- a/OvmfPkg/OvmfXen.dsc
+++ b/OvmfPkg/OvmfXen.dsc
@@ -353,8 +353,6 @@ [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
   

[edk2-devel] [PATCH 05/11] ShellPkg: Remove All UGA Support

2022-01-13 Thread Guomin Jiang
From: GuoMinJ 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove All UGA Support in ShellPkg.

Signed-off-by: Guomin Jiang 
Cc: Ray Ni 
Cc: Zhichao Gao 
---
 .../Library/UefiHandleParsingLib/UefiHandleParsingLib.inf | 4 +---
 ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h  | 4 +---
 ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c  | 4 +---
 .../Library/UefiHandleParsingLib/UefiHandleParsingLib.uni | 4 +---
 4 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf 
b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
index 0d483805e712..97fed1a50859 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
@@ -1,6 +1,6 @@
 ##  @file
 #  Provides interface to advanced shell functionality for parsing both handle 
and protocol database.
-#  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. 
+#  Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved. 
 #  (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
 #  (C) Copyright 2015-2021 Hewlett Packard Enterprise Development LP
 #
@@ -129,8 +129,6 @@ [Protocols]
   gEfiHiiConfigAccessProtocolGuid ## UNDEFINED
   gEfiFormBrowser2ProtocolGuid## UNDEFINED
   gEfiDeviceIoProtocolGuid## UNDEFINED
-  gEfiUgaDrawProtocolGuid ## UNDEFINED
-  gEfiUgaIoProtocolGuid   ## UNDEFINED
   gEfiDriverConfigurationProtocolGuid ## UNDEFINED
   gEfiDriverConfiguration2ProtocolGuid## UNDEFINED
   gEfiSimpleTextInputExProtocolGuid   ## UNDEFINED
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h 
b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
index 6be0d78c4c5a..ab66ed141757 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.h
@@ -1,7 +1,7 @@
 /** @file
   Provides interface to advanced shell functionality for parsing both handle 
and protocol database.
 
-  Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2011 - 2021, Intel Corporation. All rights reserved.
   (C) Copyright 2016 Hewlett Packard Enterprise Development LP
   (C) Copyright 2013-2016 Hewlett-Packard Development Company, L.P.
   SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -94,8 +94,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c 
b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index aa0115bdd498..d67ca16b5ece 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -1,7 +1,7 @@
 /** @file
   Provides interface to advanced shell functionality for parsing both handle 
and protocol database.
 
-  Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
   (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
   (C) Copyright 2015-2021 Hewlett Packard Enterprise Development LP
   SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -2238,8 +2238,6 @@ STATIC CONST GUID_INFO_BLOCK  mGuidStringList[] = {
   { STRING_TOKEN (STR_SHELL_ENV2),  ,
NULL },
   { STRING_TOKEN (STR_SHELL_ENV),   ,
NULL },
   { STRING_TOKEN (STR_DEVICE_IO),   , 
NULL },
-  { STRING_TOKEN (STR_UGA_DRAW),,  
NULL },
-  { STRING_TOKEN (STR_UGA_IO),  ,
NULL },
   { STRING_TOKEN (STR_ESP), ,   
NULL },
   { STRING_TOKEN (STR_GPT_NBR), ,
NULL },
   { STRING_TOKEN (STR_DRIVER_CONFIG),   
,  NULL 
},
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni 
b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index aa3396cea94d..1ecc99ba03fe 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -1,6 +1,6 @@
 // /**
 //
-// Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved. 
+// Copyright (c) 2010 - 

[edk2-devel] [PATCH 04/11] EmulatorPkg: Remove All UGA Support

2022-01-13 Thread Guomin Jiang
From: GuoMinJ 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove All UGA Support in EmulatorPkg.

Signed-off-by: Guomin Jiang 
Cc: Andrew Fish 
Cc: Ray Ni 
---
 EmulatorPkg/EmuGopDxe/Gop.h   | 10 +--
 EmulatorPkg/Include/Protocol/EmuFileSystem.h  | 24 +++---
 .../Include/Protocol/EmuGraphicsWindow.h  | 18 ++--
 .../Library/PlatformBmLib/PlatformBm.h|  4 +-
 EmulatorPkg/Unix/Host/Gasket.h| 12 +--
 EmulatorPkg/Unix/Host/Host.h  |  3 +-
 EmulatorPkg/EmuGopDxe/GopScreen.c | 16 ++--
 .../Library/PlatformBmLib/PlatformBmData.c|  6 +-
 EmulatorPkg/Unix/Host/X11GraphicsWindow.c | 82 +--
 EmulatorPkg/Win/Host/WinGopScreen.c   | 10 +--
 EmulatorPkg/Unix/Host/Ia32/Gasket.S   |  2 +-
 EmulatorPkg/Unix/Host/X64/Gasket.S|  2 +-
 12 files changed, 93 insertions(+), 96 deletions(-)

diff --git a/EmulatorPkg/EmuGopDxe/Gop.h b/EmulatorPkg/EmuGopDxe/Gop.h
index 7f7dc4e8eb9f..099449f5007f 100644
--- a/EmulatorPkg/EmuGopDxe/Gop.h
+++ b/EmulatorPkg/EmuGopDxe/Gop.h
@@ -1,13 +1,13 @@
 /*++ @file
 
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
 Portions copyright (c) 2010,Apple Inc. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#ifndef __UGA_H_
-#define __UGA_H_
+#ifndef GOP_H_
+#define GOP_H_
 
 #include 
 
@@ -60,8 +60,6 @@ typedef struct {
 extern EFI_DRIVER_BINDING_PROTOCOL  gEmuGopDriverBinding;
 extern EFI_COMPONENT_NAME_PROTOCOL  gEmuGopComponentName;
 
-#define EMU_UGA_CLASS_NAME  L"EmuGopWindow"
-
 #define GOP_PRIVATE_DATA_SIGNATURE  SIGNATURE_32 ('G', 'o', 'p', 'N')
 typedef struct {
   UINT64   Signature;
@@ -83,7 +81,7 @@ typedef struct {
   GOP_MODE_DATA*ModeData;
 
   //
-  // UGA Private Data knowing when to start hardware
+  // Private Data knowing when to start hardware
   //
   BOOLEAN  HardwareNeedsStarting;
 
diff --git a/EmulatorPkg/Include/Protocol/EmuFileSystem.h 
b/EmulatorPkg/Include/Protocol/EmuFileSystem.h
index 15de43ac022e..d0c0dee26bff 100644
--- a/EmulatorPkg/Include/Protocol/EmuFileSystem.h
+++ b/EmulatorPkg/Include/Protocol/EmuFileSystem.h
@@ -7,19 +7,19 @@
 
   UEFI 2.0 can boot from any valid EFI image contained in a SimpleFileSystem.
 
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
 Portions copyright (c) 2011, Apple Inc. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#ifndef _EMU_UGA_IO_H_
-#define _EMU_UGA_IO_H_
+#ifndef EMU_GRAPHICS_WINDOW_H_
+#define EMU_GRAPHICS_WINDOW_H_
 
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #define EMU_GRAPHICS_WINDOW_PROTOCOL_GUID \
  { 0x30FD316A, 0x6728, 0x2E41, { 0xA6, 0x90, 0x0D, 0x13, 0x33, 0xD8, 0xCA, 
0xC1 } }
@@ -29,13 +29,13 @@ typedef struct _EMU_GRAPHICS_WINDOW_PROTOCOL 
EMU_GRAPHICS_WINDOW_PROTOCOL;
 typedef
 EFI_STATUS
 (EFIAPI *EMU_GRAPHICS_WINDOWS_CLOSE)(
-  EMU_GRAPHICS_WINDOW_PROTOCOL *Uga
+  EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows
   );
 
 typedef
 EFI_STATUS
 (EFIAPI *EMU_GRAPHICS_WINDOWS_SIZE)(
-  EMU_GRAPHICS_WINDOW_PROTOCOL  *Uga,
+  EMU_GRAPHICS_WINDOW_PROTOCOL  *GraphicsWindows,
   UINT32Width,
   UINT32Height
   );
@@ -43,13 +43,13 @@ EFI_STATUS
 typedef
 EFI_STATUS
 (EFIAPI *EMU_GRAPHICS_WINDOWS_CHECK_KEY)(
-  EMU_GRAPHICS_WINDOW_PROTOCOL *Uga
+  EMU_GRAPHICS_WINDOW_PROTOCOL *GraphicsWindows
   );
 
 typedef
 EFI_STATUS
 (EFIAPI *EMU_GRAPHICS_WINDOWS_GET_KEY)(
-  EMU_GRAPHICS_WINDOW_PROTOCOL  *Uga,
+  EMU_GRAPHICS_WINDOW_PROTOCOL  *GraphicsWindows,
   EFI_KEY_DATA  *key
   );
 
@@ -88,10 +88,10 @@ typedef struct {
 typedef
 EFI_STATUS
 (EFIAPI *EMU_GRAPHICS_WINDOWS_BLT)(
-  IN  EMU_GRAPHICS_WINDOW_PROTOCOL*GraphicsWindows,
-  IN  EFI_UGA_PIXEL   *BltBuffer OPTIONAL,
-  IN  EFI_UGA_BLT_OPERATION   BltOperation,
-  IN  EMU_GRAPHICS_WINDOWS__BLT_ARGS  *Args
+  IN  EMU_GRAPHICS_WINDOW_PROTOCOL   *GraphicsWindows,
+  IN  EFI_GRAPHICS_OUTPUT_BLT_PIXEL  *BltBuffer OPTIONAL,
+  IN  EFI_GRAPHICS_OUTPUT_BLT_OPERATION  BltOperation,
+  IN  EMU_GRAPHICS_WINDOWS__BLT_ARGS *Args
   );
 
 typedef
diff --git a/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h 
b/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h
index 7c495b25eb1b..ed7b71611f90 100644
--- a/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h
+++ b/EmulatorPkg/Include/Protocol/EmuGraphicsWindow.h
@@ -6,13 +6,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#ifndef _EMU_UGA_IO_H_
-#define _EMU_UGA_IO_H_
+#ifndef EMU_GRAPHICS_WINDOW_H_
+#define EMU_GRAPHICS_WINDOW_H_
 
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #define EMU_GRAPHICS_WINDOW_PROTOCOL_GUID \
  { 

[edk2-devel] [PATCH 03/11] ArmPkg: Remove All UGA Support

2022-01-13 Thread Guomin Jiang
From: GuoMinJ 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove All UGA Support in ArmPkg.

Signed-off-by: Guomin Jiang 
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
---
 .../Library/PlatformBootManagerLib/PlatformBootManagerLib.inf  | 3 ---
 ArmPkg/Library/PlatformBootManagerLib/PlatformBm.h | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf 
b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index 86751b45f82b..9270fd3e30d6 100644
--- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -51,9 +51,6 @@ [LibraryClasses]
   UefiLib
   UefiRuntimeServicesTableLib
 
-[FeaturePcd]
-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
-
 [FixedPcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.h 
b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.h
index a40a2ff5cb4f..bab86495c1e6 100644
--- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.h
+++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.h
@@ -43,7 +43,7 @@ EnableQuietBoot (
   Simple Text Out screens will now be synced up with all non video output
   devices
 
-  @retval EFI_SUCCESS UGA devices are back in text mode and synced up.
+  @retval EFI_SUCCESS Graphic devices are back in text mode and synced up.
 **/
 EFI_STATUS
 DisableQuietBoot (
-- 
2.30.0.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85680): https://edk2.groups.io/g/devel/message/85680
Mute This Topic: https://groups.io/mt/88411248/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH 02/11] ArmVirtPkg: Remove All UGA Support

2022-01-13 Thread Guomin Jiang
From: GuoMinJ 

REF: https//bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove PcdConOutGopSupport, it is unnecessary any more.
Remove All UGA Support in ArmVirtPkg

Signed-off-by: Guomin Jiang 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Sami Mujawar 
Cc: Gerd Hoffmann 
---
 ArmVirtPkg/ArmVirtQemu.dsc   | 5 -
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 5 -
 2 files changed, 10 deletions(-)

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 84c28b0c1df4..d18ad9c26672 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -124,11 +124,6 @@ [PcdsFeatureFlag.common]
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
 
-  ## If TRUE, Graphics Output Protocol will be installed on virtual handle 
created by ConsplitterDxe.
-  #  It could be set FALSE to save size.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
-
   gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
 
   gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled|$(TPM2_ENABLE)
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 8e82c5050f6b..c8af8cefc2c5 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -107,11 +107,6 @@ [PcdsFeatureFlag.common]
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
   gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
 
-  ## If TRUE, Graphics Output Protocol will be installed on virtual handle 
created by ConsplitterDxe.
-  #  It could be set FALSE to save size.
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
-
   gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
 
 [PcdsFixedAtBuild.common]
-- 
2.30.0.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85679): https://edk2.groups.io/g/devel/message/85679
Mute This Topic: https://groups.io/mt/88411246/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH 01/11] UefiPayloadPkg: Remove All UGA Support

2022-01-13 Thread Guomin Jiang
From: GuoMinJ 

REF: https//bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove PcdConOutGopSupport, it is unnecessary any more.
Remove All UGA Support in UefiPayloadPkg.

Signed-off-by: Guomin Jiang 
Cc: Guo Dong 
Cc: Ray Ni 
Cc: Maurice Ma 
Cc: Benjamin You 
---
 UefiPayloadPkg/UefiPayloadPkg.dsc   | 2 --
 .../Library/PlatformBootManagerLib/PlatformBootManagerLib.inf   | 2 --
 .../Library/PlatformBootManagerLib/PlatformBootManager.h| 2 +-
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc 
b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 3d08edfe3164..f99e640baa0c 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -361,8 +361,6 @@ [LibraryClasses.common.DXE_SMM_DRIVER]
 

 [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
-  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
   ## This PCD specified whether ACPI SDT protocol is installed.
   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
diff --git 
a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf 
b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index 9c4a9da94350..07b5ad0eb424 100644
--- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -55,7 +55,6 @@ [Guids]
 [Protocols]
   gEfiGenericMemTestProtocolGuid  ## CONSUMES
   gEfiGraphicsOutputProtocolGuid  ## CONSUMES
-  gEfiUgaDrawProtocolGuid ## CONSUMES
   gEfiBootLogoProtocolGuid## CONSUMES
   gEfiDxeSmmReadyToLockProtocolGuid
   gEfiSmmAccess2ProtocolGuid
@@ -63,7 +62,6 @@ [Protocols]
 
 [Pcd]
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
-  gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
   gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand
diff --git 
a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h 
b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h
index 5614aadafb98..082d88caa66d 100644
--- a/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h
+++ b/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h
@@ -98,7 +98,7 @@ PlatformBootManagerEnableQuietBoot (
   Use SystemTable Conout to turn on video based Simple Text Out consoles. The
   Simple Text Out screens will now be synced up with all non video output 
devices
 
-  @retval EFI_SUCCESS UGA devices are back in text mode and synced up.
+  @retval EFI_SUCCESS Graphic devices are back in text mode and synced up.
 
 **/
 EFI_STATUS
-- 
2.30.0.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85678): https://edk2.groups.io/g/devel/message/85678
Mute This Topic: https://groups.io/mt/88411245/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH 00/11] Remove All UGA support

2022-01-13 Thread Guomin Jiang
REF: https//bugzilla.tianocore.org/show_bug.cgi?id=2368

Remove UGA protocol support and only support GOP protocol
GOP is modern graphic protocol of EDK2 and UGA is deprecated in fact.

GuoMinJ (11):
  UefiPayloadPkg: Remove All UGA Support
  ArmVirtPkg: Remove All UGA Support
  ArmPkg: Remove All UGA Support
  EmulatorPkg: Remove All UGA Support
  ShellPkg: Remove All UGA Support
  OvmfPkg: Remove All UGA Support
  MdeModulePkg/ConSplitterDxe: Remove All UGA Support
  MdeModulePkg/GraphicsConsoleDxe: Remove All UGA Support
  MdeModulePkg: Remove All UGA Support
  BaseTools: Remove All UGA Support
  MdePkg: Remove All UGA Support

 MdeModulePkg/MdeModulePkg.dec |  14 -
 MdePkg/MdePkg.dec |  12 -
 ArmVirtPkg/ArmVirtQemu.dsc|   5 -
 ArmVirtPkg/ArmVirtQemuKernel.dsc  |   5 -
 MdePkg/MdePkg.dsc |   3 -
 OvmfPkg/AmdSev/AmdSevX64.dsc  |   2 -
 OvmfPkg/Bhyve/BhyveX64.dsc|   2 -
 OvmfPkg/Microvm/MicrovmX64.dsc|   2 -
 OvmfPkg/OvmfPkgIa32.dsc   |   2 -
 OvmfPkg/OvmfPkgIa32X64.dsc|   2 -
 OvmfPkg/OvmfPkgX64.dsc|   2 -
 OvmfPkg/OvmfXen.dsc   |   2 -
 UefiPayloadPkg/UefiPayloadPkg.dsc |   2 -
 .../PlatformBootManagerLib.inf|   3 -
 .../Library/BootLogoLib/BootLogoLib.inf   |   4 -
 .../Console/ConSplitterDxe/ConSplitterDxe.inf |  17 +-
 .../GraphicsConsoleDxe/GraphicsConsoleDxe.inf |   8 +-
 MdePkg/Library/UefiLib/UefiLib.inf|   2 -
 .../UefiHandleParsingLib.inf  |   4 +-
 .../PlatformBootManagerLib.inf|   2 -
 .../PlatformBootManagerLib/PlatformBm.h   |   2 +-
 .../Source/C/Include/Protocol/HiiFramework.h  |  53 +--
 BaseTools/Source/C/Include/Protocol/UgaDraw.h | 161 ---
 EmulatorPkg/EmuGopDxe/Gop.h   |  10 +-
 EmulatorPkg/Include/Protocol/EmuFileSystem.h  |  24 +-
 .../Include/Protocol/EmuGraphicsWindow.h  |  18 +-
 .../Library/PlatformBmLib/PlatformBm.h|   4 +-
 EmulatorPkg/Unix/Host/Gasket.h|  12 +-
 EmulatorPkg/Unix/Host/Host.h  |   3 +-
 MdeModulePkg/Include/Library/BootLogoLib.h|   4 +-
 .../Console/ConSplitterDxe/ConSplitter.h  | 138 +-
 .../GraphicsConsoleDxe/GraphicsConsole.h  |  21 +-
 MdePkg/Include/Protocol/UgaDraw.h | 159 ---
 MdePkg/Include/Protocol/UgaIo.h   | 189 
 MdePkg/Library/UefiLib/UefiLibInternal.h  |   1 -
 .../UefiHandleParsingLib.h|   4 +-
 .../PlatformBootManager.h |   2 +-
 EmulatorPkg/EmuGopDxe/GopScreen.c |  16 +-
 .../Library/PlatformBmLib/PlatformBmData.c|   6 +-
 EmulatorPkg/Unix/Host/X11GraphicsWindow.c |  82 ++--
 EmulatorPkg/Win/Host/WinGopScreen.c   |  10 +-
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c   |   4 +-
 .../Library/BootLogoLib/BootLogoLib.c | 228 +++---
 .../Console/ConSplitterDxe/ConSplitter.c  | 405 +++---
 .../ConSplitterDxe/ConSplitterGraphics.c  | 310 +-
 .../GraphicsConsoleDxe/GraphicsConsole.c  | 302 +
 MdeModulePkg/Universal/HiiDatabaseDxe/Image.c |   4 +-
 MdePkg/Library/UefiLib/UefiLibPrint.c |  89 
 .../UefiHandleParsingLib.c|   4 +-
 EmulatorPkg/Unix/Host/Ia32/Gasket.S   |   2 +-
 EmulatorPkg/Unix/Host/X64/Gasket.S|   2 +-
 MdeModulePkg/MdeModulePkg.uni |  12 -
 .../Console/ConSplitterDxe/ConSplitterDxe.uni |  12 +-
 .../GraphicsConsoleDxe/GraphicsConsoleDxe.uni |   6 +-
 MdePkg/MdePkg.uni |   6 -
 .../UefiHandleParsingLib.uni  |   4 +-
 56 files changed, 264 insertions(+), 2140 deletions(-)
 delete mode 100644 BaseTools/Source/C/Include/Protocol/UgaDraw.h
 delete mode 100644 MdePkg/Include/Protocol/UgaDraw.h
 delete mode 100644 MdePkg/Include/Protocol/UgaIo.h

-- 
2.30.0.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85677): https://edk2.groups.io/g/devel/message/85677
Mute This Topic: https://groups.io/mt/88411243/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build consistency

2022-01-13 Thread Oram, Isaac W
Inline discussion continues.

Regards,
Isaac

-Original Message-
From: Desimone, Nathaniel L  
Sent: Wednesday, January 12, 2022 7:54 PM
To: Oram, Isaac W ; devel@edk2.groups.io
Cc: Chaganty, Rangasai V ; Gao, Liming 
; Dong, Eric ; Tan, Ming 
; Chiu, Chasel ; Bi, Dandan 
; Shindo, Miki ; Abbas, Mohamed 
; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

Hi Isaac,

Comments inline.

Thanks,
Nate

-Original Message-
From: Oram, Isaac W  
Sent: Wednesday, January 12, 2022 7:15 PM
To: Desimone, Nathaniel L ; devel@edk2.groups.io
Cc: Chaganty, Rangasai V ; Gao, Liming 
; Dong, Eric ; Tan, Ming 
; Chiu, Chasel ; Bi, Dandan 
; Shindo, Miki ; Abbas, Mohamed 
; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

Thanks Nate.

Comments in line.

Regards,
Isaac

-Original Message-
From: Desimone, Nathaniel L 
Sent: Wednesday, January 12, 2022 6:47 PM
To: Oram, Isaac W ; devel@edk2.groups.io
Cc: Chaganty, Rangasai V ; Gao, Liming 
; Dong, Eric ; Tan, Ming 
; Chiu, Chasel ; Bi, Dandan 
; Shindo, Miki ; Abbas, Mohamed 
; KARPAGAVINAYAGAM, MANICKAVASAKAM 

Subject: RE: [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build 
consistency

Hi Isaac,

Thank you for doing this cleanup work. I have some comments for you. I have 
provided a summary of my feedback below:

PATCH 01/27

* Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc

Line 69: [Components.IA32] should be changed to [Components.$(PEI_ARCH)] Line 
83: [Components.X64] should be changed to [Components.$(DXE_ARCH)]

Note: These comments can also be addressed by restoring the @todo comment 
stating that these changes still need to be done (which you deleted.)

[Isaac] $(DXE_ARCH) and $(PEI_ARCH) are not fully functional.  It appears that 
they are fine in DSC files, even when inside an include.  But they are not fine 
inside an include in an FDF file.  The PreMemory.fdf and PostMemory.fdf do not 
work when I try to introduce this change.  
As these are not required, ToDo are against coding style and are bad for 
comprehensibility, I would prefer to not add such useless comments back in.  
Comments should improve the comprehensibility of code and should not distract 
from understanding the code.

[Nate] The $(PEI_ARCH)/$(DXE_ARCH) additions are not be necessary in the FDF 
files. Adding them to the DSC file should be sufficient. Can you re-test with 
just the DSC file change?

[Isaac] I can't make the build work with a macros in the DSC.  FDF parsing 
throws an error.  I misspoke slightly in the prior comment, it is not the FDF 
include that is the problem.  It is the DSC include.

The macros aren't used in the FDF, but the presence of the included macro 
somehow interferes with the FDF parser determining the architecture for 
components.  It only seems to work without DSC includes.

If I use $(DXE_ARCH) in an includable DSC file, the FDF parsing throws this 
kind of error:  For example modifying AcpiDebugFeature.dsc to use $(DXE_ARCH)
Standalone build works fine (no FDF)
Enabling in a board build, you get:
build.py...
 : error F001: Module 
o:\edk2-platforms\Features\Intel\Debugging\AcpiDebugFeaturePkg\AcpiDebugDxeSmm\AcpiDebugDxe.inf
 NOT found in DSC file; Is it really a binary module?

If I move the [Components.$(DXE_ARCH)] to the platform DSC file, then the build 
succeeds.

I have submitted a bug to document this issue:  
https://bugzilla.tianocore.org/show_bug.cgi?id=3803



PATCH 18/27

* Features/Intel/Debugging/AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dsc

Line 33: [PcdsFeatureFlag.X64] should be changed to 
[PcdsFeatureFlag.$(DXE_ARCH)]

Note: This comment can also be addressed by adding a @todo comment stating that 
this change still needs to be done.
[Isaac] See prior response.

PATCH 19/27

* Features/Intel/Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc

Line 35: Typo here. Usb3DebugPortParamLibo should be Usb3DebugPortParamLib.
[Isaac] Good catch.  I guess we don't catch that class of error if the library 
class is not used.

* Features/Intel/Debugging/Usb3DebugFeaturePkg/Usb3DebugFeaturePkg.dsc

Line 40: Did you test compilation for the Usb3DebugFeaturePkg? I've generally 
run into issues when a components sections does not specify a machine 
architecture through some sort of means.
[Isaac] There is no code consuming these libraries.  I verified build of 32 and 
64 bit modes as well as part of AdvancedFeaturePkg build and a board package 
build.
I believe that library classes can be specified by module type and the build 
tool builds the right mode for the consuming driver on demand.  Basically, 
there is no value to specifying architecture for a library.
This does not work with components however.  If you leave the architecture 
unspecified, you get an error when including the component in an FDF as the 
build does not know 

Re: [edk2-devel] [PATCH V4 22/31] OvmfPkg: Update PlatformPei to support TDX

2022-01-13 Thread Vishal Annapurve via groups.io
Hi Min,

> 
> +/**
> + Transfer the incoming HobList for the TD to the final HobList for Dxe.
> + The Hobs transferred in this function are ResourceDescriptor hob and
> + MemoryAllocation hob.
> +
> + @param[in] VmmHobList The Hoblist pass the firmware
> +
> +**/
> +VOID
> +EFIAPI
> +TransferTdxHobList (
> + VOID
> + )
> +{
> + EFI_PEI_HOB_POINTERS Hob;
> + EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;
> +
> + //
> + // PcdOvmfSecGhcbBase is used as the TD_HOB in Tdx guest.
> + //
> + Hob.Raw = (UINT8 *)(UINTN)PcdGet32 (PcdOvmfSecGhcbBase);
> + while (!END_OF_HOB_LIST (Hob)) {
> + switch (Hob.Header->HobType) {
> + case EFI_HOB_TYPE_RESOURCE_DESCRIPTOR:
> + ResourceAttribute = Hob.ResourceDescriptor->ResourceAttribute;
> +

I am trying to test TDX functionality with config A patches (Wave1 + Wave2.v4) 
and with the above function passing the memory attributes of the resources in 
TD HOB list (Originally populated by VMM) as is to DXE phase,
Function CoreInitializeMemoryServices (from ./MdeModulePkg/Core/Dxe/Gcd/Gcd.c) 
is not able to find any resources with TESTED_MEMORY_ATTRIBUTES set.

For config A, Is there an expectation from VMM to set TESTED_MEMORY_ATTRIBUTES 
for each System Memory resource passed via TD HOB list or should this function
be appending TESTED_MEMORY_ATTRIBUTES to existing resource attributes?

Regards,
Vishal


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85675): https://edk2.groups.io/g/devel/message/85675
Mute This Topic: https://groups.io/mt/87696595/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] Issues with CLANGDWARF tool specification and X64 -- am I nuts or what?

2022-01-13 Thread Andrew Fish via groups.io


> On Jan 11, 2022, at 10:02 AM, Bill Paul  wrote:
> 
> BTW, regarding 3) below, it looks like this is expected behavior from Clang/
> LLVM. Dereferencing a NULL pointer is technically undefined in C, and by 
> default the Clang optimizer will cause a trap to occur if you try to do it 
> (because it assumes it's not safe for programs to do that).
> 
> The flag -fno-delete-null-pointer-checks can be used to avoid this behavior. 
> This flag seems to be valid for Clang 9 and later. This is slightly more 
> efficient than using the volatile keyword to defeat the optimizer. This flag 
> is also for GCC.
> 

Given it is undefined behavior and the compiler is behaving correctly I think 
it is better to write correct C code and use volatile if you mean to use a NULL 
pointer. 

Not to mention I worked hard to get clang to emit the trap. If was very painful 
debugging issues like this when the function just ends in the middle and you 
fall into the next function. 

Thanks,

Andrew Fish

> -Bill
> 
>> Hello all:
>> 
>> Recently I discovered that you can enable CSM compatibility mode in OVMF and
>> decided to build some images with this feature Because Of Reasons (tm). My
>> platform is:
>> 
>> FreeBSD/amd64 12.2-RELEASE
>> Clang/LLVM 10.0.1
>> QEMU 6.2.0
>> 
>> These days FreeBSD uses Clang as its native compiler. 12.2-RELEASE comes
>> with version 10.0.1, but you also have the option of installing more recent
>> Clang/ LLVM versions up to 12.0.1 as supplemental packages. I noticed that
>> CLANGDWARF is a supported tool spec for the X64 and IA32 build targets so I
>> decided to try that.
>> 
>> Unfortunately I ran into a couple of problems:
>> 
>> 1) Compilation of OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c fails due to
>> uninitialized local variable.
>> 
>> /mnt/home/wpaul/edk2/edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:
>> 1875:9: error: variable 'Compacted' is used uninitialized whenever 'if'
>> condition is false [-Werror,-Wsometimes-uninitialized]
>>if (EcxIn == 1) {
>>^~
>> /mnt/home/wpaul/edk2/edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:
>> 1895:12: note: uninitialized use occurs here
>>   Compacted
>>   ^
>> /mnt/home/wpaul/edk2/edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:
>> 1875:5: note: remove the 'if' if its condition is always true
>>if (EcxIn == 1) {
>>^~~~
>> /mnt/home/wpaul/edk2/edk2/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c:
>> 1871:37: note: initialize the variable 'Compacted' to silence this warning
>>BOOLEANCompacted;
>>^
>> = '\0'
>> 
>> I changed line 1871 to:
>> 
>>BOOLEANCompacted = FALSE;
>> 
>> and that fixed it. I suspect this may be a case where Clang is being a bit
>> more strict than GCC about uninitialized variables.
>> 
>> 2) Linking fails with numerous errors of the following kind:
>> 
>> ld.lld: error: can't create dynamic relocation R_X86_64_64 against local
>> symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-
>> z,notext' to allow text relocations in the output
>> 
> defined in
> /mnt/home/wpaul/edk2/edk2/Build/OvmfX64/RELEASE_CLANGDWARF/X64/
>> 
>> UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib/OUTPU
>> T/ SecPeiCpuExceptionHandlerLib.lib(ExceptionHandlerAsm.obj)
>> 
>> If I edit tools_def.txt and change RELEASE_CLANGDWARF_X64_DLINK_FLAGS so
>> that it includes -Wl,-z,notext as the error suggests, then everything links
>> as expected. (The same thing is needed for DEBUG_CLANGDWARF_X64_DLINK_FLAGS
>> and probably NOOPT_CLANGDWARF_X64_DLINK_FLAGS.)
>> 
>> This problem only occurs when building for X64. IA32 seems ok.
>> 
>> Is there any particular reason why these flags aren't there already?
>> 
>> 3) Although fixing the above two problems allows me to produce a complete
>> OVMF.fd image, it crashes at start-up with the runtime error:
>> 
>>  X64 Exception Type - 06(#UD - Invalid Opcode)  CPU Apic ID - 
>> 
>> RIP  - 7EC8A7DB, CS  - 0038, RFLAGS - 00010206
>> RAX  - , RCX - 7F5A0880, RDX - 7FF2BAE0
>> RBX  - 7FF2BBF0, RSP - 7FF2BB20, RBP - 5A1C5000
>> RSI  - 7FF2BB48, RDI - 
>> R8   - 0008, R9  - , R10 - 
>> R11  - 7FF41C90, R12 - 00058080, R13 - 7FF2BC20
>> R14  - 000F6DB0, R15 - 
>> DS   - 0030, ES  - 0030, FS  - 0030
>> GS   - 0030, SS  - 0030
>> CR0  - 80010033, CR2 - , CR3 - 7FC01000
>> CR4  - 0668, CR8 - 
>> DR0  - , DR1 - , DR2 - 
>> DR3  - , DR6 - 0FF0, DR7 - 0400
>> GDTR - 7F9EC000 

[edk2-devel] Event: TianoCore Community Meeting - EMEA / NAMO - 01/13/2022 #cal-reminder

2022-01-13 Thread devel@edk2.groups.io Calendar
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Groups.io Inc//Groups.io Calendar//EN
METHOD:PUBLISH
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-PUBLISHED-TTL:PT1H
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
LAST-MODIFIED:20201011T015911Z
TZURL:http://tzurl.org/zoneinfo-outlook/America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles
BEGIN:DAYLIGHT
TZNAME:PDT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
DTSTART:19700308T02
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:PST
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
DTSTART:19701101T02
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
X-GIOIDS:Event:1238703 
UID:udv2.1625609743287285458.4...@groups.io
DTSTAMP:20220113T165501Z
ORGANIZER;CN=Soumya Guptha:mailto:devel@edk2.groups.io
DTSTART:20220113T17Z
DTEND:20220113T18Z
SUMMARY:TianoCore Community Meeting - EMEA / NAMO
DESCRIPTION:Microsoft Teams meeting\n\n*Join on your computer or mobile a
 pp*\n\nClick here to join the meeting ( https://teams.microsoft.com/l/mee
 tup-join/19%3ameeting_N2UyMTVhZjUtOTk3Ni00MmI0LTg0NmItNzIwYTkyMGJhYzNh%40
 thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255
 d%22%2c%22Oid%22%3a%22b286b53a-1218-4db3-bfc9-3d4c5aa7669e%22%7d )\n\n*Jo
 in with a video conferencing device*\n\nte...@conf.intel.com\n\nVideo Con
 ference ID: 111 422 379 4\n\nAlternate VTC dialing instructions ( https:/
 /conf.intel.com/teams/?conf=1114223794=teams=conf.intel.com=te
 st_call )\n\n*Or call in (audio only)*\n\n+1 916-245-6934\,\,482062805# (
  tel:+19162456934\,\,482062805# ) United States\, Sacramento\n\nPhone Con
 ference ID: 482 062 805#\n\nFind a local number ( https://dialin.teams.mi
 crosoft.com/d195d438-2daa-420e-b9ea-da26f9d1d6d5?id=482062805 ) | Reset P
 IN ( https://mysettings.lync.com/pstnconferencing )\n\nLearn More ( https
 ://aka.ms/JoinTeamsMeeting ) | Meeting options ( https://teams.microsoft.
 com/meetingOptions/?organizerId=b286b53a-1218-4db3-bfc9-3d4c5aa7669e
 ntId=46c98d88-e344-4ed4-8496-4ed7712e255d=19_meeting_N2UyMTVhZjU
 tOTk3Ni00MmI0LTg0NmItNzIwYTkyMGJhYzNh@thread.v2=0=en-U
 S )
LOCATION:https://teams.microsoft.com/l/meetup-join/19%3ameeting_N2UyMTVhZ
 jUtOTk3Ni00MmI0LTg0NmItNzIwYTkyMGJhYzNh%40thread.v2/0?context=%7b%22Tid%2
 2%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%22b286b53a-
 1218-4db3-bfc9-3d4c5aa7669e%22%7d
SEQUENCE:1
END:VEVENT
END:VCALENDAR


invite.ics
Description: application/ics


[edk2-devel] Event: TianoCore Community Meeting - EMEA / NAMO - 01/13/2022 #cal-reminder

2022-01-13 Thread devel@edk2.groups.io Calendar
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Groups.io Inc//Groups.io Calendar//EN
METHOD:PUBLISH
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-PUBLISHED-TTL:PT1H
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
LAST-MODIFIED:20201011T015911Z
TZURL:http://tzurl.org/zoneinfo-outlook/America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles
BEGIN:DAYLIGHT
TZNAME:PDT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
DTSTART:19700308T02
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:PST
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
DTSTART:19701101T02
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
X-GIOIDS:Event:1238703 
UID:udv2.1625609743287285458.4...@groups.io
DTSTAMP:20220113T164501Z
ORGANIZER;CN=Soumya Guptha:mailto:devel@edk2.groups.io
DTSTART:20220113T17Z
DTEND:20220113T18Z
SUMMARY:TianoCore Community Meeting - EMEA / NAMO
DESCRIPTION:Microsoft Teams meeting\n\n*Join on your computer or mobile a
 pp*\n\nClick here to join the meeting ( https://teams.microsoft.com/l/mee
 tup-join/19%3ameeting_N2UyMTVhZjUtOTk3Ni00MmI0LTg0NmItNzIwYTkyMGJhYzNh%40
 thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255
 d%22%2c%22Oid%22%3a%22b286b53a-1218-4db3-bfc9-3d4c5aa7669e%22%7d )\n\n*Jo
 in with a video conferencing device*\n\nte...@conf.intel.com\n\nVideo Con
 ference ID: 111 422 379 4\n\nAlternate VTC dialing instructions ( https:/
 /conf.intel.com/teams/?conf=1114223794=teams=conf.intel.com=te
 st_call )\n\n*Or call in (audio only)*\n\n+1 916-245-6934\,\,482062805# (
  tel:+19162456934\,\,482062805# ) United States\, Sacramento\n\nPhone Con
 ference ID: 482 062 805#\n\nFind a local number ( https://dialin.teams.mi
 crosoft.com/d195d438-2daa-420e-b9ea-da26f9d1d6d5?id=482062805 ) | Reset P
 IN ( https://mysettings.lync.com/pstnconferencing )\n\nLearn More ( https
 ://aka.ms/JoinTeamsMeeting ) | Meeting options ( https://teams.microsoft.
 com/meetingOptions/?organizerId=b286b53a-1218-4db3-bfc9-3d4c5aa7669e
 ntId=46c98d88-e344-4ed4-8496-4ed7712e255d=19_meeting_N2UyMTVhZjU
 tOTk3Ni00MmI0LTg0NmItNzIwYTkyMGJhYzNh@thread.v2=0=en-U
 S )
LOCATION:https://teams.microsoft.com/l/meetup-join/19%3ameeting_N2UyMTVhZ
 jUtOTk3Ni00MmI0LTg0NmItNzIwYTkyMGJhYzNh%40thread.v2/0?context=%7b%22Tid%2
 2%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%22b286b53a-
 1218-4db3-bfc9-3d4c5aa7669e%22%7d
SEQUENCE:1
END:VEVENT
END:VCALENDAR


invite.ics
Description: application/ics


[edk2-devel] [PATCH v3 3/3] DynamicTablesPkg: Add AmlCodeGenMethodRetInteger function

2022-01-13 Thread Rebecca Cran
Add AmlCodeGenMethodRetInteger function to generate AML code for
a Method returning an Integer.

Signed-off-by: Rebecca Cran 
Reviewed-by: Pierre Gondois 
---
 DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h|  47 ++
 DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c | 156 

 2 files changed, 203 insertions(+)

diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h 
b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
index 80d05f74ee69..6f214c0dfad2 100644
--- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
+++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
@@ -1118,6 +1118,53 @@ AmlCodeGenMethodRetNameString (
   OUT   AML_OBJECT_NODE_HANDLE  *NewObjectNodeOPTIONAL
   );
 
+/** AML code generation for a method returning an Integer.
+
+  AmlCodeGenMethodRetInteger (
+"_CBA", 0, 1, TRUE, 3, ParentNode, NewObjectNode
+);
+  is equivalent of the following ASL code:
+Method(_CBA, 1, Serialized, 3) {
+  Return (0)
+}
+
+  The ASL parameters "ReturnType" and "ParameterTypes" are not asked
+  in this function. They are optional parameters in ASL.
+
+  @param [in]  MethodNameString The new Method's name.
+Must be a NULL-terminated ASL NameString
+e.g.: "MET0", "_SB.MET0", etc.
+The input string is copied.
+  @param [in]  ReturnedInteger  The value of the integer returned by the
+method.
+  @param [in]  NumArgs  Number of arguments.
+Must be 0 <= NumArgs <= 6.
+  @param [in]  IsSerialized TRUE is equivalent to Serialized.
+FALSE is equivalent to NotSerialized.
+Default is NotSerialized in ASL spec.
+  @param [in]  SyncLevelSynchronization level for the method.
+Must be 0 <= SyncLevel <= 15.
+Default is 0 in ASL.
+  @param [in]  ParentNode   If provided, set ParentNode as the parent
+of the node created.
+  @param [out] NewObjectNodeIf success, contains the created node.
+
+  @retval EFI_SUCCESS Success.
+  @retval EFI_INVALID_PARAMETER   Invalid parameter.
+  @retval EFI_OUT_OF_RESOURCESFailed to allocate memory.
+**/
+EFI_STATUS
+EFIAPI
+AmlCodeGenMethodRetInteger (
+  IN  CONST CHAR8   *MethodNameString,
+  INUINT64  ReturnedInteger,
+  INUINT8   NumArgs,
+  INBOOLEAN IsSerialized,
+  INUINT8   SyncLevel,
+  INAML_NODE_HANDLE ParentNode   OPTIONAL,
+  OUT   AML_OBJECT_NODE_HANDLE  *NewObjectNodeOPTIONAL
+  );
+
 /** Create a _LPI name.
 
   AmlCreateLpiNode ("_LPI", 0, 1, ParentNode, ) is
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c 
b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
index 838a892c6b58..07822ead5b70 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
@@ -1685,6 +1685,61 @@ exit_handler:
   return Status;
 }
 
+/** AML code generation for a Return object node,
+returning an Integer.
+
+  AmlCodeGenReturn (0), ParentNode, NewObjectNode) is
+  equivalent of the following ASL code:
+Return (0)
+
+  The ACPI 6.3 specification, 20.2.8 "Statement Opcodes Encoding" states:
+DefReturn := ReturnOp ArgObject
+ReturnOp := 0xA4
+ArgObject := TermArg => DataRefObject
+
+  Thus, the ReturnNode must be evaluated as a DataRefObject.
+
+  The ReturnNode must be generated inside a Method body scope.
+
+  @param [in]  IntegerThe integer is returned by the Return
+  ASL statement.
+  @param [in]  ParentNode If provided, set ParentNode as the parent
+  of the node created.
+  Must be a MethodOp node.
+  @param [out] NewObjectNode  If success, contains the created node.
+
+  @retval EFI_SUCCESS Success.
+  @retval EFI_INVALID_PARAMETER   Invalid parameter.
+  @retval EFI_OUT_OF_RESOURCESFailed to allocate memory.
+**/
+STATIC
+EFI_STATUS
+EFIAPI
+AmlCodeGenReturnInteger (
+  INUINT64   Integer,
+  INAML_NODE_HEADER  *ParentNode  OPTIONAL,
+  OUT   AML_OBJECT_NODE  **NewObjectNode  OPTIONAL
+  )
+{
+  EFI_STATUS   Status;
+  AML_OBJECT_NODE  *IntNode;
+
+  IntNode = NULL;
+
+  Status = AmlCodeGenInteger (Integer, );
+  ASSERT_EFI_ERROR (Status);
+
+  // AmlCodeGenReturn() deletes DataNode if error.
+  Status = AmlCodeGenReturn (
+ (AML_NODE_HEADER *)IntNode,
+ ParentNode,
+ NewObjectNode
+ );
+  ASSERT_EFI_ERROR (Status);
+
+ 

[edk2-devel] [PATCH v3 2/3] DynamicTablesPkg: Remove redundant cast in AmlCodeGenReturn

2022-01-13 Thread Rebecca Cran
In AmlCodeGenReturn, the cast to AML_NODE_HEADER* in the call to
AmlSetFixedArgument is redundant because ReturnNode is already a
AML_NODE_HEADER* .

Signed-off-by: Rebecca Cran 
Reviewed-by: Pierre Gondois 
---
 DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c 
b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
index d245848ce3fa..838a892c6b58 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
@@ -1564,7 +1564,7 @@ AmlCodeGenReturn (
   Status = AmlSetFixedArgument (
  ObjectNode,
  EAmlParseIndexTerm0,
- (AML_NODE_HEADER *)ReturnNode
+ ReturnNode
  );
   if (EFI_ERROR (Status)) {
 ASSERT (0);
-- 
2.31.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85669): https://edk2.groups.io/g/devel/message/85669
Mute This Topic: https://groups.io/mt/88400645/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 0/3] Add Memory32Fixed and AmlCodeGenMethodRetInteger functions

2022-01-13 Thread Rebecca Cran
Add functions to generate code for the Memory32Fixed ASL macro and a
method returning an Integer.

Remove a redundant cast from AmlCodeGenReturn.


Changes from v2 to v3:

o Rename function to AmlCodeGenRdMemory32Fixed.
o Use define ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR.

Rebecca Cran (3):
  DynamicTablesPkg: Add Memory32Fixed function
  DynamicTablesPkg: Remove redundant cast in AmlCodeGenReturn
  DynamicTablesPkg: Add AmlCodeGenMethodRetInteger function

 DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h|  80 
++
 DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c | 158 
+++-
 DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c |  57 
+++
 3 files changed, 294 insertions(+), 1 deletion(-)

-- 
2.31.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85667): https://edk2.groups.io/g/devel/message/85667
Mute This Topic: https://groups.io/mt/88400643/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v3 1/3] DynamicTablesPkg: Add Memory32Fixed function

2022-01-13 Thread Rebecca Cran
Add a Memory32Fixed function to generate code for the corresponding
Memory32Fixed macro in AML.

Signed-off-by: Rebecca Cran 
Reviewed-by: Pierre Gondois 
---
 DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h| 33 

 DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c | 57 

 2 files changed, 90 insertions(+)

diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h 
b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
index af18bf8e4871..80d05f74ee69 100644
--- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
+++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
@@ -592,6 +592,39 @@ AmlCodeGenRdDWordMemory (
   OUT   AML_DATA_NODE_HANDLE*NewRdNode  OPTIONAL
   );
 
+/** Code generation for the "Memory32Fixed ()" ASL macro.
+
+  The Resource Data effectively created is a 32-bit Memory Resource
+  Data. Cf ACPI 6.4:
+   - s19.6.83 "Memory Resource Descriptor Macro".
+   - s19.2.8 "Memory32FixedTerm".
+
+  See ACPI 6.4 spec, s19.2.8 for more.
+
+  @param [in]  IsReadWrite  ReadAndWrite parameter.
+  @param [in]  Address  AddressBase parameter.
+  @param [in]  RangeLength  Range length.
+  @param [in]  NameOpNode   NameOp object node defining a named object.
+If provided, append the new resource data
+node to the list of resource data elements
+of this node.
+  @param [out] NewMemNode   If provided and success,
+contain the created node.
+
+  @retval EFI_SUCCESS The function completed successfully.
+  @retval EFI_INVALID_PARAMETER   Invalid parameter.
+  @retval EFI_OUT_OF_RESOURCESCould not allocate memory.
+**/
+EFI_STATUS
+EFIAPI
+AmlCodeGenRdMemory32Fixed (
+  BOOLEAN IsReadWrite,
+  UINT32  Address,
+  UINT32  RangeLength,
+  AML_OBJECT_NODE_HANDLE  NameOpNode,
+  AML_DATA_NODE_HANDLE*NewMemNode
+  );
+
 /** Code generation for the "WordBusNumber ()" ASL function.
 
   The Resource Data effectively created is a Word Address Space Resource
diff --git 
a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c 
b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c
index 40d8c2b07ae3..fb18c5a77e2f 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c
@@ -609,6 +609,63 @@ AmlCodeGenRdDWordMemory (
);
 }
 
+/** Code generation for the "Memory32Fixed ()" ASL macro.
+
+  The Resource Data effectively created is a 32-bit Memory Resource
+  Data. Cf ACPI 6.4:
+   - s19.6.83 "Memory Resource Descriptor Macro".
+   - s19.2.8 "Memory32FixedTerm".
+
+  See ACPI 6.4 spec, s19.2.8 for more.
+
+  @param [in]  IsReadWrite  ReadAndWrite parameter.
+  @param [in]  Addres   AddressBase parameter.
+  @param [in]  RangeLength  Range length.
+  @param [in]  NameOpNode   NameOp object node defining a named object.
+If provided, append the new resource data
+node to the list of resource data elements
+of this node.
+  @param [out] NewMemNode   If provided and success,
+contain the created node.
+
+  @retval EFI_SUCCESS The function completed successfully.
+  @retval EFI_INVALID_PARAMETER   Invalid parameter.
+  @retval EFI_OUT_OF_RESOURCESCould not allocate memory.
+**/
+EFI_STATUS
+EFIAPI
+AmlCodeGenRdMemory32Fixed (
+  BOOLEAN IsReadWrite,
+  UINT32  Address,
+  UINT32  RangeLength,
+  AML_OBJECT_NODE_HANDLE  NameOpNode,
+  AML_DATA_NODE_HANDLE*NewMemNode
+  )
+{
+  EFI_STATUS Status;
+  AML_DATA_NODE  *MemNode;
+  EFI_ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR  RangeDesc;
+
+  RangeDesc.Header.Header.Byte = ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR;
+  RangeDesc.Header.Length  = 0x09;
+  RangeDesc.Information= IsReadWrite ? BIT0 : 0;
+  RangeDesc.BaseAddress= Address;
+  RangeDesc.Length = RangeLength;
+
+  Status = AmlCreateDataNode (
+ EAmlNodeDataTypeResourceData,
+ (UINT8 *),
+ sizeof (RangeDesc),
+ 
+ );
+  if (EFI_ERROR (Status)) {
+ASSERT (0);
+return Status;
+  }
+
+  return LinkRdNode (MemNode, NameOpNode, NewMemNode);
+}
+
 /** Code generation for the "WordSpace ()" ASL function.
 
   The Resource Data effectively created is a Word Address Space Resource
-- 
2.31.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85668): 

Re: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header files of RISC-V processor package

2022-01-13 Thread Michael D Kinney
Hi Abner,

General recommendations included below.  Of course each lib/modules/include 
needs to be reviewed and the
best location selected.  I am aware that there are components in edk2 that do 
not follow these general
recommendations.  This is due to content that was added before these 
recommendations were established
and we have work to do to get everything aligned.

Mike

> -Original Message-
> From: Chang, Abner (HPS SW/FW Technologist) 
> Sent: Wednesday, January 12, 2022 9:34 PM
> To: Kinney, Michael D ; Leif Lindholm 
> ; devel@edk2.groups.io; Ni, Ray
> 
> Cc: Andrew Fish ; Sami Mujawar 
> Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header 
> files of RISC-V processor package
> 
> HI Mike,
> It is no problem to meet there. However, I am not available to join the 
> design meeting in the next two weeks. Before we can get
> together to discuss the best locations, do you have information regarding the 
> rationale of driver/library location?
> 
> What is the best location for,
> - Processor ARCH dependent modules

MdePkg for libs
UefiCpuPkg for modules

> - Common modules for all processor ARCHs

Feature Packages based on the common feature.  Add to existing if it fits.  
Create new for completely new feature area.

> - Platform module that is specific to processor ARCH?

edk2-platform repository

The only exception so far are platform modules used to support OvmfPkg/QEMU to 
support CI.
In this case the modules are added to OvmfPkg.

> - Platform module that is common to processor ARCHs?

edk2-platform repository

The only exception so far are platform modules used to support OvmfPkg/QEMU to 
support CI.
In this case the modules are added to OvmfPkg.

> 
> Thanks
> Abner
> 
> > -Original Message-
> > From: Kinney, Michael D 
> > Sent: Monday, January 10, 2022 11:58 PM
> > To: Leif Lindholm ; devel@edk2.groups.io; Chang, Abner
> > (HPS SW/FW Technologist) ; Kinney, Michael D
> > ; Ni, Ray 
> > Cc: Andrew Fish ; Sami Mujawar
> > 
> > Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header
> > files of RISC-V processor package
> >
> > Hi Abner,
> >
> > I see comments from Leif as well.
> >
> > Do you think a discussion in the design meeting Ray Ni runs would be
> > valuable
> > to review all the modules/libs/includes and discuss options for the best
> > location for them to reside in the edk2 repos?
> >
> > Thanks,
> >
> > Mike
> >
> > > -Original Message-
> > > From: Kinney, Michael D 
> > > Sent: Monday, January 10, 2022 7:55 AM
> > > To: Leif Lindholm ; devel@edk2.groups.io; Chang,
> > Abner ; Kinney, Michael D
> > > 
> > > Cc: Andrew Fish ; Sami Mujawar
> > 
> > > Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
> > header files of RISC-V processor package
> > >
> > > Hi Abner,
> > >
> > > I would also like to see some proposals on adding the RiscV CPU scoped
> > content
> > > to the existing MdePkg/UefiCpuPkg instead of adding a new top level CPU
> > package.
> > >
> > > There is already some work started to move some of the ARM specific
> > content
> > > from ARM CPU packages into MdePkg.
> > >
> > > Thanks,
> > >
> > > Mike
> > >
> > > > -Original Message-
> > > > From: Leif Lindholm 
> > > > Sent: Monday, January 10, 2022 5:11 AM
> > > > To: devel@edk2.groups.io; Chang, Abner 
> > > > Cc: Andrew Fish ; Kinney, Michael D
> > ; Sami Mujawar 
> > > > Subject: Re: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
> > header files of RISC-V processor package
> > > >
> > > > On Sat, Jan 08, 2022 at 12:07:53 +0800, Abner Chang wrote:
> > > > > (This is migrated from edk2-platforms:Silicon/RISC-V)
> > > > >
> > > > > RISC-V processor package library definitions.
> > > > >
> > > > > IndustryStandard/RiscV.h
> > > > > -Add RiscV.h which conform with RISC-V Privilege Spec v1.10.
> > > > >
> > > > > RiscVImpl.h
> > > > > -Definition of EDK2 RISC-V implementation.
> > > > >
> > > > > Signed-off-by: Abner Chang 
> > > > > Co-authored-by: Daniel Schaefer 
> > > > > Co-authored-by: Gilbert Chen 
> > > > > Reviewed-by: Leif Lindholm 
> > > >
> > > > Hmm, no.
> > > > I gave a reviewed-by for that patch to be merged into edk2-platforms
> > > > once upon a time. This is not relevant for migration to edk2.
> > > >
> > > > My proposal for migrating this code would be as follows:
> > > > - Announce a hold on merging new code to RiscV portions of
> > > >   edk2-platforms.
> > > > - Apply any and all bugfixes and CI/uncrustify fixes in place in
> > > >   edk2-platforms.
> > > > - Get some level of agreement for what to do instead of
> > > >   RiscVPlatformPkg - i.e. slot into MdeModulePkg instead.
> > > >   -  If that cannot be reached within a few days, create a new
> > > >  top-level directory called "CommonPlatformPkg" or something,
> > > >  with you, Daniel(/Gilbert?), Sami, me as maintainers.
> > > >  - Move all of the RiscVPlatformPkg code under there instead.
> > > >  - I'll follow with ArmPlatformPkg.
> 

Re: [edk2-devel] [PATCH] OvmfPkg/ResetVector: Removing SEV-ES CPUID bit check

2022-01-13 Thread Peter Gonda via groups.io
On Mon, Jan 10, 2022 at 11:18 AM Tom Lendacky  wrote:
>
> On 1/10/22 9:29 AM, Peter Gonda wrote:
> > On Fri, Jan 7, 2022 at 3:54 PM Tom Lendacky  wrote:
> >>
> >> On 1/7/22 11:04 AM, Peter Gonda wrote:
> >>> The SEV-ES bit of Fn800-001F[EAX] - Bit 3 is used for a host to
> >>> determine support for running SEV-ES guests. It should not be checked by
> >>> a guest to determine if it is running under SEV-ES. The guest should use
> >>> the SEV_STATUS MSR Bit 1 to determine if SEV-ES is enabled.
> >>
> >> Worth mentioning in the commit message that this check wasn't part of the
> >> original SEV-ES support (Fixes: a91b700e385e7484ab7286b3ba7ea2efbd59480e
> >> tag?), so this is really a compatibility thing, and that this makes the
> >> check consistent with the Linux kernel.
> >
> > Sure I update the commit message in the V2 with this info and add the
> > Fixes tag. Do I need a (Fixes:
> > b461d67639f2deced77e9bb967d014b7cfcd75f8) tag too? Since the Check was
> > moved between files in that commit?
>
> I don't think so, but that's just my opinion.

Thanks. Sent V2 with updates to commit and fixes tag.

>
> Thanks,
> Tom
>
> >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85665): https://edk2.groups.io/g/devel/message/85665
Mute This Topic: https://groups.io/mt/88273346/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v2] OvmfPkg/ResetVector: Removing SEV-ES CPUID bit check

2022-01-13 Thread Peter Gonda via groups.io
The SEV-ES bit of Fn800-001F[EAX] - Bit 3 is used for a host to
determine support for running SEV-ES guests. It should not be checked by
a guest to determine if it is running under SEV-ES. The guest should use
the SEV_STATUS MSR Bit 1 to determine if SEV-ES is enabled. This check
was not part of the original SEV-ES support and was added in
a91b700e38. Removing the check makes this code consistent with the
Linux kernel

Fixes: a91b700e38 (Ovmf/ResetVector: Simplify and consolidate the SEV features 
checks)
Cc: James Bottomley 
Cc: Min Xu 
Cc: Jiewen Yao 
Cc: Tom Lendacky 
Cc: Jordan Justen 
Cc: Ard Biesheuvel 
Cc: Laszlo Ersek 
Cc: Erdem Aktas 
Cc: Brijesh Singh 
Cc: Erdem Aktas 
Cc: Marc Orr 
Signed-off-by: Peter Gonda 
---
 OvmfPkg/ResetVector/Ia32/AmdSev.asm | 8 
 1 file changed, 8 deletions(-)

diff --git a/OvmfPkg/ResetVector/Ia32/AmdSev.asm 
b/OvmfPkg/ResetVector/Ia32/AmdSev.asm
index 1f827da3b9..77692db27e 100644
--- a/OvmfPkg/ResetVector/Ia32/AmdSev.asm
+++ b/OvmfPkg/ResetVector/Ia32/AmdSev.asm
@@ -265,14 +265,6 @@ CheckSevFeatures:
 ; Set the work area header to indicate that the SEV is enabled
 mov byte[WORK_AREA_GUEST_TYPE], 1
 
-; Check for SEV-ES memory encryption feature:
-; CPUID  Fn8000_001F[EAX] - Bit 3
-;   CPUID raises a #VC exception if running as an SEV-ES guest
-mov   eax, 0x801f
-cpuid
-bteax, 3
-jnc   GetSevEncBit
-
 ; Check if SEV-ES is enabled
 ;  MSR_0xC0010131 - Bit 1 (SEV-ES enabled)
 mov   ecx, SEV_STATUS_MSR
-- 
2.34.1.575.g55b058a8bb-goog



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85664): https://edk2.groups.io/g/devel/message/85664
Mute This Topic: https://groups.io/mt/88400388/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v1 1/1] UefiCpuPackage: Add APIs for CPU physical address mask calculation

2022-01-13 Thread Yu Pu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3394

Firmware contains lots of code that deals with page table.These
code need the information of cpu physical address mask which
can be calculated from CPUID result.Today all these code implements
directly calls CPUID and calculates the address mask.
This bugzilla requests to add a new API as below so that all the
duplicated code can be removed.

Cc: Eric Dong 
Cc: Ray Ni 

Signed-off-by: Yu Pu 
---
 UefiCpuPkg/CpuDxe/CpuDxe.c | 16 +--
 UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c | 47 
 UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c  |  9 +---
 UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c|  9 +---
 UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c  |  9 +---
 UefiCpuPkg/Include/Library/UefiCpuLib.h| 17 +++
 6 files changed, 70 insertions(+), 37 deletions(-)

diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
index 00f3cb09572c..8aca1bf72b4c 100644
--- a/UefiCpuPkg/CpuDxe/CpuDxe.c
+++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
@@ -503,21 +503,7 @@ InitializeMtrrMask (
   VOID
   )
 {
-  UINT32  RegEax;
-  UINT8   PhysicalAddressBits;
-
-  AsmCpuid (0x8000, , NULL, NULL, NULL);
-
-  if (RegEax >= 0x8008) {
-AsmCpuid (0x8008, , NULL, NULL, NULL);
-
-PhysicalAddressBits = (UINT8)RegEax;
-  } else {
-PhysicalAddressBits = 36;
-  }
-
-  mValidMtrrBitsMask= LShiftU64 (1, PhysicalAddressBits) - 1;
-  mValidMtrrAddressMask = mValidMtrrBitsMask & 0xf000ULL;
+  GetPhysicalAddressBits(, );
 }
 
 /**
diff --git a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c 
b/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c
index 5d925bc273f8..bb1343f3cd21 100644
--- a/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c
+++ b/UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.c
@@ -79,3 +79,50 @@ GetCpuSteppingId (
 
   return (UINT8)Eax.Bits.SteppingId;
 }
+
+/**
+  Get the physical address width supported by the processor.
+  @param[out] ValidAddressMask  Bitmask with valid address bits set to
+one; other bits are clear. Optional
+parameter.
+  @param[out] ValidPageBaseAddressMask  Bitmask with valid page base address
+bits set to one; other bits are clear.
+Optional parameter.
+  @return  The physical address width supported by the processor.
+**/
+UINT8
+EFIAPI
+GetPhysicalAddressBits (
+  OUT UINT64 *ValidAddressMask OPTIONAL,
+  OUT UINT64 *ValidPageBaseAddressMask OPTIONAL
+  )
+{
+  UINT32 MaxExtendedFunction;
+  CPUID_VIR_PHY_ADDRESS_SIZE_EAX VirPhyAddressSize;
+  UINT64 AddressMask;
+  UINT64 PageBaseAddressMask;
+
+  AsmCpuid (CPUID_EXTENDED_FUNCTION, , NULL, NULL, NULL);
+  if (MaxExtendedFunction >= CPUID_VIR_PHY_ADDRESS_SIZE) {
+AsmCpuid (
+  CPUID_VIR_PHY_ADDRESS_SIZE,
+  ,
+  NULL,
+  NULL,
+  NULL
+  );
+  } else {
+VirPhyAddressSize.Bits.PhysicalAddressBits = 36;
+  }
+
+  AddressMask = LShiftU64 (1, VirPhyAddressSize.Bits.PhysicalAddressBits) - 1;
+  PageBaseAddressMask = AddressMask & ~(UINT64)0xFFF;
+
+  if (ValidAddressMask != NULL) {
+*ValidAddressMask = AddressMask;
+  }
+  if (ValidPageBaseAddressMask != NULL) {
+*ValidPageBaseAddressMask = PageBaseAddressMask;
+  }
+  return (UINT8)VirPhyAddressSize.Bits.PhysicalAddressBits;
+}
diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c 
b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c
index 4e8f897f5e9c..ec7cd4013132 100644
--- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c
+++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmStm.c
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -330,13 +331,7 @@ SmmCpuFeaturesInstallSmiHandler (
   if (Hob != NULL) {
 Psd->PhysicalAddressBits = ((EFI_HOB_CPU *)Hob)->SizeOfMemorySpace;
   } else {
-AsmCpuid (0x8000, , NULL, NULL, NULL);
-if (RegEax >= 0x8008) {
-  AsmCpuid (0x8008, , NULL, NULL, NULL);
-  Psd->PhysicalAddressBits = (UINT8)RegEax;
-} else {
-  Psd->PhysicalAddressBits = 36;
-}
+Psd->PhysicalAddressBits = GetPhysicalAddressBits (NULL, NULL);
   }
 
   if (!mStmConfigurationTableInitialized) {
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
index 538394f23910..de1385a86948 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
@@ -194,7 +194,6 @@ CalculateMaximumSupportAddress (
   VOID
   )
 {
-  UINT32  RegEax;
   UINT8   PhysicalAddressBits;
   VOID*Hob;
 
@@ -205,13 +204,7 @@ CalculateMaximumSupportAddress (
   if (Hob != NULL) {
 PhysicalAddressBits = ((EFI_HOB_CPU *)Hob)->SizeOfMemorySpace;
   } else {
-AsmCpuid (0x8000, , NULL, NULL, NULL);
-

[edk2-devel] MOM // RE: TianoCore edk2-test Bug Triage Meeting 13.01.2022

2022-01-13 Thread G Edhaya Chandran
Hello All,

Thank you attending the meeting.
Next meeting is on: 3rd February 2022

MOM:
Three issues were closed today. The updated status of other issues are as below:


ID▼
Product
Comp
Assignee
Status
Resolution
Summary
Changed▼
3736
EDK2 Tes
UEFI-SCT
joseph.hem...@arm.com
UNCO
---
UEFI-SCT: TCG2 Protocol 
Test
09:34:51
3145
EDK2 Tes
UEFI-SCT
sunny.w...@arm.com
CONF
---
UEFI-SCT: handling of unsupported EFI_SIMPLE_NETWORK_PROTOCOL 
functions
09:24:30
3738
EDK2 Tes
UEFI-SCT
sunny.w...@arm.com
CONF
---
EFI_SIMPLE_TEXT_OUT_PROTOCOL tests should allow SetMode to return 
EFI_UNSUPPORTED
09:23:00
3601
EDK2 Tes
UEFI-SCT
edhaya.chand...@arm.com
CONF
---
QemuVideoDxe SCT inconsistent test failures and logging 
issue
09:16:58
3759
EDK2 Tes
UEFI-SCT
unassig...@tianocore.org
CONF
---
SCT test fails when RouteConfig returns 
EFI_ACCESS_DENIED
09:13:54
2126
EDK2 Tes
UEFI-SCT
carolyn.gjert...@amd.com
CONF
---
SCT does not build for X64 using GCC - missing 
EFIAPI
09:10:24
2238
EDK2 Tes
UEFI-SCT
edhaya.chand...@arm.com
CONF
---
NULL dereference in 
BBTestQueryFunctionAutoTest()
08:17:16
1860
EDK2 Tes
UEFI-SCT
edhaya.chand...@arm.com
CONF
---
Verify that loading images with <4k section alignment either succeeds or fails 
gracefully
2021-12-03
2774
EDK2 Tes
UEFI-SCT
edhaya.chand...@arm.com
CONF
---
BS.GetNextMonotonicCount - high 32 bit increase by 1 
FAILURE.
2021-12-02
2650
EDK2 Tes
UEFI-SCT
edhaya.chand...@arm.com
CONF
---
SCT2.7 "BootServicesTest\ImageServicesTest" Test 
Fail
2021-12-02
2386
EDK2 Tes
UEFI-SCT
gao...@byosoft.com.cn
CONF
---
BBTestReadKeyStrokeExFunctionAutoTestCheckpoint1() can't identify the problem 
of wrong implementation of 
ReadKeyStrokeEx
2021-11-23
2239
EDK2 Tes
UEFI-SCT
edhaya.chand...@arm.com
CONF
---
UpdateInfoFileName() returns random bytes from 
stack
2021-11-11
2230
EDK2 Tes
UEFI-SCT
stuart.yo...@arm.com
CONF
---
Feature request: image authentication 
test
2021-11-11
1839
EDK2 

Re: [edk2-devel] [PATCH v4 00/11] Create new target for Cloud Hypervisor

2022-01-13 Thread Yao, Jiewen
Merged: https://github.com/tianocore/edk2/pull/2411

> -Original Message-
> From: Boeuf, Sebastien 
> Sent: Tuesday, January 11, 2022 8:31 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Justen, Jordan L
> ; kra...@redhat.com; Boeuf, Sebastien
> 
> Subject: [PATCH v4 00/11] Create new target for Cloud Hypervisor
> 
> From: Sebastien Boeuf 
> 
> Since Cloud Hypervisor and QEMU pc/q35 are quite different, it makes
> more sense to create a dedicated OVMF target for Cloud Hypervisor rather
> than trying to support both VMMs from the same OvmfPkgX64 target.
> 
> That's the reason why this series introduces a new target called
> CloudHvX64, meant to be used with the Cloud Hypervisor VMM only.
> 
> The new target is initially copied over from the OvmfPkgX64, then it is
> trimmed down by removing what is not needed from a Cloud Hypervisor
> perspective.
> 
> Sebastien Boeuf (11):
>   OvmfPkg/CloudHv: Add new target for Cloud Hypervisor
>   OvmfPkg/CloudHv: Replace legacy 8254 PIT with local APIC timer
>   OvmfPkg/CloudHv: Connect serial console
>   OvmfPkg/CloudHv: Remove legacy 8259 PIC support
>   OvmfPkg/CloudHv: Remove Q35 specifics
>   OvmfPkg/CloudHv: Reduce dependency on QemuFwCfg
>   OvmfPkg/CloudHv: Remove video support
>   OvmfPkg/CloudHv: Remove USB support
>   OvmfPkg/CloudHv: Remove CSM support
>   OvmfPkg/CloudHv: add Maintainers.txt entry
>   OvmfPkg: Add CloudHvX64 to the CI
> 
>  Maintainers.txt   |   5 +
>  OvmfPkg/CloudHv/CloudHvX64.dsc| 938 ++
>  OvmfPkg/CloudHv/CloudHvX64.fdf| 503 ++
>  .../PlatformBootManagerLib/BdsPlatform.c  |   8 +-
>  .../.azurepipelines/Ubuntu-GCC5.yml   |   9 +
>  OvmfPkg/PlatformCI/CloudHvBuild.py|  37 +
>  6 files changed, 1499 insertions(+), 1 deletion(-)
>  create mode 100644 OvmfPkg/CloudHv/CloudHvX64.dsc
>  create mode 100644 OvmfPkg/CloudHv/CloudHvX64.fdf
>  create mode 100644 OvmfPkg/PlatformCI/CloudHvBuild.py
> 
> --
> 2.30.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85661): https://edk2.groups.io/g/devel/message/85661
Mute This Topic: https://groups.io/mt/88347187/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] uefi-sct/SctPkg:Enhance BBTestReadKeyStrokeExFunctionAutoTestCheckpoint1()

2022-01-13 Thread G Edhaya Chandran
Reviewed-by: G Edhaya Chandran 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85660): https://edk2.groups.io/g/devel/message/85660
Mute This Topic: https://groups.io/mt/87274606/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: invalid values for SetWakeupTime()

2022-01-13 Thread G Edhaya Chandran
Upstreamed as commit - id:
https://github.com/tianocore/edk2-test/commit/01d9d24efdedb30ff6b0e1f1c47c6c3b0c5a7093


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85659): https://edk2.groups.io/g/devel/message/85659
Mute This Topic: https://groups.io/mt/86986279/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v3] MdePkg: Add registers of boot partition feature

2022-01-13 Thread Gerd Hoffmann
On Wed, Jan 05, 2022 at 06:35:06PM +0800, Maggie Chu wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3757
> 
> Add registers of boot partition feature which defined in NVM Express 1.4 Spec

nvme boot in qemu broke, and git bisect landed at this commit.

Error message:

NvmeControllerInit: the controller doesn't support NVMe command set

>  // These register offsets are defined as 0x1000 + (N * (4 << CAP.DSTRD))
> @@ -51,11 +55,14 @@ typedef struct {
>UINT8 To; // Timeout
>UINT16Dstrd  : 4;
>UINT16Nssrs  : 1; // NVM Subsystem Reset Supported NSSRS
> -  UINT16Css: 4; // Command Sets Supported - Bit 37
> -  UINT16Rsvd3  : 7;
> +  UINT16Css: 8; // Command Sets Supported - Bit 37
> +  UINT16Bps: 1; // Boot Partition Support - Bit 45 in NVMe1.4
> +  UINT16Rsvd3  : 2;

This looks very suspicious ...

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85657): https://edk2.groups.io/g/devel/message/85657
Mute This Topic: https://groups.io/mt/88211217/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2 1/3] DynamicTablesPkg: Add Memory32Fixed function

2022-01-13 Thread PierreGondois
Hello Rebecca,

Just 2 minor comments. With that changed:

Reviewed-by: Pierre Gondois 


On 1/11/22 6:54 PM, Rebecca Cran wrote:
> Add a Memory32Fixed function to generate code for the corresponding
> Memory32Fixed macro in AML.
>
> Signed-off-by: Rebecca Cran 
> ---
>  DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h| 33 
> 
>  DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c | 57 
> 
>  2 files changed, 90 insertions(+)
>
> diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h 
> b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
> index af18bf8e4871..2491ade397c6 100644
> --- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
> +++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
> @@ -592,6 +592,39 @@ AmlCodeGenRdDWordMemory (
>OUT   AML_DATA_NODE_HANDLE*NewRdNode  OPTIONAL
>);
>  
> +/** Code generation for the "Memory32Fixed ()" ASL macro.
> +
> +  The Resource Data effectively created is a 32-bit Memory Resource
> +  Data. Cf ACPI 6.4:
> +   - s19.6.83 "Memory Resource Descriptor Macro".
> +   - s19.2.8 "Memory32FixedTerm".
> +
> +  See ACPI 6.4 spec, s19.2.8 for more.
> +
> +  @param [in]  IsReadWrite  ReadAndWrite parameter.
> +  @param [in]  Address  AddressBase parameter.
> +  @param [in]  RangeLength  Range length.
> +  @param [in]  NameOpNode   NameOp object node defining a named 
> object.
> +If provided, append the new resource data
> +node to the list of resource data 
> elements
> +of this node.
> +  @param [out] NewMemNode   If provided and success,
> +contain the created node.
> +
> +  @retval EFI_SUCCESS The function completed successfully.
> +  @retval EFI_INVALID_PARAMETER   Invalid parameter.
> +  @retval EFI_OUT_OF_RESOURCESCould not allocate memory.
> +**/
> +EFI_STATUS
> +EFIAPI
> +AmlCodeGenMemory32Fixed (
> +  BOOLEAN IsReadWrite,
> +  UINT32  Address,
> +  UINT32  RangeLength,
> +  AML_OBJECT_NODE_HANDLE  NameOpNode,
> +  AML_DATA_NODE_HANDLE*NewMemNode
> +  );
> +
>  /** Code generation for the "WordBusNumber ()" ASL function.
>  
>The Resource Data effectively created is a Word Address Space Resource
> diff --git 
> a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c 
> b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c
> index 40d8c2b07ae3..19fb76dc5b45 100644
> --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c
> +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c
> @@ -609,6 +609,63 @@ AmlCodeGenRdDWordMemory (
> );
>  }
>  
> +/** Code generation for the "Memory32Fixed ()" ASL macro.
> +
> +  The Resource Data effectively created is a 32-bit Memory Resource
> +  Data. Cf ACPI 6.4:
> +   - s19.6.83 "Memory Resource Descriptor Macro".
> +   - s19.2.8 "Memory32FixedTerm".
> +
> +  See ACPI 6.4 spec, s19.2.8 for more.
> +
> +  @param [in]  IsReadWrite  ReadAndWrite parameter.
> +  @param [in]  Addres   AddressBase parameter.
> +  @param [in]  RangeLength  Range length.
> +  @param [in]  NameOpNode   NameOp object node defining a named 
> object.
> +If provided, append the new resource data
> +node to the list of resource data 
> elements
> +of this node.
> +  @param [out] NewMemNode   If provided and success,
> +contain the created node.
> +
> +  @retval EFI_SUCCESS The function completed successfully.
> +  @retval EFI_INVALID_PARAMETER   Invalid parameter.
> +  @retval EFI_OUT_OF_RESOURCESCould not allocate memory.
> +**/
> +EFI_STATUS
> +EFIAPI
> +AmlCodeGenMemory32Fixed (

I missed it in the v1, but other similar functions have an 'Rd' for Resource 
Data
in their name, so I think it should be AmlCodeGenRdMemory32Fixed() instead.


> +  BOOLEAN IsReadWrite,
> +  UINT32  Address,
> +  UINT32  RangeLength,
> +  AML_OBJECT_NODE_HANDLE  NameOpNode,
> +  AML_DATA_NODE_HANDLE*NewMemNode
> +  )
> +{
> +  EFI_STATUS Status;
> +  AML_DATA_NODE  *MemNode;
> +  EFI_ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR  RangeDesc;
> +
> +  RangeDesc.Header.Header.Byte = 0x86;
> +  RangeDesc.Header.Length  = 0x09;

Is it possible to use the macros available instead of hard-coded values ?
Cf the AmlCodeRdGenRegister() function and the macro:
ACPI_LARGE_32_BIT_MEMORY_RANGE_DESCRIPTOR_NAME

> +  RangeDesc.Information= IsReadWrite ? BIT0 : 0;
> +  RangeDesc.BaseAddress= Address;
> +