Re: [edk2-devel] [PATCH] BaseTools/PatchCheck.py: Skip length check for user name in xxx-by

2020-07-20 Thread Bob Feng
Shenglei,

I mean this link https://edk2.groups.io/g/devel/message/62647 

Thanks,
Bob

-Original Message-
From: Zhang, Shenglei  
Sent: Tuesday, July 21, 2020 1:21 PM
To: Feng, Bob C ; devel@edk2.groups.io
Cc: Gao, Liming 
Subject: RE: [PATCH] BaseTools/PatchCheck.py: Skip length check for user name 
in xxx-by

Bob,

Code review is for our internal use. Should I append it on Bugzilla?

Thanks,
Shenglei

> -Original Message-
> From: Feng, Bob C 
> Sent: Tuesday, July 21, 2020 11:39 AM
> To: Zhang, Shenglei ; devel@edk2.groups.io
> Cc: Gao, Liming 
> Subject: RE: [PATCH] BaseTools/PatchCheck.py: Skip length check for 
> user name in xxx-by
> 
> Shenglei,
> 
> After you send out the patch for review, please update the Bugzilla 
> status as in-progress and provide the code review link.
> 
> Thanks,
> Bob
> 
> -Original Message-
> From: Zhang, Shenglei 
> Sent: Thursday, July 16, 2020 11:14 AM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C ; Gao, Liming 
> 
> Subject: [PATCH] BaseTools/PatchCheck.py: Skip length check for user 
> name in xxx-by
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2836
> Current PatchCheck.py checks each line to ensure line's length is not 
> larger than 76. But there's a case that length of user's name is much 
> longer than that number. So enhance the script to handle this case.
> 
> Cc: Bob Feng 
> Cc: Liming Gao 
> Signed-off-by: Shenglei Zhang 
> ---
>  BaseTools/Scripts/PatchCheck.py | 9 -
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Scripts/PatchCheck.py 
> b/BaseTools/Scripts/PatchCheck.py index 52244b0bc4d8..7db0775d14d1
> 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -268,7 +268,14 @@ class CommitMessageCheck:
>  for i in range(2, count):
>  if (len(lines[i]) >= 76 and
>  len(lines[i].split()) > 1 and
> -not lines[i].startswith('git-svn-id:')):
> +not lines[i].startswith('git-svn-id:') and
> +not lines[i].startswith('Reviewed-by') and
> +not lines[i].startswith('Acked-by:') and
> +not lines[i].startswith('Tested-by:') and
> +not lines[i].startswith('Reported-by:') and
> +not lines[i].startswith('Suggested-by:') and
> +not lines[i].startswith('Signed-off-by:') and
> +not lines[i].startswith('Cc:')):
>  #
>  # Print a warning if body line is longer than 75 characters
>  #
> --
> 2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62961): https://edk2.groups.io/g/devel/message/62961
Mute This Topic: https://groups.io/mt/75535068/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when upgrade submodule.

2020-07-20 Thread Liming Gao
Guomin:
  +   self.lines[self.line_num+1].endswith('16\n') or

  What means for this line? 


Thanks
Liming
-Original Message-
From: Jiang, Guomin  
Sent: 2020年7月21日 10:59
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Gao, Liming 
Subject: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when upgrade 
submodule.

When i upgrade openssl to 1.1.1g, error occurred when run PatchCheck.py.
The reason is that the submodule will end with LF, but it will check based on 
file rule, it make no sense and need ignore the check.

Signed-off-by: Guomin Jiang 
Cc: Bob Feng 
Cc: Liming Gao 
---
 BaseTools/Scripts/PatchCheck.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py 
index 7db0775d14d1..46b9936c6576 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -405,12 +405,16 @@ class GitDiffCheck:
 #
 self.force_crlf = False
 if self.filename == '.gitmodules' or \
+   self.lines[self.line_num+1].endswith('16\n') or 
+ \
self.filename == 'BaseTools/Conf/diff.order':
 #
 # .gitmodules and diff orderfiles are used internally by 
git
 # use tabs and LF line endings.  Do not enforce no tabs and
 # do not enforce CR/LF line endings.
 #
+# When update submodule, it will encode with LF line and do
+# not enforce CR/LF line endings.
+#
 self.force_crlf = False
 self.force_notabs = False
 elif len(line.rstrip()) != 0:
--
2.25.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62960): https://edk2.groups.io/g/devel/message/62960
Mute This Topic: https://groups.io/mt/75697127/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] Help of acpi event

2020-07-20 Thread Kumar G
Hi Experts,

I am moving from device tree world to acpi. I found the event notification
feature of acpi table interesting.

I have some questions over notification
-  Is some hardware can generate events and notify OS by its own ?(if yes ,
please help me how) , I mean without calling any method from OS

- I may be wrong, but it looks OS needs to call a method in order to
execution of Notify function of acpi table

- Is this correct acpi tables are static piece of code, having no
thread/execution context, All execution in done from OS


Thanks
Kumar G

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62959): https://edk2.groups.io/g/devel/message/62959
Mute This Topic: https://groups.io/mt/75698650/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 v7 1/6] Platform/Intel/MinPlatformPkg: Fix build error

2020-07-20 Thread Liming Gao
Reviewed-by: Liming Gao 

-Original Message-
From: Kuo, IanX  
Sent: 2020年7月21日 13:29
To: devel@edk2.groups.io
Cc: Lu, James ; Kumar, Chandana C 
; Prabhala, Varalakshmi A 
; Gao, Liming ; Kuo, 
IanX ; Chaganty, Rangasai V 
; Chiu, Chasel 
Subject: [edk2-platforms] [PATCH v7 1/6] Platform/Intel/MinPlatformPkg: Fix 
build error

1. Fix ReportCpuHobLib build error
2. Change MODULE from BASE to PEIM

Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I0cd6ba4eb7231a3a84f080fdce85bbe74eb29eeb
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c | 3 ++-
 .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
index aa256534..7eb29152 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
@@ -6,7 +6,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 

 **/

 

-#include 

+#include 

+#include 

 #include 

 

 VOID

diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
index a1830d43..df1d780e 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
@@ -12,7 +12,7 @@
   BASE_NAME  = ReportCpuHobLib

   FILE_GUID  = F19AA754-CE24-448D-B755-1F939B00C25D

   VERSION_STRING = 1.0

-  MODULE_TYPE= BASE

+  MODULE_TYPE= PEIM

   LIBRARY_CLASS  = ReportCpuHobLib

 

 [LibraryClasses]

-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62958): https://edk2.groups.io/g/devel/message/62958
Mute This Topic: https://groups.io/mt/75698469/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 v7 2/6] Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread Liming Gao
Ian:
  Change-id should be removed from the commit message. And, the change to 
!include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc is not required. 
Can you help check?

Thanks
Liming
-Original Message-
From: Kuo, IanX  
Sent: 2020年7月21日 13:30
To: devel@edk2.groups.io
Cc: Lu, James ; Kumar, Chandana C 
; Prabhala, Varalakshmi A 
; Gao, Liming ; Kuo, 
IanX ; Chaganty, Rangasai V 
; Chiu, Chasel 
Subject: [edk2-platforms] [PATCH v7 2/6] Platform/Intel/CometlakeOpenBoardPkg: 
Add ReportCpuHobLib.

Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I1097057046aa021dc2ff193fea335790513c10c4

Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
index 136e5309..6a5c993b 100644
--- a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #

   # Include PCD configuration for this board.

   #

-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc


+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+

[Liming] This change is not required. Can you help check?


   !include OpenBoardPkgPcd.dsc

   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc

 

@@ -172,6 +173,7 @@
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf

 !endif

   
SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf

+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf

 

   ###

   # Board Package

-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62957): https://edk2.groups.io/g/devel/message/62957
Mute This Topic: https://groups.io/mt/75698470/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v7 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I1c14aece3b229c194960e91dc9505dd8120bbe30
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 3 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index 13a0fda2..b62351da 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -92,6 +92,7 @@
   #
   
FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf
   
ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
   TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
   
SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
index efdeb6a9..48cbe0df 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Platform Init Pre-Memory PEI module
 
-Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -355,28 +356,6 @@ Done:
   return EFI_SUCCESS;
 }
 
-VOID
-ReportCpuHob (
-  VOID
-  )
-{
-  UINT8 PhysicalAddressBits;
-  UINT32RegEax;
-
-  AsmCpuid (0x8000, , NULL, NULL, NULL);
-  if (RegEax >= 0x8008) {
-AsmCpuid (0x8008, , NULL, NULL, NULL);
-PhysicalAddressBits = (UINT8) RegEax;
-  } else {
-PhysicalAddressBits = 36;
-  }
-
-  ///
-  /// Create a CPU hand-off information
-  ///
-  BuildCpuHob (PhysicalAddressBits, 16);
-}
-
 /**
   Install Firmware Volume Hob's once there is main memory
 
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
index 7ee18eb6..8e828ff2 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Platform Init Pre-Memory PEI module.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -28,6 +28,7 @@
   TestPointCheckLib
   TimerLib
   SetCacheMtrrLib
+  ReportCpuHobLib
 
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62956): https://edk2.groups.io/g/devel/message/62956
Mute This Topic: https://groups.io/mt/75698482/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v7 3/6] Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: Ic312ec307b3bcd84051e48505038d9ca47d467e2
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc  | 6 --
 .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  | 6 --
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
index 6e35495a..54f10ff0 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the GalagoPro3 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -38,7 +38,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -160,6 +161,7 @@
   
DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
   
SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
 
   ###
   # Platform Package
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
index 2a086cd9..bba3510c 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the KabylakeRvp3 board.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -37,7 +37,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -212,6 +213,7 @@
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
 !endif
   
SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
 
   ###
   # Board Package
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62953): https://edk2.groups.io/g/devel/message/62953
Mute This Topic: https://groups.io/mt/75698475/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v7 4/6] Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I673f8fcd2d97bbd60229a60f53875e92826a7179
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index 8a826009..a2d35582 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the X58Ich10 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -42,7 +42,8 @@
   DEFINE NETWORK_ISCSI_ENABLE   = FALSE
   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
 
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include $(PROJECT)/OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -144,6 +145,7 @@
 !endif
   
TestPointLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointLib/PeiTestPointLib.inf
   
SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrrLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
 
 [LibraryClasses.common.DXE_DRIVER]
 
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62954): https://edk2.groups.io/g/devel/message/62954
Mute This Topic: https://groups.io/mt/75698478/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v7 5/6] Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I999b29c30993c397f918a1f7b4ea19c61c0a460d
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc | 4 +++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc| 6 --
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
index fdf85b43..1e6bd7fd 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -172,6 +173,7 @@
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
 !endif
   
SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
 
   ###
   # Board Package
diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
index 11dffb08..502e015e 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the WhiskeylakeURvp board.
 #
-#  Copyright (c) 2019, Intel Corporation. All rights reserved.
+#  Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -172,6 +173,7 @@
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
 !endif
   
SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
 
   ###
   # Board Package
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62955): https://edk2.groups.io/g/devel/message/62955
Mute This Topic: https://groups.io/mt/75698479/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v7 2/6] Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I1097057046aa021dc2ff193fea335790513c10c4
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
index 136e5309..6a5c993b 100644
--- a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -172,6 +173,7 @@
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
 !endif
   
SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
 
   ###
   # Board Package
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62952): https://edk2.groups.io/g/devel/message/62952
Mute This Topic: https://groups.io/mt/75698470/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v7 0/6] Create a Library instance of ReportCpuHobLib

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 

IanX Kuo (6):
  Platform/Intel/MinPlatformPkg: Fix build error
  Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

 .../CometlakeURvp/OpenBoardPkg.dsc|  4 ++-
 .../GalagoPro3/OpenBoardPkg.dsc   |  6 +++--
 .../KabylakeRvp3/OpenBoardPkg.dsc |  6 +++--
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../Library/ReportCpuHobLib/ReportCpuHobLib.c |  3 ++-
 .../ReportCpuHobLib/ReportCpuHobLib.inf   |  2 +-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 .../BoardX58Ich10/OpenBoardPkg.dsc|  6 +++--
 .../UpXtreme/OpenBoardPkg.dsc |  4 ++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc  |  6 +++--
 11 files changed, 31 insertions(+), 37 deletions(-)

-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62950): https://edk2.groups.io/g/devel/message/62950
Mute This Topic: https://groups.io/mt/75698465/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v7 1/6] Platform/Intel/MinPlatformPkg: Fix build error

2020-07-20 Thread IanX Kuo
1. Fix ReportCpuHobLib build error
2. Change MODULE from BASE to PEIM

Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I0cd6ba4eb7231a3a84f080fdce85bbe74eb29eeb
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c | 3 ++-
 .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
index aa256534..7eb29152 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
@@ -6,7 +6,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#include 
+#include 
+#include 
 #include 
 
 VOID
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
index a1830d43..df1d780e 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
@@ -12,7 +12,7 @@
   BASE_NAME  = ReportCpuHobLib
   FILE_GUID  = F19AA754-CE24-448D-B755-1F939B00C25D
   VERSION_STRING = 1.0
-  MODULE_TYPE= BASE
+  MODULE_TYPE= PEIM
   LIBRARY_CLASS  = ReportCpuHobLib
 
 [LibraryClasses]
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62951): https://edk2.groups.io/g/devel/message/62951
Mute This Topic: https://groups.io/mt/75698469/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/PatchCheck.py: Skip length check for user name in xxx-by

2020-07-20 Thread Zhang, Shenglei
Bob,

Code review is for our internal use. Should I append it on Bugzilla?

Thanks,
Shenglei

> -Original Message-
> From: Feng, Bob C 
> Sent: Tuesday, July 21, 2020 11:39 AM
> To: Zhang, Shenglei ; devel@edk2.groups.io
> Cc: Gao, Liming 
> Subject: RE: [PATCH] BaseTools/PatchCheck.py: Skip length check for user
> name in xxx-by
> 
> Shenglei,
> 
> After you send out the patch for review, please update the Bugzilla status as
> in-progress and provide the code review link.
> 
> Thanks,
> Bob
> 
> -Original Message-
> From: Zhang, Shenglei 
> Sent: Thursday, July 16, 2020 11:14 AM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C ; Gao, Liming 
> Subject: [PATCH] BaseTools/PatchCheck.py: Skip length check for user name
> in xxx-by
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2836
> Current PatchCheck.py checks each line to ensure line's length is not larger
> than 76. But there's a case that length of user's name is much longer than
> that number. So enhance the script to handle this case.
> 
> Cc: Bob Feng 
> Cc: Liming Gao 
> Signed-off-by: Shenglei Zhang 
> ---
>  BaseTools/Scripts/PatchCheck.py | 9 -
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Scripts/PatchCheck.py
> b/BaseTools/Scripts/PatchCheck.py index 52244b0bc4d8..7db0775d14d1
> 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -268,7 +268,14 @@ class CommitMessageCheck:
>  for i in range(2, count):
>  if (len(lines[i]) >= 76 and
>  len(lines[i].split()) > 1 and
> -not lines[i].startswith('git-svn-id:')):
> +not lines[i].startswith('git-svn-id:') and
> +not lines[i].startswith('Reviewed-by') and
> +not lines[i].startswith('Acked-by:') and
> +not lines[i].startswith('Tested-by:') and
> +not lines[i].startswith('Reported-by:') and
> +not lines[i].startswith('Suggested-by:') and
> +not lines[i].startswith('Signed-off-by:') and
> +not lines[i].startswith('Cc:')):
>  #
>  # Print a warning if body line is longer than 75 characters
>  #
> --
> 2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62949): https://edk2.groups.io/g/devel/message/62949
Mute This Topic: https://groups.io/mt/75535068/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-platforms 2/4] Readme.md: update build parallellism information

2020-07-20 Thread Bob Feng
Change looks good. 

Reviewed-by: Bob Feng 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Leif Lindholm
Sent: Wednesday, July 15, 2020 8:20 PM
To: devel@edk2.groups.io
Cc: Kinney, Michael D 
Subject: [edk2-devel] [PATCH edk2-platforms 2/4] Readme.md: update build 
parallellism information

BaseTools can now be built in parallel, so drop the statement that says it 
cannot, and add -j flag to example command line.

Also, the `build` command now utilizes parallellism by default, so update text 
and examples to reflect this (and drop the examples for manually figuring out 
available core count).

Signed-off-by: Leif Lindholm 
---
 Readme.md | 24 +---
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/Readme.md b/Readme.md
index c5df5a15f53d..e1350b456619 100644
--- a/Readme.md
+++ b/Readme.md
@@ -105,11 +105,7 @@ target-specific binutils. These are included with any 
prepackaged GCC toolchain
(This step _depends_ on **WORKSPACE** being set as per above.)  1. Build 
BaseTools
 
-   `make -C edk2/BaseTools`
-
-   (BaseTools can currently not be built in parallel, so do not specify any 
`-j`
-   option, either on the command line or in a **MAKEFLAGS** environment
-   variable.)
+   `make -C edk2/BaseTools -j`
 
 ### Build options
 There are a number of options that can (or must) be specified at the point of
@@ -123,8 +119,9 @@ TARGET| `-b` | One of DEBUG, RELEASE or 
NOOPT.
 TARGET_ARCH   | `-a` | Architecture to build for.
 TOOL_CHAIN_TAG| `-t` | Toolchain profile to use for building.
 
-There is also MAX_CONCURRENT_THREAD_NUMBER (`-n`), roughly equivalent to 
-`make -j`.
+The `build` command will automatically determine the number of 
+available cpus and enable parallell builds. If you wish to restrict the 
+parallellism, the `-n` option specifies how many threads to use.
 
 When specified on command line, `-b` can be repeated multiple times in order 
to  build multiple targets sequentially.
@@ -133,21 +130,10 @@ After a successful build, the resulting images can be 
found in  `Build/{Platform Name}/{TARGET}_{TOOL_CHAIN_TAG}/FV`.
 
 ### Build a platform
-The main build process _can_ run in parallel - so figure out how many threads 
we -have available.
-
-```
-$ getconf _NPROCESSORS_ONLN
-8
-```
-OK, so we have 8 CPUs - let's tell the build to use a little more than that:
-```
-$ NUM_CPUS=$((`getconf _NPROCESSORS_ONLN` + 2)) -```  For the toolchain tag, 
use GCC5 for gcc version 5 or later, GCC4x for  earlier versions, or 
CLANG35/CLANG38 as appropriate when building with clang.
 ```
-$ build -n $NUM_CPUS -a AARCH64 -t GCC5 -p Platform/ARM/JunoPkg/ArmJuno.dsc
+$ build -a AARCH64 -t GCC5 -p Platform/ARM/JunoPkg/ArmJuno.dsc
 ```
 (Note that the description file gets resolved by the build command through  
searching in all locations specified in **PACKAGES_PATH**.)
--
2.20.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62948): https://edk2.groups.io/g/devel/message/62948
Mute This Topic: https://groups.io/mt/75518795/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] Using LLVM compiler set to build BaseTools in Linux

2020-07-20 Thread Bob Feng
Zhiguang, 

Please update the Bugzilla status.

Thanks,
Bob

-Original Message-
From: Liu, Zhiguang  
Sent: Monday, July 6, 2020 2:38 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Gao, Liming 
Subject: [PATCH] Using LLVM compiler set to build BaseTools in Linux

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2842

To use LLVM to build BaseTools, first set the CLANG_BIN environment value, and 
add "CXX=llvm" to choose LLVM compiler set when using make command.

Cc: Bob Feng 
Cc: Liming Gao 

Signed-off-by: Zhiguang Liu 
---
 BaseTools/Source/C/Makefiles/header.makefile   | 22 --
 BaseTools/Source/C/VfrCompile/GNUmakefile  |  6 --
 BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile |  4 
 BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile   |  4 
 4 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/C/Makefiles/header.makefile 
b/BaseTools/Source/C/Makefiles/header.makefile
index 4e9b36d98b..1c105ee7d4 100644
--- a/BaseTools/Source/C/Makefiles/header.makefile
+++ b/BaseTools/Source/C/Makefiles/header.makefile
@@ -38,12 +38,19 @@ endif
 CYGWIN:=$(findstring CYGWIN, $(shell uname -s)) LINUX:=$(findstring Linux, 
$(shell uname -s)) DARWIN:=$(findstring Darwin, $(shell uname -s))-+ifeq 
($(CXX), llvm)+BUILD_CC ?= $(CLANG_BIN)clang+BUILD_CXX ?= 
$(CLANG_BIN)clang+++BUILD_AS ?= $(CLANG_BIN)clang+BUILD_AR ?= 
$(CLANG_BIN)llvm-ar+BUILD_LD ?= $(CLANG_BIN)llvm-ld+else BUILD_CC ?= gcc 
BUILD_CXX ?= g++ BUILD_AS ?= gcc BUILD_AR ?= ar BUILD_LD ?= ld+endif LINKER ?= 
$(BUILD_CC) ifeq ($(HOST_ARCH), IA32) ARCH_INCLUDE = -I 
$(MAKEROOT)/Include/Ia32/@@ -72,14 +79,25 @@ ifeq ($(DARWIN),Darwin)  
BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \ 
-Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g 
else+ifeq ($(CXX), llvm)+BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing 
-fwrapv \+-fno-delete-null-pointer-checks -Wall -Werror 
\+-Wno-deprecated-declarations -Wno-self-assign \+-Wno-unused-result -nostdlib 
-g+else BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ 
-fno-delete-null-pointer-checks -Wall -Werror \ -Wno-deprecated-declarations 
-Wno-stringop-truncation -Wno-restrict \ -Wno-unused-result -nostdlib -g 
endif+endif+ifeq ($(CXX), llvm)+BUILD_LFLAGS =+BUILD_CXXFLAGS = 
-Wno-deprecated-register -Wno-unused-result+else BUILD_LFLAGS = BUILD_CXXFLAGS 
= -Wno-unused-result-+endif ifeq ($(HOST_ARCH), IA32) # # Snow Leopard  is a 
32-bit and 64-bit environment. uname -m returns i386, but gcc defaultsdiff 
--git a/BaseTools/Source/C/VfrCompile/GNUmakefile 
b/BaseTools/Source/C/VfrCompile/GNUmakefile
index 42e3d7da02..fc329944b9 100644
--- a/BaseTools/Source/C/VfrCompile/GNUmakefile
+++ b/BaseTools/Source/C/VfrCompile/GNUmakefile
@@ -16,9 +16,11 @@ TOOL_INCLUDE = -I Pccts/h
 #OBJECTS = VfrSyntax.o VfrServices.o DLGLexer.o EfiVfrParser.o ATokenBuffer.o 
DLexerBase.o AParser.o OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o 
EfiVfrParser.o VfrLexer.o VfrSyntax.o \   VfrFormPkg.o VfrError.o 
VfrUtilityLib.o VfrCompiler.o-+ifeq ($(CXX), llvm)+VFR_CPPFLAGS = 
-Wno-deprecated-register -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)+else 
VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)-+endif # keep 
BUILD_OPTFLAGS last VFR_CXXFLAGS = $(BUILD_OPTFLAGS) diff --git 
a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile 
b/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
index 8f2cc78c59..559b1c99f1 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
@@ -164,7 +164,11 @@ PCCTS_H=../h
 # #   UNIX  (default) #+ifeq ($(CXX), llvm)+BUILD_CC?=$(CLANG_BIN)clang+else 
BUILD_CC?=gcc+endif COPT=-O ANTLR=${BIN_DIR}/antlr DLG=${BIN_DIR}/dlgdiff --git 
a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile 
b/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
index b3a34d3b46..5a3561edec 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
+++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
@@ -114,7 +114,11 @@ PCCTS_H=../h
 # #   UNIX #+ifeq ($(CXX), llvm)+BUILD_CC?=$(CLANG_BIN)clang+else 
BUILD_CC?=cc+endif COPT=-O ANTLR=${BIN_DIR}/antlr DLG=${BIN_DIR}/dlg-- 
2.25.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62947): https://edk2.groups.io/g/devel/message/62947
Mute This Topic: https://groups.io/mt/75328235/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] BaseTools: Add Guid name support in GenFfs.

2020-07-20 Thread Bob Feng
Christine,

Please update the Bugzilla 2762 status.

Thanks,
Bob

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Bob Feng
Sent: Wednesday, July 15, 2020 8:54 AM
To: devel@edk2.groups.io; Chen, Christine 
Subject: Re: [edk2-devel] [Patch v4] BaseTools: Add Guid name support in GenFfs.

Reviewed-by: Bob Feng 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Yuwei Chen
Sent: Tuesday, July 14, 2020 1:31 PM
To: devel@edk2.groups.io
Subject: [edk2-devel] [Patch v4] BaseTools: Add Guid name support in GenFfs.

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

The Fv Section in the FDF files use hard coding Guid values which is 
inconvenient to manage. This patch adds Guid name support in GenFfs to solve 
this problem.

Signed-off-by: Yuwei Chen 
---
 .../Source/Python/AutoGen/WorkspaceAutoGen.py | 24 +++  
BaseTools/Source/Python/Common/GlobalData.py  |  1 +
 BaseTools/Source/Python/GenFds/FdfParser.py   | 14 ++-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py 
b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
index 668126aaac..f86c749c08 100644
--- a/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
@@ -108,6 +108,10 @@ class WorkspaceAutoGen(AutoGen):
 #
 # Mark now build in AutoGen Phase
 #
+#
+# Collect Platform Guids to support Guid name in Fdfparser.
+#
+self.CollectPlatformGuids()
 GlobalData.gAutoGenPhase = True
 self.ProcessModuleFromPdf()
 self.ProcessPcdType()
@@ -153,6 +157,26 @@ class WorkspaceAutoGen(AutoGen):
 EdkLogger.error("build", PARAMETER_INVALID,
 ExtraData="Build target [%s] is not supported by 
the platform. [Valid target: %s]"
   % (self.BuildTarget, " 
".join(self.Platform.BuildTargets)))
+
+def CollectPlatformGuids(self):
+oriInfList = []
+oriPkgSet = set()
+PlatformPkg = set()
+for Arch in self.ArchList:
+Platform = self.BuildDatabase[self.MetaFile, Arch, 
self.BuildTarget, self.ToolChain]
+oriInfList = Platform.Modules
+for ModuleFile in oriInfList:
+ModuleData = self.BuildDatabase[ModuleFile, Platform._Arch, 
Platform._Target, Platform._Toolchain]
+oriPkgSet.update(ModuleData.Packages)
+for Pkg in oriPkgSet:
+Guids = Pkg.Guids
+GlobalData.gGuidDict.update(Guids)
+if Platform.Packages:
+PlatformPkg.update(Platform.Packages)
+for Pkg in PlatformPkg:
+Guids = Pkg.Guids
+GlobalData.gGuidDict.update(Guids)
+
 @cached_property
 def FdfProfile(self):
 if not self.FdfFile:
diff --git a/BaseTools/Source/Python/Common/GlobalData.py 
b/BaseTools/Source/Python/Common/GlobalData.py
index 8ac29eb7a6..61ab3f7e24 100755
--- a/BaseTools/Source/Python/Common/GlobalData.py
+++ b/BaseTools/Source/Python/Common/GlobalData.py
@@ -29,6 +29,7 @@ gProcessingFile = ''
 gBuildingModule = ''
 gSkuids = []
 gDefaultStores = []
+gGuidDict = {}
 
 # definition for a MACRO name.  used to create regular expressions below.
 _MacroNamePattern = "[A-Z][A-Z0-9_]*"
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py 
b/BaseTools/Source/Python/GenFds/FdfParser.py
index 9b04a76af8..ea2401b0e4 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -18,7 +18,7 @@ from uuid import UUID
 
 from Common.BuildToolError import *
 from Common import EdkLogger
-from Common.Misc import PathClass, tdict, ProcessDuplicatedInf
+from Common.Misc import PathClass, tdict, ProcessDuplicatedInf, 
+GuidStructureStringToGuidString
 from Common.StringUtils import NormPath, ReplaceMacro  from Common import 
GlobalData  from Common.Expression import * @@ -1087,6 +1087,8 @@ class 
FdfParser:
 return False
 if GlobalData.gGuidPattern.match(self._Token) is not None:
 return True
+elif self._Token in GlobalData.gGuidDict:
+return True
 else:
 self._UndoToken()
 return False
@@ -2248,6 +2250,8 @@ class FdfParser:
 
 if not self._GetNextGuid():
 raise Warning.Expected("GUID value", self.FileName, 
self.CurrentLineNumber)
+if self._Token in GlobalData.gGuidDict:
+self._Token =
+ GuidStructureStringToGuidString(GlobalData.gGuidDict[self._Token]).upp
+ er()
 
 FvObj.FvNameGuid = self._Token
 
@@ -2459,6 +2463,8 @@ class FdfParser:
 raise Warning.ExpectedEquals(self.FileName, 
self.CurrentLineNumber)
 if not self._GetNextGuid():
 raise Warning.Expected("GUID value", self.FileName, 
self.CurrentLineNumber)
+ 

Re: [edk2-devel] [PATCH] BaseTools/PatchCheck.py: Skip length check for user name in xxx-by

2020-07-20 Thread Bob Feng
Shenglei,

After you send out the patch for review, please update the Bugzilla status as 
in-progress and provide the code review link.

Thanks,
Bob

-Original Message-
From: Zhang, Shenglei  
Sent: Thursday, July 16, 2020 11:14 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Gao, Liming 
Subject: [PATCH] BaseTools/PatchCheck.py: Skip length check for user name in 
xxx-by

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2836
Current PatchCheck.py checks each line to ensure line's length is not larger 
than 76. But there's a case that length of user's name is much longer than that 
number. So enhance the script to handle this case.

Cc: Bob Feng 
Cc: Liming Gao 
Signed-off-by: Shenglei Zhang 
---
 BaseTools/Scripts/PatchCheck.py | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py 
index 52244b0bc4d8..7db0775d14d1 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -268,7 +268,14 @@ class CommitMessageCheck:
 for i in range(2, count):
 if (len(lines[i]) >= 76 and
 len(lines[i].split()) > 1 and
-not lines[i].startswith('git-svn-id:')):
+not lines[i].startswith('git-svn-id:') and
+not lines[i].startswith('Reviewed-by') and
+not lines[i].startswith('Acked-by:') and
+not lines[i].startswith('Tested-by:') and
+not lines[i].startswith('Reported-by:') and
+not lines[i].startswith('Suggested-by:') and
+not lines[i].startswith('Signed-off-by:') and
+not lines[i].startswith('Cc:')):
 #
 # Print a warning if body line is longer than 75 characters
 #
--
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62945): https://edk2.groups.io/g/devel/message/62945
Mute This Topic: https://groups.io/mt/75535068/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/PatchCheck.py: Skip length check for user name in xxx-by

2020-07-20 Thread Bob Feng
Reviewed-by: Bob Feng 

-Original Message-
From: Zhang, Shenglei  
Sent: Thursday, July 16, 2020 11:14 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Gao, Liming 
Subject: [PATCH] BaseTools/PatchCheck.py: Skip length check for user name in 
xxx-by

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2836
Current PatchCheck.py checks each line to ensure line's length is not larger 
than 76. But there's a case that length of user's name is much longer than that 
number. So enhance the script to handle this case.

Cc: Bob Feng 
Cc: Liming Gao 
Signed-off-by: Shenglei Zhang 
---
 BaseTools/Scripts/PatchCheck.py | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py 
index 52244b0bc4d8..7db0775d14d1 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -268,7 +268,14 @@ class CommitMessageCheck:
 for i in range(2, count):
 if (len(lines[i]) >= 76 and
 len(lines[i].split()) > 1 and
-not lines[i].startswith('git-svn-id:')):
+not lines[i].startswith('git-svn-id:') and
+not lines[i].startswith('Reviewed-by') and
+not lines[i].startswith('Acked-by:') and
+not lines[i].startswith('Tested-by:') and
+not lines[i].startswith('Reported-by:') and
+not lines[i].startswith('Suggested-by:') and
+not lines[i].startswith('Signed-off-by:') and
+not lines[i].startswith('Cc:')):
 #
 # Print a warning if body line is longer than 75 characters
 #
--
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62944): https://edk2.groups.io/g/devel/message/62944
Mute This Topic: https://groups.io/mt/75535068/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] Using LLVM compiler set to build BaseTools in Linux

2020-07-20 Thread Bob Feng
Reviewed-by: Bob Feng 

-Original Message-
From: Liu, Zhiguang  
Sent: Monday, July 6, 2020 2:38 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Gao, Liming 
Subject: [PATCH] Using LLVM compiler set to build BaseTools in Linux

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2842

To use LLVM to build BaseTools, first set the CLANG_BIN environment value, and 
add "CXX=llvm" to choose LLVM compiler set when using make command.

Cc: Bob Feng 
Cc: Liming Gao 

Signed-off-by: Zhiguang Liu 
---
 BaseTools/Source/C/Makefiles/header.makefile   | 22 --
 BaseTools/Source/C/VfrCompile/GNUmakefile  |  6 --
 BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile |  4 
 BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile   |  4 
 4 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/C/Makefiles/header.makefile 
b/BaseTools/Source/C/Makefiles/header.makefile
index 4e9b36d98b..1c105ee7d4 100644
--- a/BaseTools/Source/C/Makefiles/header.makefile
+++ b/BaseTools/Source/C/Makefiles/header.makefile
@@ -38,12 +38,19 @@ endif
 CYGWIN:=$(findstring CYGWIN, $(shell uname -s)) LINUX:=$(findstring Linux, 
$(shell uname -s)) DARWIN:=$(findstring Darwin, $(shell uname -s))-+ifeq 
($(CXX), llvm)+BUILD_CC ?= $(CLANG_BIN)clang+BUILD_CXX ?= 
$(CLANG_BIN)clang+++BUILD_AS ?= $(CLANG_BIN)clang+BUILD_AR ?= 
$(CLANG_BIN)llvm-ar+BUILD_LD ?= $(CLANG_BIN)llvm-ld+else BUILD_CC ?= gcc 
BUILD_CXX ?= g++ BUILD_AS ?= gcc BUILD_AR ?= ar BUILD_LD ?= ld+endif LINKER ?= 
$(BUILD_CC) ifeq ($(HOST_ARCH), IA32) ARCH_INCLUDE = -I 
$(MAKEROOT)/Include/Ia32/@@ -72,14 +79,25 @@ ifeq ($(DARWIN),Darwin)  
BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror \ 
-Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -g 
else+ifeq ($(CXX), llvm)+BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing 
-fwrapv \+-fno-delete-null-pointer-checks -Wall -Werror 
\+-Wno-deprecated-declarations -Wno-self-assign \+-Wno-unused-result -nostdlib 
-g+else BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fwrapv \ 
-fno-delete-null-pointer-checks -Wall -Werror \ -Wno-deprecated-declarations 
-Wno-stringop-truncation -Wno-restrict \ -Wno-unused-result -nostdlib -g 
endif+endif+ifeq ($(CXX), llvm)+BUILD_LFLAGS =+BUILD_CXXFLAGS = 
-Wno-deprecated-register -Wno-unused-result+else BUILD_LFLAGS = BUILD_CXXFLAGS 
= -Wno-unused-result-+endif ifeq ($(HOST_ARCH), IA32) # # Snow Leopard  is a 
32-bit and 64-bit environment. uname -m returns i386, but gcc defaultsdiff 
--git a/BaseTools/Source/C/VfrCompile/GNUmakefile 
b/BaseTools/Source/C/VfrCompile/GNUmakefile
index 42e3d7da02..fc329944b9 100644
--- a/BaseTools/Source/C/VfrCompile/GNUmakefile
+++ b/BaseTools/Source/C/VfrCompile/GNUmakefile
@@ -16,9 +16,11 @@ TOOL_INCLUDE = -I Pccts/h
 #OBJECTS = VfrSyntax.o VfrServices.o DLGLexer.o EfiVfrParser.o ATokenBuffer.o 
DLexerBase.o AParser.o OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o 
EfiVfrParser.o VfrLexer.o VfrSyntax.o \   VfrFormPkg.o VfrError.o 
VfrUtilityLib.o VfrCompiler.o-+ifeq ($(CXX), llvm)+VFR_CPPFLAGS = 
-Wno-deprecated-register -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)+else 
VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(BUILD_CPPFLAGS)-+endif # keep 
BUILD_OPTFLAGS last VFR_CXXFLAGS = $(BUILD_OPTFLAGS) diff --git 
a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile 
b/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
index 8f2cc78c59..559b1c99f1 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
@@ -164,7 +164,11 @@ PCCTS_H=../h
 # #   UNIX  (default) #+ifeq ($(CXX), llvm)+BUILD_CC?=$(CLANG_BIN)clang+else 
BUILD_CC?=gcc+endif COPT=-O ANTLR=${BIN_DIR}/antlr DLG=${BIN_DIR}/dlgdiff --git 
a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile 
b/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
index b3a34d3b46..5a3561edec 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
+++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
@@ -114,7 +114,11 @@ PCCTS_H=../h
 # #   UNIX #+ifeq ($(CXX), llvm)+BUILD_CC?=$(CLANG_BIN)clang+else 
BUILD_CC?=cc+endif COPT=-O ANTLR=${BIN_DIR}/antlr DLG=${BIN_DIR}/dlg-- 
2.25.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62943): https://edk2.groups.io/g/devel/message/62943
Mute This Topic: https://groups.io/mt/75328235/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 0/2] BaseTools: Convert ReadMe.txt to reStructuredText

2020-07-20 Thread Bob Feng
Rebecca,

Thanks for updating this file.

Reviewed-by: Bob Feng 

Thanks,
Bob

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Rebecca Cran
Sent: Wednesday, July 8, 2020 7:13 AM
To: devel@edk2.groups.io
Cc: Rebecca Cran ; Feng, Bob C ; Gao, 
Liming 
Subject: [edk2-devel] [PATCH 0/2] BaseTools: Convert ReadMe.txt to 
reStructuredText

I noticed ReadMe.txt was a little outdated. I updated it to match current 
functionality (e.g. BaseTools works on both 32-bit and 64-bit Windows). Since 
the formatting was neither RST or MD, I converted it to RST and renamed to 
ReadMe.rst to match the edk2 ReadMe.rst.

Some (most?) sqlite use was removed in commit 
2f818ed0fb57d98985d151781a2ce9b8683129ee in 2018, but there are still some 
modules (Ecc/Database.py, Eoc/Database.py and
UPT/Core/IpiDb,py) that do require it, so I'm not sure if the part about 
sqlite3 should still be present in the ReadMe file. If so, I think the text 
about cx_freeze might be obsolete.

Signed-off-by: Rebecca Cran 
Cc: Bob Feng 
Cc: Liming Gao 



Rebecca Cran (2):
  BaseTools: Update ReadMe.txt to match current functionality
  BaseTools: rename ReadMe.txt to ReadMe.rst

 BaseTools/ReadMe.rst | 41 ++
 BaseTools/ReadMe.txt | 47 
 2 files changed, 41 insertions(+), 47 deletions(-)  create mode 100644 
BaseTools/ReadMe.rst  delete mode 100644 BaseTools/ReadMe.txt

--
2.25.1






-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62942): https://edk2.groups.io/g/devel/message/62942
Mute This Topic: https://groups.io/mt/75366649/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when upgrade submodule.

2020-07-20 Thread Guomin Jiang
When i upgrade openssl to 1.1.1g, error occurred when run PatchCheck.py.
The reason is that the submodule will end with LF, but it will check
based on file rule, it make no sense and need ignore the check.

Signed-off-by: Guomin Jiang 
Cc: Bob Feng 
Cc: Liming Gao 
---
 BaseTools/Scripts/PatchCheck.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 7db0775d14d1..46b9936c6576 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -405,12 +405,16 @@ class GitDiffCheck:
 #
 self.force_crlf = False
 if self.filename == '.gitmodules' or \
+   self.lines[self.line_num+1].endswith('16\n') or \
self.filename == 'BaseTools/Conf/diff.order':
 #
 # .gitmodules and diff orderfiles are used internally by 
git
 # use tabs and LF line endings.  Do not enforce no tabs and
 # do not enforce CR/LF line endings.
 #
+# When update submodule, it will encode with LF line and do
+# not enforce CR/LF line endings.
+#
 self.force_crlf = False
 self.force_notabs = False
 elif len(line.rstrip()) != 0:
-- 
2.25.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62941): https://edk2.groups.io/g/devel/message/62941
Mute This Topic: https://groups.io/mt/75697127/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



回覆: [edk2-devel] [edk2-platforms] [PATCH v6 1/6] Platform/Intel/MinPlatformPkg: Fix build error

2020-07-20 Thread IanX Kuo
Hi Liming

Ok, I will have PATCH v7 to specific it to PEIM.

Thanks,
Ian Kuo

寄件者: Gao, Liming 
寄件日期: 2020年7月21日 上午 10:12
收件者: devel@edk2.groups.io ; Chiu, Chasel 
; Kuo, IanX 
副本: Lu, James ; Kumar, Chandana C 
; Prabhala, Varalakshmi A 
; Chaganty, Rangasai V 

主旨: RE: [edk2-devel] [edk2-platforms] [PATCH v6 1/6] 
Platform/Intel/MinPlatformPkg: Fix build error

I suggest to include  instead of . If so, other Pi definitions 
are not required to be included.

ReportCpuHobLib module type should be PEIM. Hob can be produced only in PEI 
phase.

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Chiu, Chasel
Sent: 2020年7月21日 8:58
To: Kuo, IanX ; devel@edk2.groups.io
Cc: Lu, James ; Kumar, Chandana C 
; Prabhala, Varalakshmi A 
; Chaganty, Rangasai V 

Subject: Re: [edk2-devel] [edk2-platforms] [PATCH v6 1/6] 
Platform/Intel/MinPlatformPkg: Fix build error


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kuo, IanX 
> Sent: Tuesday, July 21, 2020 8:35 AM
> To: devel@edk2.groups.io
> Cc: Lu, James ; Kumar, Chandana C
> ; Prabhala, Varalakshmi A
> ; Kuo, IanX ;
> Chaganty, Rangasai V ; Chiu, Chasel
> 
> Subject: [edk2-platforms] [PATCH v6 1/6]
> Platform/Intel/MinPlatformPkg: Fix build error
>
> Fix ReportCpuHobLib build error
>
> Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
> PA bits reported can be overridden by Library instance in Platform.
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2674
>
> Change-Id: I0cd6ba4eb7231a3a84f080fdce85bbe74eb29eeb
> Signed-off-by: IanX Kuo 
> Cc: Sai Chaganty 
> Cc: Chasel Chiu 
> ---
>  .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c   | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git
> a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R
> e
> portCpuHobLib.c
> b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R
> e
> portCpuHobLib.c
> index aa256534..83fc5249 100644
> ---
> a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R
> e
> portCpuHobLib.c
> +++
> b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R
> e
> portCpuHobLib.c
> @@ -6,7 +6,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>
>
>  **/
>
>
>
> -#include 
>
> +#include 
>
> +#include 
>
> +#include 
>
> +#include 
>
>  #include 
>
>
>
>  VOID
>
> --
> 2.26.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62940): https://edk2.groups.io/g/devel/message/62940
Mute This Topic: https://groups.io/mt/75697067/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for __builtin_return_address

2020-07-20 Thread Liming Gao
Jess:
  OK. Seemly, there is no impact with this change. Reviewed-by: Liming Gao 


Thanks
Liming
-Original Message-
From: Jessica Clarke  
Sent: 2020年7月20日 23:06
To: Gao, Liming 
Cc: devel@edk2.groups.io; l...@nuviainc.com; Kinney, Michael D 

Subject: Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for 
__builtin_return_address

It will always look like void *__builtin_return_address(unsigned) and work like 
that, just that under the hood it's being implemented slightly differently, 
which has the unfortunate side-effect of triggering this bug. We've been 
compiling the embedded EDK2 in our CheriBSD with that line deleted for years 
now with no issue.

Jess

> On 20 Jul 2020, at 15:58, Gao, Liming  wrote:
> 
> Clarke:
>  Do you mean CLANG compiler may have the different prototype for 
> __builtin_return_address()? If so, dose __builtin_return_address (L) always 
> work? 
> 
> Thanks
> Liming
>> -Original Message-
>> From: devel@edk2.groups.io  On Behalf Of Leif 
>> Lindholm
>> Sent: Monday, July 20, 2020 10:05 PM
>> To: Jessica Clarke 
>> Cc: devel@edk2.groups.io; Kinney, Michael D 
>> ; Gao, Liming 
>> Subject: Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for 
>> __builtin_return_address
>> 
>> +Mike, Liming
>> 
>> On Mon, Jul 20, 2020 at 14:49:46 +0100, Jessica Clarke wrote:
>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1004
>>> 
>>> Being a compiler builtin, the type of __builtin_return_address is 
>>> already known to the compiler so no prototype is needed. Clang also 
>>> errors out when redeclaring certain builtins like this[1], though 
>>> currently only for ones with custom type checking. At the moment, 
>>> __builtin_return_address does not use custom type checking and so 
>>> does not trigger this error, however, the CHERI fork of LLVM, which 
>>> will form the basis of the toolchain for Arm's experimental Morello 
>>> platform, does use custom type checking for it, and so gives an 
>>> error. Thus, simply delete the unnecessary line.
>>> 
>>> [1] 
>>> https://github.com/llvm/llvm-project/commit/41af97137572ad6d4dafc872
>>> e7ecf6bbb08d4984
>>> 
>>> Cc: Leif Lindholm 
>>> Signed-off-by: Jessica Clarke 
>>> ---
>>> MdePkg/Include/Base.h | 1 -
>>> 1 file changed, 1 deletion(-)
>>> 
>>> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 
>>> 85a091b9d5..8e4271f6ea 100644
>>> --- a/MdePkg/Include/Base.h
>>> +++ b/MdePkg/Include/Base.h
>>> @@ -1273,7 +1273,6 @@ typedef UINTN RETURN_STATUS;
>>>   **/
>>>   #define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)
>>> #elif defined (__GNUC__) || defined (__clang__)
>>> -  void * __builtin_return_address (unsigned int level);
>> 
>> Agreed this looks somewhat bonkers.
>> And I can't see any ill effects from dropping it, so:
>> Reviewed-by: Leif Lindholm 
>> 
>>>   /**
>>> Get the return address of the calling function.
>>> 
>>> --
>>> 2.20.1
>>> 
>> 
>> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62939): https://edk2.groups.io/g/devel/message/62939
Mute This Topic: https://groups.io/mt/75682100/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 v6 1/6] Platform/Intel/MinPlatformPkg: Fix build error

2020-07-20 Thread Liming Gao
I suggest to include  instead of . If so, other Pi definitions 
are not required to be included. 

ReportCpuHobLib module type should be PEIM. Hob can be produced only in PEI 
phase. 

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Chiu, Chasel
Sent: 2020年7月21日 8:58
To: Kuo, IanX ; devel@edk2.groups.io
Cc: Lu, James ; Kumar, Chandana C 
; Prabhala, Varalakshmi A 
; Chaganty, Rangasai V 

Subject: Re: [edk2-devel] [edk2-platforms] [PATCH v6 1/6] 
Platform/Intel/MinPlatformPkg: Fix build error


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kuo, IanX 
> Sent: Tuesday, July 21, 2020 8:35 AM
> To: devel@edk2.groups.io
> Cc: Lu, James ; Kumar, Chandana C 
> ; Prabhala, Varalakshmi A 
> ; Kuo, IanX ; 
> Chaganty, Rangasai V ; Chiu, Chasel 
> 
> Subject: [edk2-platforms] [PATCH v6 1/6] 
> Platform/Intel/MinPlatformPkg: Fix build error
> 
> Fix ReportCpuHobLib build error
> 
> Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
> PA bits reported can be overridden by Library instance in Platform.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2674
> 
> Change-Id: I0cd6ba4eb7231a3a84f080fdce85bbe74eb29eeb
> Signed-off-by: IanX Kuo 
> Cc: Sai Chaganty 
> Cc: Chasel Chiu 
> ---
>  .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c   | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R
> e
> portCpuHobLib.c
> b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R
> e
> portCpuHobLib.c
> index aa256534..83fc5249 100644
> ---
> a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R
> e
> portCpuHobLib.c
> +++
> b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R
> e
> portCpuHobLib.c
> @@ -6,7 +6,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> 
>  **/
> 
> 
> 
> -#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
>  #include 
> 
> 
> 
>  VOID
> 
> --
> 2.26.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62938): https://edk2.groups.io/g/devel/message/62938
Mute This Topic: https://groups.io/mt/75695055/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] TianoCore Bug Triage - APAC / NAMO - Tue, 07/21/2020 6:30pm-7:30pm #cal-reminder

2020-07-20 Thread Liming Gao
The following BZs will be discussed this week.

2504
Tianocor
Code
maciej.rab...@intel.com
UNCO
---
UEFI HTTPS Boot Support for HTTP Client Authentication (Basic or 
Digest)
21:59:07
2859
EDK2
Code
unassig...@tianocore.org
UNCO
---
Add BaseTools/Scripts/ to the PATH when edksetup.sh/edksetup.bat 
run.
21:52:35
2856
EDK2
Code
unassig...@tianocore.org
UNCO
---
Invalid Flash BlockIo device under 
qemu
18:44:42
2858
Tianocor
Code
unassig...@tianocore.org
UNCO
---
Debug code to audit BIOS TPM extend 
operations.
17:29:21
2857
EDK2
Code
unassig...@tianocore.org
UNCO
---
Include HttpDynamicCommand into future EDK2 releases after 
approval
16:49:17
2855
EDK2
Code
rodrigo.gonzalez.del.cueto@...
UNCO
---
Fix GetSupportedAndActivePcrs counter 
calculation
15:25:06
2854
EDK2
Code
unassig...@tianocore.org
UNCO
---
"build clean" fails for OVMF: "ResetVector: Is a 
directory"
Fri 12:40
2853
EDK2
Code
unassig...@tianocore.org
UNCO
---
UT_LOG_xxx() messages are 
truncated
Thu 01:59
2851
EDK2
Code
unassig...@tianocore.org
UNCO
---
TPM _SRS has interrupt polarity reversed (following an ACPI spec 
inconsistency)
2020-07-14
2821
EDK2
Code
michael.d.kin...@intel.com
UNCO
---
Add AARCH64 flags for MSFT compiler to Intrinsic 
Lib
2020-07-14
2424
Tianocor
Code
yonghong@intel.com
UNCO
---
TLSv1.3 support
2020-07-14
2850
EDK2
Tools
unassig...@tianocore.org
UNCO
---
Generate compile_commands.json file needed by clangd VS Code 
plugin
2020-07-14
2848
EDK2
Code
abner.ch...@hpe.com
UNCO
---
"OpensslLib.inf" and "OpensslLibCrypto.inf" use different 
RISCV64_CC_FLAGS
2020-07-13
2846
EDK2
Tools
unassig...@tianocore.org
UNCO
---
Error while execute command 'nmake all' in direcotry 
C:\Users\jguo5\Downloads\edk2-master\BaseTools\Source\C\BrotliCompress
2020-07-11
2845
EDK2
Code
unassig...@tianocore.org
UNCO
---
To enable X2Apic by default
2020-07-09
2838
Tianocor
Code
bob.c.f...@intel.com
UNCO
---
set FIRMWARE_VER with git commit 
info
2020-07-08
2837
EDK2
Code
unassig...@tianocore.org
UNCO
---
missing memory attribute 
type
2020-07-03

Thanks
Liming
From: devel@edk2.groups.io 
Sent: 2020年7月21日 9:30
To: devel@edk2.groups.io
Subject: [edk2-devel] TianoCore Bug Triage - APAC / NAMO - Tue, 07/21/2020 
6:30pm-7:30pm #cal-reminder


Reminder: TianoCore Bug Triage - APAC / NAMO

When: Tuesday, 21 July 2020, 6:30pm to 7:30pm, (GMT-07:00) America/Los Angeles

Where:https://bluejeans.com/889357567?src=join_info

View Event

Organizer: Brian Richardson 
brian.richard...@intel.com

Description:
https://www.tianocore.org/bug-triage

Meeting URL
https://bluejeans.com/889357567?src=join_info

Meeting ID
889 357 567

Want to dial in from a phone?
Dial one of the following numbers:
+1.408.740.7256 (US (San Jose))
+1.408.317.9253 (US (Primary, San Jose))

(see all numbers - https://www.bluejeans.com/numbers)
Enter the meeting ID and passcode followed by #


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62937): https://edk2.groups.io/g/devel/message/62937
Mute This 

Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for __builtin_return_address

2020-07-20 Thread Zhiguang Liu
Reviewed-by: Zhiguang Liu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Leif
> Lindholm
> Sent: Monday, July 20, 2020 10:05 PM
> To: Jessica Clarke 
> Cc: devel@edk2.groups.io; Kinney, Michael D ;
> Gao, Liming 
> Subject: Re: [edk2-devel] [PATCH] MdePkg Base.h: Delete prototype for
> __builtin_return_address
> 
> +Mike, Liming
> 
> On Mon, Jul 20, 2020 at 14:49:46 +0100, Jessica Clarke wrote:
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1004
> >
> > Being a compiler builtin, the type of __builtin_return_address is
> > already known to the compiler so no prototype is needed. Clang also
> > errors out when redeclaring certain builtins like this[1], though
> > currently only for ones with custom type checking. At the moment,
> > __builtin_return_address does not use custom type checking and so does
> > not trigger this error, however, the CHERI fork of LLVM, which will
> > form the basis of the toolchain for Arm's experimental Morello
> > platform, does use custom type checking for it, and so gives an error.
> > Thus, simply delete the unnecessary line.
> >
> > [1]
> > https://github.com/llvm/llvm-
> project/commit/41af97137572ad6d4dafc872e7
> > ecf6bbb08d4984
> >
> > Cc: Leif Lindholm 
> > Signed-off-by: Jessica Clarke 
> > ---
> >  MdePkg/Include/Base.h | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index
> > 85a091b9d5..8e4271f6ea 100644
> > --- a/MdePkg/Include/Base.h
> > +++ b/MdePkg/Include/Base.h
> > @@ -1273,7 +1273,6 @@ typedef UINTN RETURN_STATUS;
> >**/
> >#define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)
> >  #elif defined (__GNUC__) || defined (__clang__)
> > -  void * __builtin_return_address (unsigned int level);
> 
> Agreed this looks somewhat bonkers.
> And I can't see any ill effects from dropping it, so:
> Reviewed-by: Leif Lindholm 
> 
> >/**
> >  Get the return address of the calling function.
> >
> > --
> > 2.20.1
> >
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62936): https://edk2.groups.io/g/devel/message/62936
Mute This Topic: https://groups.io/mt/75682100/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] File in the build question. I'm working on a smart git grep

2020-07-20 Thread Andrew Fish via groups.io


> On Jul 20, 2020, at 6:18 PM, Jiang, Guomin  wrote:
> 
> I would like that add BaseTols/Scripts/ to the PATH.
> 
> Usually, I use ```set PATH=%PATH%;%WORKSPACE%\BaseTools\Scripts``` to add new 
> directory to the environment variable.
> 
> But I suggest that we should judge if the last character in PATH variable is 
> ';' character and then add new directory.
> 
> Let me know what I can help you.

I’m thinking I could file a bugzilla to add BaseTools/Scripts/ to the path for 
edksetup.sh/edksetup.bat and then I can just contribute my Python git extension 
to BaseTools/Scripts

As Laszlo pointed out there is generic value having  BaseTools/Scripts/ in the 
path so I filed: https://bugzilla.tianocore.org/show_bug.cgi?id=2859

Thanks,

Andrew Fish

> 
>> -Original Message-
>> From: devel@edk2.groups.io  
>> mailto:devel@edk2.groups.io>> On Behalf Of Laszlo
>> Ersek
>> Sent: Tuesday, July 21, 2020 3:55 AM
>> To: Andrew Fish mailto:af...@apple.com>>; 
>> edk2-devel-groups-io
>> mailto:devel@edk2.groups.io>>
>> Subject: Re: [edk2-devel] File in the build question. I'm working on a smart 
>> git
>> grep
>> 
>> On 07/18/20 22:23, Andrew Fish wrote:
>>> Wanted to see if people are OK with adding BaseTools/Scripts/ to the path
>> when you run `. edksetuip.sh` or edksetup.bat?
>>> 
>>> If we do that and I add BaseTools/Scripts/git-pgrep then it will show up as
>> an extended git command.
>>> 
>>> I was thinking over time we could add git-edk2* git commands to help
>> automate the process or maintainer workflow.
>>> 
>>> If people are OK with adding the path I can make a patch set to contribute
>> git-pgrep, but I need some help with how to add the new path to
>> edksetup.bat.
>> 
>> To be honest, I think edksetup.sh should add BaseTools/Scripts/ to the PATH
>> environment variable anyway. I find it a bit awkward to run
>> 
>>  python BaseTools/Scripts/GetMaintainer.py -l ...
>> 
>> rather than just
>> 
>>  GetMaintainer.py -l ...
>> 
>> Thanks
>> Laszlo
>> 
>> 
>> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62935): https://edk2.groups.io/g/devel/message/62935
Mute This Topic: https://groups.io/mt/75533926/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 06/15] FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for LicenseCheck

2020-07-20 Thread Guomin Jiang
I think the better subject is "Add configuration for avoiding License Conflict".

Anyway, it's good to me.

Reviewed-by: Guomin Jiang 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Zhang,
> Shenglei
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming ; Kinney, Michael D
> 
> Subject: [edk2-devel] [PATCH 06/15] FmpDevicePkg/FmpDevicePkg.ci.yaml:
> Add configuration for LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for some generated files.
> 
> Cc: Liming Gao 
> Cc: Michael D Kinney 
> Signed-off-by: Shenglei Zhang 
> ---
>  FmpDevicePkg/FmpDevicePkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/FmpDevicePkg/FmpDevicePkg.ci.yaml
> b/FmpDevicePkg/FmpDevicePkg.ci.yaml
> index 74a0aefe8e49..d498ad7d21e1 100644
> --- a/FmpDevicePkg/FmpDevicePkg.ci.yaml
> +++ b/FmpDevicePkg/FmpDevicePkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  ##  {
> +"LicenseCheck": {
> +"IgnoreFiles": []
> +},
>  "CompilerPlugin": {
>  "DscPath": "FmpDevicePkg.dsc"
>  },
> --
> 2.18.0.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62934): https://edk2.groups.io/g/devel/message/62934
Mute This Topic: https://groups.io/mt/75678214/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: Add configuration for LicenseCheck

2020-07-20 Thread Guomin Jiang
I think the better subject is "Add configuration for avoiding License Conflict".

Anyway, it's good to me.

Reviewed-by: Guomin Jiang 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Zhang,
> Shenglei
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Lu, XiaoyuX
> 
> Subject: [edk2-devel] [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: Add
> configuration for LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for some generated files.
> 
> Cc: Jian J Wang 
> Cc: Xiaoyu Lu 
> Signed-off-by: Shenglei Zhang 
> ---
>  CryptoPkg/CryptoPkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/CryptoPkg/CryptoPkg.ci.yaml b/CryptoPkg/CryptoPkg.ci.yaml
> index f54ebfb22e70..e73b79e01fef 100644
> --- a/CryptoPkg/CryptoPkg.ci.yaml
> +++ b/CryptoPkg/CryptoPkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  ##  {
> +"LicenseCheck": {
> +"IgnoreFiles": []
> +},
>  "CompilerPlugin": {
>  "DscPath": "CryptoPkg.dsc"
>  },
> --
> 2.18.0.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62933): https://edk2.groups.io/g/devel/message/62933
Mute This Topic: https://groups.io/mt/75678212/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] TianoCore Bug Triage - APAC / NAMO - Tue, 07/21/2020 6:30pm-7:30pm #cal-reminder

2020-07-20 Thread devel@edk2.groups.io Calendar
*Reminder:* TianoCore Bug Triage - APAC / NAMO

*When:* Tuesday, 21 July 2020, 6:30pm to 7:30pm, (GMT-07:00) America/Los Angeles

*Where:* https://bluejeans.com/889357567?src=join_info

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=816382 )

*Organizer:* Brian Richardson brian.richard...@intel.com ( 
brian.richard...@intel.com?subject=Re:%20Event:%20TianoCore%20Bug%20Triage%20-%20APAC%20%2F%20NAMO
 )

*Description:*

https://www.tianocore.org/bug-triage

Meeting URL

https://bluejeans.com/889357567?src=join_info

Meeting ID

889 357 567

Want to dial in from a phone?

Dial one of the following numbers:

+1.408.740.7256 (US (San Jose))

+1.408.317.9253 (US (Primary, San Jose))

(see all numbers - https://www.bluejeans.com/numbers)

Enter the meeting ID and passcode followed by #

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62932): https://edk2.groups.io/g/devel/message/62932
Mute This Topic: https://groups.io/mt/75695986/21656
Mute #cal-reminder: https://groups.io/g/edk2/mutehashtag/cal-reminder
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] File in the build question. I'm working on a smart git grep

2020-07-20 Thread Guomin Jiang
I would like that add BaseTols/Scripts/ to the PATH.

Usually, I use ```set PATH=%PATH%;%WORKSPACE%\BaseTools\Scripts``` to add new 
directory to the environment variable.

But I suggest that we should judge if the last character in PATH variable is 
';' character and then add new directory.

Let me know what I can help you.

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Laszlo
> Ersek
> Sent: Tuesday, July 21, 2020 3:55 AM
> To: Andrew Fish ; edk2-devel-groups-io
> 
> Subject: Re: [edk2-devel] File in the build question. I'm working on a smart 
> git
> grep
> 
> On 07/18/20 22:23, Andrew Fish wrote:
> > Wanted to see if people are OK with adding BaseTools/Scripts/ to the path
> when you run `. edksetuip.sh` or edksetup.bat?
> >
> > If we do that and I add BaseTools/Scripts/git-pgrep then it will show up as
> an extended git command.
> >
> > I was thinking over time we could add git-edk2* git commands to help
> automate the process or maintainer workflow.
> >
> > If people are OK with adding the path I can make a patch set to contribute
> git-pgrep, but I need some help with how to add the new path to
> edksetup.bat.
> 
> To be honest, I think edksetup.sh should add BaseTools/Scripts/ to the PATH
> environment variable anyway. I find it a bit awkward to run
> 
>   python BaseTools/Scripts/GetMaintainer.py -l ...
> 
> rather than just
> 
>   GetMaintainer.py -l ...
> 
> Thanks
> Laszlo
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62931): https://edk2.groups.io/g/devel/message/62931
Mute This Topic: https://groups.io/mt/75533926/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v7 03/16] MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for Ecc check

2020-07-20 Thread Wu, Hao A
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Zhang,
> Shenglei
> Sent: Monday, July 6, 2020 4:49 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Wu, Hao A 
> Subject: [edk2-devel] [PATCH v7 03/16]
> MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for Ecc check
> 
> Add configuration ExceptionList and IgnoreFiles for package config files. So 
> users
> can rely on this to ignore some Ecc issues.
> 
> Cc: Jian J Wang 
> Cc: Hao A Wu 
> Signed-off-by: Shenglei Zhang 
> ---
>  MdeModulePkg/MdeModulePkg.ci.yaml | 11 +++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/MdeModulePkg/MdeModulePkg.ci.yaml
> b/MdeModulePkg/MdeModulePkg.ci.yaml
> index 1cfc1328390e..0ed929855417 100644
> --- a/MdeModulePkg/MdeModulePkg.ci.yaml
> +++ b/MdeModulePkg/MdeModulePkg.ci.yaml
> @@ -2,9 +2,20 @@
>  # CI configuration for MdeModulePkg
>  #
>  # Copyright (c) Microsoft Corporation
> +# Copyright (c) 2020, Intel Corporation. All rights reserved.
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  ##  {
> +"EccCheck": {
> +## Exception sample looks like below:
> +## "ExceptionList": [
> +## "", ""
> +## ]
> +"ExceptionList": [
> +],
> +"IgnoreFiles": [
> +]
> +},


Acked-by: Hao A Wu 

Best Regards,
Hao Wu


>  ## options defined ci/Plugin/CompilerPlugin
>  "CompilerPlugin": {
>  "DscPath": "MdeModulePkg.dsc"
> --
> 2.18.0.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62930): https://edk2.groups.io/g/devel/message/62930
Mute This Topic: https://groups.io/mt/75329192/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 v6 5/6] Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kuo, IanX 
> Sent: Tuesday, July 21, 2020 8:36 AM
> To: devel@edk2.groups.io
> Cc: Lu, James ; Kumar, Chandana C
> ; Prabhala, Varalakshmi A
> ; Kuo, IanX ;
> Chaganty, Rangasai V ; Chiu, Chasel
> 
> Subject: [edk2-platforms] [PATCH v6 5/6]
> Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.
> 
> Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
> PA bits reported can be overridden by Library instance in Platform.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2674
> 
> Change-Id: I999b29c30993c397f918a1f7b4ea19c61c0a460d
> Signed-off-by: IanX Kuo 
> Cc: Sai Chaganty 
> Cc: Chasel Chiu 
> ---
>  .../Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc | 4 +++-
>  .../WhiskeylakeURvp/OpenBoardPkg.dsc| 6
> --
>  2 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> index fdf85b43..f78dba87 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> @@ -39,7 +39,8 @@
>#
> 
># Include PCD configuration for this board.
> 
>#
> 
> -  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> 
> 
> +  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> 
> +
> 
>!include OpenBoardPkgPcd.dsc
> 
>!include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
> 
> 
> 
> @@ -121,6 +122,7 @@
>PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
> 
> 
> PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformB
> ootManagerLib/DxePlatformBootManagerLib.inf
> 
> 
> ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/Pei
> ReportFvLib.inf
> 
> +
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuH
> obLib/ReportCpuHobLib.inf
> 
> 
> TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNu
> ll/TestPointCheckLibNull.inf
> 
> 
> 
>###
> 
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> kg.dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> kg.dsc
> index 11dffb08..9ee4030a 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> kg.dsc
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> kg.dsc
> @@ -1,7 +1,7 @@
>  ## @file
> 
>  #  The main build description file for the WhiskeylakeURvp board.
> 
>  #
> 
> -#  Copyright (c) 2019, Intel Corporation. All rights reserved.
> 
> +#  Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
> 
>  #
> 
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  #
> 
> @@ -39,7 +39,8 @@
>#
> 
># Include PCD configuration for this board.
> 
>#
> 
> -  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> 
> 
> +  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> 
> +
> 
>!include OpenBoardPkgPcd.dsc
> 
>!include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
> 
> 
> 
> @@ -121,6 +122,7 @@
>PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
> 
> 
> PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformB
> ootManagerLib/DxePlatformBootManagerLib.inf
> 
> 
> ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/Pei
> ReportFvLib.inf
> 
> +
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuH
> obLib/ReportCpuHobLib.inf
> 
> 
> TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNu
> ll/TestPointCheckLibNull.inf
> 
> 
> 
>###
> 
> --
> 2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62928): https://edk2.groups.io/g/devel/message/62928
Mute This Topic: https://groups.io/mt/75695075/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 v6 4/6] Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of IanX Kuo
> Sent: Tuesday, July 21, 2020 8:36 AM
> To: devel@edk2.groups.io
> Cc: Lu, James ; Kumar, Chandana C
> ; Prabhala, Varalakshmi A
> ; Kuo, IanX ;
> Chaganty, Rangasai V ; Chiu, Chasel
> 
> Subject: [edk2-devel] [edk2-platforms] [PATCH v6 4/6]
> Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.
> 
> Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
> PA bits reported can be overridden by Library instance in Platform.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2674
> 
> Change-Id: I673f8fcd2d97bbd60229a60f53875e92826a7179
> Signed-off-by: IanX Kuo 
> Cc: Sai Chaganty 
> Cc: Chasel Chiu 
> ---
>  .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
> b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
> index 8a826009..68a8f844 100644
> --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
> +++
> b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
> @@ -1,7 +1,7 @@
>  ## @file #  The main build description file for the X58Ich10 board. #-#
> Copyright (c) 2019, Intel Corporation. All rights reserved.+# Copyright 
> (c)
> 2019 - 2020, Intel Corporation. All rights reserved. # #
> SPDX-License-Identifier: BSD-2-Clause-Patent #@@ -42,7 +42,8 @@
>DEFINE NETWORK_ISCSI_ENABLE   = FALSE   DEFINE
> NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE -  !include
> AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> +  !include
> AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc+   !include
> $(PROJECT)/OpenBoardPkgPcd.dsc   !include
> AdvancedFeaturePkg/Include/AdvancedFeatures.dsc @@ -117,6 +118,7 @@
>LogoLib|$(BOARD_PKG)/Library/DxeLogoLib/DxeLogoLib.inf
> NvVarsFileLib|$(BOARD_PKG)/Library/NvVarsFileLib/NvVarsFileLib.inf
> ReportFvLib|$(BOARD_PKG)/Library/PeiReportFvLib/PeiReportFvLib.inf+
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuH
> obLib/ReportCpuHobLib.inf
> SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/SerializeVa
> riablesLib.inf
> SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/Silicon
> PolicyInitLib.inf
> SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib
> /SiliconPolicyUpdateLib.inf--
> 2.26.2.windows.1
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> 
> View/Reply Online (#62919): https://edk2.groups.io/g/devel/message/62919
> Mute This Topic: https://groups.io/mt/75695070/1777047
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [chasel.c...@intel.com]
> -=-=-=-=-=-=


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62927): https://edk2.groups.io/g/devel/message/62927
Mute This Topic: https://groups.io/mt/75695070/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 v6 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

2020-07-20 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kuo, IanX 
> Sent: Tuesday, July 21, 2020 8:37 AM
> To: devel@edk2.groups.io
> Cc: Lu, James ; Kumar, Chandana C
> ; Prabhala, Varalakshmi A
> ; Kuo, IanX ;
> Chaganty, Rangasai V ; Chiu, Chasel
> 
> Subject: [edk2-platforms] [PATCH v6 6/6] Platform/Intel/MinPlatformPkg: Add
> ReportCpuHobLib.
> 
> Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
> PA bits reported can be overridden by Library instance in Platform.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2674
> 
> Change-Id: I1c14aece3b229c194960e91dc9505dd8120bbe30
> Signed-off-by: IanX Kuo 
> Cc: Sai Chaganty 
> Cc: Chasel Chiu 
> ---
>  .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
>  .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
>  .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
>  3 files changed, 6 insertions(+), 25 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> index 13a0fda2..b62351da 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> @@ -1,7 +1,7 @@
>  ## @file
> 
>  #  Platform description.
> 
>  #
> 
> -# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
> 
> +# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
> 
>  #
> 
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  #
> 
> @@ -92,6 +92,7 @@
>#
> 
> 
> FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrappe
> rPlatformLib/PeiFspWrapperPlatformLib.inf
> 
> 
> ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReport
> FvLib.inf
> 
> +
> ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R
> eportCpuHobLib.inf
> 
> 
> TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPo
> intCheckLib.inf
> 
> 
> TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
> 
> 
> SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib
> Null.inf
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPr
> eMem.c
> b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPr
> eMem.c
> index efdeb6a9..48cbe0df 100644
> ---
> a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPr
> eMem.c
> +++
> b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPr
> eMem.c
> @@ -1,7 +1,7 @@
>  /** @file
> 
>Source code file for Platform Init Pre-Memory PEI module
> 
> 
> 
> -Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
> 
> +Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
> 
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> 
> 
>  **/
> 
> @@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  #include 
> 
>  #include 
> 
>  #include 
> 
> +#include 
> 
>  #include 
> 
>  #include 
> 
>  #include 
> 
> @@ -355,28 +356,6 @@ Done:
>return EFI_SUCCESS;
> 
>  }
> 
> 
> 
> -VOID
> 
> -ReportCpuHob (
> 
> -  VOID
> 
> -  )
> 
> -{
> 
> -  UINT8 PhysicalAddressBits;
> 
> -  UINT32RegEax;
> 
> -
> 
> -  AsmCpuid (0x8000, , NULL, NULL, NULL);
> 
> -  if (RegEax >= 0x8008) {
> 
> -AsmCpuid (0x8008, , NULL, NULL, NULL);
> 
> -PhysicalAddressBits = (UINT8) RegEax;
> 
> -  } else {
> 
> -PhysicalAddressBits = 36;
> 
> -  }
> 
> -
> 
> -  ///
> 
> -  /// Create a CPU hand-off information
> 
> -  ///
> 
> -  BuildCpuHob (PhysicalAddressBits, 16);
> 
> -}
> 
> -
> 
>  /**
> 
>Install Firmware Volume Hob's once there is main memory
> 
> 
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPr
> eMem.inf
> b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPr
> eMem.inf
> index 7ee18eb6..8e828ff2 100644
> ---
> a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPr
> eMem.inf
> +++
> b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPr
> eMem.inf
> @@ -1,7 +1,7 @@
>  ### @file
> 
>  # Component information file for the Platform Init Pre-Memory PEI module.
> 
>  #
> 
> -# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
> 
> +# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
> 
>  #
> 
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  #
> 
> @@ -28,6 +28,7 @@
>TestPointCheckLib
> 
>TimerLib
> 
>SetCacheMtrrLib
> 
> +  ReportCpuHobLib
> 
> 
> 
>  [Packages]
> 
>MinPlatformPkg/MinPlatformPkg.dec
> 
> --
> 2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62929): https://edk2.groups.io/g/devel/message/62929
Mute This Topic: https://groups.io/mt/75695077/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub 

Re: [edk2-devel] [edk2-platforms] [PATCH v6 3/6] Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kuo, IanX 
> Sent: Tuesday, July 21, 2020 8:36 AM
> To: devel@edk2.groups.io
> Cc: Lu, James ; Kumar, Chandana C
> ; Prabhala, Varalakshmi A
> ; Kuo, IanX ;
> Chaganty, Rangasai V ; Chiu, Chasel
> 
> Subject: [edk2-platforms] [PATCH v6 3/6]
> Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.
> 
> Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
> PA bits reported can be overridden by Library instance in Platform.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2674
> 
> Change-Id: Ic312ec307b3bcd84051e48505038d9ca47d467e2
> Signed-off-by: IanX Kuo 
> Cc: Sai Chaganty 
> Cc: Chasel Chiu 
> ---
>  .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc  | 6 --
>  .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  | 6
> --
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> index 6e35495a..55ff33ec 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> @@ -1,7 +1,7 @@
>  ## @file
> 
>  #  The main build description file for the GalagoPro3 board.
> 
>  #
> 
> -# Copyright (c) 2019, Intel Corporation. All rights reserved.
> 
> +# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
> 
>  #
> 
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  #
> 
> @@ -38,7 +38,8 @@
>#
> 
># Include PCD configuration for this board.
> 
>#
> 
> -  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> 
> 
> +  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> 
> +
> 
>!include OpenBoardPkgPcd.dsc
> 
>!include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
> 
> 
> 
> @@ -119,6 +120,7 @@
>PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
> 
> 
> PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformB
> ootManagerLib/DxePlatformBootManagerLib.inf
> 
> 
> ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/Pei
> ReportFvLib.inf
> 
> +
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuH
> obLib/ReportCpuHobLib.inf
> 
> 
> TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNu
> ll/TestPointCheckLibNull.inf
> 
> 
> 
>###
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> index 2a086cd9..0d6d5f21 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> @@ -1,7 +1,7 @@
>  ## @file
> 
>  #  The main build description file for the KabylakeRvp3 board.
> 
>  #
> 
> -# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
> 
> +# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
> 
>  #
> 
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  #
> 
> @@ -37,7 +37,8 @@
>#
> 
># Include PCD configuration for this board.
> 
>#
> 
> -  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> 
> 
> +  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> 
> +
> 
>!include OpenBoardPkgPcd.dsc
> 
>!include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
> 
> 
> 
> @@ -161,6 +162,7 @@
>PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
> 
> 
> PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformB
> ootManagerLib/DxePlatformBootManagerLib.inf
> 
> 
> ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/Pei
> ReportFvLib.inf
> 
> +
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuH
> obLib/ReportCpuHobLib.inf
> 
> 
> TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNu
> ll/TestPointCheckLibNull.inf
> 
> 
> 
>###
> 
> --
> 2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62926): https://edk2.groups.io/g/devel/message/62926
Mute This Topic: https://groups.io/mt/75695066/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 v6 2/6] Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of IanX Kuo
> Sent: Tuesday, July 21, 2020 8:36 AM
> To: devel@edk2.groups.io
> Cc: Lu, James ; Kumar, Chandana C
> ; Prabhala, Varalakshmi A
> ; Kuo, IanX ;
> Chaganty, Rangasai V ; Chiu, Chasel
> 
> Subject: [edk2-devel] [edk2-platforms] [PATCH v6 2/6]
> Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.
> 
> Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
> PA bits reported can be overridden by Library instance in Platform.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2674
> 
> Change-Id: I1097057046aa021dc2ff193fea335790513c10c4
> Signed-off-by: IanX Kuo 
> Cc: Sai Chaganty 
> Cc: Chasel Chiu 
> ---
>  .../CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc  | 4
> +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> sc
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> sc
> index 136e5309..74943352 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> sc
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> s
> +++ c
> @@ -39,7 +39,8 @@
>#   # Include PCD configuration for this board.   #-  !include
> AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
> +  !include
> AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc+   !include
> OpenBoardPkgPcd.dsc   !include
> AdvancedFeaturePkg/Include/AdvancedFeatures.dsc @@ -121,6 +122,7 @@
>PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
> PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformB
> ootManagerLib/DxePlatformBootManagerLib.inf
> ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/Pei
> ReportFvLib.inf+
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuH
> obLib/ReportCpuHobLib.inf
> TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNu
> ll/TestPointCheckLibNull.inf
> ###--
> 2.26.2.windows.1
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> 
> View/Reply Online (#62917): https://edk2.groups.io/g/devel/message/62917
> Mute This Topic: https://groups.io/mt/75695061/1777047
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [chasel.c...@intel.com]
> -=-=-=-=-=-=


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62925): https://edk2.groups.io/g/devel/message/62925
Mute This Topic: https://groups.io/mt/75695061/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 v6 1/6] Platform/Intel/MinPlatformPkg: Fix build error

2020-07-20 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kuo, IanX 
> Sent: Tuesday, July 21, 2020 8:35 AM
> To: devel@edk2.groups.io
> Cc: Lu, James ; Kumar, Chandana C
> ; Prabhala, Varalakshmi A
> ; Kuo, IanX ;
> Chaganty, Rangasai V ; Chiu, Chasel
> 
> Subject: [edk2-platforms] [PATCH v6 1/6] Platform/Intel/MinPlatformPkg: Fix
> build error
> 
> Fix ReportCpuHobLib build error
> 
> Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
> PA bits reported can be overridden by Library instance in Platform.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2674
> 
> Change-Id: I0cd6ba4eb7231a3a84f080fdce85bbe74eb29eeb
> Signed-off-by: IanX Kuo 
> Cc: Sai Chaganty 
> Cc: Chasel Chiu 
> ---
>  .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c   | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Re
> portCpuHobLib.c
> b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Re
> portCpuHobLib.c
> index aa256534..83fc5249 100644
> ---
> a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Re
> portCpuHobLib.c
> +++
> b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Re
> portCpuHobLib.c
> @@ -6,7 +6,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> 
>  **/
> 
> 
> 
> -#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
>  #include 
> 
> 
> 
>  VOID
> 
> --
> 2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62924): https://edk2.groups.io/g/devel/message/62924
Mute This Topic: https://groups.io/mt/75695055/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 2/2] MdePkg: Add support for variable size MMCONF space

2020-07-20 Thread Liming Gao
Marcello:
  Besides separate the patch for the different packages, I have some comments 
on the change in PciExpressLib. 

1) PciExpressxx() API description should be updated to include the invalid 
return value 0xFF, 0x or 0x in PciExpressLib.h and PciExpressLib 
library implementation. 
2) There are three PciExprssion library instancs BasePciExpressLib, 
DxeRuntimePciExpressLib and SmmPciExpressLib. They are required to be updated. 
3) For the change in MdePkg\Library\BasePciExpressLib, why remove ASSERT() in 
PciExpressRegisterForRuntimeAccess() function? 
4) For the change in MdePkg\Library\BasePciExpressLib, PcdPciExpressBaseSize() 
function header return value description is incorrect. 
5) For the change in MdePkg\Library\BasePciExpressLib, PciExpressAndThenOr32() 
function should return UINT32, but the code uses return (UINT16) ~0;. There are 
similar issues in other function implementation. Please check them. 

Thanks
Liming
-Original Message-
From: Ma, Maurice  
Sent: 2020年7月20日 23:26
To: Marcello Sylvester Bauer ; 
devel@edk2.groups.io
Cc: Patrick Rudolph ; Christian Walter 
; Desimone, Nathaniel L 
; Zeng, Star ; Kinney, 
Michael D ; Gao, Liming 
Subject: RE: [PATCH v2 2/2] MdePkg: Add support for variable size MMCONF space

Hi Marcello,

Since this patch mixes changes for both UefiPayloadPkg  and MdePkg.  I think 
you might want to split this patch into two so that it can be reviewed by the 
proper package maintainers.

Thanks
Maurice
> -Original Message-
> From: Marcello Sylvester Bauer 
> Sent: Thursday, July 16, 2020 4:48
> To: devel@edk2.groups.io
> Cc: Patrick Rudolph ; Christian Walter 
> ; Ma, Maurice ; 
> Desimone, Nathaniel L ; Zeng, Star 
> ; Kinney, Michael D ; 
> Gao, Liming 
> Subject: [PATCH v2 2/2] MdePkg: Add support for variable size MMCONF 
> space
> 
> From: Patrick Rudolph 
> 
> On embedded AMD platforms the MMCONF window is usually only 64MiB.
> 
> Add support for arbitrary sized MMCONF by introducing a new PCD.
> The default size is still 256MiB, but will be overwritten by 
> UefiPayloadPkg with the real MMCONF size.
> 
> Fixes crash on platforms not exposing 256 buses.
> 
> Tested on:
> * AMD Stoney Ridge
> 
> Signed-off-by: Patrick Rudolph 
> Signed-off-by: Marcello Sylvester Bauer 
> Cc: Patrick Rudolph 
> Cc: Christian Walter 
> Cc: Maurice Ma 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> ---
>  MdePkg/MdePkg.dec  |   4 +
>  UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc   |   1 +
>  MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf |   6 +-
>  UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf   |   1 +
>  MdePkg/Include/Library/PciExpressLib.h |   5 +-
>  MdePkg/Library/BasePciExpressLib/PciExpressLib.c   | 118
> +++-
>  UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c |   4 +-
>  7 files changed, 131 insertions(+), 8 deletions(-)
> 
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> 73f6c2407357..02e736a01126 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -2274,6 +2274,10 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, 
> PcdsDynamic, PcdsDynamicEx]
># @Prompt PCI Express Base Address.
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE000|UINT64|
> 0x000a +  ## This value is used to set the size of PCI express 
> hierarchy. The default is 256 MB.+  # @Prompt PCI Express Base Size.+
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0x0FFF|UINT64|0x00
> 0f+   ## Default current ISO 639-2 language: English & French.   #
> @Prompt Default Value of LangCodes Variable.
> gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangCodes|"engfraengfra"
> |VOID*|0x001cdiff --git a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> index a768a8702c66..162cbf47a83f 100644
> --- a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> +++ b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
> @@ -363,6 +363,7 @@ [PcdsDynamicDefault]
>gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|31
> gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|100
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0+
> gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0
> #
> ### #diff --git
> a/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
> b/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
> index a7edb74cde71..12734b022ac7 100644
> --- a/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
> +++ b/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
> @@ -1,7 +1,7 @@
>  ## @file-#  Instance of PCI Express Library using the 256 MB PCI 
> Express MMIO window.+#  Instance of PCI Express Library using the 
> variable size PCI Express MMIO window. #-#  PCI Express Library that 
> uses the 256 MB PCI Express MMIO window to perform+#  PCI Express 
> Library that uses the variable size PCI Express MMIO 

Re: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, Destroy RamDisk memory before RSC.

2020-07-20 Thread Liming Gao
This patch has been merged @ cb38ace647231076acfc0c5bdd21d3aff43e4f83.

Thanks
Liming

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Liming Gao
> Sent: Friday, July 17, 2020 11:07 PM
> To: Veliyathuparambil Prakashan, KrishnadasX 
> ; Gao, Zhichao
> 
> Cc: Ni, Ray ; T V, Krishnamoorthy 
> ; devel@edk2.groups.io; Kinney, Michael D
> 
> Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, 
> Destroy RamDisk memory before RSC.
> 
> Krishnadas:
>   The patch for BZ 2836 has passed reviewed. It will be merged early next 
> week. Then, your patch will also be merged next week.
> 
> Thanks
> Liming
> > -Original Message-
> > From: Veliyathuparambil Prakashan, KrishnadasX 
> > 
> > Sent: Friday, July 17, 2020 12:09 PM
> > To: Gao, Liming ; Gao, Zhichao 
> > Cc: Ni, Ray ; T V, Krishnamoorthy 
> > ; devel@edk2.groups.io; Kinney, Michael D
> > 
> > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, 
> > Destroy RamDisk memory before RSC.
> >
> > Hello Liming,
> >
> > Gentle Reminder.
> > As discussed before, please let us know when we can expect our changes 
> > (below BZ) to get pushed in to Edk2Repo.
> > Please help to give an ETA.
> >
> > BZ Details:
> > [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure, Destroy RamDisk 
> > memory before RSC
> > https://bugzilla.tianocore.org/show_bug.cgi?id=2818
> >
> > Dependency : https://bugzilla.tianocore.org/show_bug.cgi?id=2836
> >
> > Thanks,
> > Krishnadas
> >
> > >-Original Message-
> > > From: Veliyathuparambil Prakashan, KrishnadasX
> > > Sent: Friday, July 3, 2020 3:00 PM
> > > To: Gao, Liming ; Gao, Zhichao
> > > 
> > > Cc: Ni, Ray ; T V, Krishnamoorthy
> > > ; devel@edk2.groups.io; l...@nuviainc.com;
> > > Laszlo Ersek ; af...@apple.com; Kinney, Michael D
> > > 
> > > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure,
> > > Destroy RamDisk memory before RSC.
> > >
> > > Thank you very much Liming  and Zhichao for your time to discuss this 
> > > case.
> > >
> > > Hello Liming,
> > >
> > > As discussed, please help to raise the BZ to enhance PatchCheck.py and 
> > > kindly
> > > help to submit our Edk2 patch to Edk2 Repo.
> > > [EDK2 Change BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2818]
> > >
> > > Also, please give us an update on next week regarding the ETA , as per our
> > > discussion.
> > >
> > > Thanks,
> > > Krishnadas
> > >
> > > > -Original Message-
> > > > From: Gao, Liming 
> > > > Sent: Friday, July 3, 2020 11:32 AM
> > > > To: devel@edk2.groups.io; Veliyathuparambil Prakashan, KrishnadasX
> > > > ;
> > > > l...@nuviainc.com; Laszlo Ersek ; af...@apple.com;
> > > > Kinney, Michael D 
> > > > Cc: Gao, Zhichao ; Ni, Ray 
> > > > Subject: RE: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption
> > > > failure, Destroy RamDisk memory before RSC.
> > > >
> > > > Signed-off-by line is too long and exceeds 80 characters requirement.
> > > > But, it is valid.
> > > >
> > > > So, I suggest to enhance PatchCheck.py and skip the check for the
> > > > lines with Signed-off-by, Ack-by:, Reviewed-by:, and Tested-By:.
> > > >
> > > > Thanks
> > > > Liming
> > > > > -Original Message-
> > > > > From: devel@edk2.groups.io  On Behalf Of
> > > > > KrishnadasX Veliyathuparambil Prakashan
> > > > > Sent: Friday, June 19, 2020 10:40 AM
> > > > > To: devel@edk2.groups.io
> > > > > Cc: Gao, Zhichao ; Ni, Ray 
> > > > > Subject: [edk2-devel] [PATCH] MdeModulePkg: Upon BootOption failure,
> > > > Destroy RamDisk memory before RSC.
> > > > >
> > > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2818
> > > > >
> > > > > For better memory management, re-ordered the DestroyRamDisk and
> > > > > ReportStatusCode calls inside the EfiBootManagerBoot() function.
> > > > >
> > > > > This will help to clean the unused memory before reporting the
> > > > > failure status, so that OEMs can use RSC Listener to launch custom
> > > > > boot option or application for recovering the failed hard drive.
> > > > >
> > > > > This change will help to ensure that the allocated pool of memory
> > > > > for the failed boot option is freed before executing OEM's RSC
> > > > > listener callback to handle every boot option failure.
> > > > >
> > > > > Signed-off-by: KrishnadasX Veliyathuparambil Prakashan
> > > > > 
> > > > > Cc: "Gao, Zhichao" 
> > > > > Cc: "Ni, Ray" 
> > > > > ---
> > > > >  .../Library/UefiBootManagerLib/BmBoot.c   | 28 
> > > > > ++-
> > > > >  1 file changed, 15 insertions(+), 13 deletions(-)
> > > > >
> > > > > diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > > > > b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > > > > index 540d169ec1..aff620ad52 100644
> > > > > --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > > > > +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > > > > @@ -2,7 +2,7 @@
> > > > >Library functions which relates with booting.
> > > > >
> > > > >
> > > > >
> 

[edk2-devel] [edk2-platforms] [PATCH v6 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I1c14aece3b229c194960e91dc9505dd8120bbe30
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 3 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index 13a0fda2..b62351da 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -92,6 +92,7 @@
   #
   
FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf
   
ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
   TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
   
SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
index efdeb6a9..48cbe0df 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Platform Init Pre-Memory PEI module
 
-Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -355,28 +356,6 @@ Done:
   return EFI_SUCCESS;
 }
 
-VOID
-ReportCpuHob (
-  VOID
-  )
-{
-  UINT8 PhysicalAddressBits;
-  UINT32RegEax;
-
-  AsmCpuid (0x8000, , NULL, NULL, NULL);
-  if (RegEax >= 0x8008) {
-AsmCpuid (0x8008, , NULL, NULL, NULL);
-PhysicalAddressBits = (UINT8) RegEax;
-  } else {
-PhysicalAddressBits = 36;
-  }
-
-  ///
-  /// Create a CPU hand-off information
-  ///
-  BuildCpuHob (PhysicalAddressBits, 16);
-}
-
 /**
   Install Firmware Volume Hob's once there is main memory
 
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
index 7ee18eb6..8e828ff2 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Platform Init Pre-Memory PEI module.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -28,6 +28,7 @@
   TestPointCheckLib
   TimerLib
   SetCacheMtrrLib
+  ReportCpuHobLib
 
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62921): https://edk2.groups.io/g/devel/message/62921
Mute This Topic: https://groups.io/mt/75695077/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v6 4/6] Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I673f8fcd2d97bbd60229a60f53875e92826a7179
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index 8a826009..68a8f844 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the X58Ich10 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -42,7 +42,8 @@
   DEFINE NETWORK_ISCSI_ENABLE   = FALSE
   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
 
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include $(PROJECT)/OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -117,6 +118,7 @@
   LogoLib|$(BOARD_PKG)/Library/DxeLogoLib/DxeLogoLib.inf
   NvVarsFileLib|$(BOARD_PKG)/Library/NvVarsFileLib/NvVarsFileLib.inf
   ReportFvLib|$(BOARD_PKG)/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/SerializeVariablesLib.inf
   
SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/SiliconPolicyInitLib.inf
   
SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.inf
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62919): https://edk2.groups.io/g/devel/message/62919
Mute This Topic: https://groups.io/mt/75695070/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v6 5/6] Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I999b29c30993c397f918a1f7b4ea19c61c0a460d
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc | 4 +++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc| 6 --
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
index fdf85b43..f78dba87 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
index 11dffb08..9ee4030a 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the WhiskeylakeURvp board.
 #
-#  Copyright (c) 2019, Intel Corporation. All rights reserved.
+#  Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62920): https://edk2.groups.io/g/devel/message/62920
Mute This Topic: https://groups.io/mt/75695075/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v6 3/6] Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: Ic312ec307b3bcd84051e48505038d9ca47d467e2
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc  | 6 --
 .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  | 6 --
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
index 6e35495a..55ff33ec 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the GalagoPro3 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -38,7 +38,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -119,6 +120,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
index 2a086cd9..0d6d5f21 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the KabylakeRvp3 board.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -37,7 +37,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -161,6 +162,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62918): https://edk2.groups.io/g/devel/message/62918
Mute This Topic: https://groups.io/mt/75695066/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v6 1/6] Platform/Intel/MinPlatformPkg: Fix build error

2020-07-20 Thread IanX Kuo
Fix ReportCpuHobLib build error

Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I0cd6ba4eb7231a3a84f080fdce85bbe74eb29eeb
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c   | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
index aa256534..83fc5249 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
@@ -6,7 +6,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 
 VOID
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62916): https://edk2.groups.io/g/devel/message/62916
Mute This Topic: https://groups.io/mt/75695055/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v6 2/6] Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

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

Change-Id: I1097057046aa021dc2ff193fea335790513c10c4
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
index 136e5309..74943352 100644
--- a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62917): https://edk2.groups.io/g/devel/message/62917
Mute This Topic: https://groups.io/mt/75695061/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [PATCH v6 0/6] Create a Library instance of ReportCpuHobLib

2020-07-20 Thread IanX Kuo
Create a Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overridden by Library instance in Platform.

Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 

IanX Kuo (6):
  Platform/Intel/MinPlatformPkg: Fix build error
  Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

 .../CometlakeURvp/OpenBoardPkg.dsc|  4 ++-
 .../GalagoPro3/OpenBoardPkg.dsc   |  6 +++--
 .../KabylakeRvp3/OpenBoardPkg.dsc |  6 +++--
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../Library/ReportCpuHobLib/ReportCpuHobLib.c |  5 +++-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 .../BoardX58Ich10/OpenBoardPkg.dsc|  6 +++--
 .../UpXtreme/OpenBoardPkg.dsc |  4 ++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc  |  6 +++--
 10 files changed, 32 insertions(+), 36 deletions(-)

-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62915): https://edk2.groups.io/g/devel/message/62915
Mute This Topic: https://groups.io/mt/75695050/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 07/15] MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for LicenseCheck

2020-07-20 Thread Wu, Hao A
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Zhang,
> Shenglei
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Wu, Hao A 
> Subject: [edk2-devel] [PATCH 07/15] MdeModulePkg/MdeModulePkg.ci.yaml:
> Add configuration for LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for some generated files.
> 
> Cc: Jian J Wang 
> Cc: Hao A Wu 
> Signed-off-by: Shenglei Zhang 
> ---
>  MdeModulePkg/MdeModulePkg.ci.yaml | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/MdeModulePkg/MdeModulePkg.ci.yaml
> b/MdeModulePkg/MdeModulePkg.ci.yaml
> index 1cfc1328390e..0fc8c3633878 100644
> --- a/MdeModulePkg/MdeModulePkg.ci.yaml
> +++ b/MdeModulePkg/MdeModulePkg.ci.yaml
> @@ -5,6 +5,10 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  ##  {
> +## options defined .pytool/Plugin/LicenseCheck
> +"LicenseCheck": {
> +"IgnoreFiles": []
> +},


Reviewed-by: Hao A Wu 

Best Regards,
Hao Wu


>  ## options defined ci/Plugin/CompilerPlugin
>  "CompilerPlugin": {
>  "DscPath": "MdeModulePkg.dsc"
> --
> 2.18.0.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62914): https://edk2.groups.io/g/devel/message/62914
Mute This Topic: https://groups.io/mt/75678215/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for LicenseCheck

2020-07-20 Thread Dong, Eric
Reviewed-by: Eric Dong 

> -Original Message-
> From: Zhang, Shenglei 
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric ; Ni, Ray ; Laszlo
> Ersek 
> Subject: [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration
> for LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for some generated files.
> 
> Cc: Eric Dong 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Signed-off-by: Shenglei Zhang 
> ---
>  UefiCpuPkg/UefiCpuPkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/UefiCpuPkg/UefiCpuPkg.ci.yaml
> b/UefiCpuPkg/UefiCpuPkg.ci.yaml index 99e460a8b090..d54651d43800
> 100644
> --- a/UefiCpuPkg/UefiCpuPkg.ci.yaml
> +++ b/UefiCpuPkg/UefiCpuPkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  ##  {
> +"LicenseCheck": {
> +"IgnoreFiles": []
> +},
>  "CompilerPlugin": {
>  "DscPath": "UefiCpuPkg.dsc"
>  },
> --
> 2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62913): https://edk2.groups.io/g/devel/message/62913
Mute This Topic: https://groups.io/mt/75678225/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



回覆: [edk2-devel] [PATCH v4 0/6] *** SUBJECT HERE ***

2020-07-20 Thread IanX Kuo
Hi Liming

I thought devel@edk2.groups.io not to receive my path, so send many times.
I will send v6 version patch soon to fix spelling error. We can review v6 
version patch directly.

Thanks,
Ian Kuo

寄件者: Gao, Liming 
寄件日期: 2020年7月21日 上午 08:14
收件者: devel@edk2.groups.io ; Kuo, IanX 
主旨: RE: [edk2-devel] [PATCH v4 0/6] *** SUBJECT HERE ***

Ian:
  You send the patch v2, v3, v4, v5. Do we only need to review v5 version patch?

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of IanX Kuo
Sent: 2020年7月20日 16:55
To: devel@edk2.groups.io
Cc: Kuo, IanX 
Subject: [edk2-devel] [PATCH v4 0/6] *** SUBJECT HERE ***

*** BLURB HERE ***

IanX Kuo (6):
  Platform/Intel/MinPlatformPkg: Fix build error
  Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

 .../CometlakeURvp/OpenBoardPkg.dsc|  4 ++-
 .../GalagoPro3/OpenBoardPkg.dsc   |  6 +++--
 .../KabylakeRvp3/OpenBoardPkg.dsc |  6 +++--
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../Library/ReportCpuHobLib/ReportCpuHobLib.c |  5 +++-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 .../BoardX58Ich10/OpenBoardPkg.dsc|  6 +++--
 .../UpXtreme/OpenBoardPkg.dsc |  4 ++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc  |  6 +++--
 10 files changed, 32 insertions(+), 36 deletions(-)

--
2.26.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62912): https://edk2.groups.io/g/devel/message/62912
Mute This Topic: https://groups.io/mt/75694817/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 0/6] *** SUBJECT HERE ***

2020-07-20 Thread Liming Gao
Ian:
  You send the patch v2, v3, v4, v5. Do we only need to review v5 version 
patch? 

Thanks
Liming
-Original Message-
From: devel@edk2.groups.io  On Behalf Of IanX Kuo
Sent: 2020年7月20日 16:55
To: devel@edk2.groups.io
Cc: Kuo, IanX 
Subject: [edk2-devel] [PATCH v4 0/6] *** SUBJECT HERE ***

*** BLURB HERE ***

IanX Kuo (6):
  Platform/Intel/MinPlatformPkg: Fix build error
  Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

 .../CometlakeURvp/OpenBoardPkg.dsc|  4 ++-
 .../GalagoPro3/OpenBoardPkg.dsc   |  6 +++--
 .../KabylakeRvp3/OpenBoardPkg.dsc |  6 +++--
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../Library/ReportCpuHobLib/ReportCpuHobLib.c |  5 +++-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 .../BoardX58Ich10/OpenBoardPkg.dsc|  6 +++--
 .../UpXtreme/OpenBoardPkg.dsc |  4 ++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc  |  6 +++--
 10 files changed, 32 insertions(+), 36 deletions(-)

-- 
2.26.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62911): https://edk2.groups.io/g/devel/message/62911
Mute This Topic: https://groups.io/mt/75694161/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] SecurityPkg: Fix GetSupportedAndActivePcrs counter calculation

2020-07-20 Thread Yao, Jiewen
Good to know.
Usually, if I saw second patch, I will override the first patch. 

It brings confusing in this case, because I notice that there is NO signed-off 
or Cc in the second one. It seems in invalid patch.
So I will ignore the latest one and just review the old one.

I recommend do test/debug with a test patch, not a real patch, to avoid 
confusing in the future.

Thank you
Yao Jiewen


> -Original Message-
> From: Gonzalez Del Cueto, Rodrigo 
> Sent: Tuesday, July 21, 2020 8:05 AM
> To: Yao, Jiewen ; devel@edk2.groups.io
> Subject: RE: [edk2-devel] [PATCH] SecurityPkg: Fix GetSupportedAndActivePcrs
> counter calculation
> 
> Hi Jiewen,
> 
> Sorry about that, I was debugging my git SMTP configuration and I might have
> send the same patch twice at some point.
> This is the version of the patch that should be reviewed:
> 
>   >Subject: [PATCH] SecurityPkg: Fix GetSupportedAndActivePcrs counter
> calculation
>   >Date: Mon, 20 Jul 2020 15:27:13 -0700
>   >Message-Id:
>  ez.del.cu...@intel.com>
> 
> FYI, I also sent another patch to be reviewed, which is independent and not to
> be confused with this one.
> 
>   >Subject: [PATCH] SecurityPkg: Debug code to audit BIOS TPM extend
> operations.
>   >Date: Mon, 20 Jul 2020 15:28:32 -0700
>   >Message-Id:
>  lez.del.cu...@intel.com>
> 
> Thanks and regards,
> -Rodrigo
> 
> > -Original Message-
> > From: Yao, Jiewen 
> > Sent: Monday, July 20, 2020 5:51 PM
> > To: devel@edk2.groups.io; Gonzalez Del Cueto, Rodrigo
> > 
> > Cc: Yao, Jiewen 
> > Subject: RE: [edk2-devel] [PATCH] SecurityPkg: Fix
> > GetSupportedAndActivePcrs counter calculation
> >
> > Hi Bodrigo
> > I have seen a patch with similar title and content earlier. May I know which
> > one the latest one?
> >
> > Please add *PATCH-V2* in the title to tell us which one is the latest 
> > version,
> > and always add V3/V4/V5 to future update.
> > I will review and give comment to the latest version.
> >
> > Thank you
> > Yao Jiewen
> >
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io  On Behalf Of
> > Rodrigo
> > > Gonzalez del Cueto
> > > Sent: Tuesday, July 21, 2020 5:27 AM
> > > To: devel@edk2.groups.io
> > > Cc: Gonzalez Del Cueto, Rodrigo 
> > > Subject: [edk2-devel] [PATCH] SecurityPkg: Fix
> > > GetSupportedAndActivePcrs counter calculation
> > >
> > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2855
> > > The Tpm2GetCapabilitySupportedAndActivePcrs function prints a count
> > > number that should reflect the *supported and currently
> > > active* PCR banks, but the implementation in place displays instead
> > > the count of the *supported PCR banks* retrieved directly from the
> > > Tpm2GetCapabilityPcrs() TPML_PCR_SELECTION output.
> > >
> > > The counter should only take into account those PCRs banks which are
> > > active.
> > >
> > > Replaced usage of EFI_D_* for DEBUG_* definitions in debug messages.
> > >
> > > Change-Id: I2f41bbe69834bdce41ffc0f20199b6fb881cd10b
> > > Signed-off-by: Rodrigo Gonzalez del Cueto
> > > 
> > > ---
> > >  SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 46
> > > +-
> > >  1 file changed, 29 insertions(+), 17 deletions(-)
> > >
> > > diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> > > b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> > > index 85b11c7715..07cac08c40 100644
> > > --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> > > +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> > > @@ -110,7 +110,7 @@ Tpm2GetCapability (
> > >// Fail if command failed
> > >
> > >//
> > >
> > >if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS)
> > > {
> > >
> > > -DEBUG ((EFI_D_ERROR, "Tpm2GetCapability: Response Code error!
> > > 0x%08x\r\n", SwapBytes32(RecvBuffer.Header.responseCode)));
> > >
> > > +DEBUG ((DEBUG_ERROR, "Tpm2GetCapability: Response Code error!
> > > 0x%08x\r\n", SwapBytes32(RecvBuffer.Header.responseCode)));
> > >
> > >  return EFI_DEVICE_ERROR;
> > >
> > >}
> > >
> > >
> > >
> > > @@ -522,74 +522,86 @@ Tpm2GetCapabilitySupportedAndActivePcrs (
> > >EFI_STATUSStatus;
> > >
> > >TPML_PCR_SELECTIONPcrs;
> > >
> > >UINTN Index;
> > >
> > > +  UINT8 ActivePcrBankCount;
> > >
> > >
> > >
> > >//
> > >
> > > -  // Get supported PCR and current Active PCRs.
> > >
> > > +  // Get supported PCR
> > >
> > >//
> > >
> > >Status = Tpm2GetCapabilityPcrs ();
> > >
> > > -
> > >
> > > +  DEBUG ((DEBUG_INFO, "Supported PCRs - Count = %08x\n",
> > > + Pcrs.count));
> > >
> > > +  ActivePcrBankCount = 0;
> > >
> > >//
> > >
> > >// If error, assume that we have at least SHA-1 (and return the
> > > error.)
> > >
> > >//
> > >
> > >if (EFI_ERROR (Status)) {
> > >
> > > -DEBUG ((EFI_D_ERROR, "GetSupportedAndActivePcrs -
> > > Tpm2GetCapabilityPcrs fail!\n"));
> > >
> > > +DEBUG ((DEBUG_ERROR, 

Re: [edk2-devel] [PATCH] SecurityPkg: Fix GetSupportedAndActivePcrs counter calculation

2020-07-20 Thread Rodrigo Gonzalez del Cueto
Hi Jiewen,

Sorry about that, I was debugging my git SMTP configuration and I might have 
send the same patch twice at some point.
This is the version of the patch that should be reviewed:

  >Subject: [PATCH] SecurityPkg: Fix GetSupportedAndActivePcrs counter 
calculation
  >Date: Mon, 20 Jul 2020 15:27:13 -0700
  >Message-Id: 


FYI, I also sent another patch to be reviewed, which is independent and not to 
be confused with this one.

  >Subject: [PATCH] SecurityPkg: Debug code to audit BIOS TPM extend operations.
  >Date: Mon, 20 Jul 2020 15:28:32 -0700
  >Message-Id: 


Thanks and regards,
-Rodrigo

> -Original Message-
> From: Yao, Jiewen 
> Sent: Monday, July 20, 2020 5:51 PM
> To: devel@edk2.groups.io; Gonzalez Del Cueto, Rodrigo
> 
> Cc: Yao, Jiewen 
> Subject: RE: [edk2-devel] [PATCH] SecurityPkg: Fix
> GetSupportedAndActivePcrs counter calculation
> 
> Hi Bodrigo
> I have seen a patch with similar title and content earlier. May I know which
> one the latest one?
> 
> Please add *PATCH-V2* in the title to tell us which one is the latest version,
> and always add V3/V4/V5 to future update.
> I will review and give comment to the latest version.
> 
> Thank you
> Yao Jiewen
> 
> 
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of
> Rodrigo
> > Gonzalez del Cueto
> > Sent: Tuesday, July 21, 2020 5:27 AM
> > To: devel@edk2.groups.io
> > Cc: Gonzalez Del Cueto, Rodrigo 
> > Subject: [edk2-devel] [PATCH] SecurityPkg: Fix
> > GetSupportedAndActivePcrs counter calculation
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2855
> > The Tpm2GetCapabilitySupportedAndActivePcrs function prints a count
> > number that should reflect the *supported and currently
> > active* PCR banks, but the implementation in place displays instead
> > the count of the *supported PCR banks* retrieved directly from the
> > Tpm2GetCapabilityPcrs() TPML_PCR_SELECTION output.
> >
> > The counter should only take into account those PCRs banks which are
> > active.
> >
> > Replaced usage of EFI_D_* for DEBUG_* definitions in debug messages.
> >
> > Change-Id: I2f41bbe69834bdce41ffc0f20199b6fb881cd10b
> > Signed-off-by: Rodrigo Gonzalez del Cueto
> > 
> > ---
> >  SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 46
> > +-
> >  1 file changed, 29 insertions(+), 17 deletions(-)
> >
> > diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> > b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> > index 85b11c7715..07cac08c40 100644
> > --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> > +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> > @@ -110,7 +110,7 @@ Tpm2GetCapability (
> >// Fail if command failed
> >
> >//
> >
> >if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS)
> > {
> >
> > -DEBUG ((EFI_D_ERROR, "Tpm2GetCapability: Response Code error!
> > 0x%08x\r\n", SwapBytes32(RecvBuffer.Header.responseCode)));
> >
> > +DEBUG ((DEBUG_ERROR, "Tpm2GetCapability: Response Code error!
> > 0x%08x\r\n", SwapBytes32(RecvBuffer.Header.responseCode)));
> >
> >  return EFI_DEVICE_ERROR;
> >
> >}
> >
> >
> >
> > @@ -522,74 +522,86 @@ Tpm2GetCapabilitySupportedAndActivePcrs (
> >EFI_STATUSStatus;
> >
> >TPML_PCR_SELECTIONPcrs;
> >
> >UINTN Index;
> >
> > +  UINT8 ActivePcrBankCount;
> >
> >
> >
> >//
> >
> > -  // Get supported PCR and current Active PCRs.
> >
> > +  // Get supported PCR
> >
> >//
> >
> >Status = Tpm2GetCapabilityPcrs ();
> >
> > -
> >
> > +  DEBUG ((DEBUG_INFO, "Supported PCRs - Count = %08x\n",
> > + Pcrs.count));
> >
> > +  ActivePcrBankCount = 0;
> >
> >//
> >
> >// If error, assume that we have at least SHA-1 (and return the
> > error.)
> >
> >//
> >
> >if (EFI_ERROR (Status)) {
> >
> > -DEBUG ((EFI_D_ERROR, "GetSupportedAndActivePcrs -
> > Tpm2GetCapabilityPcrs fail!\n"));
> >
> > +DEBUG ((DEBUG_ERROR, "GetSupportedAndActivePcrs -
> > Tpm2GetCapabilityPcrs fail!\n"));
> >
> >  *TpmHashAlgorithmBitmap = HASH_ALG_SHA1;
> >
> >  *ActivePcrBanks = HASH_ALG_SHA1;
> >
> > +ActivePcrBankCount = 1;
> >
> >}
> >
> >//
> >
> >// Otherwise, process the return data to determine what algorithms
> > are supported
> >
> >// and currently allocated.
> >
> >//
> >
> >else {
> >
> > -DEBUG ((EFI_D_INFO, "GetSupportedAndActivePcrs - Count = %08x\n",
> > Pcrs.count));
> >
> >  *TpmHashAlgorithmBitmap = 0;
> >
> >  *ActivePcrBanks = 0;
> >
> >  for (Index = 0; Index < Pcrs.count; Index++) {
> >
> >switch (Pcrs.pcrSelections[Index].hash) {
> >
> >case TPM_ALG_SHA1:
> >
> > -DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs -
> HASH_ALG_SHA1
> > present.\n"));
> >
> > +DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs -
> > HASH_ALG_SHA1 present.\n"));
> >
> >  

Re: [edk2-devel] [PATCH] SecurityPkg: Fix GetSupportedAndActivePcrs counter calculation

2020-07-20 Thread Yao, Jiewen
Hi Bodrigo
I have seen a patch with similar title and content earlier. May I know which 
one the latest one?

Please add *PATCH-V2* in the title to tell us which one is the latest version, 
and always add V3/V4/V5 to future update.
I will review and give comment to the latest version.

Thank you
Yao Jiewen


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Rodrigo
> Gonzalez del Cueto
> Sent: Tuesday, July 21, 2020 5:27 AM
> To: devel@edk2.groups.io
> Cc: Gonzalez Del Cueto, Rodrigo 
> Subject: [edk2-devel] [PATCH] SecurityPkg: Fix GetSupportedAndActivePcrs
> counter calculation
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2855
> The Tpm2GetCapabilitySupportedAndActivePcrs function prints a
> count number that should reflect the *supported and currently
> active* PCR banks, but the implementation in place displays
> instead the count of the *supported PCR banks* retrieved
> directly from the Tpm2GetCapabilityPcrs()
> TPML_PCR_SELECTION output.
> 
> The counter should only take into account those PCRs banks
> which are active.
> 
> Replaced usage of EFI_D_* for DEBUG_* definitions in debug
> messages.
> 
> Change-Id: I2f41bbe69834bdce41ffc0f20199b6fb881cd10b
> Signed-off-by: Rodrigo Gonzalez del Cueto
> 
> ---
>  SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 46
> +-
>  1 file changed, 29 insertions(+), 17 deletions(-)
> 
> diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> index 85b11c7715..07cac08c40 100644
> --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
> @@ -110,7 +110,7 @@ Tpm2GetCapability (
>// Fail if command failed
> 
>//
> 
>if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) {
> 
> -DEBUG ((EFI_D_ERROR, "Tpm2GetCapability: Response Code error!
> 0x%08x\r\n", SwapBytes32(RecvBuffer.Header.responseCode)));
> 
> +DEBUG ((DEBUG_ERROR, "Tpm2GetCapability: Response Code error!
> 0x%08x\r\n", SwapBytes32(RecvBuffer.Header.responseCode)));
> 
>  return EFI_DEVICE_ERROR;
> 
>}
> 
> 
> 
> @@ -522,74 +522,86 @@ Tpm2GetCapabilitySupportedAndActivePcrs (
>EFI_STATUSStatus;
> 
>TPML_PCR_SELECTIONPcrs;
> 
>UINTN Index;
> 
> +  UINT8 ActivePcrBankCount;
> 
> 
> 
>//
> 
> -  // Get supported PCR and current Active PCRs.
> 
> +  // Get supported PCR
> 
>//
> 
>Status = Tpm2GetCapabilityPcrs ();
> 
> -
> 
> +  DEBUG ((DEBUG_INFO, "Supported PCRs - Count = %08x\n", Pcrs.count));
> 
> +  ActivePcrBankCount = 0;
> 
>//
> 
>// If error, assume that we have at least SHA-1 (and return the error.)
> 
>//
> 
>if (EFI_ERROR (Status)) {
> 
> -DEBUG ((EFI_D_ERROR, "GetSupportedAndActivePcrs -
> Tpm2GetCapabilityPcrs fail!\n"));
> 
> +DEBUG ((DEBUG_ERROR, "GetSupportedAndActivePcrs -
> Tpm2GetCapabilityPcrs fail!\n"));
> 
>  *TpmHashAlgorithmBitmap = HASH_ALG_SHA1;
> 
>  *ActivePcrBanks = HASH_ALG_SHA1;
> 
> +ActivePcrBankCount = 1;
> 
>}
> 
>//
> 
>// Otherwise, process the return data to determine what algorithms are
> supported
> 
>// and currently allocated.
> 
>//
> 
>else {
> 
> -DEBUG ((EFI_D_INFO, "GetSupportedAndActivePcrs - Count = %08x\n",
> Pcrs.count));
> 
>  *TpmHashAlgorithmBitmap = 0;
> 
>  *ActivePcrBanks = 0;
> 
>  for (Index = 0; Index < Pcrs.count; Index++) {
> 
>switch (Pcrs.pcrSelections[Index].hash) {
> 
>case TPM_ALG_SHA1:
> 
> -DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA1
> present.\n"));
> 
> +DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs -
> HASH_ALG_SHA1 present.\n"));
> 
>  *TpmHashAlgorithmBitmap |= HASH_ALG_SHA1;
> 
>  if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect,
> Pcrs.pcrSelections[Index].sizeofSelect)) {
> 
> -  DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs -
> HASH_ALG_SHA1 active.\n"));
> 
> +  DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs -
> HASH_ALG_SHA1 active.\n"));
> 
>*ActivePcrBanks |= HASH_ALG_SHA1;
> 
> +  ActivePcrBankCount++;
> 
>  }
> 
>  break;
> 
>case TPM_ALG_SHA256:
> 
> -DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs -
> HASH_ALG_SHA256 present.\n"));
> 
> +DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs -
> HASH_ALG_SHA256 present.\n"));
> 
>  *TpmHashAlgorithmBitmap |= HASH_ALG_SHA256;
> 
>  if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect,
> Pcrs.pcrSelections[Index].sizeofSelect)) {
> 
> -  DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs -
> HASH_ALG_SHA256 active.\n"));
> 
> +  DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs -
> HASH_ALG_SHA256 active.\n"));
> 
>*ActivePcrBanks |= HASH_ALG_SHA256;
> 
> +  

[edk2-devel] [PATCH v2 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I1c14aece3b229c194960e91dc9505dd8120bbe30
Signed-off-by: IanX Kuo 
---
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 3 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index 13a0fda2..b62351da 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -92,6 +92,7 @@
   #
   
FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf
   
ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
   TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
   
SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
index efdeb6a9..48cbe0df 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Platform Init Pre-Memory PEI module
 
-Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -355,28 +356,6 @@ Done:
   return EFI_SUCCESS;
 }
 
-VOID
-ReportCpuHob (
-  VOID
-  )
-{
-  UINT8 PhysicalAddressBits;
-  UINT32RegEax;
-
-  AsmCpuid (0x8000, , NULL, NULL, NULL);
-  if (RegEax >= 0x8008) {
-AsmCpuid (0x8008, , NULL, NULL, NULL);
-PhysicalAddressBits = (UINT8) RegEax;
-  } else {
-PhysicalAddressBits = 36;
-  }
-
-  ///
-  /// Create a CPU hand-off information
-  ///
-  BuildCpuHob (PhysicalAddressBits, 16);
-}
-
 /**
   Install Firmware Volume Hob's once there is main memory
 
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
index 7ee18eb6..8e828ff2 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Platform Init Pre-Memory PEI module.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -28,6 +28,7 @@
   TestPointCheckLib
   TimerLib
   SetCacheMtrrLib
+  ReportCpuHobLib
 
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62890): https://edk2.groups.io/g/devel/message/62890
Mute This Topic: https://groups.io/mt/75694148/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v5 2/6] Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I1097057046aa021dc2ff193fea335790513c10c4
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
index 136e5309..74943352 100644
--- a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62902): https://edk2.groups.io/g/devel/message/62902
Mute This Topic: https://groups.io/mt/75694163/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v5 5/6] Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I999b29c30993c397f918a1f7b4ea19c61c0a460d
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc | 4 +++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc| 6 --
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
index fdf85b43..f78dba87 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
index 11dffb08..9ee4030a 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the WhiskeylakeURvp board.
 #
-#  Copyright (c) 2019, Intel Corporation. All rights reserved.
+#  Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62906): https://edk2.groups.io/g/devel/message/62906
Mute This Topic: https://groups.io/mt/75694166/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v3 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I1c14aece3b229c194960e91dc9505dd8120bbe30
Signed-off-by: IanX Kuo 
---
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 3 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index 13a0fda2..b62351da 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -92,6 +92,7 @@
   #
   
FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf
   
ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
   TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
   
SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
index efdeb6a9..48cbe0df 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Platform Init Pre-Memory PEI module
 
-Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -355,28 +356,6 @@ Done:
   return EFI_SUCCESS;
 }
 
-VOID
-ReportCpuHob (
-  VOID
-  )
-{
-  UINT8 PhysicalAddressBits;
-  UINT32RegEax;
-
-  AsmCpuid (0x8000, , NULL, NULL, NULL);
-  if (RegEax >= 0x8008) {
-AsmCpuid (0x8008, , NULL, NULL, NULL);
-PhysicalAddressBits = (UINT8) RegEax;
-  } else {
-PhysicalAddressBits = 36;
-  }
-
-  ///
-  /// Create a CPU hand-off information
-  ///
-  BuildCpuHob (PhysicalAddressBits, 16);
-}
-
 /**
   Install Firmware Volume Hob's once there is main memory
 
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
index 7ee18eb6..8e828ff2 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Platform Init Pre-Memory PEI module.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -28,6 +28,7 @@
   TestPointCheckLib
   TimerLib
   SetCacheMtrrLib
+  ReportCpuHobLib
 
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62886): https://edk2.groups.io/g/devel/message/62886
Mute This Topic: https://groups.io/mt/75694144/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 4/6] Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I673f8fcd2d97bbd60229a60f53875e92826a7179
Signed-off-by: IanX Kuo 
---
 .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index 8a826009..68a8f844 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the X58Ich10 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -42,7 +42,8 @@
   DEFINE NETWORK_ISCSI_ENABLE   = FALSE
   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
 
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include $(PROJECT)/OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -117,6 +118,7 @@
   LogoLib|$(BOARD_PKG)/Library/DxeLogoLib/DxeLogoLib.inf
   NvVarsFileLib|$(BOARD_PKG)/Library/NvVarsFileLib/NvVarsFileLib.inf
   ReportFvLib|$(BOARD_PKG)/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/SerializeVariablesLib.inf
   
SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/SiliconPolicyInitLib.inf
   
SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.inf
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62898): https://edk2.groups.io/g/devel/message/62898
Mute This Topic: https://groups.io/mt/75694133/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 2/6] Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I1097057046aa021dc2ff193fea335790513c10c4
Signed-off-by: IanX Kuo 
---
 .../CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
index 136e5309..74943352 100644
--- a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62901): https://edk2.groups.io/g/devel/message/62901
Mute This Topic: https://groups.io/mt/75694145/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I1c14aece3b229c194960e91dc9505dd8120bbe30
Signed-off-by: IanX Kuo 
---
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 3 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index 13a0fda2..b62351da 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -92,6 +92,7 @@
   #
   
FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf
   
ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
   TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
   
SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
index efdeb6a9..48cbe0df 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Platform Init Pre-Memory PEI module
 
-Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -355,28 +356,6 @@ Done:
   return EFI_SUCCESS;
 }
 
-VOID
-ReportCpuHob (
-  VOID
-  )
-{
-  UINT8 PhysicalAddressBits;
-  UINT32RegEax;
-
-  AsmCpuid (0x8000, , NULL, NULL, NULL);
-  if (RegEax >= 0x8008) {
-AsmCpuid (0x8008, , NULL, NULL, NULL);
-PhysicalAddressBits = (UINT8) RegEax;
-  } else {
-PhysicalAddressBits = 36;
-  }
-
-  ///
-  /// Create a CPU hand-off information
-  ///
-  BuildCpuHob (PhysicalAddressBits, 16);
-}
-
 /**
   Install Firmware Volume Hob's once there is main memory
 
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
index 7ee18eb6..8e828ff2 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Platform Init Pre-Memory PEI module.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -28,6 +28,7 @@
   TestPointCheckLib
   TimerLib
   SetCacheMtrrLib
+  ReportCpuHobLib
 
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62884): https://edk2.groups.io/g/devel/message/62884
Mute This Topic: https://groups.io/mt/75694142/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I1c14aece3b229c194960e91dc9505dd8120bbe30
Signed-off-by: IanX Kuo 
---
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 3 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index 13a0fda2..b62351da 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -92,6 +92,7 @@
   #
   
FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf
   
ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
   TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
   
SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
index efdeb6a9..48cbe0df 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Platform Init Pre-Memory PEI module
 
-Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -355,28 +356,6 @@ Done:
   return EFI_SUCCESS;
 }
 
-VOID
-ReportCpuHob (
-  VOID
-  )
-{
-  UINT8 PhysicalAddressBits;
-  UINT32RegEax;
-
-  AsmCpuid (0x8000, , NULL, NULL, NULL);
-  if (RegEax >= 0x8008) {
-AsmCpuid (0x8008, , NULL, NULL, NULL);
-PhysicalAddressBits = (UINT8) RegEax;
-  } else {
-PhysicalAddressBits = 36;
-  }
-
-  ///
-  /// Create a CPU hand-off information
-  ///
-  BuildCpuHob (PhysicalAddressBits, 16);
-}
-
 /**
   Install Firmware Volume Hob's once there is main memory
 
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
index 7ee18eb6..8e828ff2 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Platform Init Pre-Memory PEI module.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -28,6 +28,7 @@
   TestPointCheckLib
   TimerLib
   SetCacheMtrrLib
+  ReportCpuHobLib
 
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62894): https://edk2.groups.io/g/devel/message/62894
Mute This Topic: https://groups.io/mt/75694142/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH] SecurityPkg: Fix GetSupportedAndActivePcrs counter calculation

2020-07-20 Thread Rodrigo Gonzalez del Cueto
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2855
The Tpm2GetCapabilitySupportedAndActivePcrs function prints a
count number that should reflect the *supported and currently
active* PCR banks, but the implementation in place displays
instead the count of the *supported PCR banks* retrieved
directly from the Tpm2GetCapabilityPcrs()
TPML_PCR_SELECTION output.

The counter should only take into account those PCRs banks
which are active.

Replaced usage of EFI_D_* for DEBUG_* definitions in debug
messages.

Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Qi Zhang 
Signed-off-by: Rodrigo Gonzalez del Cueto 
---
 .../Library/Tpm2CommandLib/Tpm2Capability.c   | 46 ---
 1 file changed, 29 insertions(+), 17 deletions(-)

diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c 
b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
index 85b11c7715..07cac08c40 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
@@ -110,7 +110,7 @@ Tpm2GetCapability (
   // Fail if command failed
   //
   if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) {
-DEBUG ((EFI_D_ERROR, "Tpm2GetCapability: Response Code error! 0x%08x\r\n", 
SwapBytes32(RecvBuffer.Header.responseCode)));
+DEBUG ((DEBUG_ERROR, "Tpm2GetCapability: Response Code error! 0x%08x\r\n", 
SwapBytes32(RecvBuffer.Header.responseCode)));
 return EFI_DEVICE_ERROR;
   }
 
@@ -522,74 +522,86 @@ Tpm2GetCapabilitySupportedAndActivePcrs (
   EFI_STATUSStatus;
   TPML_PCR_SELECTIONPcrs;
   UINTN Index;
+  UINT8 ActivePcrBankCount;
 
   //
-  // Get supported PCR and current Active PCRs.
+  // Get supported PCR
   //
   Status = Tpm2GetCapabilityPcrs ();
-
+  DEBUG ((DEBUG_INFO, "Supported PCRs - Count = %08x\n", Pcrs.count));
+  ActivePcrBankCount = 0;
   //
   // If error, assume that we have at least SHA-1 (and return the error.)
   //
   if (EFI_ERROR (Status)) {
-DEBUG ((EFI_D_ERROR, "GetSupportedAndActivePcrs - Tpm2GetCapabilityPcrs 
fail!\n"));
+DEBUG ((DEBUG_ERROR, "GetSupportedAndActivePcrs - Tpm2GetCapabilityPcrs 
fail!\n"));
 *TpmHashAlgorithmBitmap = HASH_ALG_SHA1;
 *ActivePcrBanks = HASH_ALG_SHA1;
+ActivePcrBankCount = 1;
   }
   //
   // Otherwise, process the return data to determine what algorithms are 
supported
   // and currently allocated.
   //
   else {
-DEBUG ((EFI_D_INFO, "GetSupportedAndActivePcrs - Count = %08x\n", 
Pcrs.count));
 *TpmHashAlgorithmBitmap = 0;
 *ActivePcrBanks = 0;
 for (Index = 0; Index < Pcrs.count; Index++) {
   switch (Pcrs.pcrSelections[Index].hash) {
   case TPM_ALG_SHA1:
-DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA1 
present.\n"));
+DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA1 
present.\n"));
 *TpmHashAlgorithmBitmap |= HASH_ALG_SHA1;
 if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, 
Pcrs.pcrSelections[Index].sizeofSelect)) {
-  DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA1 
active.\n"));
+  DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA1 
active.\n"));
   *ActivePcrBanks |= HASH_ALG_SHA1;
+  ActivePcrBankCount++;
 }
 break;
   case TPM_ALG_SHA256:
-DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA256 
present.\n"));
+DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA256 
present.\n"));
 *TpmHashAlgorithmBitmap |= HASH_ALG_SHA256;
 if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, 
Pcrs.pcrSelections[Index].sizeofSelect)) {
-  DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA256 
active.\n"));
+  DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA256 
active.\n"));
   *ActivePcrBanks |= HASH_ALG_SHA256;
+  ActivePcrBankCount++;
 }
 break;
   case TPM_ALG_SHA384:
-DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA384 
present.\n"));
+DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA384 
present.\n"));
 *TpmHashAlgorithmBitmap |= HASH_ALG_SHA384;
 if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, 
Pcrs.pcrSelections[Index].sizeofSelect)) {
-  DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA384 
active.\n"));
+  DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA384 
active.\n"));
   *ActivePcrBanks |= HASH_ALG_SHA384;
+  ActivePcrBankCount++;
 }
 break;
   case TPM_ALG_SHA512:
-DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA512 
present.\n"));
+DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA512 
present.\n"));
 *TpmHashAlgorithmBitmap |= HASH_ALG_SHA512;
 if (!IsZeroBuffer 

[edk2-devel] [PATCH v5 1/6] Platform/Intel/MinPlatformPkg: Fix build error

2020-07-20 Thread IanX Kuo
Fix ReportCpuHobLib build error

Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I0cd6ba4eb7231a3a84f080fdce85bbe74eb29eeb
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c   | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
index aa256534..83fc5249 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
@@ -6,7 +6,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 
 VOID
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62905): https://edk2.groups.io/g/devel/message/62905
Mute This Topic: https://groups.io/mt/75694165/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 0/6] *** SUBJECT HERE ***

2020-07-20 Thread IanX Kuo
*** BLURB HERE ***

IanX Kuo (6):
  Platform/Intel/MinPlatformPkg: Fix build error
  Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.
  Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

 .../CometlakeURvp/OpenBoardPkg.dsc|  4 ++-
 .../GalagoPro3/OpenBoardPkg.dsc   |  6 +++--
 .../KabylakeRvp3/OpenBoardPkg.dsc |  6 +++--
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../Library/ReportCpuHobLib/ReportCpuHobLib.c |  5 +++-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 .../BoardX58Ich10/OpenBoardPkg.dsc|  6 +++--
 .../UpXtreme/OpenBoardPkg.dsc |  4 ++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc  |  6 +++--
 10 files changed, 32 insertions(+), 36 deletions(-)

-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62897): https://edk2.groups.io/g/devel/message/62897
Mute This Topic: https://groups.io/mt/75694161/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v2 3/6] Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: Ic312ec307b3bcd84051e48505038d9ca47d467e2
Signed-off-by: IanX Kuo 
---
 .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc  | 6 --
 .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  | 6 --
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
index 6e35495a..55ff33ec 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the GalagoPro3 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -38,7 +38,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -119,6 +120,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
index 2a086cd9..0d6d5f21 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the KabylakeRvp3 board.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -37,7 +37,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -161,6 +162,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62889): https://edk2.groups.io/g/devel/message/62889
Mute This Topic: https://groups.io/mt/75694147/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH] SecurityPkg: Debug code to audit BIOS TPM extend operations.

2020-07-20 Thread Rodrigo Gonzalez del Cueto
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2858

Add debug functionality to examine TPM extend operations
performed by BIOS and inspect the PCR 00 value prior to
any BIOS measurements.

Replaced usage of EFI_D_* for DEBUG_* definitions in debug
messages.

Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Qi Zhang 
Signed-off-by: Rodrigo Gonzalez del Cueto 
---
 SecurityPkg/Include/Library/Tpm2CommandLib.h  |  25 +-
 .../Library/Tpm2CommandLib/Tpm2Integrity.c| 468 --
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c |  32 +-
 3 files changed, 364 insertions(+), 161 deletions(-)

diff --git a/SecurityPkg/Include/Library/Tpm2CommandLib.h 
b/SecurityPkg/Include/Library/Tpm2CommandLib.h
index ce381e786b..bfa5bd82f4 100644
--- a/SecurityPkg/Include/Library/Tpm2CommandLib.h
+++ b/SecurityPkg/Include/Library/Tpm2CommandLib.h
@@ -505,7 +505,7 @@ EFIAPI
 Tpm2PcrEvent (
   IN  TPMI_DH_PCR   PcrHandle,
   IN  TPM2B_EVENT   *EventData,
- OUT  TPML_DIGEST_VALUES*Digests
+  OUT  TPML_DIGEST_VALUES*Digests
   );
 
 /**
@@ -523,9 +523,26 @@ EFI_STATUS
 EFIAPI
 Tpm2PcrRead (
   IN  TPML_PCR_SELECTION*PcrSelectionIn,
- OUT  UINT32*PcrUpdateCounter,
- OUT  TPML_PCR_SELECTION*PcrSelectionOut,
- OUT  TPML_DIGEST   *PcrValues
+  OUT  UINT32*PcrUpdateCounter,
+  OUT  TPML_PCR_SELECTION*PcrSelectionOut,
+  OUT  TPML_DIGEST   *PcrValues
+  );
+
+/**
+   This function will query the TPM to determine which hashing algorithms and
+   get the digests of all active and supported PCR banks of a specific PCR 
register.
+
+   @param[in] PcrHandle The index of the PCR register to be read.
+   @param[out]HashList  List of digests from PCR register being read.
+
+   @retval EFI_SUCCESS   The Pcr was read successfully.
+   @retval EFI_DEVICE_ERROR  The command was unsuccessful.
+**/
+EFI_STATUS
+EFIAPI
+Tpm2ActivePcrRegisterRead (
+  IN  TPMI_DH_PCRPcrHandle,
+  OUT TPML_DIGEST*HashList
   );
 
 /**
diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c 
b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c
index ddb15178fb..229fc44139 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c
@@ -76,6 +76,297 @@ typedef struct {
 
 #pragma pack()
 
+/**
+  This command returns the values of all PCR specified in pcrSelect.
+
+  @param[in]  PcrSelectionIn The selection of PCR to read.
+  @param[out] PcrUpdateCounter   The current value of the PCR update counter.
+  @param[out] PcrSelectionOutThe PCR in the returned list.
+  @param[out] PcrValues  The contents of the PCR indicated in 
pcrSelect.
+
+  @retval EFI_SUCCESSOperation completed successfully.
+  @retval EFI_DEVICE_ERROR   The command was unsuccessful.
+**/
+EFI_STATUS
+EFIAPI
+Tpm2PcrRead (
+  IN  TPML_PCR_SELECTION*PcrSelectionIn,
+ OUT  UINT32*PcrUpdateCounter,
+ OUT  TPML_PCR_SELECTION*PcrSelectionOut,
+ OUT  TPML_DIGEST   *PcrValues
+  )
+{
+  EFI_STATUSStatus;
+  TPM2_PCR_READ_COMMAND SendBuffer;
+  TPM2_PCR_READ_RESPONSERecvBuffer;
+  UINT32SendBufferSize;
+  UINT32RecvBufferSize;
+  UINTN Index;
+  TPML_DIGEST   *PcrValuesOut;
+  TPM2B_DIGEST  *Digests;
+
+  //
+  // Construct command
+  //
+  SendBuffer.Header.tag = SwapBytes16(TPM_ST_NO_SESSIONS);
+  SendBuffer.Header.commandCode = SwapBytes32(TPM_CC_PCR_Read);
+
+  SendBuffer.PcrSelectionIn.count = SwapBytes32(PcrSelectionIn->count);
+  for (Index = 0; Index < PcrSelectionIn->count; Index++) {
+SendBuffer.PcrSelectionIn.pcrSelections[Index].hash = 
SwapBytes16(PcrSelectionIn->pcrSelections[Index].hash);
+SendBuffer.PcrSelectionIn.pcrSelections[Index].sizeofSelect = 
PcrSelectionIn->pcrSelections[Index].sizeofSelect;
+CopyMem ([Index].pcrSelect, 
>pcrSelections[Index].pcrSelect, 
SendBuffer.PcrSelectionIn.pcrSelections[Index].sizeofSelect);
+  }
+
+  SendBufferSize = sizeof(SendBuffer.Header) + 
sizeof(SendBuffer.PcrSelectionIn.count) + 
sizeof(SendBuffer.PcrSelectionIn.pcrSelections[0]) * PcrSelectionIn->count;
+  SendBuffer.Header.paramSize = SwapBytes32 (SendBufferSize);
+
+  //
+  // send Tpm command
+  //
+  RecvBufferSize = sizeof (RecvBuffer);
+  Status = Tpm2SubmitCommand (SendBufferSize, (UINT8 *), 
, (UINT8 *));
+  if (EFI_ERROR (Status)) {
+return Status;
+  }
+
+  if (RecvBufferSize < sizeof (TPM2_RESPONSE_HEADER)) {
+DEBUG ((DEBUG_ERROR, "Tpm2PcrRead - RecvBufferSize Error - %x\n", 
RecvBufferSize));
+return EFI_DEVICE_ERROR;
+  }
+  if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) {
+DEBUG 

[edk2-devel] [PATCH] SecurityPkg: Fix GetSupportedAndActivePcrs counter calculation

2020-07-20 Thread Rodrigo Gonzalez del Cueto
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2855
The Tpm2GetCapabilitySupportedAndActivePcrs function prints a
count number that should reflect the *supported and currently
active* PCR banks, but the implementation in place displays
instead the count of the *supported PCR banks* retrieved
directly from the Tpm2GetCapabilityPcrs()
TPML_PCR_SELECTION output.

The counter should only take into account those PCRs banks
which are active.

Replaced usage of EFI_D_* for DEBUG_* definitions in debug
messages.

Change-Id: I2f41bbe69834bdce41ffc0f20199b6fb881cd10b
Signed-off-by: Rodrigo Gonzalez del Cueto 
---
 SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 46 
+-
 1 file changed, 29 insertions(+), 17 deletions(-)

diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c 
b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
index 85b11c7715..07cac08c40 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
@@ -110,7 +110,7 @@ Tpm2GetCapability (
   // Fail if command failed
   //
   if (SwapBytes32(RecvBuffer.Header.responseCode) != TPM_RC_SUCCESS) {
-DEBUG ((EFI_D_ERROR, "Tpm2GetCapability: Response Code error! 0x%08x\r\n", 
SwapBytes32(RecvBuffer.Header.responseCode)));
+DEBUG ((DEBUG_ERROR, "Tpm2GetCapability: Response Code error! 0x%08x\r\n", 
SwapBytes32(RecvBuffer.Header.responseCode)));
 return EFI_DEVICE_ERROR;
   }
 
@@ -522,74 +522,86 @@ Tpm2GetCapabilitySupportedAndActivePcrs (
   EFI_STATUSStatus;
   TPML_PCR_SELECTIONPcrs;
   UINTN Index;
+  UINT8 ActivePcrBankCount;
 
   //
-  // Get supported PCR and current Active PCRs.
+  // Get supported PCR
   //
   Status = Tpm2GetCapabilityPcrs ();
-
+  DEBUG ((DEBUG_INFO, "Supported PCRs - Count = %08x\n", Pcrs.count));
+  ActivePcrBankCount = 0;
   //
   // If error, assume that we have at least SHA-1 (and return the error.)
   //
   if (EFI_ERROR (Status)) {
-DEBUG ((EFI_D_ERROR, "GetSupportedAndActivePcrs - Tpm2GetCapabilityPcrs 
fail!\n"));
+DEBUG ((DEBUG_ERROR, "GetSupportedAndActivePcrs - Tpm2GetCapabilityPcrs 
fail!\n"));
 *TpmHashAlgorithmBitmap = HASH_ALG_SHA1;
 *ActivePcrBanks = HASH_ALG_SHA1;
+ActivePcrBankCount = 1;
   }
   //
   // Otherwise, process the return data to determine what algorithms are 
supported
   // and currently allocated.
   //
   else {
-DEBUG ((EFI_D_INFO, "GetSupportedAndActivePcrs - Count = %08x\n", 
Pcrs.count));
 *TpmHashAlgorithmBitmap = 0;
 *ActivePcrBanks = 0;
 for (Index = 0; Index < Pcrs.count; Index++) {
   switch (Pcrs.pcrSelections[Index].hash) {
   case TPM_ALG_SHA1:
-DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA1 
present.\n"));
+DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA1 
present.\n"));
 *TpmHashAlgorithmBitmap |= HASH_ALG_SHA1;
 if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, 
Pcrs.pcrSelections[Index].sizeofSelect)) {
-  DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA1 
active.\n"));
+  DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA1 
active.\n"));
   *ActivePcrBanks |= HASH_ALG_SHA1;
+  ActivePcrBankCount++;
 }
 break;
   case TPM_ALG_SHA256:
-DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA256 
present.\n"));
+DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA256 
present.\n"));
 *TpmHashAlgorithmBitmap |= HASH_ALG_SHA256;
 if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, 
Pcrs.pcrSelections[Index].sizeofSelect)) {
-  DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA256 
active.\n"));
+  DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA256 
active.\n"));
   *ActivePcrBanks |= HASH_ALG_SHA256;
+  ActivePcrBankCount++;
 }
 break;
   case TPM_ALG_SHA384:
-DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA384 
present.\n"));
+DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA384 
present.\n"));
 *TpmHashAlgorithmBitmap |= HASH_ALG_SHA384;
 if (!IsZeroBuffer (Pcrs.pcrSelections[Index].pcrSelect, 
Pcrs.pcrSelections[Index].sizeofSelect)) {
-  DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA384 
active.\n"));
+  DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA384 
active.\n"));
   *ActivePcrBanks |= HASH_ALG_SHA384;
+  ActivePcrBankCount++;
 }
 break;
   case TPM_ALG_SHA512:
-DEBUG ((EFI_D_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA512 
present.\n"));
+DEBUG ((DEBUG_VERBOSE, "GetSupportedAndActivePcrs - HASH_ALG_SHA512 
present.\n"));
 *TpmHashAlgorithmBitmap |= HASH_ALG_SHA512;
 

[edk2-devel] [PATCH v4 3/6] Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: Ic312ec307b3bcd84051e48505038d9ca47d467e2
Signed-off-by: IanX Kuo 
---
 .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc  | 6 --
 .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  | 6 --
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
index 6e35495a..55ff33ec 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the GalagoPro3 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -38,7 +38,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -119,6 +120,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
index 2a086cd9..0d6d5f21 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the KabylakeRvp3 board.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -37,7 +37,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -161,6 +162,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62876): https://edk2.groups.io/g/devel/message/62876
Mute This Topic: https://groups.io/mt/75694132/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 1/6] Platform/Intel/MinPlatformPkg: Fix build error

2020-07-20 Thread IanX Kuo
Fix ReportCpuHobLib build error

Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I0cd6ba4eb7231a3a84f080fdce85bbe74eb29eeb
Signed-off-by: IanX Kuo 
---
 .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c   | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
index aa256534..83fc5249 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
@@ -6,7 +6,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 
 VOID
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62904): https://edk2.groups.io/g/devel/message/62904
Mute This Topic: https://groups.io/mt/75694137/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v3 4/6] Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I673f8fcd2d97bbd60229a60f53875e92826a7179
Signed-off-by: IanX Kuo 
---
 .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index 8a826009..68a8f844 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the X58Ich10 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -42,7 +42,8 @@
   DEFINE NETWORK_ISCSI_ENABLE   = FALSE
   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
 
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include $(PROJECT)/OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -117,6 +118,7 @@
   LogoLib|$(BOARD_PKG)/Library/DxeLogoLib/DxeLogoLib.inf
   NvVarsFileLib|$(BOARD_PKG)/Library/NvVarsFileLib/NvVarsFileLib.inf
   ReportFvLib|$(BOARD_PKG)/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/SerializeVariablesLib.inf
   
SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/SiliconPolicyInitLib.inf
   
SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.inf
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62875): https://edk2.groups.io/g/devel/message/62875
Mute This Topic: https://groups.io/mt/75694131/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v2 1/6] Platform/Intel/MinPlatformPkg: Use Uefi.h

2020-07-20 Thread IanX Kuo
Use Uefi.h replace Base.h to avoid EFI_GUID not found.

Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I0cd6ba4eb7231a3a84f080fdce85bbe74eb29eeb
Signed-off-by: IanX Kuo 
---
 .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
index aa256534..2a317f78 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
@@ -6,7 +6,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#include 
+#include 
 #include 
 
 VOID
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62874): https://edk2.groups.io/g/devel/message/62874
Mute This Topic: https://groups.io/mt/75694130/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 3/6] Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: Ic312ec307b3bcd84051e48505038d9ca47d467e2
Signed-off-by: IanX Kuo 
---
 .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc  | 6 --
 .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  | 6 --
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
index 6e35495a..55ff33ec 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the GalagoPro3 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -38,7 +38,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -119,6 +120,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
index 2a086cd9..0d6d5f21 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the KabylakeRvp3 board.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -37,7 +37,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -161,6 +162,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62893): https://edk2.groups.io/g/devel/message/62893
Mute This Topic: https://groups.io/mt/75694132/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v5 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I1c14aece3b229c194960e91dc9505dd8120bbe30
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  3 ++-
 .../PlatformInitPei/PlatformInitPreMem.c  | 25 ++-
 .../PlatformInitPei/PlatformInitPreMem.inf|  3 ++-
 3 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
index 13a0fda2..b62351da 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Platform description.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -92,6 +92,7 @@
   #
   
FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf
   
ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPointCheckLib.inf
   TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
   
SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNull.inf
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
index efdeb6a9..48cbe0df 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Platform Init Pre-Memory PEI module
 
-Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -355,28 +356,6 @@ Done:
   return EFI_SUCCESS;
 }
 
-VOID
-ReportCpuHob (
-  VOID
-  )
-{
-  UINT8 PhysicalAddressBits;
-  UINT32RegEax;
-
-  AsmCpuid (0x8000, , NULL, NULL, NULL);
-  if (RegEax >= 0x8008) {
-AsmCpuid (0x8008, , NULL, NULL, NULL);
-PhysicalAddressBits = (UINT8) RegEax;
-  } else {
-PhysicalAddressBits = 36;
-  }
-
-  ///
-  /// Create a CPU hand-off information
-  ///
-  BuildCpuHob (PhysicalAddressBits, 16);
-}
-
 /**
   Install Firmware Volume Hob's once there is main memory
 
diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
index 7ee18eb6..8e828ff2 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Platform Init Pre-Memory PEI module.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -28,6 +28,7 @@
   TestPointCheckLib
   TimerLib
   SetCacheMtrrLib
+  ReportCpuHobLib
 
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62896): https://edk2.groups.io/g/devel/message/62896
Mute This Topic: https://groups.io/mt/75694160/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 5/6] Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I999b29c30993c397f918a1f7b4ea19c61c0a460d
Signed-off-by: IanX Kuo 
---
 .../Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc | 4 +++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc| 6 --
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
index fdf85b43..f78dba87 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
index 11dffb08..9ee4030a 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the WhiskeylakeURvp board.
 #
-#  Copyright (c) 2019, Intel Corporation. All rights reserved.
+#  Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62883): https://edk2.groups.io/g/devel/message/62883
Mute This Topic: https://groups.io/mt/75694141/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v2 5/6] Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I999b29c30993c397f918a1f7b4ea19c61c0a460d
Signed-off-by: IanX Kuo 
---
 .../Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc | 4 +++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc| 6 --
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
index fdf85b43..f78dba87 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
index 11dffb08..9ee4030a 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the WhiskeylakeURvp board.
 #
-#  Copyright (c) 2019, Intel Corporation. All rights reserved.
+#  Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62882): https://edk2.groups.io/g/devel/message/62882
Mute This Topic: https://groups.io/mt/75694139/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v2 2/6] Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I1097057046aa021dc2ff193fea335790513c10c4
Signed-off-by: IanX Kuo 
---
 .../CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
index 136e5309..74943352 100644
--- a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62888): https://edk2.groups.io/g/devel/message/62888
Mute This Topic: https://groups.io/mt/75694146/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 4/6] Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I673f8fcd2d97bbd60229a60f53875e92826a7179
Signed-off-by: IanX Kuo 
---
 .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index 8a826009..68a8f844 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the X58Ich10 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -42,7 +42,8 @@
   DEFINE NETWORK_ISCSI_ENABLE   = FALSE
   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
 
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include $(PROJECT)/OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -117,6 +118,7 @@
   LogoLib|$(BOARD_PKG)/Library/DxeLogoLib/DxeLogoLib.inf
   NvVarsFileLib|$(BOARD_PKG)/Library/NvVarsFileLib/NvVarsFileLib.inf
   ReportFvLib|$(BOARD_PKG)/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/SerializeVariablesLib.inf
   
SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/SiliconPolicyInitLib.inf
   
SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.inf
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62877): https://edk2.groups.io/g/devel/message/62877
Mute This Topic: https://groups.io/mt/75694133/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v3 5/6] Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I999b29c30993c397f918a1f7b4ea19c61c0a460d
Signed-off-by: IanX Kuo 
---
 .../Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc | 4 +++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc| 6 --
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
index fdf85b43..f78dba87 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
index 11dffb08..9ee4030a 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the WhiskeylakeURvp board.
 #
-#  Copyright (c) 2019, Intel Corporation. All rights reserved.
+#  Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62880): https://edk2.groups.io/g/devel/message/62880
Mute This Topic: https://groups.io/mt/75694136/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v3 3/6] Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: Ic312ec307b3bcd84051e48505038d9ca47d467e2
Signed-off-by: IanX Kuo 
---
 .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc  | 6 --
 .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  | 6 --
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
index 6e35495a..55ff33ec 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the GalagoPro3 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -38,7 +38,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -119,6 +120,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
index 2a086cd9..0d6d5f21 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the KabylakeRvp3 board.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -37,7 +37,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -161,6 +162,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62885): https://edk2.groups.io/g/devel/message/62885
Mute This Topic: https://groups.io/mt/75694143/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/6] Platform/Intel/MinPlatformPkg: Fix build error

2020-07-20 Thread IanX Kuo
Fix ReportCpuHobLib build error

Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I0cd6ba4eb7231a3a84f080fdce85bbe74eb29eeb
Signed-off-by: IanX Kuo 
---
 .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c   | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
index aa256534..83fc5249 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
@@ -6,7 +6,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 
 VOID
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62891): https://edk2.groups.io/g/devel/message/62891
Mute This Topic: https://groups.io/mt/75694149/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v5 4/6] Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I673f8fcd2d97bbd60229a60f53875e92826a7179
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index 8a826009..68a8f844 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the X58Ich10 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -42,7 +42,8 @@
   DEFINE NETWORK_ISCSI_ENABLE   = FALSE
   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
 
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include $(PROJECT)/OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -117,6 +118,7 @@
   LogoLib|$(BOARD_PKG)/Library/DxeLogoLib/DxeLogoLib.inf
   NvVarsFileLib|$(BOARD_PKG)/Library/NvVarsFileLib/NvVarsFileLib.inf
   ReportFvLib|$(BOARD_PKG)/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/SerializeVariablesLib.inf
   
SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/SiliconPolicyInitLib.inf
   
SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.inf
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62900): https://edk2.groups.io/g/devel/message/62900
Mute This Topic: https://groups.io/mt/75694162/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 5/6] Platform/Intel/WhiskeylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I999b29c30993c397f918a1f7b4ea19c61c0a460d
Signed-off-by: IanX Kuo 
---
 .../Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc | 4 +++-
 .../WhiskeylakeURvp/OpenBoardPkg.dsc| 6 --
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
index fdf85b43..f78dba87 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
index 11dffb08..9ee4030a 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the WhiskeylakeURvp board.
 #
-#  Copyright (c) 2019, Intel Corporation. All rights reserved.
+#  Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62899): https://edk2.groups.io/g/devel/message/62899
Mute This Topic: https://groups.io/mt/75694141/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 2/6] Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I1097057046aa021dc2ff193fea335790513c10c4
Signed-off-by: IanX Kuo 
---
 .../CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
index 136e5309..74943352 100644
--- a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62887): https://edk2.groups.io/g/devel/message/62887
Mute This Topic: https://groups.io/mt/75694145/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v4 1/6] Platform/Intel/MinPlatformPkg: Fix build error

2020-07-20 Thread IanX Kuo
Fix ReportCpuHobLib build error

Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I0cd6ba4eb7231a3a84f080fdce85bbe74eb29eeb
Signed-off-by: IanX Kuo 
---
 .../PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c   | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
index aa256534..83fc5249 100644
--- 
a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
+++ 
b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.c
@@ -6,7 +6,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
-#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 
 VOID
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62881): https://edk2.groups.io/g/devel/message/62881
Mute This Topic: https://groups.io/mt/75694137/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v3 2/6] Platform/Intel/CometlakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I1097057046aa021dc2ff193fea335790513c10c4
Signed-off-by: IanX Kuo 
---
 .../CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
index 136e5309..74943352 100644
--- a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
@@ -39,7 +39,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -121,6 +122,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62879): https://edk2.groups.io/g/devel/message/62879
Mute This Topic: https://groups.io/mt/75694135/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v5 3/6] Platform/Intel/KabylakeOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: Ic312ec307b3bcd84051e48505038d9ca47d467e2
Signed-off-by: IanX Kuo 
Cc: Sai Chaganty 
Cc: Chasel Chiu 
---
 .../Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc  | 6 --
 .../KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  | 6 --
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
index 6e35495a..55ff33ec 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the GalagoPro3 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -38,7 +38,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -119,6 +120,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
index 2a086cd9..0d6d5f21 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the KabylakeRvp3 board.
 #
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -37,7 +37,8 @@
   #
   # Include PCD configuration for this board.
   #
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -161,6 +162,7 @@
   PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
   
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
   
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
 
   ###
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62895): https://edk2.groups.io/g/devel/message/62895
Mute This Topic: https://groups.io/mt/75694159/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v2 4/6] Platform/Intel/SimicsOpenBoardPkg: Add ReportCpuHobLib.

2020-07-20 Thread IanX Kuo
Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
PA bits reported can be overriden using Library instance in Platform.

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

Change-Id: I673f8fcd2d97bbd60229a60f53875e92826a7179
Signed-off-by: IanX Kuo 
---
 .../Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index 8a826009..68a8f844 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  The main build description file for the X58Ich10 board.
 #
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -42,7 +42,8 @@
   DEFINE NETWORK_ISCSI_ENABLE   = FALSE
   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
 
-  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+  !include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
   !include $(PROJECT)/OpenBoardPkgPcd.dsc
   !include AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
 
@@ -117,6 +118,7 @@
   LogoLib|$(BOARD_PKG)/Library/DxeLogoLib/DxeLogoLib.inf
   NvVarsFileLib|$(BOARD_PKG)/Library/NvVarsFileLib/NvVarsFileLib.inf
   ReportFvLib|$(BOARD_PKG)/Library/PeiReportFvLib/PeiReportFvLib.inf
+  
ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHobLib/ReportCpuHobLib.inf
   
SerializeVariablesLib|$(BOARD_PKG)/Library/SerializeVariablesLib/SerializeVariablesLib.inf
   
SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/SiliconPolicyInitLib.inf
   
SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.inf
-- 
2.26.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62878): https://edk2.groups.io/g/devel/message/62878
Mute This Topic: https://groups.io/mt/75694134/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration for LicenseCheck

2020-07-20 Thread Laszlo Ersek
On 07/20/20 10:37, Shenglei Zhang wrote:
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
> 
> Cc: Jordan Justen 
> Cc: Laszlo Ersek 
> Cc: Ard Biesheuvel 
> Signed-off-by: Shenglei Zhang 
> ---
>  OvmfPkg/OvmfPkg.ci.yaml | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/OvmfPkg/OvmfPkg.ci.yaml b/OvmfPkg/OvmfPkg.ci.yaml
> index 98992f0429ff..ed342d7a3d08 100644
> --- a/OvmfPkg/OvmfPkg.ci.yaml
> +++ b/OvmfPkg/OvmfPkg.ci.yaml
> @@ -8,6 +8,10 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +## options defined .pytool/Plugin/LicenseCheck
> +"LicenseCheck": {
> +"IgnoreFiles": []
> +},
>  ## options defined .pytool/Plugin/CompilerPlugin
>  "CompilerPlugin": {
>  "DscPath": "" # Don't support this test
> 

Can you list the following file at once, please:

  OvmfPkg/QemuVideoDxe/VbeShim.h

With that:

Reviewed-by: Laszlo Ersek 

Thanks
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62873): https://edk2.groups.io/g/devel/message/62873
Mute This Topic: https://groups.io/mt/75678218/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for LicenseCheck

2020-07-20 Thread Laszlo Ersek
On 07/20/20 10:37, Shenglei Zhang wrote:
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
> 
> Cc: Eric Dong 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Signed-off-by: Shenglei Zhang 
> ---
>  UefiCpuPkg/UefiCpuPkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/UefiCpuPkg/UefiCpuPkg.ci.yaml b/UefiCpuPkg/UefiCpuPkg.ci.yaml
> index 99e460a8b090..d54651d43800 100644
> --- a/UefiCpuPkg/UefiCpuPkg.ci.yaml
> +++ b/UefiCpuPkg/UefiCpuPkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +"LicenseCheck": {
> +"IgnoreFiles": []
> +},
>  "CompilerPlugin": {
>  "DscPath": "UefiCpuPkg.dsc"
>  },
> 

Reviewed-by: Laszlo Ersek 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62872): https://edk2.groups.io/g/devel/message/62872
Mute This Topic: https://groups.io/mt/75678225/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 03/15] ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for LicenseCheck

2020-07-20 Thread Laszlo Ersek
On 07/20/20 10:36, Shenglei Zhang wrote:
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
> 
> Cc: Laszlo Ersek 
> Cc: Ard Biesheuvel 
> Cc: Leif Lindholm 
> Signed-off-by: Shenglei Zhang 
> ---
>  ArmVirtPkg/ArmVirtPkg.ci.yaml | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/ArmVirtPkg/ArmVirtPkg.ci.yaml b/ArmVirtPkg/ArmVirtPkg.ci.yaml
> index 4553725ee528..27bb7ff49011 100644
> --- a/ArmVirtPkg/ArmVirtPkg.ci.yaml
> +++ b/ArmVirtPkg/ArmVirtPkg.ci.yaml
> @@ -8,6 +8,10 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +## options defined .pytool/Plugin/LicenseCheck
> +"LicenseCheck": {
> +"IgnoreFiles": []
> +},
>  ## options defined .pytool/Plugin/CompilerPlugin
>  "CompilerPlugin": {
>  "DscPath": "" # Don't support this test
> 

Reviewed-by: Laszlo Ersek 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62871): https://edk2.groups.io/g/devel/message/62871
Mute This Topic: https://groups.io/mt/75678211/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platform][PATCH v1 4/7] Platforms/RaspberryPi: SMBIOS Type 4 fixes

2020-07-20 Thread Andrei Warkentin
Reviewed-by: Andrei Warkentin 

From: Samer El-Haj-Mahmoud 
Sent: Monday, July 20, 2020 1:16 PM
To: devel@edk2.groups.io 
Cc: Leif Lindholm ; Pete Batard ; Andrei 
Warkentin ; Ard Biesheuvel 
Subject: [edk2-platform][PATCH v1 4/7] Platforms/RaspberryPi: SMBIOS Type 4 
fixes

Various fixes and enhancements for SMBIOS Type 4:
 - Fix ProcessorId to correctly report the Arm64 MIDR_EL1 value
 - Change ProcessorUpgrade from Other to None
 - Add comments for ProcessorCharacteristics fields
 - Add CoreCount2, EnabledCoreCount2, and ThreadCount2
 - Set LxCacheHandle to 0x

Cc: Leif Lindholm 
Cc: Pete Batard 
Cc: Andrei Warkentin 
Cc: Ard Biesheuvel 
Signed-off-by: Samer El-Haj-Mahmoud 
---
 Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf |  1 +
 Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c   | 87 

 2 files changed, 34 insertions(+), 54 deletions(-)

diff --git 
a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf 
b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf
index 817b902b1fad..2b24b22c25fc 100644
--- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf
+++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf
@@ -31,6 +31,7 @@ [Packages]
   EmbeddedPkg/EmbeddedPkg.dec

 [LibraryClasses]
+  ArmLib
   UefiBootServicesTableLib
   MemoryAllocationLib
   BaseMemoryLib
diff --git a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c 
b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
index 21feab3e47a5..4dcdec5615dc 100644
--- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
+++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -230,55 +231,13 @@ CHAR8 *mEnclosureInfoType3Strings[] = {
 /
 SMBIOS_TABLE_TYPE4 mProcessorInfoType4 = {
   { EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION, sizeof (SMBIOS_TABLE_TYPE4), 0},
-  1,// Socket String
-  CentralProcessor,   // ProcessorType;   
///< The enumeration value from PROCESSOR_TYPE_DATA.
+  1,   // Socket String
+  CentralProcessor,// ProcessorType;  ///< The 
enumeration value from PROCESSOR_TYPE_DATA.
   ProcessorFamilyIndicatorFamily2, // ProcessorFamily;///< The 
enumeration value from PROCESSOR_FAMILY2_DATA.
-  2,// ProcessorManufacture String;
-  { // ProcessorId;
-{  // PROCESSOR_SIGNATURE
-  0, //  ProcessorSteppingId:4;
-  0, //  ProcessorModel: 4;
-  0, //  ProcessorFamily:4;
-  0, //  ProcessorType:  2;
-  0, //  ProcessorReserved1: 2;
-  0, //  ProcessorXModel:4;
-  0, //  ProcessorXFamily:   8;
-  0, //  ProcessorReserved2: 4;
-},
-
-{  // PROCESSOR_FEATURE_FLAGS
-  0, //  ProcessorFpu   :1;
-  0, //  ProcessorVme   :1;
-  0, //  ProcessorDe:1;
-  0, //  ProcessorPse   :1;
-  0, //  ProcessorTsc   :1;
-  0, //  ProcessorMsr   :1;
-  0, //  ProcessorPae   :1;
-  0, //  ProcessorMce   :1;
-  0, //  ProcessorCx8   :1;
-  0, //  ProcessorApic  :1;
-  0, //  ProcessorReserved1 :1;
-  0, //  ProcessorSep   :1;
-  0, //  ProcessorMtrr  :1;
-  0, //  ProcessorPge   :1;
-  0, //  ProcessorMca   :1;
-  0, //  ProcessorCmov  :1;
-  0, //  ProcessorPat   :1;
-  0, //  ProcessorPse36 :1;
-  0, //  ProcessorPsn   :1;
-  0, //  ProcessorClfsh :1;
-  0, //  ProcessorReserved2 :1;
-  0, //  ProcessorDs:1;
-  0, //  ProcessorAcpi  :1;
-  0, //  ProcessorMmx   :1;
-  0, //  ProcessorFxsr  :1;
-  0, //  ProcessorSse   :1;
-  0, //  ProcessorSse2  :1;
-  0, //  ProcessorSs:1;
-  0, //  ProcessorReserved3 :1;
-  0, //  ProcessorTm:1;
-  0, //  ProcessorReserved4 :2;
-}
+  2,   // ProcessorManufacture String;
+  {// ProcessorId;
+{ 0x00, 0x00, 0x00, 0x00 },
+{ 0x00, 0x00, 0x00, 0x00 }
   },
   3,// ProcessorVersion String;
   { // Voltage;
@@ -293,18 +252,31 @@ SMBIOS_TABLE_TYPE4 mProcessorInfoType4 = {
   0,  // MaxSpeed;
   0,  // CurrentSpeed;
   0x41,   // Status;
-  ProcessorUpgradeOther,  // ProcessorUpgrade;  ///< The enumeration value 
from PROCESSOR_UPGRADE.
-  0,  // L1CacheHandle;
-  0,  // L2CacheHandle;
-  0,  // L3CacheHandle;
+  ProcessorUpgradeNone,   // ProcessorUpgrade; 

Re: [edk2-devel] [edk2-platform][PATCH v1 6/7] Platforms/RaspberryPi: SMBIOS Memory Types fixes

2020-07-20 Thread Andrei Warkentin
Reviewed-by: Andrei Warkentin 

From: Samer El-Haj-Mahmoud 
Sent: Monday, July 20, 2020 1:16 PM
To: devel@edk2.groups.io 
Cc: Leif Lindholm ; Pete Batard ; Andrei 
Warkentin ; Ard Biesheuvel 
Subject: [edk2-platform][PATCH v1 6/7] Platforms/RaspberryPi: SMBIOS Memory 
Types fixes

Various fixes and enhancements for SMBIOS memory structures
(Types 16, 17, and 19):

 - Type 16:
- Update MaximumCapacity dynamically
- Keep ExtendedMaximumCapacity at 0 (not used, per spec)

 - Type 17:
   - Update Size and VolatileSize dynamically
   - Change FormFactor from Unknown to Chip
   - Set DeviceSet to 0 (not part of set) instead of 0xFF (unknown)
   - Fix the DeviceLocator, BankLocator, and Manufacturer strings
   - Update MemoryType correctly for RPi4 and RPi3
   - Add additional SMBIOS fields from 3.3 definition

 - Type 19:
   - Update MemoryArrayHandle to point to Type 16 handle

Cc: Leif Lindholm 
Cc: Pete Batard 
Cc: Andrei Warkentin 
Cc: Ard Biesheuvel 
Signed-off-by: Samer El-Haj-Mahmoud 
---
 Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c | 115 
++--
 1 file changed, 83 insertions(+), 32 deletions(-)

diff --git a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c 
b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
index 4ee8ae6ebfc9..d382797602ce 100644
--- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
+++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
@@ -496,10 +496,10 @@ SMBIOS_TABLE_TYPE16 mPhyMemArrayInfoType16 = {
   MemoryArrayLocationSystemBoard, // Location;   ///< The 
enumeration value from MEMORY_ARRAY_LOCATION.
   MemoryArrayUseSystemMemory, // Use;///< The 
enumeration value from MEMORY_ARRAY_USE.
   MemoryErrorCorrectionUnknown,   // MemoryErrorCorrection;  ///< The 
enumeration value from MEMORY_ERROR_CORRECTION.
-  0x4000, // MaximumCapacity;
+  0x, // MaximumCapacity;
   0xFFFE, // MemoryErrorInformationHandle;
   1,  // NumberOfMemoryDevices;
-  0x4000ULL,  // ExtendedMaximumCapacity;
+  0xULL,  // ExtendedMaximumCapacity;
 };
 CHAR8 *mPhyMemArrayInfoType16Strings[] = {
   NULL
@@ -510,18 +510,23 @@ CHAR8 *mPhyMemArrayInfoType16Strings[] = {
 /
 SMBIOS_TABLE_TYPE17 mMemDevInfoType17 = {
   { EFI_SMBIOS_TYPE_MEMORY_DEVICE, sizeof (SMBIOS_TABLE_TYPE17), 0 },
-  0,  // MemoryArrayHandle; // Should match 
SMBIOS_TABLE_TYPE16.Handle, initialized at runtime, refer to 
PhyMemArrayInfoUpdateSmbiosType16()
-  0xFFFE, // MemoryErrorInformationHandle;
-  0x, // TotalWidth;
-  0x, // DataWidth;
-  0x0400, // Size; // When bit 15 is 0: Size in MB
-  // When bit 15 is 1: Size in KB, and continues in ExtendedSize
-  MemoryFormFactorUnknown, // FormFactor; ///< The 
enumeration value from MEMORY_FORM_FACTOR.
-  0xff,   // DeviceSet;
-  1,  // DeviceLocator String
-  2,  // BankLocator String
-  MemoryTypeDram, // MemoryType; ///< The 
enumeration value from MEMORY_DEVICE_TYPE.
-  {   // TypeDetail;
+  0,// MemoryArrayHandle; // Should match 
SMBIOS_TABLE_TYPE16.Handle, initialized at runtime, refer to 
PhyMemArrayInfoUpdateSmbiosType16()
+  0xFFFE,   // MemoryErrorInformationHandle; (not provided)
+  0x,   // TotalWidth; (unknown)
+  0x,   // DataWidth; (unknown)
+  0x,   // Size; // When bit 15 is 0: Size in MB
+// When bit 15 is 1: Size in KB, and continues in 
ExtendedSize
+// initialized at runtime, refer to 
PhyMemArrayInfoUpdateSmbiosType16()
+  MemoryFormFactorChip, // FormFactor; ///< The 
enumeration value from MEMORY_FORM_FACTOR.
+  0,// DeviceSet;
+  1,// DeviceLocator String
+  0,// BankLocator String
+#if (RPI_MODEL == 4)
+  MemoryTypeLpddr4, // MemoryType; ///< The 
enumeration value from MEMORY_DEVICE_TYPE.
+#else
+  MemoryTypeLpddr2, // MemoryType; ///< The 
enumeration value from MEMORY_DEVICE_TYPE.
+#endif
+  { // TypeDetail;
 0,  // Reserved:1;
 0,  // Other   :1;
 1,  // Unknown :1;
@@ -539,19 +544,42 @@ SMBIOS_TABLE_TYPE17 mMemDevInfoType17 = {
 0,  // Unbuffered  :1;
 0,  // Reserved1   :1;
   },
-  0,  // Speed;
-  3,  // Manufacturer String
-  0,  // SerialNumber String
-  0,  // AssetTag String
-  0,  // PartNumber String
-  0,  // Attributes;
-  0,  // 

Re: [edk2-devel] [edk2-platform][PATCH v1 5/7] Platforms/RaspberryPi: SMBIOS Type 7 fixes

2020-07-20 Thread Andrei Warkentin
Reviewed-by: Andrei Warkentin 

From: Samer El-Haj-Mahmoud 
Sent: Monday, July 20, 2020 1:16 PM
To: devel@edk2.groups.io 
Cc: Leif Lindholm ; Pete Batard ; Andrei 
Warkentin ; Ard Biesheuvel 
Subject: [edk2-platform][PATCH v1 5/7] Platforms/RaspberryPi: SMBIOS Type 7 
fixes

Various fixes and enhancements for SMBIOS Type 7:
 - Break into 3 instances (L1 Instruction, L1 Data, and L2 cache)
 - Use correct values for RPi4 and RPi3 SoCs
 - Add Type 4 association with type 7 handles

Cc: Leif Lindholm 
Cc: Pete Batard 
Cc: Andrei Warkentin 
Cc: Ard Biesheuvel 
Signed-off-by: Samer El-Haj-Mahmoud 
---
 Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c | 146 
++--
 1 file changed, 133 insertions(+), 13 deletions(-)

diff --git a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c 
b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
index 4dcdec5615dc..4ee8ae6ebfc9 100644
--- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
+++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
@@ -291,12 +291,24 @@ CHAR8 *mProcessorInfoType4Strings[] = {
 /***
 SMBIOS data definition  TYPE7  Cache Information
 /
-SMBIOS_TABLE_TYPE7 mCacheInfoType7 = {
+SMBIOS_TABLE_TYPE7 mCacheInfoType7_L1I = {
   { EFI_SMBIOS_TYPE_CACHE_INFORMATION, sizeof (SMBIOS_TABLE_TYPE7), 0 },
   1,// SocketDesignation String
-  0x018A,   // Cache Configuration
-  0x00FF,   // Maximum Size 256k
-  0x00FF,   // Install Size 256k
+  0x380,// Cache Configuration
+   //Cache Level:3  (L1)
+   //Cache Socketed :1  (Not Socketed)
+   //Reserved   :1
+   //Location   :2  (Internal)
+   //Enabled/Disabled   :1  (Enabled)
+   //Operational Mode   :2  (Unknown)
+   //Reserved   :6
+#if (RPI_MODEL == 4)
+  0x0030,   // Maximum Size (RPi4: 48KB)
+  0x0030,   // Install Size (RPi4: 48KB)
+#else
+  0x0010,   // Maximum Size (RPi3: 16KB)
+  0x0010,   // Install Size (RPi3: 16KB)
+#endif
   { // Supported SRAM Type
 0,  //Other :1
 0,  //Unknown   :1
@@ -317,16 +329,115 @@ SMBIOS_TABLE_TYPE7 mCacheInfoType7 = {
 0,  //Asynchronous  :1
 0   //Reserved  :9
   },
-  0,// Cache Speed unknown
-  CacheErrorMultiBit,   // Error Correction Multi
-  CacheTypeUnknown, // System Cache Type
-  CacheAssociativity2Way// Associativity
+  0,// Cache Speed unknown
+  CacheErrorParity, // Error Correction
+  CacheTypeInstruction, // System Cache Type
+  CacheAssociativity2Way// Associativity  (RPi4 L1 Instruction cache is 
3-way set associative, but SMBIOS spec does not define that)
 };
-CHAR8  *mCacheInfoType7Strings[] = {
-  "Cache1",
+CHAR8  *mCacheInfoType7Strings_L1I[] = {
+  "L1 Instruction",
   NULL
 };

+SMBIOS_TABLE_TYPE7 mCacheInfoType7_L1D = {
+  { EFI_SMBIOS_TYPE_CACHE_INFORMATION, sizeof (SMBIOS_TABLE_TYPE7), 0 },
+  1,// SocketDesignation String
+  0x180,// Cache Configuration
+   //Cache Level:3  (L1)
+   //Cache Socketed :1  (Not Socketed)
+   //Reserved   :1
+   //Location   :2  (Internal)
+   //Enabled/Disabled   :1  (Enabled)
+   //Operational Mode   :2  (WB)
+   //Reserved   :6
+#if (RPI_MODEL == 4)
+  0x0020,   // Maximum Size (RPi4: 32KB)
+  0x0020,   // Install Size (RPi4: 32KB)
+#else
+  0x0010,   // Maximum Size (RPi3: 16KB)
+  0x0010,   // Install Size (RPi3: 16KB)
+#endif
+  { // Supported SRAM Type
+0,  //Other :1
+0,  //Unknown   :1
+0,  //NonBurst  :1
+1,  //Burst :1
+0,  //PiplelineBurst:1
+1,  //Synchronous   :1
+0,  //Asynchronous  :1
+0   //Reserved  :9
+  },
+  { // Current SRAM Type
+0,  //Other :1
+0,  //Unknown   :1
+0,  //NonBurst  :1
+1,  //Burst :1
+0,  //PiplelineBurst:1
+1,  //Synchronous   :1
+0,  //Asynchronous  :1
+0   //Reserved  :9
+  },
+  0,// Cache Speed unknown
+  CacheErrorSingleBit,  // Error Correction
+  CacheTypeData,// System Cache Type
+#if (RPI_MODEL == 4)
+  CacheAssociativity2Way// Associativity
+#else
+  CacheAssociativity4Way// Associativity

Re: [edk2-devel] [edk2-platform][PATCH v1 3/7] Platforms/RaspberryPi: SMBIOS Type 0 fixes

2020-07-20 Thread Andrei Warkentin
Reviewed-by: Andrei Warkentin 

From: Samer El-Haj-Mahmoud 
Sent: Monday, July 20, 2020 1:16 PM
To: devel@edk2.groups.io 
Cc: Leif Lindholm ; Pete Batard ; Andrei 
Warkentin ; Ard Biesheuvel 
Subject: [edk2-platform][PATCH v1 3/7] Platforms/RaspberryPi: SMBIOS Type 0 
fixes

Various fixes and enhancements for SMBIOS Type 0:
 - Use PCDs to report the BIOS Segment and Size
 - Report Extended BiosSize
 - Set BiosIsUpgradable (it is!)
 - Clear FunctionKeyNetworkBootIsSupported

Cc: Leif Lindholm 
Cc: Pete Batard 
Cc: Andrei Warkentin 
Cc: Ard Biesheuvel 
Signed-off-by: Samer El-Haj-Mahmoud 
---
 Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf |  6 
+-
 Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c   | 17 
+
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git 
a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf 
b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf
index 59b2fefdf0fd..817b902b1fad 100644
--- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf
+++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.inf
@@ -1,10 +1,11 @@
 #/** @file
 #
-#  SMBIOS Table for ARM platform
+#  SMBIOS Table for the RaspberryPi platform
 #
 #  Copyright (c) 2017, Andrei Warkentin 
 #  Copyright (c) Microsoft Corporation. All rights reserved.
 #  Copyright (c) 2013 Linaro.org
+#  Copyright (c) 2020, ARM Limited. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -51,8 +52,11 @@ [Depex]
   gEfiSmbiosProtocolGuid AND gRaspberryPiFirmwareProtocolGuid

 [Pcd]
+  gArmTokenSpaceGuid.PcdFdBaseAddress
+  gArmTokenSpaceGuid.PcdFdSize
   gArmTokenSpaceGuid.PcdSystemMemorySize
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
+  gRaspberryPiTokenSpaceGuid.PcdFdtSize
   gRaspberryPiTokenSpaceGuid.PcdRamMoreThan3GB
   gRaspberryPiTokenSpaceGuid.PcdRamLimitTo3GB
diff --git a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c 
b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
index 170f1843f90b..21feab3e47a5 100644
--- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
+++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
@@ -54,11 +54,11 @@ STATIC RASPBERRY_PI_FIRMWARE_PROTOCOL *mFwProtocol;
 /
 SMBIOS_TABLE_TYPE0 mBIOSInfoType0 = {
   { EFI_SMBIOS_TYPE_BIOS_INFORMATION, sizeof (SMBIOS_TABLE_TYPE0), 0 },
-  1,// Vendor String
-  2,// BiosVersion String
-  0x0,  // BiosSegment
-  3,// BiosReleaseDate String
-  0x1F, // BiosSize
+  1, // Vendor String
+  2, // BiosVersion String
+  (UINT16) (FixedPcdGet32 (PcdFdBaseAddress) / 0x1), // BiosSegment
+  3, // BiosReleaseDate 
String
+  (UINT8) (FixedPcdGet32 (PcdFdSize) / 0x1), // BiosSize (in 64KB)
   { // BiosCharacteristics
 0,//  Reserved  :2;  ///< Bits 0-1.
 0,//  Unknown   :1;
@@ -66,11 +66,11 @@ SMBIOS_TABLE_TYPE0 mBIOSInfoType0 = {
 0,//  IsaIsSupported:1;
 0,//  McaIsSupported:1;
 0,//  EisaIsSupported   :1;
-0,//  PciIsSupported:1;
+0,//  PciIsSupported:1; /// No PCIe support since 
we hide ECAM from the OS
 0,//  PcmciaIsSupported :1;
 0,//  PlugAndPlayIsSupported:1;
 0,//  ApmIsSupported:1;
-0,//  BiosIsUpgradable  :1;
+1,//  BiosIsUpgradable  :1;
 0,//  BiosShadowingAllowed  :1;
 0,//  VlVesaIsSupported :1;
 0,//  EscdSupportIsAvailable:1;
@@ -104,7 +104,7 @@ SMBIOS_TABLE_TYPE0 mBIOSInfoType0 = {
   //  Boot1394IsSupported   :1;
   //  SmartBatteryIsSupported   :1;
   //  BIOSCharacteristicsExtensionBytes[1]
-0x0e, //  BiosBootSpecIsSupported  :1;
+0x0c, //  BiosBootSpecIsSupported  :1;
   //  FunctionKeyNetworkBootIsSupported:1;
   //  TargetContentDistributionEnabled :1;
   //  UefiSpecificationSupported   :1;
@@ -115,6 +115,7 @@ SMBIOS_TABLE_TYPE0 mBIOSInfoType0 = {
   0,   // SystemBiosMinorRelease
   0,   // EmbeddedControllerFirmwareMajorRelease
   0,   // EmbeddedControllerFirmwareMinorRelease
+  { (UINT16) ((FixedPcdGet32 (PcdFdSize) + 

Re: [edk2-devel] [edk2-platform][PATCH v1 2/7] Platforms/RaspberryPi: SMBIOS Type 2 and Type 3 fixes

2020-07-20 Thread Andrei Warkentin
Reviewed-by: Andrei Warkentin 

From: Samer El-Haj-Mahmoud 
Sent: Monday, July 20, 2020 1:16 PM
To: devel@edk2.groups.io 
Cc: Leif Lindholm ; Pete Batard ; Andrei 
Warkentin ; Ard Biesheuvel 
Subject: [edk2-platform][PATCH v1 2/7] Platforms/RaspberryPi: SMBIOS Type 2 and 
Type 3 fixes

Various fixes for SMBIOS Types 2 and 3:
 - Add LocationInChassis string to Type 2
 - Update Type 3 NumberofPowerCords to 1
 - Add ChassisHandle refernce to Type2. This requires moving the
   Type 3 population to happen before Type 2

Cc: Leif Lindholm 
Cc: Pete Batard 
Cc: Andrei Warkentin 
Cc: Ard Biesheuvel 
Signed-off-by: Samer El-Haj-Mahmoud 
---
 Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c | 41 

 1 file changed, 24 insertions(+), 17 deletions(-)

diff --git a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c 
b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
index 6eef66f125f8..170f1843f90b 100644
--- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
+++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
@@ -176,7 +176,7 @@ SMBIOS_TABLE_TYPE2 mBoardInfoType2 = {
 0,//  HotSwappable  :1;
 0,//  Reserved  :3;
   },
-  0,// LocationInChassis String
+  6,// LocationInChassis String
   0,// ChassisHandle;
   BaseBoardTypeMotherBoard, // BoardType;
   0,// NumberOfContainedObjectHandles;
@@ -191,6 +191,7 @@ CHAR8 *mBoardInfoType2Strings[] = {
   mSysInfoVersionName,
   mSysInfoSerial,
   mChassisAssetTag,
+  "Internal",
   NULL
 };

@@ -210,7 +211,7 @@ SMBIOS_TABLE_TYPE3 mEnclosureInfoType3 = {
   ChassisSecurityStatusNone,// SecurityStatus;
   { 0, 0, 0, 0 },   // OemDefined[4];
   0,// Height;
-  0,// NumberofPowerCords;
+  1,// NumberofPowerCords;
   0,// ContainedElementCount;
   0,// ContainedElementRecordLength;
   { { 0 } },// ContainedElements[1];
@@ -782,9 +783,22 @@ BoardInfoUpdateSmbiosType2 (
   VOID
   )
 {
-  UINTN  Size;
-  CHAR16 AssetTagVar[ASSET_TAG_STR_STORAGE_SIZE] = L"";
-  EFI_STATUS Status;
+
+  LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER*), 
mBoardInfoType2Strings, NULL);
+}
+
+/***
+SMBIOS data update  TYPE3  Enclosure Information
+/
+VOID
+EnclosureInfoUpdateSmbiosType3 (
+  VOID
+  )
+{
+  UINTN Size;
+  EFI_STATUSStatus;
+  EFI_SMBIOS_HANDLE SmbiosHandle;
+  CHAR16AssetTagVar[ASSET_TAG_STR_STORAGE_SIZE] = L"";

   Size = sizeof(AssetTagVar);
   Status = gRT->GetVariable(L"AssetTag",
@@ -802,18 +816,10 @@ BoardInfoUpdateSmbiosType2 (
   }
   DEBUG ((DEBUG_INFO, "System Asset Tag : %a\n", mChassisAssetTag));

-  LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER*), 
mBoardInfoType2Strings, NULL);
-}
+  LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER*), 
mEnclosureInfoType3Strings, );

-/***
-SMBIOS data update  TYPE3  Enclosure Information
-/
-VOID
-EnclosureInfoUpdateSmbiosType3 (
-  VOID
-  )
-{
-  LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER*), 
mEnclosureInfoType3Strings, NULL);
+  // Set Type2 ChassisHandle to point to the newly added Type3 handle
+  mBoardInfoType2.ChassisHandle = (UINT16) SmbiosHandle;
 }

 /***
@@ -982,9 +988,10 @@ PlatformSmbiosDriverEntryPoint (

   SysInfoUpdateSmbiosType1 ();

+  EnclosureInfoUpdateSmbiosType3 (); // Add Type 3 first to get chassis handle 
for use in Type 2
+
   BoardInfoUpdateSmbiosType2 ();

-  EnclosureInfoUpdateSmbiosType3 ();

   ProcessorInfoUpdateSmbiosType4 (4);   //One example for creating and updating

--
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62866): https://edk2.groups.io/g/devel/message/62866
Mute This Topic: https://groups.io/mt/75687845/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platform][PATCH v1 1/7] Platforms/RaspberryPi: Fix NULL AssetTag in SMBIOS

2020-07-20 Thread Andrei Warkentin
Reviewed-by: Andrei Warkentin 

From: Samer El-Haj-Mahmoud 
Sent: Monday, July 20, 2020 1:16 PM
To: devel@edk2.groups.io 
Cc: Leif Lindholm ; Pete Batard ; Andrei 
Warkentin ; Ard Biesheuvel 
Subject: [edk2-platform][PATCH v1 1/7] Platforms/RaspberryPi: Fix NULL AssetTag 
in SMBIOS

Commit 6d4fed696d004a6aeb795369aa38d4ce1d39f308 added support for
reporting AssetTag in RPi SMBIOS Types 2 and 3. The default
AssetTag is an empty string. SMBIOS does not allow empty strings to be
referenced from the corresponding string field. This caused breakage in
parsing SMBIOS Types 2 and 3 fields that follow the AssetTag field.

The issue caused an FWTS test failure, as reported in:
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpftf%2FRPi4%2Fissues%2F75data=02%7C01%7Cawarkentin%40vmware.com%7C0eeb8c53c3b64e1e2fd008d82cd915f3%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C1%7C637308658172692193sdata=QPQN3zqWXN4JSJqMK9kN5Ntx%2BFXVZ0Hn1PI1RXxWBt8%3Dreserved=0

The fix is to detect if no AssetTag is set in the UEFI variable, and if
so, change the AssetTag SMBIOS field to an empty blank space.

Cc: Leif Lindholm 
Cc: Pete Batard 
Cc: Andrei Warkentin 
Cc: Ard Biesheuvel 
Signed-off-by: Samer El-Haj-Mahmoud 
---
 Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c 
b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
index d5fb843d43ce..6eef66f125f8 100644
--- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
+++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
@@ -793,7 +793,13 @@ BoardInfoUpdateSmbiosType2 (
   if (EFI_ERROR (Status)) {
 DEBUG ((DEBUG_ERROR, "Failed to get Asset Tag: %r\n", Status));
   }
-  UnicodeStrToAsciiStrS(AssetTagVar, mChassisAssetTag, 
sizeof(mChassisAssetTag));
+
+  if (AssetTagVar[0] == L'\0') {
+// SMBIOS referenced strings cannot be NULL. If no AssetTag is set, 
default to a blank space.
+UnicodeStrToAsciiStrS(L" ", mChassisAssetTag, sizeof(mChassisAssetTag));
+  } else {
+UnicodeStrToAsciiStrS(AssetTagVar, mChassisAssetTag, 
sizeof(mChassisAssetTag));
+  }
   DEBUG ((DEBUG_INFO, "System Asset Tag : %a\n", mChassisAssetTag));

   LogSmbiosData ((EFI_SMBIOS_TABLE_HEADER*), 
mBoardInfoType2Strings, NULL);
--
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62865): https://edk2.groups.io/g/devel/message/62865
Mute This Topic: https://groups.io/mt/75687844/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] File in the build question. I'm working on a smart git grep

2020-07-20 Thread Laszlo Ersek
On 07/18/20 22:23, Andrew Fish wrote:
> Wanted to see if people are OK with adding BaseTools/Scripts/ to the path 
> when you run `. edksetuip.sh` or edksetup.bat?
> 
> If we do that and I add BaseTools/Scripts/git-pgrep then it will show up as 
> an extended git command. 
> 
> I was thinking over time we could add git-edk2* git commands to help automate 
> the process or maintainer workflow. 
> 
> If people are OK with adding the path I can make a patch set to contribute 
> git-pgrep, but I need some help with how to add the new path to edksetup.bat. 

To be honest, I think edksetup.sh should add BaseTools/Scripts/ to the
PATH environment variable anyway. I find it a bit awkward to run

  python BaseTools/Scripts/GetMaintainer.py -l ...

rather than just

  GetMaintainer.py -l ...

Thanks
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62864): https://edk2.groups.io/g/devel/message/62864
Mute This Topic: https://groups.io/mt/75533926/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] ShellPkg: smbiosview - Change some type 17 field values format

2020-07-20 Thread Samer El-Haj-Mahmoud
Change how some SMBIOS TYpe 17 field values are printed:

 - TotalWidth, DataWidth, ConfiguredMemoryClockSpeed: Print as
   hex values instead of decimal, since there are some special meanings
   for certain values (e.g. 0x)
 - VolatileSize, NonVolatileSize, CacheSize, and LogicalSize: Print
   as "0x%lx" instead of "0x%x" to prevent truncating output when
   printing these QWORD fields.

Cc: Ray Ni 
Cc: Zhichao Gao 
Cc: Sami Mujawar 
Signed-off-by: Samer El-Haj-Mahmoud 
---
 ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c | 14 
+++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
index 1ea7b84bd0fa..7517465ddd49 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c
@@ -746,8 +746,8 @@ SmbiosPrintStructure (
   case 17:
 PRINT_STRUCT_VALUE_H (Struct, Type17, MemoryArrayHandle);
 PRINT_STRUCT_VALUE_H (Struct, Type17, MemoryErrorInformationHandle);
-PRINT_STRUCT_VALUE (Struct, Type17, TotalWidth);
-PRINT_STRUCT_VALUE (Struct, Type17, DataWidth);
+PRINT_STRUCT_VALUE_H (Struct, Type17, TotalWidth);
+PRINT_STRUCT_VALUE_H (Struct, Type17, DataWidth);
 PRINT_STRUCT_VALUE (Struct, Type17, Size);
 DisplayMemoryDeviceFormFactor (Struct->Type17->FormFactor, Option);
 PRINT_STRUCT_VALUE_H (Struct, Type17, DeviceSet);
@@ -765,7 +765,7 @@ SmbiosPrintStructure (
 }
 if (AE_SMBIOS_VERSION (0x2, 0x7) && (Struct->Hdr->Length > 0x1C)) {
   PRINT_STRUCT_VALUE (Struct, Type17, ExtendedSize);
-  PRINT_STRUCT_VALUE (Struct, Type17, ConfiguredMemoryClockSpeed);
+  PRINT_STRUCT_VALUE_H (Struct, Type17, ConfiguredMemoryClockSpeed);
 }
 if (AE_SMBIOS_VERSION (0x2, 0x8) && (Struct->Hdr->Length > 0x22)) {
   PRINT_STRUCT_VALUE (Struct, Type17, MinimumVoltage);
@@ -783,16 +783,16 @@ SmbiosPrintStructure (
 PRINT_STRUCT_VALUE_H (Struct, Type17, 
MemorySubsystemControllerProductID);
   }
   if (Struct->Hdr->Length > 0x34) {
-PRINT_STRUCT_VALUE_H (Struct, Type17, NonVolatileSize);
+PRINT_STRUCT_VALUE_LH (Struct, Type17, NonVolatileSize);
   }
   if (Struct->Hdr->Length > 0x3C) {
-PRINT_STRUCT_VALUE_H (Struct, Type17, VolatileSize);
+PRINT_STRUCT_VALUE_LH (Struct, Type17, VolatileSize);
   }
   if (Struct->Hdr->Length > 0x44) {
-PRINT_STRUCT_VALUE_H (Struct, Type17, CacheSize);
+PRINT_STRUCT_VALUE_LH (Struct, Type17, CacheSize);
   }
   if (Struct->Hdr->Length > 0x4C) {
-PRINT_STRUCT_VALUE_H (Struct, Type17, LogicalSize);
+PRINT_STRUCT_VALUE_LH (Struct, Type17, LogicalSize);
   }
 }
 break;
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62863): https://edk2.groups.io/g/devel/message/62863
Mute This Topic: https://groups.io/mt/75689584/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platform][PATCH v1 7/7] Platforms/RaspberryPi: SMBIOS minor cleanup

2020-07-20 Thread Samer El-Haj-Mahmoud
Minor code cleanup:
 - Update file header to list SBBR required/recommended tables
 - Rename DataSmbiosHande to DataSmbiosHandle
 - Remove SMBIOS_HANDLE_PI_RESERVED from Type 11 template for
   consistency. This is already done in LogSmbiosData().

Cc: Leif Lindholm 
Cc: Pete Batard 
Cc: Andrei Warkentin 
Cc: Ard Biesheuvel 
Signed-off-by: Samer El-Haj-Mahmoud 
---
 Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c | 43 

 1 file changed, 25 insertions(+), 18 deletions(-)

diff --git a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c 
b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
index d382797602ce..d955291c5bb7 100644
--- a/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
+++ b/Platform/RaspberryPi/Drivers/PlatformSmbiosDxe/PlatformSmbiosDxe.c
@@ -1,20 +1,27 @@
 /** @file
  *
- *  Static SMBIOS Table for ARM platform
+ *  Static SMBIOS Table for the RaspberryPi platform
  *  Derived from EmulatorPkg package
  *
- *  Note SMBIOS 2.7.1 Required structures:
- *  BIOS Information (Type 0)
- *  System Information (Type 1)
- *  Board Information (Type 2)
- *  System Enclosure (Type 3)
- *  Processor Information (Type 4) - CPU Driver
- *  Cache Information (Type 7) - For cache that is external to processor
- *  System Slots (Type 9) - If system has slots
- *  Physical Memory Array (Type 16)
- *  Memory Device (Type 17) - For each socketed system-memory Device
- *  Memory Array Mapped Address (Type 19) - One per contiguous block per 
Physical Memroy Array
- *  System Boot Information (Type 32)
+ *  Note - Arm SBBR ver 1.2 required and recommended SMBIOS structures:
+ *BIOS Information (Type 0)
+ *System Information (Type 1)
+ *Board Information (Type 2) - Recommended
+ *System Enclosure (Type 3)
+ *Processor Information (Type 4) - CPU Driver
+ *Cache Information (Type 7) - For cache that is external to processor
+ *Port Information (Type 8) - Recommended for platforms with physical ports
+ *System Slots (Type 9) - If system has slots
+ *OEM Strings (Type 11) - Recommended
+ *BIOS Language Information (Type 13) - Recommended
+ *System Event Log (Type 15) - Recommended (does not exit on RPi)
+ *Physical Memory Array (Type 16)
+ *Memory Device (Type 17) - For each socketed system-memory Device
+ *Memory Array Mapped Address (Type 19) - One per contiguous block per 
Physical Memroy Array
+ *System Boot Information (Type 32)
+ *IPMI Device Information (Type 38) - Required for platforms with IPMIv1.0 
BMC Host Interface (not applicable to RPi)
+ *Onboard Devices Extended Information (Type 41) - Recommended
+ *Redfish Host Interface (Type 42) - Required for platforms supporting 
Redfish Host Interface (not applicable to RPi)
  *
  *  Copyright (c) 2017-2018, Andrey Warkentin 
  *  Copyright (c) 2013, Linaro.org
@@ -480,7 +487,7 @@ CHAR8 *mSysSlotInfoType9Strings[] = {
 /
 
 SMBIOS_TABLE_TYPE11 mOemStringsType11 = {
-  { EFI_SMBIOS_TYPE_OEM_STRINGS, sizeof (SMBIOS_TABLE_TYPE11), 
SMBIOS_HANDLE_PI_RESERVED },
+  { EFI_SMBIOS_TYPE_OEM_STRINGS, sizeof (SMBIOS_TABLE_TYPE11), 0 },
   1 // StringCount
 };
 CHAR8 *mOemStringsType11Strings[] = {
@@ -641,7 +648,7 @@ CHAR8 *mBootInfoType32Strings[] = {
@param  TemplateFixed SMBIOS structure, required.
@param  StringPack  Array of strings to convert to an SMBIOS string pack.
NULL is OK.
-   @param  DataSmbiosHande  The new SMBIOS record handle .
+   @param  DataSmbiosHandle  The new SMBIOS record handle.
NULL is OK.
 **/
 
@@ -650,7 +657,7 @@ EFIAPI
 LogSmbiosData (
   IN  EFI_SMBIOS_TABLE_HEADER *Template,
   IN  CHAR8   **StringPack,
-  OUT EFI_SMBIOS_HANDLE   *DataSmbiosHande
+  OUT EFI_SMBIOS_HANDLE   *DataSmbiosHandle
   )
 {
   EFI_STATUSStatus;
@@ -716,8 +723,8 @@ LogSmbiosData (
  Record
);
 
-  if ((Status == EFI_SUCCESS) && (DataSmbiosHande != NULL)) {
-*DataSmbiosHande = SmbiosHandle;
+  if ((Status == EFI_SUCCESS) && (DataSmbiosHandle != NULL)) {
+*DataSmbiosHandle = SmbiosHandle;
   }
 
   ASSERT_EFI_ERROR (Status);
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62862): https://edk2.groups.io/g/devel/message/62862
Mute This Topic: https://groups.io/mt/75687850/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



  1   2   >