[edk2-devel] [PATCH v8] IntelFsp2Pkg: Support Multi-Phase SiInit and debug handlers.

2020-05-13 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2698

To enhance FSP silicon initialization flexibility an optional
Multi-Phase API is introduced and FSP header needs update for
new API offset. Also new SecCore module created for
FspMultiPhaseSiInit API

New ARCH_UPD introduced for enhancing FSP debug message
flexibility now bootloader can pass its own debug handler
function pointer and FSP will call the function to handle
debug message.
To support calling bootloader functions, a FspGlobalData field
added to indicate if FSP needs to switch stack when FSP running
on separate stack from bootloader.

Cc: Maurice Ma 
Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---

V8: 
Add OnSeparateStack FspGlobalData field to indicate if
FSP running on bootloader stack or not. When FSP calling
bootloader functions switching stack is necessary when FSP
running on separate stack.

 IntelFsp2Pkg/FspSecCore/SecFsp.c   |  12 
+++-
 IntelFsp2Pkg/FspSecCore/SecFspApiChk.c |   6 +++---
 IntelFsp2Pkg/FspSecCore/SecMain.c  |  10 
+-
 IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c |  19 
++-
 IntelFsp2Pkg/FspSecCore/Fsp22SecCoreS.inf  |  52 

 IntelFsp2Pkg/FspSecCore/Ia32/Fsp22ApiEntryS.nasm   |  99 
+++
 IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryCommon.nasm|   5 -
 IntelFsp2Pkg/Include/FspEas/FspApi.h   | 130 
+++---
 IntelFsp2Pkg/Include/FspGlobalData.h   |  11 
---
 IntelFsp2Pkg/Include/Guid/FspHeaderFile.h  |  10 
--
 IntelFsp2Pkg/Include/Library/FspSecPlatformLib.h   |  16 
+++-
 11 files changed, 354 insertions(+), 16 deletions(-)

diff --git a/IntelFsp2Pkg/FspSecCore/SecFsp.c b/IntelFsp2Pkg/FspSecCore/SecFsp.c
index 446d1730e9..216f7bb6c5 100644
--- a/IntelFsp2Pkg/FspSecCore/SecFsp.c
+++ b/IntelFsp2Pkg/FspSecCore/SecFsp.c
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
+  Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -161,6 +161,16 @@ FspGlobalDataInit (
   SetFspSiliconInitUpdDataPointer (NULL);
 
   //
+  // Initialize OnSeparateStack value.
+  //
+  if (PcdGet8 (PcdFspHeapSizePercentage) != 0) {
+//
+// FSP is running on its own stack and may need switching stack when 
calling bootloader functions.
+//
+GetFspGlobalDataPointer ()->OnSeparateStack = 1;
+  }
+
+  //
   // Initialize serial port
   // It might have been done in ProcessLibraryConstructorList(), however,
   // the FSP global data is not initialized at that time. So do it again
diff --git a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c 
b/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c
index 8e0595fe9a..1334959005 100644
--- a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c
+++ b/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -59,7 +59,7 @@ FspApiCallingCheck (
 Status = EFI_UNSUPPORTED;
   }
 }
-  } else if (ApiIdx == FspSiliconInitApiIndex) {
+  } else if ((ApiIdx == FspSiliconInitApiIndex) || (ApiIdx == 
FspMultiPhaseSiInitApiIndex)) {
 //
 // FspSiliconInit check
 //
@@ -68,7 +68,7 @@ FspApiCallingCheck (
 } else {
   if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
 Status = EFI_UNSUPPORTED;
-  } else if (EFI_ERROR (FspUpdSignatureCheck (ApiIdx, ApiParam))) {
+  } else if (EFI_ERROR (FspUpdSignatureCheck (FspSiliconInitApiIndex, 
ApiParam))) {
 Status = EFI_INVALID_PARAMETER;
   }
 }
diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.c 
b/IntelFsp2Pkg/FspSecCore/SecMain.c
index 7169afc6c7..300f93ebab 100644
--- a/IntelFsp2Pkg/FspSecCore/SecMain.c
+++ b/IntelFsp2Pkg/FspSecCore/SecMain.c
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
+  Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -221,6 +221,14 @@ SecTemporaryRamSupport (
   UINTN CurrentStack;
   UINTN FspStackBase;
 
+  //
+  // Override OnSeparateStack to 1 because this function will switch stack to 
permanent memory which
+  // makes FSP running on different stack from bootloader temp ram stack.
+  // Usually OnSeparateStack can be reset when 

Re: [edk2-devel] [PATCH] IntelSiliconPkg/Include/Library:Add ConfigBlockLib.h

2020-03-16 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Chen, TinaX Y 
> Sent: Monday, March 16, 2020 10:41 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Chaganty, Rangasai V
> ; Chiu, Chasel ;
> Tsao, Ethan 
> Subject: [PATCH] IntelSiliconPkg/Include/Library:Add ConfigBlockLib.h
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2318
> 
> Change reference path of ConfigBlockLib to IntelSiliconPkg for Coffeelake.
> 
> Change-Id: I433e0a7a00c0cc15a0986050c203c7ca8aef02a2
> Signed-off-by: TinaX Y Chen 
> cc: Ray Ni 
> cc: Rangasai V Chaganty 
> cc: Chasel Chiu 
> cc: Ethan Tsao 
> ---
>  Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> b/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> index 37c77d8f..2f25bdb3 100644
> --- a/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> +++ b/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> @@ -1,7 +1,7 @@
>  ## @file
>  #  Component description file for the Coffee Lake silicon package DSC file.
>  #
> -# Copyright (c) 2019 Intel Corporation. All rights reserved. 
> +# Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.
> +
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -147,7 +147,7 @@
> gUefiCpuPkgTokenSpaceGuid.PcdCpuApTargetCstate|0
>  # Silicon Init Common Library
>  #
>  !include $(PLATFORM_SI_PACKAGE)/SiPkgCommonLib.dsc
> -ConfigBlockLib|ClientSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBl
> -ConfigBlockLib|ockLib.inf
> +ConfigBlockLib|IntelSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBlo
> +ConfigBlockLib|ckLib.inf
> 
> PchTraceHubInitLib|ClientSiliconPkg/Library/BasePchTraceHubInitLib/BasePch
> TraceHubInitLib.inf
> 
>  [LibraryClasses.IA32]
> --
> 2.16.2.windows.1


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

View/Reply Online (#55905): https://edk2.groups.io/g/devel/message/55905
Mute This Topic: https://groups.io/mt/72001271/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] CoffeelakeSiliconPkg:Redirect ConfigBlockLib path

2020-03-17 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of TinaX Y
> Chen
> Sent: Tuesday, March 17, 2020 11:02 AM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Chaganty, Rangasai V
> ; Chiu, Chasel ;
> Tsao, Ethan 
> Subject: [edk2-devel] [edk2-platforms:PATCH] CoffeelakeSiliconPkg:Redirect
> ConfigBlockLib path
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2318
> 
> Change reference path of ConfigBlockLib to IntelSiliconPkg for Coffeelake.
> 
> Signed-off-by: TinaX Y Chen 
> cc: Ray Ni 
> cc: Rangasai V Chaganty 
> cc: Chasel Chiu 
> cc: Ethan Tsao 
> ---
>  Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> b/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> index 37c77d8f..2f25bdb3 100644
> --- a/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> +++ b/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> @@ -1,7 +1,7 @@
>  ## @file
>  #  Component description file for the Coffee Lake silicon package DSC file.
>  #
> -# Copyright (c) 2019 Intel Corporation. All rights reserved. 
> +# Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.
> +
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -147,7 +147,7 @@
> gUefiCpuPkgTokenSpaceGuid.PcdCpuApTargetCstate|0
>  # Silicon Init Common Library
>  #
>  !include $(PLATFORM_SI_PACKAGE)/SiPkgCommonLib.dsc
> -ConfigBlockLib|ClientSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBl
> -ConfigBlockLib|ockLib.inf
> +ConfigBlockLib|IntelSiliconPkg/Library/BaseConfigBlockLib/BaseConfigBlo
> +ConfigBlockLib|ckLib.inf
> 
> PchTraceHubInitLib|ClientSiliconPkg/Library/BasePchTraceHubInitLib/BasePch
> TraceHubInitLib.inf
> 
>  [LibraryClasses.IA32]
> --
> 2.16.2.windows.1
> 
> 
> 


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

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



Re: [edk2-devel] [PATCH] IntelSiliconPkg/Include/Library:Add ConfigBlockLib.h

2020-03-16 Thread Chiu, Chasel


Sorry Tina, the commit message and code review subject format were wrong, 
please refer to other edk2-platform patches and re-send again.

Thanks,
Chasel


> -Original Message-
> From: Chiu, Chasel
> Sent: Tuesday, March 17, 2020 8:08 AM
> To: Chen, TinaX Y ; devel@edk2.groups.io
> Cc: Ni, Ray ; Chaganty, Rangasai V
> ; Tsao, Ethan 
> Subject: RE: [PATCH] IntelSiliconPkg/Include/Library:Add ConfigBlockLib.h
> 
> 
> Reviewed-by: Chasel Chiu 
> 
> > -Original Message-
> > From: Chen, TinaX Y 
> > Sent: Monday, March 16, 2020 10:41 PM
> > To: devel@edk2.groups.io
> > Cc: Ni, Ray ; Chaganty, Rangasai V
> > ; Chiu, Chasel ;
> > Tsao, Ethan 
> > Subject: [PATCH] IntelSiliconPkg/Include/Library:Add ConfigBlockLib.h
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2318
> >
> > Change reference path of ConfigBlockLib to IntelSiliconPkg for Coffeelake.
> >
> > Change-Id: I433e0a7a00c0cc15a0986050c203c7ca8aef02a2
> > Signed-off-by: TinaX Y Chen 
> > cc: Ray Ni 
> > cc: Rangasai V Chaganty 
> > cc: Chasel Chiu 
> > cc: Ethan Tsao 
> > ---
> >  Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git
> > a/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> > b/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> > index 37c77d8f..2f25bdb3 100644
> > --- a/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> > +++ b/Silicon/Intel/CoffeelakeSiliconPkg/CoffeelakeSiliconPkg.dsc
> > @@ -1,7 +1,7 @@
> >  ## @file
> >  #  Component description file for the Coffee Lake silicon package DSC
> file.
> >  #
> > -# Copyright (c) 2019 Intel Corporation. All rights reserved. 
> > +# Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.
> > +
> >  #
> >  # SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -147,7 +147,7 @@
> > gUefiCpuPkgTokenSpaceGuid.PcdCpuApTargetCstate|0
> >  # Silicon Init Common Library
> >  #
> >  !include $(PLATFORM_SI_PACKAGE)/SiPkgCommonLib.dsc
> > -ConfigBlockLib|ClientSiliconPkg/Library/BaseConfigBlockLib/BaseConfig
> > -ConfigBlockLib|Bl
> > -ConfigBlockLib|ockLib.inf
> > +ConfigBlockLib|IntelSiliconPkg/Library/BaseConfigBlockLib/BaseConfigB
> > +ConfigBlockLib|lo
> > +ConfigBlockLib|ckLib.inf
> >
> > PchTraceHubInitLib|ClientSiliconPkg/Library/BasePchTraceHubInitLib/Bas
> > PchTraceHubInitLib|ePch
> > TraceHubInitLib.inf
> >
> >  [LibraryClasses.IA32]
> > --
> > 2.16.2.windows.1


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

View/Reply Online (#55906): https://edk2.groups.io/g/devel/message/55906
Mute This Topic: https://groups.io/mt/72001271/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 v4] IntelFsp2Pkg: Support Multi-Phase SiInit and debug handlers.

2020-05-07 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2698

To enhance FSP silicon initialization flexibility an optional
Multi-Phase API is introduced and FSP header needs update for
new API offset. Also new SecCore module created for
FspMultiPhaseSiInit API

New ARCH_UPD introduced for enhancing FSP debug message
flexibility now bootloader can pass its own debug handler
function pointer and FSP will call the function to handle
debug message.

Cc: Maurice Ma 
Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---
 IntelFsp2Pkg/FspSecCore/SecFspApiChk.c |   6 +++---
 IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c |  19 
++-
 IntelFsp2Pkg/FspSecCore/FspSecCoreSS.inf   |  48 

 IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryCommon.nasm|   5 -
 IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntrySS.nasm|  68 

 IntelFsp2Pkg/Include/FspEas/FspApi.h   | 124 
++--
 IntelFsp2Pkg/Include/FspGlobalData.h   |   3 ++-
 IntelFsp2Pkg/Include/Guid/FspHeaderFile.h  |  10 
--
 IntelFsp2Pkg/Include/Library/FspSecPlatformLib.h   |  16 
+++-
 9 files changed, 288 insertions(+), 11 deletions(-)

diff --git a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c 
b/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c
index 8e0595fe9a..1334959005 100644
--- a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c
+++ b/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -59,7 +59,7 @@ FspApiCallingCheck (
 Status = EFI_UNSUPPORTED;
   }
 }
-  } else if (ApiIdx == FspSiliconInitApiIndex) {
+  } else if ((ApiIdx == FspSiliconInitApiIndex) || (ApiIdx == 
FspMultiPhaseSiInitApiIndex)) {
 //
 // FspSiliconInit check
 //
@@ -68,7 +68,7 @@ FspApiCallingCheck (
 } else {
   if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
 Status = EFI_UNSUPPORTED;
-  } else if (EFI_ERROR (FspUpdSignatureCheck (ApiIdx, ApiParam))) {
+  } else if (EFI_ERROR (FspUpdSignatureCheck (FspSiliconInitApiIndex, 
ApiParam))) {
 Status = EFI_INVALID_PARAMETER;
   }
 }
diff --git a/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c 
b/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c
index f7945b5240..df8c5d121f 100644
--- a/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c
+++ b/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c
@@ -1,7 +1,7 @@
 /** @file
   Null instance of Platform Sec Lib.
 
-  Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
+  Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -25,3 +25,20 @@ FspUpdSignatureCheck (
 {
   return EFI_SUCCESS;
 }
+
+/**
+  This function handles FspMultiPhaseSiInitApi.
+
+  @param[in]  ApiIdx   Internal index of the FSP API.
+  @param[in]  ApiParam Parameter of the FSP API.
+
+**/
+EFI_STATUS
+EFIAPI
+FspMultiPhaseSiInitApiHandler (
+  IN UINT32   ApiIdx,
+  IN VOID *ApiParam
+  )
+{
+  return EFI_SUCCESS;
+}
diff --git a/IntelFsp2Pkg/FspSecCore/FspSecCoreSS.inf 
b/IntelFsp2Pkg/FspSecCore/FspSecCoreSS.inf
new file mode 100644
index 00..184101c7d3
--- /dev/null
+++ b/IntelFsp2Pkg/FspSecCore/FspSecCoreSS.inf
@@ -0,0 +1,48 @@
+## @file
+#  Sec Core for FSP to support MultiPhase (SeparatePhase) SiInitialization.
+#
+#  Copyright (c) 2020, Intel Corporation. All rights reserved.
+#
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION= 0x00010005
+  BASE_NAME  = FspSecCoreSS
+  FILE_GUID  = DF0FCD70-264A-40BF-BBD4-06C76DB19CB1
+  MODULE_TYPE= SEC
+  VERSION_STRING = 1.0
+
+#
+# The following information is for reference only and not required by the 
build tools.
+#
+#  VALID_ARCHITECTURES   = IA32
+#
+
+[Sources]
+  SecFspApiChk.c
+  SecFsp.h
+
+[Sources.IA32]
+  Ia32/Stack.nasm
+  Ia32/FspApiEntrySS.nasm
+  Ia32/FspApiEntryCommon.nasm
+  Ia32/FspHelper.nasm
+
+[Binaries.Ia32]
+  RAW|Vtf0/Bin/ResetVec.ia32.raw |GCC
+
+[Packages]
+  MdePkg/MdePkg.dec
+  IntelFsp2Pkg/IntelFsp2Pkg.dec
+
+[LibraryClasses]
+  BaseMemoryLib
+  DebugLib
+  BaseLib
+  PciCf8Lib
+  SerialPortLib
+  FspSwitchStackLib
+  FspCommonLib
+  FspSecPlatformLib
diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryCommon.nasm 

Re: [edk2-devel] Patch List for 202005 stable tag

2020-05-20 Thread Chiu, Chasel

Hi Liming,

I would like to include https://edk2.groups.io/g/devel/message/59921 to 202005 
stable tag.
We missed something in previous FSP enhancement commit 
(https://edk2.groups.io/g/devel/message/59438) and this patch fixed the bug.

Thanks,
Chasel


From: devel@edk2.groups.io  On Behalf Of Maciej Rabeda
Sent: Wednesday, May 20, 2020 5:47 PM
To: devel@edk2.groups.io; Gao, Liming ; Leif Lindholm 
; Laszlo Ersek ; Kinney, Michael D 
; af...@apple.com
Subject: Re: [edk2-devel] Patch List for 202005 stable tag

Hi Liming,

I would like to pull this in.
https://edk2.groups.io/g/devel/message/59947

Thanks,
Maciej
On 19-May-20 13:09, Liming Gao wrote:
Hi Stewards and all:
  I collect current patch lists in devel mail list. Those patch contributors 
request to add them for 200205 stable tag. Because we have enter into Soft 
Feature Freeze, I want to collect your feedback for them. If any patches are 
missing, please reply this mail to add them.

Feature List (pass review):
https://edk2.groups.io/g/devel/message/59578 [PATCH V7 0/1] Disable safe string 
constraint assertions
https://edk2.groups.io/g/devel/message/59589 [PATCH V7 0/6] Add definitions 
introduced in UEFI 2.8a

Bug List (pass review):
https://edk2.groups.io/g/devel/message/59735 [PATCH v3] SecurityPkg: Change 
default value source

Thanks
Liming





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

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



Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData.

2020-05-20 Thread Chiu, Chasel


Change pushed: 3f89db869028fa65a37756fd7f391cbd69f4579c

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Chiu,
> Chasel
> Sent: Wednesday, May 20, 2020 11:34 AM
> To: devel@edk2.groups.io
> Cc: Ma, Maurice ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [edk2-devel] [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to
> FspGlobalData.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2726
> 
> When FSP switching stack and calling bootloader functions, the function
> parameter in stack may not be accessible easily.
> We can store the function parameter pointer to FspGlobalData and retrieve
> it after stack switched.
> 
> Also need to add Loader2PeiSwitchStack () to header file as public function
> for platform FSP code to consume.
> 
> Cc: Maurice Ma 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Signed-off-by: Chasel Chiu 
> ---
>  IntelFsp2Pkg/Include/FspGlobalData.h | 12 ++--
>  IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h | 18 +-
>  2 files changed, 27 insertions(+), 3 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Include/FspGlobalData.h
> b/IntelFsp2Pkg/Include/FspGlobalData.h
> index 5bde316893..dba9b48e1a 100644
> --- a/IntelFsp2Pkg/Include/FspGlobalData.h
> +++ b/IntelFsp2Pkg/Include/FspGlobalData.h
> @@ -52,12 +52,20 @@ typedef struct  {
> VOID   *MemoryInitUpdPtr;
> VOID   *SiliconInitUpdPtr;
> UINT8  ApiIdx;
> -   UINT8  FspMode; // 0: FSP in API mode; 1: FSP in
> DISPATCH mode
> +   ///
> +   /// 0: FSP in API mode; 1: FSP in DISPATCH mode
> +   ///
> +   UINT8  FspMode;
> UINT8  OnSeparateStack;
> UINT8  Reserved3;
> UINT32 NumberOfPhases;
> UINT32 PhasesExecuted;
> -   UINT8  Reserved4[20];
> +   ///
> +   /// To store function parameters pointer
> +   /// so it can be retrieved after stack switched.
> +   ///
> +   VOID   *FunctionParameterPtr;
> +   UINT8  Reserved4[16];
> UINT32 PerfSig;
> UINT16 PerfLen;
> UINT16 Reserved5;
> diff --git a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> index 0c76e9f022..bed2a5d677 100644
> --- a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> +++ b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> @@ -1,6 +1,6 @@
>  /** @file
> 
> -  Copyright (c) 2014, Intel Corporation. All rights reserved.
> +  Copyright (c) 2014 - 2020, Intel Corporation. All rights
> + reserved.
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -36,4 +36,20 @@ Pei2LoaderSwitchStack (
>VOID
>);
> 
> +/**
> +
> +  This function is equilivant to Pei2LoaderSwitchStack () but just
> + indicates  the stack after switched is FSP stack.
> +
> +  @return ReturnKey  After switching to the saved stack,
> + this value will be saved in eax before
> returning.
> +
> +
> +**/
> +UINT32
> +EFIAPI
> +Loader2PeiSwitchStack (
> +  VOID
> +  );
> +
>  #endif
> --
> 2.13.3.windows.1
> 
> 
> 


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

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



Re: [edk2-devel] [Patch V1 1/1] Maintainers.txt: Update CometlakeOpenBoardPkg maintainer

2020-05-19 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of
> Kathappan Esakkithevar
> Sent: Tuesday, May 12, 2020 11:45 PM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Kethi Reddy, Deepika
> 
> Subject: [edk2-devel] [Patch V1 1/1] Maintainers.txt: Update
> CometlakeOpenBoardPkg maintainer
> 
> Adds Kathappan Esakkithevar as an Intel maintainer.
> 
> Signed-off-by: Kathappan Esakkithevar 
> Cc: Sai Chaganty 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Deepika Kethi Reddy 
> ---
>  Maintainers.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt index 0e50b6fdf3..b00b69d979
> 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -180,8 +180,8 @@ F: Platform/Intel/CometlakeOpenBoardPkg/
>  M: Chasel Chiu 
>  M: Nate DeSimone 
>  M: Rangasai V Chaganty 
> +M: Kathappan Esakkithevar 
>  R: Deepika Kethi Reddy 
> -R: Kathappan Esakkithevar 
> 
>  Platform/Intel/SimicsOpenBoardPkg
>  F: Platform/Intel/SimicsOpenBoardPkg/
> --
> 2.16.2.windows.1
> 
> 
> 


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

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



[edk2-devel] [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData.

2020-05-19 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2726

When FSP switching stack and calling bootloader functions,
the function parameter in stack may not be accessible easily.
We can store the function parameter pointer to FspGlobalData
and retrieve it after stack switched.

Also need to add Loader2PeiSwitchStack () to header file
as public function for platform FSP code to consume.

Cc: Maurice Ma 
Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---
 IntelFsp2Pkg/Include/FspGlobalData.h | 12 ++--
 IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h | 18 +-
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/IntelFsp2Pkg/Include/FspGlobalData.h 
b/IntelFsp2Pkg/Include/FspGlobalData.h
index 5bde316893..dba9b48e1a 100644
--- a/IntelFsp2Pkg/Include/FspGlobalData.h
+++ b/IntelFsp2Pkg/Include/FspGlobalData.h
@@ -52,12 +52,20 @@ typedef struct  {
VOID   *MemoryInitUpdPtr;
VOID   *SiliconInitUpdPtr;
UINT8  ApiIdx;
-   UINT8  FspMode; // 0: FSP in API mode; 1: FSP in DISPATCH mode
+   ///
+   /// 0: FSP in API mode; 1: FSP in DISPATCH mode
+   ///
+   UINT8  FspMode;
UINT8  OnSeparateStack;
UINT8  Reserved3;
UINT32 NumberOfPhases;
UINT32 PhasesExecuted;
-   UINT8  Reserved4[20];
+   ///
+   /// To store function parameters pointer
+   /// so it can be retrieved after stack switched.
+   ///
+   VOID   *FunctionParameterPtr;
+   UINT8  Reserved4[16];
UINT32 PerfSig;
UINT16 PerfLen;
UINT16 Reserved5;
diff --git a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h 
b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
index 0c76e9f022..bed2a5d677 100644
--- a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
+++ b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
@@ -1,6 +1,6 @@
 /** @file
 
-  Copyright (c) 2014, Intel Corporation. All rights reserved.
+  Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -36,4 +36,20 @@ Pei2LoaderSwitchStack (
   VOID
   );
 
+/**
+
+  This function is equilivant to Pei2LoaderSwitchStack () but just indicates
+  the stack after switched is FSP stack.
+
+  @return ReturnKey  After switching to the saved stack,
+ this value will be saved in eax before returning.
+
+
+**/
+UINT32
+EFIAPI
+Loader2PeiSwitchStack (
+  VOID
+  );
+
 #endif
-- 
2.13.3.windows.1


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

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



Re: [edk2-devel] [edk2-non-osi] [PATCH V1 0/2] Add CometlakeSiliconBinPkg

2020-09-02 Thread Chiu, Chasel


For this series, Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Wednesday, September 2, 2020 3:11 PM
> To: devel@edk2.groups.io
> Cc: Esakkithevar, Kathappan ; Chaganty,
> Rangasai V ; Chiu, Chasel
> 
> Subject: [edk2-non-osi] [PATCH V1 0/2] Add CometlakeSiliconBinPkg
> 
> Adds binary package for Comet Lake.
> 
> Cc: Kathappan Esakkithevar 
> Cc: Sai Chaganty 
> Cc: Chasel Chiu 
> Signed-off-by: Nate DeSimone 
> 
> Nate DeSimone (2):
>   CometlakeSiliconBinPkg: Add package contents
>   edk2-non-osi: Add CometlakeSiliconBinPkg maintainers
> 
>  Maintainers.txt   |   4 ++
>  .../CnlPchLpChipsetInitTable_Dx.bin   | Bin 0 -> 4620 bytes
>  .../Intel/CometlakeSiliconBinPkg/License.txt  |  30 ++
>  .../Microcode/IntelMicrocodeLicense.txt   |  37
> ++
>  .../Microcode/MicrocodeUpdates.inf|  18 +
>  .../Microcode/m94806EC_00D6.mcb   | Bin 0 -> 103424
> bytes
>  6 files changed, 89 insertions(+)
>  create mode 100644
> Silicon/Intel/CometlakeSiliconBinPkg/ChipsetInit/CnlPchLpChipsetInitTable_D
> x.bin
>  create mode 100644 Silicon/Intel/CometlakeSiliconBinPkg/License.txt
>  create mode 100644
> Silicon/Intel/CometlakeSiliconBinPkg/Microcode/IntelMicrocodeLicense.txt
>  create mode 100644
> Silicon/Intel/CometlakeSiliconBinPkg/Microcode/MicrocodeUpdates.inf
>  create mode 100644
> Silicon/Intel/CometlakeSiliconBinPkg/Microcode/m94806EC_00D6.mcb
> 
> --
> 2.27.0.windows.1


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

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



Re: [edk2-devel] [edk2-platforms] [PATCH V1] CometlakeOpenBoardPkg: Add usage of CometlakeSiliconBinPkg

2020-09-02 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Wednesday, September 2, 2020 3:15 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Chaganty, Rangasai V
> ; Kethi Reddy, Deepika
> ; Esakkithevar, Kathappan
> 
> Subject: [edk2-platforms] [PATCH V1] CometlakeOpenBoardPkg: Add usage of
> CometlakeSiliconBinPkg
> 
> Updates CometlakeOpenBoardPkg to use CometlakeSiliconBinPkg instead of
> CoffeelakeSiliconBinPkg.
> 
> Cc: Chasel Chiu 
> Cc: Rangasai V Chaganty 
> Cc: Deepika Kethi Reddy 
> Cc: Kathappan Esakkithevar 
> Signed-off-by: Nate DeSimone 
> ---
>  .../CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc | 5
> +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> sc
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> sc
> index 2d9dcb139f..6de834565a 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> sc
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> s
> +++ c
> @@ -10,7 +10,7 @@
>  [Defines]
>DEFINE  PLATFORM_PACKAGE  = MinPlatformPkg
>DEFINE  PLATFORM_SI_PACKAGE   = CoffeelakeSiliconPkg
> -  DEFINE  PLATFORM_SI_BIN_PACKAGE   = CoffeelakeSiliconBinPkg
> +  DEFINE  PLATFORM_SI_BIN_PACKAGE   = CometlakeSiliconBinPkg
>DEFINE  PLATFORM_FSP_BIN_PACKAGE  =
> CometLakeFspBinPkg/CometLake1
>DEFINE  PLATFORM_BOARD_PACKAGE=
> CometlakeOpenBoardPkg
>DEFINE  BOARD = CometlakeURvp
> @@ -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
> 
> --
> 2.27.0.windows.1


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

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



Re: [edk2-devel] [PATCH] IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec: add FspMeasurementLib.h

2020-08-30 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Zhang, Qi1 
> Sent: Monday, August 31, 2020 10:07 AM
> To: devel@edk2.groups.io
> Cc: Zhang, Qi1 ; Chiu, Chasel ;
> Desimone, Nathaniel L ; Liming Gao
> ; Dong, Eric 
> Subject: [PATCH] IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec: add
> FspMeasurementLib.h
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2944
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Qi Zhang 
> ---
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> index 768df1336f..6852bf1271 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> @@ -26,6 +26,8 @@
>##  @libraryclass  Provide FSP platform related function.
> 
>FspWrapperPlatformLib|Include/Library/FspWrapperPlatformLib.h
> 
> 
> 
> +  ##  @libraryclass  Provide FSP TPM measurement related function.
> 
> +  FspMeasurementLib|Include/Library/FspMeasurementLib.h
> 
>  [Guids]
> 
>#
> 
># GUID defined in package
> 
> --
> 2.26.2.windows.1


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

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



[edk2-devel] [PATCH] UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only case.

2020-09-10 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2883

MpServices Ppi can be replaced by MpServices2 Ppi and MpServices2
Ppi is mandatory for RegisterCpuFeaturesLib functionality,
basing on this we can drop MpServices Ppi usage from the library
and the constraint that both Ppis must be installed.

Cc: Eric Dong 
Cc: Ray Ni 
Cc: Laszlo Ersek 
Cc: Rahul Kumar 
Cc: Nate DeSimone 
Signed-off-by: Chasel Chiu 
---
 UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c | 61 
+++--
 UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h   |  6 
+++---
 2 files changed, 26 insertions(+), 41 deletions(-)

diff --git 
a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c 
b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
index 64768f7a74..4e558e9fee 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
@@ -1,7 +1,7 @@
 /** @file
   CPU Register Table Library functions.
 
-  Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
+  Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -11,7 +11,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "RegisterCpuFeatures.h"
@@ -75,10 +74,10 @@ GetMpService (
   MP_SERVICESMpService;
 
   //
-  // Get MP Services Protocol
+  // Get MP Services2 Ppi
   //
   Status = PeiServicesLocatePpi (
- ,
+ ,
  0,
  NULL,
  (VOID **)
@@ -100,17 +99,17 @@ GetProcessorIndex (
   )
 {
   EFI_STATUS Status;
-  EFI_PEI_MP_SERVICES_PPI*CpuMpPpi;
+  EDKII_PEI_MP_SERVICES2_PPI *CpuMp2Ppi;
   UINTN  ProcessorIndex;
 
-  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
 
   //
   // For two reasons which use NULL for WhoAmI:
   // 1. This function will be called by APs and AP should not use PeiServices 
Table
   // 2. Check WhoAmI implementation, this parameter will not be used.
   //
-  Status = CpuMpPpi->WhoAmI(NULL, CpuMpPpi, );
+  Status = CpuMp2Ppi->WhoAmI (CpuMp2Ppi, );
   ASSERT_EFI_ERROR (Status);
   return ProcessorIndex;
 }
@@ -131,16 +130,15 @@ GetProcessorInformation (
   OUT EFI_PROCESSOR_INFORMATION*ProcessorInfoBuffer
   )
 {
-  EFI_PEI_MP_SERVICES_PPI*CpuMpPpi;
+  EDKII_PEI_MP_SERVICES2_PPI *CpuMp2Ppi;
   EFI_STATUS Status;
   CPU_FEATURES_DATA  *CpuFeaturesData;
 
   CpuFeaturesData = GetCpuFeaturesData ();
-  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
 
-  Status = CpuMpPpi->GetProcessorInfo (
-   GetPeiServicesTablePointer(),
-   CpuMpPpi,
+  Status = CpuMp2Ppi->GetProcessorInfo (
+   CpuMp2Ppi,
ProcessorNumber,
ProcessorInfoBuffer
);
@@ -162,18 +160,17 @@ StartupAllAPsWorker (
   )
 {
   EFI_STATUS   Status;
-  EFI_PEI_MP_SERVICES_PPI  *CpuMpPpi;
+  EDKII_PEI_MP_SERVICES2_PPI   *CpuMp2Ppi;
   CPU_FEATURES_DATA*CpuFeaturesData;
 
   CpuFeaturesData = GetCpuFeaturesData ();
-  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
 
   //
   // Wakeup all APs for data collection.
   //
-  Status = CpuMpPpi->StartupAllAPs (
- GetPeiServicesTablePointer (),
- CpuMpPpi,
+  Status = CpuMp2Ppi->StartupAllAPs (
+ CpuMp2Ppi,
  Procedure,
  FALSE,
  0,
@@ -203,17 +200,7 @@ StartupAllCPUsWorker (
   //
   // Get MP Services2 Ppi
   //
-  Status = PeiServicesLocatePpi (
- ,
- 0,
- NULL,
- (VOID **)
- );
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Wakeup all APs for data collection.
-  //
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
   Status = CpuMp2Ppi->StartupAllCPUs (
  CpuMp2Ppi,
  Procedure,
@@ -234,18 +221,17 @@ SwitchNewBsp (
   )
 {
   EFI_STATUS   Status;
-  EFI_PEI_MP_SERVICES_PPI  *CpuMpPpi;
+  EDKII_PEI_MP_SERVICES2_PPI   *CpuMp2Ppi;
   CPU_FEATURES_DATA*CpuFeaturesData;
 
   CpuFeaturesData = GetCpuFeaturesData ();
-  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
 
   //
   // Wakeup all APs for data collection.
   //
-  Status = CpuMpPpi->SwitchBSP (
- GetPeiServicesTablePointer (),
- CpuMpPpi,
+  Status = CpuMp2Ppi->SwitchBSP (
+ CpuMp2Ppi,
  ProcessorNumber,
  TRUE
  );
@@ -269,18 +255,17 @@ GetNumberOfProcessor (
   )
 {
   EFI_STATUS   

Re: [edk2-devel] [PATCH 1/2] IntelFsp2WrapperPkg: remove gPeiTpmInitializationDonePpiGuid from Depex

2020-09-15 Thread Chiu, Chasel

Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Zhang, Qi1 
> Sent: Tuesday, September 15, 2020 2:21 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Qi1 ; Chiu, Chasel ;
> Desimone, Nathaniel L ; Zeng, Star
> ; Yao, Jiewen 
> Subject: [PATCH 1/2] IntelFsp2WrapperPkg: remove
> gPeiTpmInitializationDonePpiGuid from Depex
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2963
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Cc: Jiewen Yao 
> Signed-off-by: Qi Zhang 
> ---
>  IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf | 3 +--
> IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf | 3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> index c3578397b6..00166e56a0 100644
> --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> @@ -73,5 +73,4 @@
>gEfiPeiFirmwareVolumeInfoMeasurementExcludedPpiGuid##
> PRODUCES  [Depex]-  gEfiPeiMasterBootModePpiGuid AND-
> gPeiTpmInitializationDonePpiGuid+  gEfiPeiMasterBootModePpiGuiddiff
> --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> index 884514747f..aeeca58d6d 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> @@ -77,5 +77,4 @@
>FspsWrapperPeim.c  [Depex]-  gEfiPeiMemoryDiscoveredPpiGuid AND-
> gPeiTpmInitializationDonePpiGuid+  gEfiPeiMemoryDiscoveredPpiGuid--
> 2.26.2.windows.1


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

View/Reply Online (#65304): https://edk2.groups.io/g/devel/message/65304
Mute This Topic: https://groups.io/mt/76859554/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] UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only case.

2020-09-14 Thread Chiu, Chasel


Change pushed: 1b461403ee723dab01d5828714cca0b9396a6b3c

Thanks,
Chasel


> -Original Message-
> From: Ni, Ray 
> Sent: Monday, September 14, 2020 11:46 AM
> To: Chiu, Chasel ; devel@edk2.groups.io
> Cc: Chiu, Chasel ; Dong, Eric ;
> Laszlo Ersek ; Kumar, Rahul1
> ; Desimone, Nathaniel L
> 
> Subject: RE: [PATCH v2] UefiCpuPkg/RegisterCpuFeaturesLib: Support
> MpServices2 only case.
> 
> Reviewed-by: Ray Ni 
> 
> > -Original Message-
> > From: Chasel Chiu 
> > Sent: Monday, September 14, 2020 9:48 AM
> > To: devel@edk2.groups.io
> > Cc: Chiu, Chasel ; Dong, Eric
> > ; Ni, Ray ; Laszlo Ersek
> > ; Kumar, Rahul1 ;
> Desimone,
> > Nathaniel L 
> > Subject: [PATCH v2] UefiCpuPkg/RegisterCpuFeaturesLib: Support
> > MpServices2 only case.
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2883
> >
> > MpServices Ppi can be replaced by MpServices2 Ppi and MpServices2 Ppi
> > is mandatory for RegisterCpuFeaturesLib functionality, basing on this
> > we can drop MpServices Ppi usage from the library and the constraint
> > that both Ppis must be installed.
> >
> > Cc: Eric Dong 
> > Cc: Ray Ni 
> > Cc: Laszlo Ersek 
> > Cc: Rahul Kumar 
> > Cc: Nate DeSimone 
> > Signed-off-by: Chasel Chiu 
> > ---
> >  UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
> |
> > 61 +++--
> >
> > UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.in
> > f |  5
> > ++---
> >  UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h
> |  6
> > +++---
> >  3 files changed, 28 insertions(+), 44 deletions(-)
> >
> > diff --git
> > a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.
> > c
> > b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.
> > c
> > index 64768f7a74..4e558e9fee 100644
> > ---
> > a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.
> > c
> > +++
> > b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.
> > c
> > @@ -1,7 +1,7 @@
> >  /** @file
> >CPU Register Table Library functions.
> >
> > -  Copyright (c) 2016 - 2019, Intel Corporation. All rights
> > reserved.
> > +  Copyright (c) 2016 - 2020, Intel Corporation. All rights
> > + reserved.
> >SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >  **/
> > @@ -11,7 +11,6 @@
> >  #include 
> >  #include 
> >  #include 
> > -#include 
> >  #include 
> >
> >  #include "RegisterCpuFeatures.h"
> > @@ -75,10 +74,10 @@ GetMpService (
> >MP_SERVICESMpService;
> >
> >//
> > -  // Get MP Services Protocol
> > +  // Get MP Services2 Ppi
> >//
> >Status = PeiServicesLocatePpi (
> > - ,
> > + ,
> >   0,
> >   NULL,
> >   (VOID **)
> > @@ -100,17 +99,17 @@ GetProcessorIndex (
> >)
> >  {
> >EFI_STATUS Status;
> > -  EFI_PEI_MP_SERVICES_PPI*CpuMpPpi;
> > +  EDKII_PEI_MP_SERVICES2_PPI *CpuMp2Ppi;
> >UINTN  ProcessorIndex;
> >
> > -  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
> > +  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
> >
> >//
> >// For two reasons which use NULL for WhoAmI:
> >// 1. This function will be called by APs and AP should not use
> > PeiServices Table
> >// 2. Check WhoAmI implementation, this parameter will not be used.
> >//
> > -  Status = CpuMpPpi->WhoAmI(NULL, CpuMpPpi, );
> > +  Status = CpuMp2Ppi->WhoAmI (CpuMp2Ppi, );
> >ASSERT_EFI_ERROR (Status);
> >return ProcessorIndex;
> >  }
> > @@ -131,16 +130,15 @@ GetProcessorInformation (
> >OUT EFI_PROCESSOR_INFORMATION*ProcessorInfoBuffer
> >)
> >  {
> > -  EFI_PEI_MP_SERVICES_PPI*CpuMpPpi;
> > +  EDKII_PEI_MP_SERVICES2_PPI *CpuMp2Ppi;
> >EFI_STATUS Status;
> >CPU_FEATURES_DATA  *CpuFeaturesData;
> >
> >CpuFeaturesData = GetCpuFeaturesData ();
> > -  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
> > +  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
> >
> > -  Status = CpuMpPpi->GetProcessorInfo (
> > -   GetPeiServicesTablePointer(),
> > -   CpuMpPpi,
> > +  Status = CpuMp2Ppi->GetProcessor

[edk2-devel] [PATCH v2] UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only case.

2020-09-13 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2883

MpServices Ppi can be replaced by MpServices2 Ppi and MpServices2
Ppi is mandatory for RegisterCpuFeaturesLib functionality,
basing on this we can drop MpServices Ppi usage from the library
and the constraint that both Ppis must be installed.

Cc: Eric Dong 
Cc: Ray Ni 
Cc: Laszlo Ersek 
Cc: Rahul Kumar 
Cc: Nate DeSimone 
Signed-off-by: Chasel Chiu 
---
 UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c   | 61 
+++--
 UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.inf |  5 
++---
 UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h |  6 
+++---
 3 files changed, 28 insertions(+), 44 deletions(-)

diff --git 
a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c 
b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
index 64768f7a74..4e558e9fee 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
@@ -1,7 +1,7 @@
 /** @file
   CPU Register Table Library functions.
 
-  Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
+  Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -11,7 +11,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "RegisterCpuFeatures.h"
@@ -75,10 +74,10 @@ GetMpService (
   MP_SERVICESMpService;
 
   //
-  // Get MP Services Protocol
+  // Get MP Services2 Ppi
   //
   Status = PeiServicesLocatePpi (
- ,
+ ,
  0,
  NULL,
  (VOID **)
@@ -100,17 +99,17 @@ GetProcessorIndex (
   )
 {
   EFI_STATUS Status;
-  EFI_PEI_MP_SERVICES_PPI*CpuMpPpi;
+  EDKII_PEI_MP_SERVICES2_PPI *CpuMp2Ppi;
   UINTN  ProcessorIndex;
 
-  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
 
   //
   // For two reasons which use NULL for WhoAmI:
   // 1. This function will be called by APs and AP should not use PeiServices 
Table
   // 2. Check WhoAmI implementation, this parameter will not be used.
   //
-  Status = CpuMpPpi->WhoAmI(NULL, CpuMpPpi, );
+  Status = CpuMp2Ppi->WhoAmI (CpuMp2Ppi, );
   ASSERT_EFI_ERROR (Status);
   return ProcessorIndex;
 }
@@ -131,16 +130,15 @@ GetProcessorInformation (
   OUT EFI_PROCESSOR_INFORMATION*ProcessorInfoBuffer
   )
 {
-  EFI_PEI_MP_SERVICES_PPI*CpuMpPpi;
+  EDKII_PEI_MP_SERVICES2_PPI *CpuMp2Ppi;
   EFI_STATUS Status;
   CPU_FEATURES_DATA  *CpuFeaturesData;
 
   CpuFeaturesData = GetCpuFeaturesData ();
-  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
 
-  Status = CpuMpPpi->GetProcessorInfo (
-   GetPeiServicesTablePointer(),
-   CpuMpPpi,
+  Status = CpuMp2Ppi->GetProcessorInfo (
+   CpuMp2Ppi,
ProcessorNumber,
ProcessorInfoBuffer
);
@@ -162,18 +160,17 @@ StartupAllAPsWorker (
   )
 {
   EFI_STATUS   Status;
-  EFI_PEI_MP_SERVICES_PPI  *CpuMpPpi;
+  EDKII_PEI_MP_SERVICES2_PPI   *CpuMp2Ppi;
   CPU_FEATURES_DATA*CpuFeaturesData;
 
   CpuFeaturesData = GetCpuFeaturesData ();
-  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
 
   //
   // Wakeup all APs for data collection.
   //
-  Status = CpuMpPpi->StartupAllAPs (
- GetPeiServicesTablePointer (),
- CpuMpPpi,
+  Status = CpuMp2Ppi->StartupAllAPs (
+ CpuMp2Ppi,
  Procedure,
  FALSE,
  0,
@@ -203,17 +200,7 @@ StartupAllCPUsWorker (
   //
   // Get MP Services2 Ppi
   //
-  Status = PeiServicesLocatePpi (
- ,
- 0,
- NULL,
- (VOID **)
- );
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Wakeup all APs for data collection.
-  //
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
   Status = CpuMp2Ppi->StartupAllCPUs (
  CpuMp2Ppi,
  Procedure,
@@ -234,18 +221,17 @@ SwitchNewBsp (
   )
 {
   EFI_STATUS   Status;
-  EFI_PEI_MP_SERVICES_PPI  *CpuMpPpi;
+  EDKII_PEI_MP_SERVICES2_PPI   *CpuMp2Ppi;
   CPU_FEATURES_DATA*CpuFeaturesData;
 
   CpuFeaturesData = GetCpuFeaturesData ();
-  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;
 
   //
   // Wakeup all APs for data collection.
   //
-  Status = CpuMpPpi->SwitchBSP (
- GetPeiServicesTablePointer (),
- CpuMpPpi,
+  Status = CpuMp2Ppi->SwitchBSP (
+ CpuMp2Ppi,
  ProcessorNumber,
  TRUE
 

Re: [edk2-devel] [PATCH] UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only case.

2020-09-13 Thread Chiu, Chasel

Thanks Ray. This is good catch and it was no issue because both MpServices and 
MpServices2 at the same time.
I will update INF.

Thanks,
Chasel


From: Ni, Ray 
Sent: Saturday, September 12, 2020 2:37 AM
To: Dong, Eric ; Chiu, Chasel ; 
devel@edk2.groups.io
Cc: Chiu, Chasel ; Laszlo Ersek ; 
Kumar, Rahul1 ; Desimone, Nathaniel L 

Subject: Re: [PATCH] UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 
only case.

A rough check in phone. Why inf file is not changed?


发件人: Dong, Eric mailto:eric.d...@intel.com>>
发送时间: Friday, September 11, 2020 10:31:32 AM
收件人: Chiu, Chasel mailto:chasel.c...@intel.com>>; 
devel@edk2.groups.io<mailto:devel@edk2.groups.io> 
mailto:devel@edk2.groups.io>>
抄送: Chiu, Chasel mailto:chasel.c...@intel.com>>; Ni, Ray 
mailto:ray...@intel.com>>; Laszlo Ersek 
mailto:ler...@redhat.com>>; Kumar, Rahul1 
mailto:rahul1.ku...@intel.com>>; Desimone, Nathaniel L 
mailto:nathaniel.l.desim...@intel.com>>
主题: RE: [PATCH] UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only 
case.

Reviewed-by: Eric Dong mailto:eric.d...@intel.com>>

-Original Message-
From: Chasel Chiu mailto:chasel.c...@intel.com>>
Sent: Thursday, September 10, 2020 5:03 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Chiu, Chasel mailto:chasel.c...@intel.com>>; Dong, 
Eric mailto:eric.d...@intel.com>>; Ni, Ray 
mailto:ray...@intel.com>>; Laszlo Ersek 
mailto:ler...@redhat.com>>; Kumar, Rahul1 
mailto:rahul1.ku...@intel.com>>; Desimone, Nathaniel L 
mailto:nathaniel.l.desim...@intel.com>>
Subject: [PATCH] UefiCpuPkg/RegisterCpuFeaturesLib: Support MpServices2 only 
case.

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

MpServices Ppi can be replaced by MpServices2 Ppi and MpServices2 Ppi is 
mandatory for RegisterCpuFeaturesLib functionality, basing on this we can drop 
MpServices Ppi usage from the library and the constraint that both Ppis must be 
installed.

Cc: Eric Dong mailto:eric.d...@intel.com>>
Cc: Ray Ni mailto:ray...@intel.com>>
Cc: Laszlo Ersek mailto:ler...@redhat.com>>
Cc: Rahul Kumar mailto:rahul1.ku...@intel.com>>
Cc: Nate DeSimone 
mailto:nathaniel.l.desim...@intel.com>>
Signed-off-by: Chasel Chiu mailto:chasel.c...@intel.com>>
---
 UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c | 61 
+++--
 UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h   |  6 
+++---
 2 files changed, 26 insertions(+), 41 deletions(-)

diff --git 
a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c 
b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
index 64768f7a74..4e558e9fee 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLi
+++ b.c
@@ -1,7 +1,7 @@
 /** @file
   CPU Register Table Library functions.

-  Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
+  Copyright (c) 2016 - 2020, Intel Corporation. All rights
+ reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent

 **/
@@ -11,7 +11,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 

 #include "RegisterCpuFeatures.h"
@@ -75,10 +74,10 @@ GetMpService (
   MP_SERVICESMpService;

   //
-  // Get MP Services Protocol
+  // Get MP Services2 Ppi
   //
   Status = PeiServicesLocatePpi (
- ,
+ ,
  0,
  NULL,
  (VOID **)
@@ -100,17 +99,17 @@ GetProcessorIndex (
   )
 {
   EFI_STATUS Status;
-  EFI_PEI_MP_SERVICES_PPI*CpuMpPpi;
+  EDKII_PEI_MP_SERVICES2_PPI *CpuMp2Ppi;
   UINTN  ProcessorIndex;

-  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;

   //
   // For two reasons which use NULL for WhoAmI:
   // 1. This function will be called by APs and AP should not use PeiServices 
Table
   // 2. Check WhoAmI implementation, this parameter will not be used.
   //
-  Status = CpuMpPpi->WhoAmI(NULL, CpuMpPpi, );
+  Status = CpuMp2Ppi->WhoAmI (CpuMp2Ppi, );
   ASSERT_EFI_ERROR (Status);
   return ProcessorIndex;
 }
@@ -131,16 +130,15 @@ GetProcessorInformation (
   OUT EFI_PROCESSOR_INFORMATION*ProcessorInfoBuffer
   )
 {
-  EFI_PEI_MP_SERVICES_PPI*CpuMpPpi;
+  EDKII_PEI_MP_SERVICES2_PPI *CpuMp2Ppi;
   EFI_STATUS Status;
   CPU_FEATURES_DATA  *CpuFeaturesData;

   CpuFeaturesData = GetCpuFeaturesData ();
-  CpuMpPpi = CpuFeaturesData->MpService.Ppi;
+  CpuMp2Ppi = CpuFeaturesData->MpService.Ppi;

-  Status = CpuMpPpi->GetProcessorInfo (
-   GetPeiServicesTablePointer(),
-   CpuMpPpi,
+  Status = CpuMp2Ppi->GetProcessorInfo (
+   CpuMp2Ppi,

Re: [edk2-devel] [PATCH v3 8/8] IntelFsp2WrapperPkg/dsc: add HashLib, Tpm2CommandLib and Tpm2DeviceLib

2020-08-17 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Zhang, Qi1 
> Sent: Friday, August 14, 2020 2:32 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Qi1 ; Yao, Jiewen ;
> Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [PATCH v3 8/8] IntelFsp2WrapperPkg/dsc: add HashLib,
> Tpm2CommandLib and Tpm2DeviceLib
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376
> 
> Cc: Jiewen Yao 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Signed-off-by: Qi Zhang 
> ---
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> index 9bed45b89b..767d547844 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> @@ -52,6 +52,8 @@
> 
> PlatformSecLib|IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibS
> ample/SecFspWrapperPlatformSecLibSample.inf
> 
> 
> FspWrapperHobProcessLib|IntelFsp2WrapperPkg/Library/PeiFspWrapperHob
> ProcessLibSample/PeiFspWrapperHobProcessLibSample.inf
> 
> 
> 
> +
> Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandL
> ib.inf
> 
> +
> 
>  [LibraryClasses.common.PEIM,LibraryClasses.common.PEI_CORE]
> 
>PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
> 
> 
> PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiSe
> rvicesTablePointerLib.inf
> 
> @@ -60,6 +62,8 @@
>HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> 
> 
> TpmMeasurementLib|SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmM
> easurementLib.inf
> 
> 
> FvEventLogRecordLib|SecurityPkg/Library/FvEventLogRecordLib/FvEventLogR
> ecordLib.inf
> 
> +
> HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoR
> outerPei.inf
> 
> +
> Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTp
> m.inf
> 
> 
> 
>  [LibraryClasses.common.DXE_DRIVER]
> 
> 
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryP
> oint.inf
> 
> --
> 2.26.2.windows.1


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

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



Re: [edk2-devel] [PATCH v3 4/8] IntelFsp2WraperPkg/Fsp{m|s}WrapperPeim: Add FspBin measurement.

2020-08-17 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Zhang, Qi1 
> Sent: Friday, August 14, 2020 2:32 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Zhang,
> Qi1 
> Subject: [PATCH v3 4/8] IntelFsp2WraperPkg/Fsp{m|s}WrapperPeim: Add
> FspBin measurement.
> 
> From: Jiewen Yao 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376
> 
> Cc: Jiewen Yao 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Qi Zhang 
> Signed-off-by: Jiewen Yao 
> ---
>  .../FspmWrapperPeim/FspmWrapperPeim.c | 90
> ++-
>  .../FspmWrapperPeim/FspmWrapperPeim.inf   | 20 +++--
>  .../FspsWrapperPeim/FspsWrapperPeim.c | 86
> +-
>  .../FspsWrapperPeim/FspsWrapperPeim.inf   | 27 +++---
>  4 files changed, 204 insertions(+), 19 deletions(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> index 265b77ed60..24ab534620 100644
> --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> @@ -3,7 +3,7 @@
>register TemporaryRamDonePpi to call TempRamExit API, and register
> MemoryDiscoveredPpi
> 
>notify to call FspSiliconInit API.
> 
> 
> 
> -  Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
> 
> +  Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
> 
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> 
> 
>  **/
> 
> @@ -25,11 +25,14 @@
>  #include 
> 
>  #include 
> 
>  #include 
> 
> +#include 
> 
> 
> 
>  #include 
> 
>  #include 
> 
>  #include 
> 
>  #include 
> 
> +#include 
> 
> +#include 
> 
>  #include 
> 
>  #include 
> 
>  #include 
> 
> @@ -147,7 +150,21 @@ FspmWrapperInit (
>VOID
> 
>)
> 
>  {
> 
> -  EFI_STATUS   Status;
> 
> +  EFI_STATUSStatus;
> 
> +  EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_PPI
> *MeasurementExcludedFvPpi;
> 
> +  EFI_PEI_PPI_DESCRIPTOR
> *MeasurementExcludedPpiList;
> 
> +
> 
> +  MeasurementExcludedFvPpi = AllocatePool
> (sizeof(*MeasurementExcludedFvPpi));
> 
> +  ASSERT(MeasurementExcludedFvPpi != NULL);
> 
> +  MeasurementExcludedFvPpi->Count = 1;
> 
> +  MeasurementExcludedFvPpi->Fv[0].FvBase = PcdGet32
> (PcdFspmBaseAddress);
> 
> +  MeasurementExcludedFvPpi->Fv[0].FvLength =
> ((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32
> (PcdFspmBaseAddress))->FvLength;
> 
> +
> 
> +  MeasurementExcludedPpiList = AllocatePool
> (sizeof(*MeasurementExcludedPpiList));
> 
> +  ASSERT(MeasurementExcludedPpiList != NULL);
> 
> +  MeasurementExcludedPpiList->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI |
> EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
> 
> +  MeasurementExcludedPpiList->Guid  =
> 
> 
> +  MeasurementExcludedPpiList->Ppi   = MeasurementExcludedFvPpi;
> 
> 
> 
>Status = EFI_SUCCESS;
> 
> 
> 
> @@ -155,6 +172,9 @@ FspmWrapperInit (
>  Status = PeiFspMemoryInit ();
> 
>  ASSERT_EFI_ERROR (Status);
> 
>} else {
> 
> +Status = PeiServicesInstallPpi (MeasurementExcludedPpiList);
> 
> +ASSERT_EFI_ERROR (Status);
> 
> +
> 
>  PeiServicesInstallFvInfoPpi (
> 
>NULL,
> 
>(VOID *)(UINTN) PcdGet32 (PcdFspmBaseAddress),
> 
> @@ -167,6 +187,67 @@ FspmWrapperInit (
>return Status;
> 
>  }
> 
> 
> 
> +/**
> 
> +  This function is called after TCG installed PPI.
> 
> +
> 
> +  @param[in] PeiServicesPointer to PEI Services Table.
> 
> +  @param[in] NotifyDesc Pointer to the descriptor for the
> Notification event that
> 
> +caused this function to execute.
> 
> +  @param[in] PpiPointer to the PPI data associated with this
> function.
> 
> +
> 
> +  @retval EFI_STATUSAlways return EFI_SUCCESS
> 
> +**/
> 
> +EFI_STATUS
> 
> +EFIAPI
> 
> +TcgPpiNotify (
> 
> +  IN EFI_PEI_SERVICES  **PeiServices,
> 
> +  IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,
> 
> +  IN VOID  *Ppi
> 
> +  );
> 
> +
> 
> +EFI_PEI_NOTIFY_DESCRIPTOR mTcgPpiNotifyDesc = {
> 
> +  (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK |
> EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
> 
> +  ,
> 
> +  TcgPpiNotify
> 
> +};
> 
> +
> 
> +/**
> 
> +  This function is called after TCG installe

Re: [edk2-devel] [PATCH v3 3/8] IntelFsp2WrapperPkg/FspMeasurementLib: Add BaseFspMeasurementLib.

2020-08-17 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Zhang, Qi1 
> Sent: Friday, August 14, 2020 2:32 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Zhang,
> Qi1 
> Subject: [PATCH v3 3/8] IntelFsp2WrapperPkg/FspMeasurementLib: Add
> BaseFspMeasurementLib.
> 
> From: Jiewen Yao 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376
> 
> Cc: Jiewen Yao 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Qi Zhang 
> Signed-off-by: Jiewen Yao 
> ---
>  .../BaseFspMeasurementLib.inf |  54 
>  .../BaseFspMeasurementLib/FspMeasurementLib.c | 248
> ++
>  2 files changed, 302 insertions(+)
>  create mode 100644
> IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasuremen
> tLib.inf
>  create mode 100644
> IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLib.
> c
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurem
> entLib.inf
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurem
> entLib.inf
> new file mode 100644
> index 00..9c0dd9fb40
> --- /dev/null
> +++
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurem
> entLib.inf
> @@ -0,0 +1,54 @@
> +## @file
> 
> +#  Provides FSP measurement functions.
> 
> +#
> 
> +#  This library provides MeasureFspFirmwareBlob() to measure FSP binary.
> 
> +#
> 
> +# Copyright (c) 2020, Intel Corporation. All rights reserved.
> 
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +#
> 
> +##
> 
> +
> 
> +[Defines]
> 
> +  INF_VERSION= 0x00010005
> 
> +  BASE_NAME  = FspMeasurementLib
> 
> +  FILE_GUID  =
> 9A62C49D-C45A-4322-9F3C-45958DF0056B
> 
> +  MODULE_TYPE= BASE
> 
> +  VERSION_STRING = 1.0
> 
> +  LIBRARY_CLASS  = FspMeasurementLib
> 
> +
> 
> +#
> 
> +# The following information is for reference only and not required by the
> build tools.
> 
> +#
> 
> +#  VALID_ARCHITECTURES   = IA32 X64
> 
> +#
> 
> +
> 
> +[Sources]
> 
> +  FspMeasurementLib.c
> 
> +
> 
> +[Packages]
> 
> +  MdePkg/MdePkg.dec
> 
> +  MdeModulePkg/MdeModulePkg.dec
> 
> +  SecurityPkg/SecurityPkg.dec
> 
> +  IntelFsp2Pkg/IntelFsp2Pkg.dec
> 
> +  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> 
> +
> 
> +[LibraryClasses]
> 
> +  BaseLib
> 
> +  BaseMemoryLib
> 
> +  DebugLib
> 
> +  PrintLib
> 
> +  PcdLib
> 
> +  PeiServicesLib
> 
> +  PeiServicesTablePointerLib
> 
> +  FspWrapperApiLib
> 
> +  FvEventLogRecordLib
> 
> +  HashLib
> 
> +
> 
> +[Ppis]
> 
> +  gEdkiiTcgPpiGuid
> ## CONSUMES
> 
> +
> 
> +[Pcd]
> 
> +  gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig
> ## CONSUMES
> 
> +  gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress
> ## CONSUMES
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdTcgPfpMeasurementRevision
> ## CONSUMES
> 
> +
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLi
> b.c
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLi
> b.c
> new file mode 100644
> index 00..adb4393426
> --- /dev/null
> +++
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLi
> b.c
> @@ -0,0 +1,248 @@
> +/** @file
> 
> +  This library is used by FSP modules to measure data to TPM.
> 
> +
> 
> +Copyright (c) 2020, Intel Corporation. All rights reserved. 
> 
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +
> 
> +**/
> 
> +
> 
> +#include 
> 
> +#include 
> 
> +
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +
> 
> +#include 
> 
> +#include 
> 
> +
> 
> +/**
> 
> +  Tpm measure and log data, and extend the measurement result into a
> specific PCR.
> 
> +
> 
> +  @param[in]  PcrIndex PCR Index.
> 
> +  @param[in]  EventTypeEvent type.
> 
> +  @param[in]  EventLog Measurement event log.
> 
> +  @param[in]  LogLen   Event log length in bytes.
> 
> +  @param[in]  HashData The start of the data buffer to be
> hashed, extended.
> 
> +  @param[in]  HashDataLen  The length, in bytes, of the buffer
&g

Re: [edk2-devel] [PATCH v4 3/8] IntelFsp2WrapperPkg/FspMeasurementLib: Add BaseFspMeasurementLib.

2020-08-18 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Zhang, Qi1 
> Sent: Tuesday, August 18, 2020 2:26 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Zhang,
> Qi1 
> Subject: [PATCH v4 3/8] IntelFsp2WrapperPkg/FspMeasurementLib: Add
> BaseFspMeasurementLib.
> 
> From: Jiewen Yao 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376
> 
> Cc: Jiewen Yao 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Qi Zhang 
> Signed-off-by: Jiewen Yao 
> ---
>  .../BaseFspMeasurementLib.inf |  54 
>  .../BaseFspMeasurementLib/FspMeasurementLib.c | 248
> ++
>  2 files changed, 302 insertions(+)
>  create mode 100644
> IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasuremen
> tLib.inf
>  create mode 100644
> IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLib.
> c
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurem
> entLib.inf
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurem
> entLib.inf
> new file mode 100644
> index 00..1b5f0012aa
> --- /dev/null
> +++
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurem
> entLib.inf
> @@ -0,0 +1,54 @@
> +## @file
> 
> +#  Provides FSP measurement functions.
> 
> +#
> 
> +#  This library provides MeasureFspFirmwareBlob() to measure FSP binary.
> 
> +#
> 
> +# Copyright (c) 2020, Intel Corporation. All rights reserved.
> 
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +#
> 
> +##
> 
> +
> 
> +[Defines]
> 
> +  INF_VERSION= 0x00010005
> 
> +  BASE_NAME  = FspMeasurementLib
> 
> +  FILE_GUID  =
> 890B12B4-56CC-453E-B062-4597FC6D3D8C
> 
> +  MODULE_TYPE= BASE
> 
> +  VERSION_STRING = 1.0
> 
> +  LIBRARY_CLASS  = FspMeasurementLib
> 
> +
> 
> +#
> 
> +# The following information is for reference only and not required by the
> build tools.
> 
> +#
> 
> +#  VALID_ARCHITECTURES   = IA32 X64
> 
> +#
> 
> +
> 
> +[Sources]
> 
> +  FspMeasurementLib.c
> 
> +
> 
> +[Packages]
> 
> +  MdePkg/MdePkg.dec
> 
> +  MdeModulePkg/MdeModulePkg.dec
> 
> +  SecurityPkg/SecurityPkg.dec
> 
> +  IntelFsp2Pkg/IntelFsp2Pkg.dec
> 
> +  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> 
> +
> 
> +[LibraryClasses]
> 
> +  BaseLib
> 
> +  BaseMemoryLib
> 
> +  DebugLib
> 
> +  PrintLib
> 
> +  PcdLib
> 
> +  PeiServicesLib
> 
> +  PeiServicesTablePointerLib
> 
> +  FspWrapperApiLib
> 
> +  TcgEventLogRecordLib
> 
> +  HashLib
> 
> +
> 
> +[Ppis]
> 
> +  gEdkiiTcgPpiGuid
> ## CONSUMES
> 
> +
> 
> +[Pcd]
> 
> +  gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig
> ## CONSUMES
> 
> +  gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress
> ## CONSUMES
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdTcgPfpMeasurementRevision
> ## CONSUMES
> 
> +
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLi
> b.c
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLi
> b.c
> new file mode 100644
> index 00..0fe0606a6d
> --- /dev/null
> +++
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLi
> b.c
> @@ -0,0 +1,248 @@
> +/** @file
> 
> +  This library is used by FSP modules to measure data to TPM.
> 
> +
> 
> +Copyright (c) 2020, Intel Corporation. All rights reserved. 
> 
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +
> 
> +**/
> 
> +
> 
> +#include 
> 
> +#include 
> 
> +
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +
> 
> +#include 
> 
> +#include 
> 
> +
> 
> +/**
> 
> +  Tpm measure and log data, and extend the measurement result into a
> specific PCR.
> 
> +
> 
> +  @param[in]  PcrIndex PCR Index.
> 
> +  @param[in]  EventTypeEvent type.
> 
> +  @param[in]  EventLog Measurement event log.
> 
> +  @param[in]  LogLen   Event log length in bytes.
> 
> +  @param[in]  HashData The start of the data buffer to be
> hashed, extended.
> 
> +  @param[in]  HashDataLen  The length, in bytes, of the buffer
&g

Re: [edk2-devel] [PATCH v4 6/8] IntelFsp2Wrapper/dsc: Add FspTpmMeasurementLib and PcdFspMeasurementConfig.

2020-08-18 Thread Chiu, Chasel


Copyright year of IntelFsp2WrapperPkg.dec can be extend to 2020 when pushing.
Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Zhang, Qi1 
> Sent: Tuesday, August 18, 2020 2:26 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Zhang,
> Qi1 
> Subject: [PATCH v4 6/8] IntelFsp2Wrapper/dsc: Add FspTpmMeasurementLib
> and PcdFspMeasurementConfig.
> 
> From: Jiewen Yao 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376
> 
> Cc: Jiewen Yao 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Qi Zhang 
> Signed-off-by: Jiewen Yao 
> ---
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | 17 +
> IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc |  6 +-
>  2 files changed, 22 insertions(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> index faf2be621c..cb41ca9807 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> @@ -92,6 +92,23 @@
>#
> gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection|0x0001|UINT
> 8|0x400A +  ## This PCD decides how FSP is measured+  # 1) The
> BootGuard ACM may already measured the FSP component, such as
> FSPT/FSPM.+  # We need a flag (PCD) to indicate if there is need to do such
> FSP measurement or NOT.+  # 2) The FSP binary includes FSP code and FSP
> UPD region. The UPD region is considered+  # as configuration block, and it
> may be updated by OEM by design.+  # This flag (PCD) is to indicate if we
> need isolate the the UPD region from the FSP code region.+  # BIT0: Need
> measure FSP. (for FSP1.x) - reserved in FSP2.+  # BIT1: Need measure FSPT.
> (for FSP 2.x)+  # BIT2: Need measure FSPM. (for FSP 2.x)+  # BIT3: Need
> measure FSPS. (for FSP 2.x)+  # BIT4~30: reserved.+  # BIT31: Need isolate
> UPD region measurement.+#0: measure FSP[T|M|S] as one binary in
> one record (PCR0).+#1: measure FSP UPD region in one record (PCR1),
> the FSP code without UPD in another record (PCR0).+  #+
> gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig|0x|
> UINT32|0x400B+ [PcdsFixedAtBuild,
> PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx]   #   ## These are
> the base address of FSP-M/Sdiff --git
> a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> index cb4f69285d..aa2eb26c33 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> @@ -1,7 +1,7 @@
>  ## @file # Provides drivers and definitions to support fsp in EDKII bios. #-#
> Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.+#
> Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved. #
> SPDX-License-Identifier: BSD-2-Clause-Patent # ##@@ -45,6 +45,7 @@
># FSP Wrapper Lib
> FspWrapperApiLib|IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/Bas
> eFspWrapperApiLib.inf
> FspWrapperApiTestLib|IntelFsp2WrapperPkg/Library/BaseFspWrapperApiTes
> tLibNull/BaseFspWrapperApiTestLibNull.inf+
> FspMeasurementLib|IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/
> BaseFspMeasurementLib.inf# FSP platform sample
> FspWrapperPlatformLib|IntelFsp2WrapperPkg/Library/BaseFspWrapperPlatf
> ormLibSample/BaseFspWrapperPlatformLibSample.inf@@ -57,6 +58,8 @@
>PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemory
> AllocationLib.inf   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf+
> TpmMeasurementLib|SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmM
> easurementLib.inf+
> TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLo
> gRecordLib.inf  [LibraryClasses.common.DXE_DRIVER]
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryP
> oint.inf@@ -73,6 +76,7 @@
> 
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFspW
> rapperPlatformSecLibSample.inf
> IntelFsp2WrapperPkg/Library/PeiFspWrapperHobProcessLibSample/PeiFspWr
> apperHobProcessLibSample.inf
> IntelFsp2WrapperPkg/Library/PeiFspWrapperApiTestLib/PeiFspWrapperApiTe
> stLib.inf+
> IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasuremen
> tLib.infIntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
> IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf--
> 2.26.2.windows.1


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

View/Reply Online (#64382): https://edk2.groups.io/g/devel/message/64382
Mute This Topic: https://groups.io/mt/76260213/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 2/8] IntelFsp2WrapperPkg/FspMeasurementLib: Add header file.

2020-08-18 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Zhang, Qi1 
> Sent: Tuesday, August 18, 2020 2:26 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Zhang,
> Qi1 
> Subject: [PATCH v4 2/8] IntelFsp2WrapperPkg/FspMeasurementLib: Add
> header file.
> 
> From: Jiewen Yao 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376
> 
> Cc: Jiewen Yao 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Qi Zhang 
> Signed-off-by: Jiewen Yao 
> ---
>  .../Include/Library/FspMeasurementLib.h   | 39
> +++
>  1 file changed, 39 insertions(+)
>  create mode 100644
> IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h
> 
> diff --git a/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h
> b/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h
> new file mode 100644
> index 00..4620b4b08e
> --- /dev/null
> +++ b/IntelFsp2WrapperPkg/Include/Library/FspMeasurementLib.h
> @@ -0,0 +1,39 @@
> +/** @file
> 
> +  This library is used by FSP modules to measure data to TPM.
> 
> +
> 
> +Copyright (c) 2020, Intel Corporation. All rights reserved. 
> 
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +
> 
> +**/
> 
> +
> 
> +#ifndef _FSP_MEASUREMENT_LIB_H_
> 
> +#define _FSP_MEASUREMENT_LIB_H_
> 
> +
> 
> +#define FSP_MEASURE_FSP   BIT0
> 
> +#define FSP_MEASURE_FSPT  BIT1
> 
> +#define FSP_MEASURE_FSPM  BIT2
> 
> +#define FSP_MEASURE_FSPS  BIT3
> 
> +#define FSP_MEASURE_FSPUPDBIT31
> 
> +
> 
> +/**
> 
> +  Measure a FSP FirmwareBlob.
> 
> +
> 
> +  @param[in]  PcrIndexPCR Index.
> 
> +  @param[in]  Description Description for this
> FirmwareBlob.
> 
> +  @param[in]  FirmwareBlobBaseBase address of this
> FirmwareBlob.
> 
> +  @param[in]  FirmwareBlobLength  Size in bytes of this
> FirmwareBlob.
> 
> +
> 
> +  @retval EFI_SUCCESS   Operation completed successfully.
> 
> +  @retval EFI_UNSUPPORTED   TPM device not available.
> 
> +  @retval EFI_OUT_OF_RESOURCES  Out of memory.
> 
> +  @retval EFI_DEVICE_ERROR  The operation was unsuccessful.
> 
> +*/
> 
> +EFI_STATUS
> 
> +EFIAPI
> 
> +MeasureFspFirmwareBlob (
> 
> +  IN UINT32 PcrIndex,
> 
> +  IN CHAR8  *Description OPTIONAL,
> 
> +  IN EFI_PHYSICAL_ADDRESS   FirmwareBlobBase,
> 
> +  IN UINT64 FirmwareBlobLength
> 
> +  );
> 
> +#endif
> 
> --
> 2.26.2.windows.1


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

View/Reply Online (#64379): https://edk2.groups.io/g/devel/message/64379
Mute This Topic: https://groups.io/mt/76260206/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 4/8] IntelFsp2WraperPkg/Fsp{m|s}WrapperPeim: Add FspBin measurement.

2020-08-18 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Zhang, Qi1 
> Sent: Tuesday, August 18, 2020 2:26 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Zhang,
> Qi1 
> Subject: [PATCH v4 4/8] IntelFsp2WraperPkg/Fsp{m|s}WrapperPeim: Add
> FspBin measurement.
> 
> From: Jiewen Yao 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376
> 
> Cc: Jiewen Yao 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Qi Zhang 
> Signed-off-by: Jiewen Yao 
> ---
>  .../FspmWrapperPeim/FspmWrapperPeim.c | 90
> ++-
>  .../FspmWrapperPeim/FspmWrapperPeim.inf   | 20 +++--
>  .../FspsWrapperPeim/FspsWrapperPeim.c | 86
> +-
>  .../FspsWrapperPeim/FspsWrapperPeim.inf   | 27 +++---
>  4 files changed, 204 insertions(+), 19 deletions(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> index 265b77ed60..24ab534620 100644
> --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> @@ -3,7 +3,7 @@
>register TemporaryRamDonePpi to call TempRamExit API, and register
> MemoryDiscoveredPpi
> 
>notify to call FspSiliconInit API.
> 
> 
> 
> -  Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
> 
> +  Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
> 
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> 
> 
>  **/
> 
> @@ -25,11 +25,14 @@
>  #include 
> 
>  #include 
> 
>  #include 
> 
> +#include 
> 
> 
> 
>  #include 
> 
>  #include 
> 
>  #include 
> 
>  #include 
> 
> +#include 
> 
> +#include 
> 
>  #include 
> 
>  #include 
> 
>  #include 
> 
> @@ -147,7 +150,21 @@ FspmWrapperInit (
>VOID
> 
>)
> 
>  {
> 
> -  EFI_STATUS   Status;
> 
> +  EFI_STATUSStatus;
> 
> +  EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_PPI
> *MeasurementExcludedFvPpi;
> 
> +  EFI_PEI_PPI_DESCRIPTOR
> *MeasurementExcludedPpiList;
> 
> +
> 
> +  MeasurementExcludedFvPpi = AllocatePool
> (sizeof(*MeasurementExcludedFvPpi));
> 
> +  ASSERT(MeasurementExcludedFvPpi != NULL);
> 
> +  MeasurementExcludedFvPpi->Count = 1;
> 
> +  MeasurementExcludedFvPpi->Fv[0].FvBase = PcdGet32
> (PcdFspmBaseAddress);
> 
> +  MeasurementExcludedFvPpi->Fv[0].FvLength =
> ((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32
> (PcdFspmBaseAddress))->FvLength;
> 
> +
> 
> +  MeasurementExcludedPpiList = AllocatePool
> (sizeof(*MeasurementExcludedPpiList));
> 
> +  ASSERT(MeasurementExcludedPpiList != NULL);
> 
> +  MeasurementExcludedPpiList->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI |
> EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
> 
> +  MeasurementExcludedPpiList->Guid  =
> 
> 
> +  MeasurementExcludedPpiList->Ppi   = MeasurementExcludedFvPpi;
> 
> 
> 
>Status = EFI_SUCCESS;
> 
> 
> 
> @@ -155,6 +172,9 @@ FspmWrapperInit (
>  Status = PeiFspMemoryInit ();
> 
>  ASSERT_EFI_ERROR (Status);
> 
>} else {
> 
> +Status = PeiServicesInstallPpi (MeasurementExcludedPpiList);
> 
> +ASSERT_EFI_ERROR (Status);
> 
> +
> 
>  PeiServicesInstallFvInfoPpi (
> 
>NULL,
> 
>(VOID *)(UINTN) PcdGet32 (PcdFspmBaseAddress),
> 
> @@ -167,6 +187,67 @@ FspmWrapperInit (
>return Status;
> 
>  }
> 
> 
> 
> +/**
> 
> +  This function is called after TCG installed PPI.
> 
> +
> 
> +  @param[in] PeiServicesPointer to PEI Services Table.
> 
> +  @param[in] NotifyDesc Pointer to the descriptor for the
> Notification event that
> 
> +caused this function to execute.
> 
> +  @param[in] PpiPointer to the PPI data associated with this
> function.
> 
> +
> 
> +  @retval EFI_STATUSAlways return EFI_SUCCESS
> 
> +**/
> 
> +EFI_STATUS
> 
> +EFIAPI
> 
> +TcgPpiNotify (
> 
> +  IN EFI_PEI_SERVICES  **PeiServices,
> 
> +  IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc,
> 
> +  IN VOID  *Ppi
> 
> +  );
> 
> +
> 
> +EFI_PEI_NOTIFY_DESCRIPTOR mTcgPpiNotifyDesc = {
> 
> +  (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK |
> EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
> 
> +  ,
> 
> +  TcgPpiNotify
> 
> +};
> 
> +
> 
> +/**
> 
> +  This function is called after TCG installe

Re: [edk2-devel] [PATCH v4 8/8] IntelFsp2WrapperPkg/dsc: add HashLib, Tpm2CommandLib and Tpm2DeviceLib

2020-08-18 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Zhang, Qi1 
> Sent: Tuesday, August 18, 2020 2:26 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Qi1 ; Yao, Jiewen ;
> Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [PATCH v4 8/8] IntelFsp2WrapperPkg/dsc: add HashLib,
> Tpm2CommandLib and Tpm2DeviceLib
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376
> 
> Cc: Jiewen Yao 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Signed-off-by: Qi Zhang 
> ---
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> index aa2eb26c33..738342b69b 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> @@ -52,6 +52,8 @@
> 
> PlatformSecLib|IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibS
> ample/SecFspWrapperPlatformSecLibSample.inf
> 
> 
> FspWrapperHobProcessLib|IntelFsp2WrapperPkg/Library/PeiFspWrapperHob
> ProcessLibSample/PeiFspWrapperHobProcessLibSample.inf
> 
> 
> 
> +
> Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandL
> ib.inf
> 
> +
> 
>  [LibraryClasses.common.PEIM,LibraryClasses.common.PEI_CORE]
> 
>PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
> 
> 
> PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiSe
> rvicesTablePointerLib.inf
> 
> @@ -60,6 +62,8 @@
>HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> 
> 
> TpmMeasurementLib|SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmM
> easurementLib.inf
> 
> 
> TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLo
> gRecordLib.inf
> 
> +
> HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoR
> outerPei.inf
> 
> +
> Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTp
> m.inf
> 
> 
> 
>  [LibraryClasses.common.DXE_DRIVER]
> 
> 
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryP
> oint.inf
> 
> --
> 2.26.2.windows.1


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

View/Reply Online (#64384): https://edk2.groups.io/g/devel/message/64384
Mute This Topic: https://groups.io/mt/76260215/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/3] Platform/Intel/CometlakeOpenBoardPkg: add ibrary for Fsp measurement.

2020-08-28 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Zhang, Qi1 
> Sent: Friday, August 28, 2020 2:33 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Qi1 ; Chiu, Chasel ;
> Desimone, Nathaniel L ; Chaganty,
> Rangasai V ; Kethi Reddy, Deepika
> ; Esakkithevar, Kathappan
> 
> Subject: [PATCH 1/3] Platform/Intel/CometlakeOpenBoardPkg: add ibrary for
> Fsp measurement.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2939
> 
> Signed-off-by: Qi Zhang 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Rangasai V Chaganty 
> Cc: Deepika Kethi Reddy 
> Cc: Kathappan Esakkithevar 
> ---
>  .../Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc  | 2
> ++
>  1 file changed, 2 insertions(+)
> 
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> sc
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> sc
> index 2d9dcb139f..4ea797c550 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> sc
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> sc
> @@ -173,6 +173,8 @@
>  !endif
> 
> 
> SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCache
> MtrrLibNull.inf
> 
> 
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuH
> obLib/ReportCpuHobLib.inf
> 
> +
> FspMeasurementLib|IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/
> BaseFspMeasurementLib.inf
> 
> +
> TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLo
> gRecordLib.inf
> 
> 
> 
>###
> 
># Board Package
> 
> --
> 2.26.2.windows.1


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

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



Re: [edk2-devel] [PATCH 3/3] Platform/Intel/WhiskeylakeOpenBoardPkg: add ibrary for Fsp measurement.

2020-08-28 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Zhang, Qi1 
> Sent: Friday, August 28, 2020 2:33 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Qi1 ; Chiu, Chasel ;
> Desimone, Nathaniel L 
> Subject: [PATCH 3/3] Platform/Intel/WhiskeylakeOpenBoardPkg: add ibrary
> for Fsp measurement.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2939
> 
> Signed-off-by: Qi Zhang 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> ---
>  .../Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc | 2
> ++
>  .../WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc| 2
> ++
>  2 files changed, 4 insertions(+)
> 
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> index fb493973e2..ab02a2ef59 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> @@ -173,6 +173,8 @@
>  !endif
> 
> 
> SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCache
> MtrrLibNull.inf
> 
> 
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuH
> obLib/ReportCpuHobLib.inf
> 
> +
> FspMeasurementLib|IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/
> BaseFspMeasurementLib.inf
> 
> +
> TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLo
> gRecordLib.inf
> 
> 
> 
>###
> 
># Board Package
> 
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> kg.dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> kg.dsc
> index 9a1f107faf..0a87a3d4b2 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> kg.dsc
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> kg.dsc
> @@ -173,6 +173,8 @@
>  !endif
> 
> 
> SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCache
> MtrrLibNull.inf
> 
> 
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuH
> obLib/ReportCpuHobLib.inf
> 
> +
> FspMeasurementLib|IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/
> BaseFspMeasurementLib.inf
> 
> +
> TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLo
> gRecordLib.inf
> 
> 
> 
>###
> 
># Board Package
> 
> --
> 2.26.2.windows.1


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

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



Re: [edk2-devel] [PATCH 2/3] Platform/Intel/KabylakeOpenBoardPkg: add ibrary for Fsp measurement.

2020-08-28 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Zhang, Qi1 
> Sent: Friday, August 28, 2020 2:33 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Qi1 ; Chiu, Chasel ;
> Desimone, Nathaniel L ; Jeremy Soller
> 
> Subject: [PATCH 2/3] Platform/Intel/KabylakeOpenBoardPkg: add ibrary for
> Fsp measurement.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2939
> 
> Signed-off-by: Qi Zhang 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Jeremy Soller 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc | 2
> ++
>  .../Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc| 2
> ++
>  2 files changed, 4 insertions(+)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> index 862e6a6655..34d645be7e 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> @@ -172,6 +172,8 @@
>  !if $(TARGET) == DEBUG
> 
> 
> TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/P
> eiTestPointCheckLib.inf
> 
>  !endif
> 
> +
> FspMeasurementLib|IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/
> BaseFspMeasurementLib.inf
> 
> +
> TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLo
> gRecordLib.inf
> 
> 
> 
>###
> 
># Board Package
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> index 0b30da8f96..fdfaaa0cda 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> @@ -213,6 +213,8 @@
>  !endif
> 
> 
> SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCache
> MtrrLibNull.inf
> 
> 
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuH
> obLib/ReportCpuHobLib.inf
> 
> +
> FspMeasurementLib|IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/
> BaseFspMeasurementLib.inf
> 
> +
> TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLo
> gRecordLib.inf
> 
> 
> 
>###
> 
># Board Package
> 
> --
> 2.26.2.windows.1


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

View/Reply Online (#64740): https://edk2.groups.io/g/devel/message/64740
Mute This Topic: https://groups.io/mt/76468604/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] Platform/Intel/MinPlatformPkg: add Fsp measurement lib to dsc

2020-08-28 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Qi Zhang
> Sent: Friday, August 28, 2020 4:38 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Qi1 ; Chiu, Chasel ;
> Desimone, Nathaniel L ; Liming Gao
> ; Dong, Eric 
> Subject: [edk2-devel] [PATCH v2] Platform/Intel/MinPlatformPkg: add Fsp
> measurement lib to dsc
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2939
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Qi Zhang 
> ---
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> index 8e1869078c..2bcaed05a1 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> @@ -63,6 +63,10 @@
> 
> HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoR
> outerPei.inf
> Tcg2PhysicalPresenceLib|SecurityPkg/Library/PeiTcg2PhysicalPresenceLib/PeiT
> cg2PhysicalPresenceLib.inf +
> FspMeasurementLib|IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/
> BaseFspMeasurementLib.inf+
> TcgEventLogRecordLib|SecurityPkg/Library/TcgEventLogRecordLib/TcgEventLo
> gRecordLib.inf+
> TpmMeasurementLib|SecurityPkg/Library/PeiTpmMeasurementLib/PeiTpmM
> easurementLib.inf+ !if
> gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE
> PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformance
> Lib.inf !endif--
> 2.26.2.windows.1
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> 
> View/Reply Online (#64748): https://edk2.groups.io/g/devel/message/64748
> Mute This Topic: https://groups.io/mt/76469825/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 (#64752): https://edk2.groups.io/g/devel/message/64752
Mute This Topic: https://groups.io/mt/76469825/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH] IntelFsp2Pkg/GenCfgOpt: skip unnecessarily header/BSF recreating.

2020-09-30 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2967

When no change in FSP UPD DSC files, GenCfgOpt.py should skip
recreating UPD header and BSF files.
This patch added a check to handle this case.

Cc: Maurice Ma 
Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---
 IntelFsp2Pkg/Tools/GenCfgOpt.py | 60 
++--
 1 file changed, 42 insertions(+), 18 deletions(-)

diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt.py
index bcced590ce..af7e14a10a 100644
--- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
+++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
@@ -810,6 +810,17 @@ EndList
 SubItem['value'] = valuestr
 return Error
 
+def NoDscFileChange (self, OutPutFile):
+NoFileChange = True
+if not os.path.exists(OutPutFile):
+NoFileChange = False
+else:
+DscTime = os.path.getmtime(self._DscFile)
+OutputTime = os.path.getmtime(OutPutFile)
+if DscTime > OutputTime:
+NoFileChange = False
+return NoFileChange
+
 def CreateSplitUpdTxt (self, UpdTxtFile):
 GuidList = 
['FSP_T_UPD_TOOL_GUID','FSP_M_UPD_TOOL_GUID','FSP_S_UPD_TOOL_GUID']
 SignatureList = ['0x545F', '0x4D5F','0x535F']#  _T, _M, and _S 
signature for FSPT, FSPM, FSPS
@@ -823,16 +834,7 @@ EndList
 if UpdTxtFile == '':
 UpdTxtFile = os.path.join(FvDir, 
self._MacroDict[GuidList[Index]] + '.txt')
 
-ReCreate = False
-if not os.path.exists(UpdTxtFile):
-ReCreate = True
-else:
-DscTime = os.path.getmtime(self._DscFile)
-TxtTime = os.path.getmtime(UpdTxtFile)
-if DscTime > TxtTime:
-ReCreate = True
-
-if not  ReCreate:
+if (self.NoDscFileChange (UpdTxtFile)):
 # DSC has not been modified yet
 # So don't have to re-generate other files
 self.Error = 'No DSC file change, skip to create UPD TXT file'
@@ -1056,7 +1058,11 @@ EndList
 HeaderFile = os.path.join(FvDir, HeaderFileName)
 
 # Check if header needs to be recreated
-ReCreate = False
+if (self.NoDscFileChange (HeaderFile)):
+# DSC has not been modified yet
+# So don't have to re-generate other files
+self.Error = 'No DSC file change, skip to create UPD header file'
+return 256
 
 TxtBody = []
 for Item in self._CfgItemList:
@@ -1382,6 +1388,12 @@ EndList
 self.Error = "BSF output file '%s' is invalid" % BsfFile
 return 1
 
+if (self.NoDscFileChange (BsfFile)):
+# DSC has not been modified yet
+# So don't have to re-generate other files
+self.Error = 'No DSC file change, skip to create UPD BSF file'
+return 256
+
 Error = 0
 OptionDict = {}
 BsfFd  = open(BsfFile, "w")
@@ -1467,7 +1479,7 @@ EndList
 
 
 def Usage():
-print ("GenCfgOpt Version 0.55")
+print ("GenCfgOpt Version 0.56")
 print ("Usage:")
 print ("GenCfgOpt  UPDTXT  PlatformDscFile BuildFvDir 
[-D Macros]")
 print ("GenCfgOpt  HEADER  PlatformDscFile BuildFvDir  InputHFile 
[-D Macros]")
@@ -1529,13 +1541,25 @@ def Main():
 print ("ERROR: %s !" % (GenCfgOpt.Error))
 return Ret
 elif sys.argv[1] == "HEADER":
-if GenCfgOpt.CreateHeaderFile(OutFile) != 0:
-print ("ERROR: %s !" % GenCfgOpt.Error)
-return 8
+Ret = GenCfgOpt.CreateHeaderFile(OutFile)
+if Ret != 0:
+# No change is detected
+if Ret == 256:
+print ("INFO: %s !" % (GenCfgOpt.Error))
+else :
+print ("ERROR: %s !" % (GenCfgOpt.Error))
+return 8
+return Ret
 elif sys.argv[1] == "GENBSF":
-if GenCfgOpt.GenerateBsfFile(OutFile) != 0:
-print ("ERROR: %s !" % GenCfgOpt.Error)
-return 9
+Ret = GenCfgOpt.GenerateBsfFile(OutFile)
+if Ret != 0:
+# No change is detected
+if Ret == 256:
+print ("INFO: %s !" % (GenCfgOpt.Error))
+else :
+print ("ERROR: %s !" % (GenCfgOpt.Error))
+return 9
+return Ret
 else:
 if argc < 5:
 Usage()
-- 
2.28.0.windows.1



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

Re: [edk2-devel] [edk2-platforms] [PATCH V1 2/2] MinPlatformPkg: Coding style cleanups in CompressLib

2020-10-01 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Nate DeSimone 
> Sent: Wednesday, September 30, 2020 8:15 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Liming Gao
> ; Dong, Eric 
> Subject: [edk2-platforms] [PATCH V1 2/2] MinPlatformPkg: Coding style
> cleanups in CompressLib
> 
> Signed-off-by: Nate DeSimone 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  .../Library/CompressLib/CompressLib.c | 177 +-
>  .../Library/CompressLib/CompressLib.inf   |   4 +-
>  2 files changed, 95 insertions(+), 86 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Library/CompressLib/CompressLib.c
> b/Platform/Intel/MinPlatformPkg/Library/CompressLib/CompressLib.c
> index 537eb3b693..a9aeea32c1 100644
> --- a/Platform/Intel/MinPlatformPkg/Library/CompressLib/CompressLib.c
> +++ b/Platform/Intel/MinPlatformPkg/Library/CompressLib/CompressLib.c
> @@ -7,7 +7,7 @@
>This sequence is further divided into Blocks and Huffman codings
>are applied to each Block.
> 
> -  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
> +  Copyright (c) 2007 - 2020, Intel Corporation. All rights
> + reserved.
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -31,7 +31,6 @@
>  // Macro Definitions
>  //
>  typedef INT16 NODE;
> -#define UINT8_MAX 0xff
>  #define UINT8_BIT 8
>  #define THRESHOLD 3
>  #define INIT_CRC  0
> @@ -42,7 +41,7 @@ typedef INT16 NODE;
>  #define PERC_FLAG 0x8000U
>  #define CODE_BIT  16
>  #define NIL   0
> -#define MAX_HASH_VAL  (3 * WNDSIZ + (WNDSIZ / 512 + 1) * UINT8_MAX)
> +#define MAX_HASH_VAL  (3 * WNDSIZ + (WNDSIZ / 512 + 1) * MAX_UINT8)
>  #define HASH(LoopVar7, LoopVar5)((LoopVar7) + ((LoopVar5) << (WNDBIT
> - 9)) + WNDSIZ * 2)
>  #define CRCPOLY   0xA001
>  #define UPDATE_CRC(LoopVar5) mCrc = mCrcTable[(mCrc ^ (LoopVar5)) &
> 0xFF] ^ (mCrc >> UINT8_BIT)
> @@ -50,7 +49,7 @@ typedef INT16 NODE;
>  //
>  // C: the Char Set; P: the Position Set; T: the exTra Set  //
> -#define NC(UINT8_MAX + MAXMATCH + 2 - THRESHOLD)
> +#define NC(MAX_UINT8 + MAXMATCH + 2 - THRESHOLD)
>  #define CBIT  9
>  #define NP(WNDBIT + 1)
>  #define PBIT  4
> @@ -66,13 +65,13 @@ typedef INT16 NODE;
>  //
> 
>  /**
> -  Put a dword to output stream
> +  Put a dword to output stream.
> 
>@param[in] DataThe dword to put.
>  **/
>  VOID
>  EFIAPI
> -PutDword(
> +PutDword (
>IN UINT32 Data
>);
> 
> @@ -110,7 +109,7 @@ STATIC UINT16 *mSortPtr;  STATIC UINT16
> mLenCnt[17];  STATIC UINT16 mLeft[2 * NC - 1];  STATIC UINT16 mRight[2 * NC
> - 1]; -STATIC UINT16 mCrcTable[UINT8_MAX + 1];
> +STATIC UINT16 mCrcTable[MAX_UINT8 + 1];
>  STATIC UINT16 mCFreq[2 * NC - 1];
>  STATIC UINT16 mCCode[NC];
>  STATIC UINT16 mPFreq[2 * NP - 1];
> @@ -142,7 +141,7 @@ MakeCrcTable (
> 
>UINT32  LoopVar4;
> 
> -  for (LoopVar1 = 0; LoopVar1 <= UINT8_MAX; LoopVar1++) {
> +  for (LoopVar1 = 0; LoopVar1 <= MAX_UINT8; LoopVar1++) {
>  LoopVar4 = LoopVar1;
>  for (LoopVar2 = 0; LoopVar2 < UINT8_BIT; LoopVar2++) {
>if ((LoopVar4 & 1) != 0) {
> @@ -186,7 +185,7 @@ PutDword (
> 
>  /**
>Allocate memory spaces for data structures used in compression process.
> -
> +
>@retval EFI_SUCCESS   Memory was allocated successfully.
>@retval EFI_OUT_OF_RESOURCES  A memory allocation failed.
>  **/
> @@ -197,9 +196,9 @@ AllocateMemory (
>)
>  {
>mText   = AllocateZeroPool (WNDSIZ * 2 + MAXMATCH);
> -  mLevel  = AllocateZeroPool ((WNDSIZ + UINT8_MAX + 1) * sizeof 
> (*mLevel));
> -  mChildCount = AllocateZeroPool ((WNDSIZ + UINT8_MAX + 1) * sizeof
> (*mChildCount));
> -  mPosition   = AllocateZeroPool ((WNDSIZ + UINT8_MAX + 1) * sizeof
> (*mPosition));
> +  mLevel  = AllocateZeroPool ((WNDSIZ + MAX_UINT8 + 1) * sizeof 
> (*mLevel));
> +  mChildCount = AllocateZeroPool ((WNDSIZ + MAX_UINT8 + 1) * sizeof
> (*mChildCount));
> +  mPosition   = AllocateZeroPool ((WNDSIZ + MAX_UINT8 + 1) * sizeof
> (*mPosition));
>mParent = AllocateZeroPool (WNDSIZ * 2 * sizeof (*mParent));
>mPrev   = AllocateZeroPool (WNDSIZ * 2 * sizeof (*mPrev));
>mNext   = AllocateZeroPool ((MAX_HASH_VAL + 1) * sizeof (*mNext));
> @@ -251,8 +250,8 @@ InitSlide (
>  {
>NODE  LoopVar1;
> 
> -  SetMem (mLevel + WNDSIZ, (UINT8_MAX + 1) * sizeof (UINT8), 1);
> -  SetMem (mPosition +

Re: [edk2-devel] [edk2-platforms] [PATCH V1 1/2] MinPlatformPkg: Add missing bounds checks to CompressLib

2020-10-01 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Nate DeSimone 
> Sent: Wednesday, September 30, 2020 8:15 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Liming Gao
> ; Dong, Eric 
> Subject: [edk2-platforms] [PATCH V1 1/2] MinPlatformPkg: Add missing bounds
> checks to CompressLib
> 
> Current code only as bounds checks in ASSERT macros.
> They are also needed in release mode where ASSERT is not used.
> 
> Signed-off-by: Nate DeSimone 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  .../MinPlatformPkg/Library/CompressLib/CompressLib.c   | 10 --
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Library/CompressLib/CompressLib.c
> b/Platform/Intel/MinPlatformPkg/Library/CompressLib/CompressLib.c
> index 9f93e1ee2d..537eb3b693 100644
> --- a/Platform/Intel/MinPlatformPkg/Library/CompressLib/CompressLib.c
> +++ b/Platform/Intel/MinPlatformPkg/Library/CompressLib/CompressLib.c
> @@ -1002,7 +1002,10 @@ CountTFreq (
>  mTFreq[2]++;
>}
>  } else {
> -  ASSERT((LoopVar3+2)<(2 * NT - 1));
> +  ASSERT ((LoopVar3 + 2) < (2 * NT - 1));
> +  if ((LoopVar3 + 2) >= (2 * NT - 1)) {
> +return;
> +  }
>mTFreq[LoopVar3 + 2]++;
>  }
>}
> @@ -1101,7 +1104,10 @@ WriteCLen (
>  PutBits (CBIT, Count - 20);
>}
>  } else {
> -  ASSERT((LoopVar3+2) +  ASSERT ((LoopVar3 + 2) < NPT);
> +  if ((LoopVar3 + 2) >= NPT) {
> +return;
> +  }
>PutBits (mPTLen[LoopVar3 + 2], mPTCode[LoopVar3 + 2]);
>  }
>}
> --
> 2.27.0.windows.1



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




Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData.

2020-05-19 Thread Chiu, Chasel


Yes, thanks for good catch! I will correct it.

> -Original Message-
> From: Zeng, Star 
> Sent: Wednesday, May 20, 2020 12:21 PM
> To: Desimone, Nathaniel L ; Chiu, Chasel
> ; devel@edk2.groups.io
> Cc: Ma, Maurice ; Zeng, Star 
> Subject: RE: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to
> FspGlobalData.
> 
> equilivant is a typo?
> 
> > -Original Message-
> > From: Desimone, Nathaniel L 
> > Sent: Wednesday, May 20, 2020 12:12 PM
> > To: Chiu, Chasel ; devel@edk2.groups.io
> > Cc: Ma, Maurice ; Zeng, Star
> > 
> > Subject: RE: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to
> > FspGlobalData.
> >
> > Reviewed-by: Nate DeSimone 
> >
> > > -Original Message-
> > > From: Chiu, Chasel 
> > > Sent: Tuesday, May 19, 2020 8:34 PM
> > > To: devel@edk2.groups.io
> > > Cc: Ma, Maurice ; Desimone, Nathaniel L
> > > ; Zeng, Star 
> > > Subject: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to
> FspGlobalData.
> > >
> > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2726
> > >
> > > When FSP switching stack and calling bootloader functions, the
> > > function parameter in stack may not be accessible easily.
> > > We can store the function parameter pointer to FspGlobalData and
> > > retrieve it after stack switched.
> > >
> > > Also need to add Loader2PeiSwitchStack () to header file as public
> > > function for platform FSP code to consume.
> > >
> > > Cc: Maurice Ma 
> > > Cc: Nate DeSimone 
> > > Cc: Star Zeng 
> > > Signed-off-by: Chasel Chiu 
> > > ---
> > >  IntelFsp2Pkg/Include/FspGlobalData.h | 12
> ++--
> > >  IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h | 18
> > > +-
> > >  2 files changed, 27 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/IntelFsp2Pkg/Include/FspGlobalData.h
> > > b/IntelFsp2Pkg/Include/FspGlobalData.h
> > > index 5bde316893..dba9b48e1a 100644
> > > --- a/IntelFsp2Pkg/Include/FspGlobalData.h
> > > +++ b/IntelFsp2Pkg/Include/FspGlobalData.h
> > > @@ -52,12 +52,20 @@ typedef struct  {
> > > VOID   *MemoryInitUpdPtr;
> > > VOID   *SiliconInitUpdPtr;
> > > UINT8  ApiIdx;
> > > -   UINT8  FspMode; // 0: FSP in API mode; 1: FSP in
> > DISPATCH mode
> > > +   ///
> > > +   /// 0: FSP in API mode; 1: FSP in DISPATCH mode
> > > +   ///
> > > +   UINT8  FspMode;
> > > UINT8  OnSeparateStack;
> > > UINT8  Reserved3;
> > > UINT32 NumberOfPhases;
> > > UINT32 PhasesExecuted;
> > > -   UINT8  Reserved4[20];
> > > +   ///
> > > +   /// To store function parameters pointer
> > > +   /// so it can be retrieved after stack switched.
> > > +   ///
> > > +   VOID   *FunctionParameterPtr;
> > > +   UINT8  Reserved4[16];
> > > UINT32 PerfSig;
> > > UINT16 PerfLen;
> > > UINT16 Reserved5;
> > > diff --git a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> > > b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> > > index 0c76e9f022..bed2a5d677 100644
> > > --- a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> > > +++ b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> > > @@ -1,6 +1,6 @@
> > >  /** @file
> > >
> > > -  Copyright (c) 2014, Intel Corporation. All rights reserved.
> > > +  Copyright (c) 2014 - 2020, Intel Corporation. All rights
> > > + reserved.
> > >SPDX-License-Identifier: BSD-2-Clause-Patent
> > >
> > >  **/
> > > @@ -36,4 +36,20 @@ Pei2LoaderSwitchStack (
> > >VOID
> > >);
> > >
> > > +/**
> > > +
> > > +  This function is equilivant to Pei2LoaderSwitchStack () but just
> > > + indicates  the stack after switched is FSP stack.
> > > +
> > > +  @return ReturnKey  After switching to the saved stack,
> > > + this value will be saved in eax before
> > returning.
> > > +
> > > +
> > > +**/
> > > +UINT32
> > > +EFIAPI
> > > +Loader2PeiSwitchStack (
> > > +  VOID
> > > +  );
> > > +
> > >  #endif
> > > --
> > > 2.13.3.windows.1


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

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



Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData.

2020-05-20 Thread Chiu, Chasel


Thanks!

> -Original Message-
> From: Zeng, Star 
> Sent: Wednesday, May 20, 2020 12:34 PM
> To: Chiu, Chasel ; Desimone, Nathaniel L
> ; devel@edk2.groups.io
> Cc: Ma, Maurice ; Zeng, Star 
> Subject: RE: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to
> FspGlobalData.
> 
> No need to resend new patch, you can go ahead with Nate's review after the
> correction.
> 
> > -Original Message-
> > From: Chiu, Chasel 
> > Sent: Wednesday, May 20, 2020 12:25 PM
> > To: Zeng, Star ; Desimone, Nathaniel L
> > ; devel@edk2.groups.io
> > Cc: Ma, Maurice 
> > Subject: RE: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to
> > FspGlobalData.
> >
> >
> > Yes, thanks for good catch! I will correct it.
> >
> > > -Original Message-
> > > From: Zeng, Star 
> > > Sent: Wednesday, May 20, 2020 12:21 PM
> > > To: Desimone, Nathaniel L ; Chiu,
> > > Chasel ; devel@edk2.groups.io
> > > Cc: Ma, Maurice ; Zeng, Star
> > > 
> > > Subject: RE: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to
> > > FspGlobalData.
> > >
> > > equilivant is a typo?
> > >
> > > > -Original Message-
> > > > From: Desimone, Nathaniel L 
> > > > Sent: Wednesday, May 20, 2020 12:12 PM
> > > > To: Chiu, Chasel ; devel@edk2.groups.io
> > > > Cc: Ma, Maurice ; Zeng, Star
> > > > 
> > > > Subject: RE: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to
> > > > FspGlobalData.
> > > >
> > > > Reviewed-by: Nate DeSimone 
> > > >
> > > > > -Original Message-
> > > > > From: Chiu, Chasel 
> > > > > Sent: Tuesday, May 19, 2020 8:34 PM
> > > > > To: devel@edk2.groups.io
> > > > > Cc: Ma, Maurice ; Desimone, Nathaniel L
> > > > > ; Zeng, Star
> > > > > 
> > > > > Subject: [PATCH] IntelFsp2Pkg: Add FunctionParametePtr to
> > > FspGlobalData.
> > > > >
> > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2726
> > > > >
> > > > > When FSP switching stack and calling bootloader functions, the
> > > > > function parameter in stack may not be accessible easily.
> > > > > We can store the function parameter pointer to FspGlobalData and
> > > > > retrieve it after stack switched.
> > > > >
> > > > > Also need to add Loader2PeiSwitchStack () to header file as
> > > > > public function for platform FSP code to consume.
> > > > >
> > > > > Cc: Maurice Ma 
> > > > > Cc: Nate DeSimone 
> > > > > Cc: Star Zeng 
> > > > > Signed-off-by: Chasel Chiu 
> > > > > ---
> > > > >  IntelFsp2Pkg/Include/FspGlobalData.h | 12
> > > ++--
> > > > >  IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h | 18
> > > > > +-
> > > > >  2 files changed, 27 insertions(+), 3 deletions(-)
> > > > >
> > > > > diff --git a/IntelFsp2Pkg/Include/FspGlobalData.h
> > > > > b/IntelFsp2Pkg/Include/FspGlobalData.h
> > > > > index 5bde316893..dba9b48e1a 100644
> > > > > --- a/IntelFsp2Pkg/Include/FspGlobalData.h
> > > > > +++ b/IntelFsp2Pkg/Include/FspGlobalData.h
> > > > > @@ -52,12 +52,20 @@ typedef struct  {
> > > > > VOID   *MemoryInitUpdPtr;
> > > > > VOID   *SiliconInitUpdPtr;
> > > > > UINT8  ApiIdx;
> > > > > -   UINT8  FspMode; // 0: FSP in API mode; 1: FSP in
> > > > DISPATCH mode
> > > > > +   ///
> > > > > +   /// 0: FSP in API mode; 1: FSP in DISPATCH mode
> > > > > +   ///
> > > > > +   UINT8  FspMode;
> > > > > UINT8  OnSeparateStack;
> > > > > UINT8  Reserved3;
> > > > > UINT32 NumberOfPhases;
> > > > > UINT32 PhasesExecuted;
> > > > > -   UINT8  Reserved4[20];
> > > > > +   ///
> > > > > +   /// To store function parameters pointer
> > > > > +   /// so it can be retrieved after stack switched.
> > > > > +   ///
> > > > > +   VOID   *FunctionParameterPtr;
> > > > > +   UINT8  Re

Re: [edk2-devel] [PATCH] IntelFsp2Pkg GenCfgOpt.py: Initialize IncLines as empty list

2020-09-16 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of
> gaoliming
> Sent: Wednesday, September 16, 2020 5:58 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [edk2-devel] [PATCH] IntelFsp2Pkg GenCfgOpt.py: Initialize IncLines
> as empty list
> 
> IncLines as empty list for the case when InputHeaderFile is not specified.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Signed-off-by: Liming Gao 
> ---
>  IntelFsp2Pkg/Tools/GenCfgOpt.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> b/IntelFsp2Pkg/Tools/GenCfgOpt.py index e9de128e..bcced590 100644
> --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> @@ -1177,6 +1177,7 @@ EndList
>  UpdSignatureCheck = ['FSPT_UPD_SIGNATURE',
> 'FSPM_UPD_SIGNATURE', 'FSPS_UPD_SIGNATURE']
>  ExcludedSpecificUpd = ['FSPT_ARCH_UPD', 'FSPM_ARCH_UPD',
> 'FSPS_ARCH_UPD']
> 
> +IncLines = []
>  if InputHeaderFile != '':
>  if not os.path.exists(InputHeaderFile):
>   self.Error = "Input header file '%s' does not exist" %
> InputHeaderFile
> --
> 2.27.0.windows.1
> 
> 
> 
> 


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

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



Re: [edk2-devel] [edk2-platforms: PATCH V1] MinPlatformPkg/PlatformInitPei:

2020-07-17 Thread Chiu, Chasel


Hi Chandana,

Please see my question below.

Thanks,
Chasel


> -Original Message-
> From: Kumar, Chandana C 
> Sent: Wednesday, July 15, 2020 6:49 PM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V ; Chiu, Chasel
> ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms: PATCH V1] MinPlatformPkg/PlatformInitPei:
> 
> Create an Library instance of ReportCpuHobLib from PlatformInitPei driver.
> PA bits reported can be overriden using Library instance in Platform.
> 
> Update ReportCpuHobLib to PlatformInitPreMem driver and dec file.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2674
> 
> Change-Id: Iad1be2612e0748d5c9a2a766cd2256dd9845ec13
> Signed-off-by: Chandana Kumar 
> Cc: Sai Chaganty 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> ---
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> | 5 +++--
> 
> Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPre
> Mem.inf | 3 ++-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> index 7f74ac93..da312c86 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
> @@ -6,7 +6,7 @@
>  # INF files to generate AutoGen.c and AutoGen.h files  # for the build
> infrastructure.
>  #
> -# 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  # @@ -68,7 +68,8 @@
>TestPointLib|Include/Library/TestPointLib.h
>TestPointCheckLib|Include/Library/TestPointCheckLib.h
> 
> -SetCacheMtrrLib|Include/Library/SetCacheMtrrLib.h
> +  SetCacheMtrrLib|Include/Library/SetCacheMtrrLib.h
> +  ReportCpuHobLib|Include/Library/ReportCpuHobLib.h
> 
>  [PcdsFixedAtBuild, PcdsPatchableInModule]
> 
> 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/Platfor
> +++ mInitPreMem.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

You are adding library class here but still local function ReportCpuHob () 
defined in PlatformInitPreMem.c, I think we should remove that local function.


> 
>  [Packages]
>MinPlatformPkg/MinPlatformPkg.dec
> --
> 2.16.2.windows.1


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

View/Reply Online (#62741): https://edk2.groups.io/g/devel/message/62741
Mute This Topic: https://groups.io/mt/75517691/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] Platform/Intel: Add VmgExitLib to required DSC files

2020-08-10 Thread Chiu, Chasel

Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Gao, Liming 
> Sent: Tuesday, August 11, 2020 8:02 AM
> To: Tom Lendacky ; devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Dong, Eric ;
> Kinney, Michael D ; Agyeman, Prince
> ; Qian, Yi ; Steele, Kelly
> ; Sun, Zailiang ; Laszlo
> Ersek ; Brijesh Singh 
> Subject: RE: [PATCH 1/1] Platform/Intel: Add VmgExitLib to required DSC files
> 
> Reviewed-by: Liming Gao 
> 
> -Original Message-
> From: Tom Lendacky 
> Sent: 2020年8月10日 21:22
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Dong, Eric ; Gao,
> Liming ; Kinney, Michael D
> ; Agyeman, Prince
> ; Qian, Yi ; Steele, Kelly
> ; Sun, Zailiang ; Laszlo
> Ersek ; Brijesh Singh 
> Subject: [PATCH 1/1] Platform/Intel: Add VmgExitLib to required DSC files
> 
> From: Tom Lendacky 
> 
> Any DSC file that uses the UefiCpuPkg MpInitLib or CpuExeptionHandlerLib
> libraries, now requires the VmgExitLib library. Update the DSC files to
> include the VmgExitLib NULL library implementation.
> 
> Signed-off-by: Tom Lendacky 
> ---
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc | 2
> ++
>  Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc | 2 ++
>  Platform/Intel/QuarkPlatformPkg/Quark.dsc| 1
> +
>  Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc | 1
> +
>  Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 1
> +
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 +
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc  | 1 +
>  7 files changed, 9 insertions(+)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> index 0f0f15d3f6..026ddf4cd7 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> @@ -44,6 +44,8 @@
> 
> HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoR
> outerDxe.inf
> 
> Tcg2PhysicalPresenceLib|SecurityPkg/Library/DxeTcg2PhysicalPresenceLib/Dxe
> Tcg2PhysicalPresenceLib.inf
> 
> +  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
> +
>  [LibraryClasses.common.DXE_CORE]
>HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
> 
> MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib
> /DxeCoreMemoryAllocationLib.inf
> diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> index 3f784d58c9..8e1869078c 100644
> --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> @@ -32,6 +32,8 @@
> 
>TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
> 
> +  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
> +
>  [LibraryClasses.common.SEC]
> 
> ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseRe
> portStatusCodeLibNull.inf
> 
> CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPe
> iCpuExceptionHandlerLib.inf
> diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> index a02adb64e6..e352aed49f 100644
> --- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> +++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
> @@ -102,6 +102,7 @@
>  !endif
> 
> DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLib
> Null.inf
> 
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BaseP
> eCoffGetEntryPointLib.inf
> +  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
> 
>#
># UEFI & PI
> diff --git a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> index 3dbf616c66..d1e2c0f437 100644
> --- a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> +++ b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> @@ -90,6 +90,7 @@
>  !endif
> 
> DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLib
> Null.inf
> 
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BaseP
> eCoffGetEntryPointLib.inf
> +  VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
> 
>#
># UEFI & PI
> diff --git
> a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
> b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
> index 3cf6e12cdf..77c408a326 100644
> --- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
> +++
> b/Platform/Intel/SimicsOpenBoardPkg/Board

Re: [edk2-devel] [PATCH v2 6/9] IntelFsp2WrapperPkg/FspMeasurementLib: Add BaseFspMeasurementLib.

2020-08-05 Thread Chiu, Chasel


Hi Qi,

Please see my comments below inline.

Thanks,
Chasel


> -Original Message-
> From: Zhang, Qi1 
> Sent: Thursday, August 6, 2020 8:34 AM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Zhang,
> Qi1 
> Subject: [PATCH v2 6/9] IntelFsp2WrapperPkg/FspMeasurementLib: Add
> BaseFspMeasurementLib.
> 
> From: Jiewen Yao 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2376
> 
> Cc: Jiewen Yao 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Qi Zhang 
> Signed-off-by: Jiewen Yao 
> ---
>  .../BaseFspMeasurementLib.inf |  54 +++
>  .../BaseFspMeasurementLib/FspMeasurementLib.c | 349
> ++
>  2 files changed, 403 insertions(+)
>  create mode 100644
> IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasuremen
> tLib.inf
>  create mode 100644
> IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLib.
> c
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurem
> entLib.inf
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurem
> entLib.inf
> new file mode 100644
> index 00..d30168117d
> --- /dev/null
> +++
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/BaseFspMeasurem
> entLib.inf
> @@ -0,0 +1,54 @@
> +## @file
> 
> +#  Provides FSP measurement functions.
> 
> +#
> 
> +#  This library provides MeasureFspFirmwareBlob() to measure FSP binary.
> 
> +#
> 
> +# Copyright (c) 2020, Intel Corporation. All rights reserved.
> 
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +#
> 
> +##
> 
> +
> 
> +[Defines]
> 
> +  INF_VERSION= 0x00010005
> 
> +  BASE_NAME  = FspMeasurementLib
> 
> +  FILE_GUID  =
> 9A62C49D-C45A-4322-9F3C-45958DF0056B
> 
> +  MODULE_TYPE= BASE
> 
> +  VERSION_STRING = 1.0
> 
> +  LIBRARY_CLASS  = FspMeasurementLib
> 
> +
> 
> +#
> 
> +# The following information is for reference only and not required by the
> build tools.
> 
> +#
> 
> +#  VALID_ARCHITECTURES   = IA32 X64
> 
> +#
> 
> +
> 
> +[Sources]
> 
> +  FspMeasurementLib.c
> 
> +
> 
> +[Packages]
> 
> +  MdePkg/MdePkg.dec
> 
> +  MdeModulePkg/MdeModulePkg.dec
> 
> +  SecurityPkg/SecurityPkg.dec
> 
> +  IntelFsp2Pkg/IntelFsp2Pkg.dec
> 
> +  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> 
> +
> 
> +[LibraryClasses]
> 
> +  BaseLib
> 
> +  BaseMemoryLib
> 
> +  DebugLib
> 
> +  PrintLib
> 
> +  PcdLib
> 
> +  PeiServicesLib
> 
> +  PeiServicesTablePointerLib
> 
> +  FspWrapperApiLib
> 
> +  TpmMeasurementLib
> 
> +  HashLib
> 
> +
> 
> +[Ppis]
> 
> +  gEdkiiTcgPpiGuid
> ## CONSUMES
> 
> +
> 
> +[Pcd]
> 
> +  gIntelFsp2WrapperTokenSpaceGuid.PcdFspMeasurementConfig
> ## CONSUMES
> 
> +  gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress
> ## CONSUMES
> 
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdTcgPfpMeasurementRevision
> ## CONSUMES
> 
> +
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLi
> b.c
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLi
> b.c
> new file mode 100644
> index 00..316570cd2c
> --- /dev/null
> +++
> b/IntelFsp2WrapperPkg/Library/BaseFspMeasurementLib/FspMeasurementLi
> b.c
> @@ -0,0 +1,349 @@
> +/** @file
> 
> +  This library is used by FSP modules to measure data to TPM.
> 
> +
> 
> +Copyright (c) 2020, Intel Corporation. All rights reserved. 
> 
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +
> 
> +**/
> 
> +
> 
> +#include 
> 
> +#include 
> 
> +
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +#include 
> 
> +
> 
> +#include 
> 
> +#include 
> 
> +
> 
> +#pragma pack (1)
> 
> +
> 
> +#define PLATFORM_FIRMWARE_BLOB_DESC
> "Fv(----)"
> 
> +typedef struct {
> 
> +  UINT8 BlobDescriptionSize;
> 
> +  UINT8
> BlobDescription[sizeof(PLATFORM_FIRMWARE_BLOB_DESC)];
> 
> +  EFI_PHYSICAL_ADDRESS  BlobBase;
> 
> +  UINT64BlobLength;
> 
> +} PLATFORM_FIRMWARE_BLOB2_STRUCT;
> 
> +
> 
> +#define HANDOFF_TABLE_POINTER_DESC  

[edk2-devel] [PATCH v2 1/2] IntelFsp2Pkg: Add FSP*_ARCH_UPD.

2020-06-18 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2781

Introduce FSPT_ARCH_UPD and FSPS_ARCH_UPD to support debug events
and multi-phase silicon initialization.
For backward compatibility the original structures are kept and
new ARCH_UPD structures will be included only when UPD header
revision equal or greater than 2.

GenCfgOpt script also updated to prevent from generating duplicate
FSPT_ARCH_UPD and FSPS_ARCH_UPD typedef structures.

Cc: Maurice Ma 
Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---
 IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm | 78 
+-
 IntelFsp2Pkg/Include/FspEas/FspApi.h   | 81 
-
 IntelFsp2Pkg/Tools/GenCfgOpt.py|  6 +++---
 3 files changed, 156 insertions(+), 9 deletions(-)

diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm 
b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
index e354870a1d..7934eab6d7 100644
--- a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
+++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
@@ -1,7 +1,7 @@
 ;; @file
 ;  Provide FSP API entry points.
 ;
-; Copyright (c) 2016, Intel Corporation. All rights reserved.
+; Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.
 ; SPDX-License-Identifier: BSD-2-Clause-Patent
 ;;
 
@@ -78,6 +78,23 @@ struc LoadMicrocodeParams
 .size:
 endstruc
 
+struc LoadMicrocodeParamsFsp22
+; FSP_UPD_HEADER {
+.FspUpdHeaderSignature:   resd2
+.FspUpdHeaderRevision:resb1
+.FspUpdHeaderReserved:resb   23
+; }
+; FSPT_ARCH_UPD{
+.FsptArchUpd: resd8
+; }
+; FSPT_CORE_UPD {
+.MicrocodeCodeAddr:   resd1
+.MicrocodeCodeSize:   resd1
+.CodeRegionBase:  resd1
+.CodeRegionSize:  resd1
+; }
+.size:
+endstruc
 
 ;
 ; Define SSE macros
@@ -169,6 +186,11 @@ ASM_PFX(LoadMicrocodeDefault):
 
; skip loading Microcode if the MicrocodeCodeSize is zero
; and report error if size is less than 2k
+   ; first check UPD header revision
+   cmpbyte [esp + LoadMicrocodeParamsFsp22.FspUpdHeaderRevision], 2
+   jaeFsp22UpdHeader
+
+   ; UPD structure is compliant with FSP spec 2.0/2.1
moveax, dword [esp + LoadMicrocodeParams.MicrocodeCodeSize]
cmpeax, 0
jz Exit2
@@ -178,6 +200,19 @@ ASM_PFX(LoadMicrocodeDefault):
movesi, dword [esp + LoadMicrocodeParams.MicrocodeCodeAddr]
cmpesi, 0
jnzCheckMainHeader
+   jmpParamError
+
+Fsp22UpdHeader:
+   ; UPD structure is compliant with FSP spec 2.2
+   moveax, dword [esp + LoadMicrocodeParamsFsp22.MicrocodeCodeSize]
+   cmpeax, 0
+   jz Exit2
+   cmpeax, 0800h
+   jl ParamError
+
+   movesi, dword [esp + LoadMicrocodeParamsFsp22.MicrocodeCodeAddr]
+   cmpesi, 0
+   jnzCheckMainHeader
 
 ParamError:
moveax, 08002h
@@ -276,6 +311,11 @@ CheckAddress:
cmp   dword [esi + MicrocodeHdr.MicrocodeHdrVersion], 0h
jzDone
 
+   ; Check UPD header revision
+   cmpbyte [esp + LoadMicrocodeParamsFsp22.FspUpdHeaderRevision], 2
+   jaeFsp22UpdHeader1
+
+   ; UPD structure is compliant with FSP spec 2.0/2.1
; Is automatic size detection ?
mov   eax, dword [esp + LoadMicrocodeParams.MicrocodeCodeSize]
cmp   eax, 0h
@@ -287,6 +327,19 @@ CheckAddress:
jae   Done;Jif address is outside of microcode region
jmp   CheckMainHeader
 
+Fsp22UpdHeader1:
+   ; UPD structure is compliant with FSP spec 2.2
+   ; Is automatic size detection ?
+   mov   eax, dword [esp + LoadMicrocodeParamsFsp22.MicrocodeCodeSize]
+   cmp   eax, 0h
+   jzLoadMicrocodeDefault4
+
+   ; Address >= microcode region address + microcode region size?
+   add   eax, dword [esp + LoadMicrocodeParamsFsp22.MicrocodeCodeAddr]
+   cmp   esi, eax
+   jae   Done;Jif address is outside of microcode region
+   jmp   CheckMainHeader
+
 LoadMicrocodeDefault4:
 LoadCheck:
; Get the revision of the current microcode update loaded
@@ -349,11 +402,26 @@ ASM_PFX(EstablishStackFsp):
 
   push  DATA_LEN_OF_MCUD ; Size of the data region
   push  4455434Dh; Signature of the  data region 'MCUD'
-  push  dword [edx + 2Ch]; Code size   sizeof(FSPT_UPD_COMMON) + 12
-  push  dword [edx + 28h]; Code base   sizeof(FSPT_UPD_COMMON) + 8
-  push  dword [edx + 24h]; Microcode size  sizeof(FSPT_UPD_COMMON) + 4
-  push  dword [edx + 20h]; Microcode base  sizeof(FSPT_UPD_COMMON) + 0
 
+  ; check UPD structure revision (edx + 8)
+  cmp   byte [edx + LoadMicrocodeParamsFsp22.FspUpdHeaderRevision], 2
+  jae   Fsp22UpdHeader2
+
+  ; UPD structure is compliant with FSP spec 2.0/2.1
+  push  dword [edx + LoadMicrocodeParams.CodeRegionSize] ; Code size   
sizeof(FSPT_UPD_COMMON) + 12
+  

[edk2-devel] [PATCH v2 0/2] IntelFsp2Pkg: Add FSP*_ARCH_UPD.

2020-06-18 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2781

Introduce FSPT_ARCH_UPD and FSPS_ARCH_UPD to support debug events
and multi-phase silicon initialization.

In V2 backward compatibility support is added, the original
structures are kept and new ARCH_UPD structures will be
included only when UPD header revision equal or greater than 2.

GenCfgOpt script also updated to prevent from generating duplicate
FSPT_ARCH_UPD and FSPS_ARCH_UPD typedef structures.

Cc: Maurice Ma 
Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 

Chasel Chiu (2):
  IntelFsp2Pkg: Add FSP*_ARCH_UPD.
  IntelFsp2WrapperPkg: Add FSP*_ARCH_UPD.

 IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c 
| 26 --
 IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm 
| 78 
+-
 IntelFsp2Pkg/Include/FspEas/FspApi.h   
| 81 
-
 IntelFsp2Pkg/Tools/GenCfgOpt.py
|  6 +++---
 4 files changed, 180 insertions(+), 11 deletions(-)

-- 
2.13.3.windows.1


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

View/Reply Online (#61483): https://edk2.groups.io/g/devel/message/61483
Mute This Topic: https://groups.io/mt/74958111/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/2] IntelFsp2WrapperPkg: Add FSP*_ARCH_UPD.

2020-06-18 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2781

Provides sample code to include FSPT_ARCH_UPD initial values with
UPD header revision set to 2.

Cc: Maurice Ma 
Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---
 IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c 
| 26 --
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git 
a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
 
b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
index 2d1368c3ed..96b47e23da 100644
--- 
a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
+++ 
b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
@@ -1,7 +1,7 @@
 /** @file
   Sample to provide TempRamInitParams data.
 
-  Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -18,17 +18,39 @@ typedef struct {
 
 typedef struct {
   FSP_UPD_HEADERFspUpdHeader;
+  //
+  // If platform does not support FSP spec 2.2 remove FSPT_ARCH_UPD structure.
+  //
+  FSPT_ARCH_UPD FsptArchUpd;
   FSPT_CORE_UPD FsptCoreUpd;
 } FSPT_UPD_CORE_DATA;
 
 GLOBAL_REMOVE_IF_UNREFERENCED CONST FSPT_UPD_CORE_DATA FsptUpdDataPtr = {
   {
 0x4450555F54505346,
-0x00,
+//
+// UPD header revision must be equal or greater than 2 when the structure 
is compliant with FSP spec 2.2.
+//
+0x02,
 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 }
   },
+  //
+  // If platform does not support FSP spec 2.2 remove FSPT_ARCH_UPD structure.
+  //
+  {
+0x01,
+{
+  0x00, 0x00, 0x00
+},
+0x0020,
+0x,
+{
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+}
+  },
   {
 ((UINT32)FixedPcdGet64 (PcdCpuMicrocodePatchAddress) + FixedPcdGet32 
(PcdFlashMicrocodeOffset)),
 ((UINT32)FixedPcdGet64 (PcdCpuMicrocodePatchRegionSize) - FixedPcdGet32 
(PcdFlashMicrocodeOffset)),
-- 
2.13.3.windows.1


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

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



Re: [edk2-devel] [Patch] MinPlatformPkg PciSegmentInfoLibSimple: Update GetPciSegmentInfo() API

2020-06-24 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Gao, Liming 
> Sent: Wednesday, June 24, 2020 10:22 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray ; Chiu, Chasel ;
> Desimone, Nathaniel L ; Dong, Eric
> 
> Subject: [Patch] MinPlatformPkg PciSegmentInfoLibSimple: Update
> GetPciSegmentInfo() API
> 
> Update GetPciSegmentInfo() API to match its library class definition
> 
> Signed-off-by: Liming Gao 
> Cc: Ray Ni 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Eric Dong 
> ---
>  .../Pci/Library/PciSegmentInfoLibSimple/PciSegmentInfoLibSimple.c
> | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Pci/Library/PciSegmentInfoLibSimple/PciSe
> gmentInfoLibSimple.c
> b/Platform/Intel/MinPlatformPkg/Pci/Library/PciSegmentInfoLibSimple/PciSe
> gmentInfoLibSimple.c
> index 6a6218d906..398f4d4b78 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Pci/Library/PciSegmentInfoLibSimple/PciSe
> gmentInfoLibSimple.c
> +++
> b/Platform/Intel/MinPlatformPkg/Pci/Library/PciSegmentInfoLibSimple/PciSe
> gmentInfoLibSimple.c
> @@ -31,6 +31,7 @@ volatile PCI_SEGMENT_INFO  mPciSegmentInfo;
>@retval A callee owned array holding the segment information.
>  **/
>  PCI_SEGMENT_INFO *
> +EFIAPI
>  GetPciSegmentInfo (
>OUT UINTN  *Count
>)
> --
> 2.13.0.windows.1


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

View/Reply Online (#61684): https://edk2.groups.io/g/devel/message/61684
Mute This Topic: https://groups.io/mt/75082470/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] IntelFsp2Pkg/Tools/GenCfgOpt.py: Fix a bug about parse macro

2020-06-28 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Tan, Ming 
> Sent: Sunday, June 28, 2020 2:54 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [PATCH 1/1] IntelFsp2Pkg/Tools/GenCfgOpt.py: Fix a bug about parse
> macro
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2827
> 
> Fix a bug about parse the macro value which use another macro.
> 
> Use the following example to verify:
> [Define]
>   DEFINE M1 = V1
>   DEFINE M2 = $(M1)/V2
> 
>   !include $(M2)/pcd.dsc
> 
> The old code will failed parse M2 and cause following error:
> Traceback (most recent call last):
>   File "Edk2\IntelFsp2Pkg\Tools\GenCfgOpt.py", line 1550, in 
> sys.exit(Main())
>   File "Edk2\IntelFsp2Pkg\Tools\GenCfgOpt.py", line 1513, in Main
> if GenCfgOpt.ParseDscFile(DscFile, FvDir) != 0:
>   File "Edk2\IntelFsp2Pkg\Tools\GenCfgOpt.py", line 533, in ParseDscFile
> NewDscLines = IncludeDsc.readlines()
> ValueError: I/O operation on closed file.
> 
> The tool should support the value use another macro, and expand it.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Signed-off-by: Ming Tan 
> ---
>  IntelFsp2Pkg/Tools/GenCfgOpt.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> b/IntelFsp2Pkg/Tools/GenCfgOpt.py index e6c15108f5c5..e9de128e5055
> 100644
> --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> @@ -546,11 +546,11 @@ EndList
>  #DEFINE FSP_T_UPD_TOOL_GUID =
> 34686CA3-34F9-4901-B82A-BA630F0714C6
>  #DEFINE FSP_M_UPD_TOOL_GUID =
> 39A250DB-E465-4DD1-A2AC-E2BD3C0E2385
>  #DEFINE FSP_S_UPD_TOOL_GUID =
> CAE3605B-5B34-4C85-B3D7-27D54273C40F
> -Match =
> re.match("^\s*(?:DEFINE\s+)*(\w+)\s*=\s*([-.\w]+)", DscLine)
> +Match =
> + re.match("^\s*(?:DEFINE\s+)*(\w+)\s*=\s*([/$()-.\w]+)", DscLine)
>  if Match:
> -self._MacroDict[Match.group(1)] = Match.group(2)
> +self._MacroDict[Match.group(1)] =
> + self.ExpandMacros(Match.group(2))
>  if self.Debug:
> -print ("INFO : DEFINE %s = [ %s ]" %
> (Match.group(1), Match.group(2)))
> +print ("INFO : DEFINE %s = [ %s ]" %
> + (Match.group(1), self.ExpandMacros(Match.group(2
>  elif IsPcdSect:
>  #gSiPkgTokenSpaceGuid.PcdTxtEnable|FALSE
>  #gSiPkgTokenSpaceGuid.PcdOverclockEnable|TRUE
> --
> 2.24.0.windows.2


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

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



Re: [edk2-devel] [PATCH] IntelFsp2Pkg/FspSecCore: Use UefiCpuLib.

2020-06-28 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Dong, Eric 
> Sent: Saturday, June 27, 2020 9:52 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [PATCH] IntelFsp2Pkg/FspSecCore: Use UefiCpuLib.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2825
> 
> UefiCpuLib has API InitializeFloatingPointUnits.
> Remove internal copy of InitializeFloatingPointUnits in FspSecCoreM, use
> UefiCpuLib API.
> 
> This change also avoid later potential conflict when use UefiCpuLib for
> FspSecCoreM module.
> 
> Signed-off-by: Eric Dong 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> ---
>  IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf   |  3 +-
>  IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf   |  1 -
>  .../FspSecCore/Ia32/InitializeFpu.nasm| 72 ---
>  IntelFsp2Pkg/FspSecCore/SecMain.h | 15 +---
>  IntelFsp2Pkg/IntelFsp2Pkg.dsc |  1 +
>  5 files changed, 4 insertions(+), 88 deletions(-)  delete mode 100644
> IntelFsp2Pkg/FspSecCore/Ia32/InitializeFpu.nasm
> 
> diff --git a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> index 25f2a109ab..61b7ddca4c 100644
> --- a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> +++ b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> @@ -29,7 +29,6 @@
> 
>  [Sources.IA32]
>Ia32/Stack.nasm
> -  Ia32/InitializeFpu.nasm
>Ia32/FspApiEntryM.nasm
>Ia32/FspApiEntryCommon.nasm
>Ia32/FspHelper.nasm
> @@ -41,6 +40,7 @@
>  [Packages]
>MdePkg/MdePkg.dec
>IntelFsp2Pkg/IntelFsp2Pkg.dec
> +  UefiCpuPkg/UefiCpuPkg.dec
> 
>  [LibraryClasses]
>BaseMemoryLib
> @@ -51,6 +51,7 @@
>FspSwitchStackLib
>FspCommonLib
>FspSecPlatformLib
> +  UefiCpuLib
> 
>  [Pcd]
>gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase  ##
> CONSUMES
> diff --git a/IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf
> b/IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf
> index 971b311e42..664bde5678 100644
> --- a/IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf
> +++ b/IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf
> @@ -25,7 +25,6 @@
> 
>  [Sources.IA32]
>Ia32/Stack.nasm
> -  Ia32/InitializeFpu.nasm
>Ia32/FspApiEntryT.nasm
>Ia32/FspHelper.nasm
> 
> diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/InitializeFpu.nasm
> b/IntelFsp2Pkg/FspSecCore/Ia32/InitializeFpu.nasm
> deleted file mode 100644
> index ebc91c41e4..00
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/InitializeFpu.nasm
> +++ /dev/null
> @@ -1,72 +0,0 @@
> -;--
> -;
> -; Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved. -;
> SPDX-License-Identifier: BSD-2-Clause-Patent -; -; Abstract:
> -;
> -;--
> -
> -
> -SECTION .data
> -;
> -; Float control word initial value:
> -; all exceptions masked, double-precision, round-to-nearest -;
> -ASM_PFX(mFpuControlWord):
> -dw0x027F
> -;
> -; Multimedia-extensions control word:
> -; all exceptions masked, round-to-nearest, flush to zero for masked
> underflow -;
> -ASM_PFX(mMmxControlWord):
> - dd 0x01F80
> -
> -SECTION .text
> -
> -;
> -; Initializes floating point units for requirement of UEFI specification.
> -;
> -; This function initializes floating-point control word to 0x027F (all
> exceptions -; masked,double-precision, round-to-nearest) and
> multimedia-extensions control word -; (if supported) to 0x1F80 (all
> exceptions masked, round-to-nearest, flush to zero -; for masked underflow).
> -;
> -
> -global ASM_PFX(InitializeFloatingPointUnits)
> -ASM_PFX(InitializeFloatingPointUnits):
> -
> -
> -pushebx
> -
> -;
> -; Initialize floating point units
> -;
> -finit
> -fldcw[ASM_PFX(mFpuControlWord)]
> -
> -;
> -; Use CpuId instruction (CPUID.01H:EDX.SSE[bit 25] = 1) to test
> -; whether the processor supports SSE instruction.
> -;
> -mov eax, 1
> -cpuid
> -bt  edx, 25
> -jnc Done
> -
> -;
> -; Set OSFXSR bit 9 in CR4
> -;
> -mov eax, cr4
> -or  eax, BIT9
> -mov cr4, eax
> -
> -;
> -; The processor should support SSE instruction and we can use
> -; ldmxcsr instruction
> -;
> -ldmxcsr [ASM_PFX(mMmxControlWord)]
> -Done:
> -pop ebx
> -
> -ret
> diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.h
> b/IntelFsp2Pkg/FspSecCore/SecMain.h
> index af7f387960..f6333b0ffb 100644
> --- a/Int

Re: [edk2-devel] [edk2-staging/EdkRepo-Manifest] [PATCH] Intel-MinPlatform: Update FSP repo URL

2020-06-10 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Tuesday, June 9, 2020 9:49 AM
> To: devel@edk2.groups.io
> Cc: Desimone, Ashley E ; Chiu, Chasel
> ; Chaganty, Rangasai V
> ; Oram, Isaac W ;
> Gao, Liming ; Ni, Ray ; Agyeman,
> Prince ; Pandya, Puja
> 
> Subject: [edk2-staging/EdkRepo-Manifest] [PATCH] Intel-MinPlatform: Update
> FSP repo URL
> 
> The FSP repo has moved to the new Intel GitHub group.
> Updating the URL to the new location.
> 
> Signed-off-by: Nate DeSimone 
> Cc: Ashley DeSimone 
> Cc: Chasel Chiu 
> Cc: Sai Chaganty 
> Cc: Isaac Oram 
> Cc: Liming Gao 
> Cc: Ray Ni 
> Cc: Prince Agyeman 
> Cc: Puja Pandya 
> ---
>  edk2-platforms/Intel-MinPlatform/IntelMinPlatformManifest.xml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/edk2-platforms/Intel-MinPlatform/IntelMinPlatformManifest.xml
> b/edk2-platforms/Intel-MinPlatform/IntelMinPlatformManifest.xml
> index fa78924606..eeaae4dc3f 100644
> --- a/edk2-platforms/Intel-MinPlatform/IntelMinPlatformManifest.xml
> +++ b/edk2-platforms/Intel-MinPlatform/IntelMinPlatformManifest.xml
> @@ -59,7 +59,7 @@
>   name="Edk2Repo">https://github.com/tianocore/edk2.git
>   name="Edk2PlatformsRepo">https://github.com/tianocore/edk2-platforms.gi
> t
>   name="Edk2NonOsiRepo">https://github.com/tianocore/edk2-non-osi.git emote>
> - name="FspRepo">https://github.com/IntelFsp/FSP.git
> +https://github.com/intel/FSP.git
>
> 
>
> --
> 2.26.2.windows.1


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

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



[edk2-devel] [PATCH] IntelFsp2Pkg: Add Fsp22SecCoreS.inf to Dsc.

2020-06-09 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2788

DSC is incomplete according to the established CI policies.
Fsp22SecCoreS.inf needs to be added to the Components section
for completeness.

Cc: Maurice Ma 
Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---
 IntelFsp2Pkg/IntelFsp2Pkg.dsc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dsc b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
index 02fe9cb188..9b5e38c5d9 100644
--- a/IntelFsp2Pkg/IntelFsp2Pkg.dsc
+++ b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 # Provides driver and definitions to build fsp.
 #
-# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -65,6 +65,7 @@
   IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf
   IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
   IntelFsp2Pkg/FspSecCore/FspSecCoreS.inf
+  IntelFsp2Pkg/FspSecCore/Fsp22SecCoreS.inf
   IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.inf
 
 [PcdsFixedAtBuild.common]
-- 
2.13.3.windows.1


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

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



Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Add Fsp22SecCoreS.inf to Dsc.

2020-06-10 Thread Chiu, Chasel

Thanks Sean and I will correct the copyright typo.
We will evaluate Core CI enabling.

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Sean
> Sent: Wednesday, June 10, 2020 2:55 PM
> To: devel@edk2.groups.io; Chiu, Chasel 
> Cc: Ma, Maurice ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Add Fsp22SecCoreS.inf to Dsc.
> 
> I think your copyright year is off.  2022?
> 
> After you fix that
> 
> Reviewed-by: Sean Brogan 
> 
> Also since you are the package maintainer of this package what do you think
> about enabling Core CI?  We do this already in Project Mu which is how
> this missing entry was identified.
> https://github.com/microsoft/mu_silicon_intel_tiano/blob/release/202002/I
> ntelFsp2Pkg/IntelFsp2Pkg.ci.yaml
> 
> 
> Thanks
> Sean
> 
> 
> On 6/9/2020 7:33 PM, Chiu, Chasel wrote:
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2788
> >
> > DSC is incomplete according to the established CI policies.
> > Fsp22SecCoreS.inf needs to be added to the Components section for
> > completeness.
> >
> > Cc: Maurice Ma 
> > Cc: Nate DeSimone 
> > Cc: Star Zeng 
> > Signed-off-by: Chasel Chiu 
> > ---
> >   IntelFsp2Pkg/IntelFsp2Pkg.dsc | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dsc
> > b/IntelFsp2Pkg/IntelFsp2Pkg.dsc index 02fe9cb188..9b5e38c5d9 100644
> > --- a/IntelFsp2Pkg/IntelFsp2Pkg.dsc
> > +++ b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
> > @@ -1,7 +1,7 @@
> >   ## @file
> >   # Provides driver and definitions to build fsp.
> >   #
> > -# Copyright (c) 2014 - 2016, Intel Corporation. All rights
> > reserved.
> > +# Copyright (c) 2014 - 2022, Intel Corporation. All rights
> > +reserved.
> >   # SPDX-License-Identifier: BSD-2-Clause-Patent
> >   #
> >   ##
> > @@ -65,6 +65,7 @@
> > IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf
> > IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> > IntelFsp2Pkg/FspSecCore/FspSecCoreS.inf
> > +  IntelFsp2Pkg/FspSecCore/Fsp22SecCoreS.inf
> > IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.inf
> >
> >   [PcdsFixedAtBuild.common]
> >
> 
> 


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

View/Reply Online (#61077): https://edk2.groups.io/g/devel/message/61077
Mute This Topic: https://groups.io/mt/74789273/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] KabyLakeSiliconPkg: Bitmask comparison logic bug

2020-06-11 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Wednesday, June 10, 2020 8:31 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Chaganty, Rangasai V
> 
> Subject: [edk2-platforms] [PATCH] KabyLakeSiliconPkg: Bitmask comparison
> logic bug
> 
> (Cpptv & B_PCH_SPI_SFDPX_VSCCX_CPPTV) can only evaluate to two possible
> values, 0x0 or B_PCH_SPI_SFDPX_VSCCX_CPPTV (aka BIT31). The current
> comparison to 0x1 will always fail.
> 
> Fixed the if statement to compare to B_PCH_SPI_SFDPX_VSCCX_CPPTV.
> 
> Signed-off-by: Nate DeSimone 
> Cc: Chasel Chiu 
> Cc: Sai Chaganty 
> ---
>  .../KabylakeSiliconPkg/Hsti/Dxe/BootFirmwareMediaProtection.c   | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/BootFirmwareMediaProtection.c
> b/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/BootFirmwareMediaProtection.c
> index a255e7e514..467e133cd5 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/BootFirmwareMediaProtection.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/BootFirmwareMediaProtect
> +++ ion.c
> @@ -167,7 +167,7 @@ CheckBootFirmwareMediaProtection (
>FreePool (HstiErrorString);
>  }
>} else {
> -if ((Cpptv & B_PCH_SPI_SFDPX_VSCCX_CPPTV) == 1) {
> +if ((Cpptv & B_PCH_SPI_SFDPX_VSCCX_CPPTV) ==
> + B_PCH_SPI_SFDPX_VSCCX_CPPTV) {
> 
>HstiErrorString = BuildHstiErrorString
> (HSTI_BYTE0_BOOT_FIRMWARE_MEDIA_PROTECTION_ERROR_CODE_6 ,HSTI_
> SPI_FLASH_CONFIGURATION,
> HSTI_BYTE0_BOOT_FIRMWARE_MEDIA_PROTECTION_ERROR_STRING_6);
>Status = HstiLibAppendErrorString (
> --
> 2.20.1


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

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



Re: [edk2-devel] [PATCH 2/5] Platform/Intel/WhiskeylakeOpenBoardPkg: Change some PCDs type

2020-06-11 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Tan, Ming 
> Sent: Tuesday, June 9, 2020 7:24 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> 
> Subject: [PATCH 2/5] Platform/Intel/WhiskeylakeOpenBoardPkg: Change
> some PCDs type
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2791
> 
> Since the type of PcdStatusCodeUseSerial and PcdStatusCodeUseMemory in
> MdeModulePkg.dec are changed, so change them from PcdsFeatureFlag to
> PcdsFixedAtBuild in dsc files.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Signed-off-by: Ming Tan 
> ---
>  .../UpXtreme/OpenBoardPkgPcd.dsc   | 13
> +++--
>  .../WhiskeylakeURvp/OpenBoardPkgPcd.dsc| 14
> +++---
>  2 files changed, 14 insertions(+), 13 deletions(-)
> 
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.d
> sc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.d
> sc
> index af548dc81b..d797ae9d94 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.d
> sc
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.d
> s
> +++ c
> @@ -71,12 +71,6 @@
># Edk2 Configuration   ##
> gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSection
> First|FALSE-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE-!if
> $(TARGET) == RELEASE-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE-!else-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE-!endif
> gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
> gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmProfileEnable|FALSE
> gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE@@
> -216,6 +210,13 @@
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALS
> E   gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE +
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE+!if
> $(TARGET) == RELEASE+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE+!else+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE+!endif+
> gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoBarEnableMask|0x80
> gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBarRegisterOffset|0x00
> gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBusNumber|0x0diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> kgPcd.dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> kgPcd.dsc
> index b3dc1ef501..5d769e8153 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> kgPcd.dsc
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardP
> k
> +++ gPcd.dsc
> @@ -1,7 +1,7 @@
>  ## @file #  PCD configuration 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 #@@ -71,12
> +71,6 @@
># Edk2 Configuration   ##
> gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSection
> First|FALSE-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE-!if
> $(TARGET) == RELEASE-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE-!else-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE-!endif
> gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
> gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmProfileEnable|FALSE
> gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE@@
> -203,6 +197,12 @@
>  !if $(TARGET) == DEBUG
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALS
> E !endif+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE+!if
> $(TARGET) == RELEASE+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE+!else+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE+!endif
> gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoBarEnableMask|0x80
> gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBarRegisterOffset|0x00--
> 2.24.0.windows.2


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

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



Re: [edk2-devel] [PATCH 3/5] Platform/Intel/CometlakeOpenBoardPkg: Change some PCDs type

2020-06-11 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Tan, Ming 
> Sent: Tuesday, June 9, 2020 7:24 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Chaganty, Rangasai V
> 
> Subject: [PATCH 3/5] Platform/Intel/CometlakeOpenBoardPkg: Change some
> PCDs type
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2791
> 
> Since the type of PcdStatusCodeUseSerial and PcdStatusCodeUseMemory in
> MdeModulePkg.dec are changed, so change them from PcdsFeatureFlag to
> PcdsFixedAtBuild in dsc files.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Rangasai V Chaganty 
> Signed-off-by: Ming Tan 
> ---
>  .../CometlakeURvp/OpenBoardPkgPcd.dsc| 12
> ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkgP
> cd.dsc
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkgP
> cd.dsc
> index 1ccdb28f12..d611e99fc1 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkgP
> cd.dsc
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkgP
> cd
> +++ .dsc
> @@ -75,12 +75,6 @@
># Edk2 Configuration   ##
> gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSection
> First|FALSE-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE-!if
> $(TARGET) == RELEASE-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE-!else-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE-!endif
> gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
> gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmProfileEnable|FALSE
> gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE@@
> -207,6 +201,12 @@
>  !if $(TARGET) == DEBUG
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALS
> E !endif+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE+!if
> $(TARGET) == RELEASE+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE+!else+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE+!endif
> gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoBarEnableMask|0x80
> gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBarRegisterOffset|0x00--
> 2.24.0.windows.2


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

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



Re: [edk2-devel] [PATCH 4/5] Platform/Intel/KabylakeOpenBoardPkg: Change some PCDs type

2020-06-11 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Tan, Ming 
> Sent: Tuesday, June 9, 2020 7:24 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> 
> Subject: [PATCH 4/5] Platform/Intel/KabylakeOpenBoardPkg: Change some
> PCDs type
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2791
> 
> Since the type of PcdStatusCodeUseSerial and PcdStatusCodeUseMemory in
> MdeModulePkg.dec are changed, so change them from PcdsFeatureFlag to
> PcdsFixedAtBuild in dsc files.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Signed-off-by: Ming Tan 
> ---
>  .../GalagoPro3/OpenBoardPkgPcd.dsc | 14
> +++---
>  .../KabylakeRvp3/OpenBoardPkgPcd.dsc   | 14 +++---
>  2 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
> index 7393897249..352416a489 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
> @@ -1,7 +1,7 @@
>  ## @file #  PCD configuration 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 #@@ -69,12 +69,6 @@
># Edk2 Configuration   ##
> gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSection
> First|FALSE-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE-!if
> $(TARGET) == RELEASE-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE-!else-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE-!endif
> gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
> gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmProfileEnable|FALSE
> gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE@@
> -206,6 +200,12 @@
>  !if $(TARGET) == DEBUG
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALS
> E !endif+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE+!if
> $(TARGET) == RELEASE+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE+!else+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE+!endif
> gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoBarEnableMask|0x80
> gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBarRegisterOffset|0x40diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.d
> sc
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.d
> sc
> index 916b5189fe..9e8b148753 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.d
> sc
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.d
> +++ sc
> @@ -1,7 +1,7 @@
>  ## @file #  PCD configuration 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 #@@ -107,12
> +107,6 @@
># Edk2 Configuration   ##
> gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSection
> First|FALSE-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE-!if
> $(TARGET) == RELEASE-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE-!else-
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE-!endif
> gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
> gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmProfileEnable|FALSE
> gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE@@
> -244,6 +238,12 @@
>  !if $(TARGET) == DEBUG
> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl|FALS
> E !endif+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseMemory|FALSE+!if
> $(TARGET) == RELEASE+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|FALSE+!else+
> gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE+!endif
> gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoBarEnableMask|0x80
> gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPciBarRegisterOffset|0x40--
> 2.24.0.windows.2


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

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



[edk2-devel] [PATCH] IntelFsp2Pkg: Add FSP*_ARCH_UPD.

2020-06-04 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2781

Introduce FSPT_ARCH_UPD and FSPS_ARCH_UPD to support debug events
and multi-phase silicon initialization.

Cc: Maurice Ma 
Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---
 IntelFsp2Pkg/Include/FspEas/FspApi.h | 55 
+++
 1 file changed, 55 insertions(+)

diff --git a/IntelFsp2Pkg/Include/FspEas/FspApi.h 
b/IntelFsp2Pkg/Include/FspEas/FspApi.h
index ed40f9538c..88c5b49e61 100644
--- a/IntelFsp2Pkg/Include/FspEas/FspApi.h
+++ b/IntelFsp2Pkg/Include/FspEas/FspApi.h
@@ -106,6 +106,27 @@ typedef struct {
 } FSP_UPD_HEADER;
 
 ///
+/// FSPT_ARCH_UPD Configuration.
+///
+typedef struct {
+  ///
+  /// Revision Revision of the structure is 1 for this version of the 
specification.
+  ///
+  UINT8   Revision;
+  UINT8   Reserved[3];
+  ///
+  /// Length Length of the structure in bytes. The current value for this 
field is 32.
+  ///
+  UINT32  Length;
+  ///
+  /// FspDebugHandler Optional debug handler for the bootloader to receive 
debug messages
+  /// occurring during FSP execution.
+  ///
+  FSP_DEBUG_HANDLER   FspDebugHandler;
+  UINT8   Reserved1[20];
+} FSPT_ARCH_UPD;
+
+///
 /// FSPM_ARCH_UPD Configuration.
 ///
 typedef struct {
@@ -146,6 +167,32 @@ typedef struct {
   UINT8   Reserved1[4];
 } FSPM_ARCH_UPD;
 
+typedef struct {
+  ///
+  /// Revision Revision of the structure is 1 for this version of the 
specification.
+  ///
+  UINT8  Revision;
+  UINT8  Reserved[3];
+  ///
+  /// Length Length of the structure in bytes. The current value for this 
field is 32.
+  ///
+  UINT32  Length;
+  ///
+  /// FspEventHandler Optional event handler for the bootloader to be informed 
of events
+  /// occurring during FSP execution.
+  ///
+  FSP_EVENT_HANDLER   FspEventHandler;
+  ///
+  /// A FSP binary may optionally implement multi-phase silicon initialization,
+  /// This is only supported if the FspMultiPhaseSiInitEntryOffset field in 
FSP_INFO_HEADER
+  /// is non-zero.
+  /// To enable multi-phase silicon initialization, the bootloader must set
+  /// EnableMultiPhaseSiliconInit to a non-zero value.
+  ///
+  UINT8   EnableMultiPhaseSiliconInit;
+  UINT8   Reserved1[19];
+} FSPS_ARCH_UPD;
+
 ///
 /// FSPT_UPD_COMMON Configuration.
 ///
@@ -154,6 +201,10 @@ typedef struct {
   /// FSP_UPD_HEADER Configuration.
   ///
   FSP_UPD_HEADER  FspUpdHeader;
+  ///
+  /// FSPT_ARCH_UPD Configuration.
+  ///
+  FSPT_ARCH_UPD   FsptArchUpd;
 } FSPT_UPD_COMMON;
 
 ///
@@ -178,6 +229,10 @@ typedef struct {
   /// FSP_UPD_HEADER Configuration.
   ///
   FSP_UPD_HEADER  FspUpdHeader;
+  ///
+  /// FSPS_ARCH_UPD Configuration.
+  ///
+  FSPS_ARCH_UPD   FspsArchUpd;
 } FSPS_UPD_COMMON;
 
 ///
-- 
2.13.3.windows.1


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

View/Reply Online (#60714): https://edk2.groups.io/g/devel/message/60714
Mute This Topic: https://groups.io/mt/74666963/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 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. 

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 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 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] [edk2-platforms] [PATCH v8 0/6] Create a Library instance of ReportCpuHobLib

2020-07-21 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kuo, IanX 
> Sent: Tuesday, July 21, 2020 3:29 PM
> 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 v8 0/6] Create a Library instance of
> ReportCpuHobLib
> 
> 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   |  1 +
>  .../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, 30 insertions(+), 36 deletions(-)
> 
> --
> 2.27.0.windows.1


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

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



Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Add YAML file generation support

2021-02-03 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Loo Tung Lun 
> Sent: Wednesday, February 3, 2021 8:36 AM
> To: devel@edk2.groups.io
> Cc: Loo, Tung Lun ; Ma, Maurice
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Chiu,
> Chasel 
> Subject: [PATCH] IntelFsp2Pkg: Add YAML file generation support
> 
> Add support for YAML format file generation in addition
> to current BSF structure. Configuration of YAML format
> output will be supported by an open source ConfigEditor.
> 
> Reference to YAML code, test and ConfigEditor is at
> https://github.com/joshloo/fsp_yaml_cfg/tree/master/Tools
> 
> A unit test is also added in Tests folder. This test compares
> the generated yaml file against the expected output to know
> if it is constructing the yaml data structure as expected.
> 
> Cc: Maurice Ma 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Chasel Chiu 
> Signed-off-by: Loo Tung Lun 
> ---
>  IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py  | 875 ++
>  IntelFsp2Pkg/Tools/GenCfgOpt.py   | 470 +++---
>  IntelFsp2Pkg/Tools/Tests/ExpectedFspUpd.h |  16 +
>  IntelFsp2Pkg/Tools/Tests/ExpectedFspmUpd.h|  75 ++
>  IntelFsp2Pkg/Tools/Tests/ExpectedFspsUpd.h|  69 ++
>  IntelFsp2Pkg/Tools/Tests/ExpectedFsptUpd.h|  87 ++
>  IntelFsp2Pkg/Tools/Tests/ExpectedOutput.bsf   |  88 ++
>  IntelFsp2Pkg/Tools/Tests/ExpectedOutput.yaml  | 270 ++
>  IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc   | 469 ++
>  IntelFsp2Pkg/Tools/Tests/test_yaml.py |  96 ++
>  .../UserManuals/FspDscBsf2YamlUserManual.md   |  39 +
>  11 files changed, 2422 insertions(+), 132 deletions(-)
>  create mode 100644 IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
>  create mode 100644 IntelFsp2Pkg/Tools/Tests/ExpectedFspUpd.h
>  create mode 100644 IntelFsp2Pkg/Tools/Tests/ExpectedFspmUpd.h
>  create mode 100644 IntelFsp2Pkg/Tools/Tests/ExpectedFspsUpd.h
>  create mode 100644 IntelFsp2Pkg/Tools/Tests/ExpectedFsptUpd.h
>  create mode 100644 IntelFsp2Pkg/Tools/Tests/ExpectedOutput.bsf
>  create mode 100644 IntelFsp2Pkg/Tools/Tests/ExpectedOutput.yaml
>  create mode 100644 IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
>  create mode 100644 IntelFsp2Pkg/Tools/Tests/test_yaml.py
>  create mode 100644
> IntelFsp2Pkg/Tools/UserManuals/FspDscBsf2YamlUserManual.md
> 
> diff --git a/IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
> b/IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
> new file mode 100644
> index 00..395fc2c526
> --- /dev/null
> +++ b/IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
> @@ -0,0 +1,875 @@
> +#!/usr/bin/env python
> 
> +## @ FspDscBsf2Yaml.py
> 
> +# This script convert FSP BSF format into DSC format
> 
> +#
> 
> +# Copyright(c) 2021, Intel Corporation. All rights reserved.
> 
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +#
> 
> +##
> 
> +
> 
> +import os
> 
> +import re
> 
> +import sys
> 
> +from datetime import date
> 
> +from collections import OrderedDict
> 
> +from functools import reduce
> 
> +
> 
> +from GenCfgOpt import CGenCfgOpt
> 
> +
> 
> +__copyright_tmp__ = """## @file
> 
> +#
> 
> +#  YAML CFGDATA %s File.
> 
> +#
> 
> +#  Copyright(c) %4d, Intel Corporation. All rights reserved.
> 
> +#  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +#
> 
> +##
> 
> +"""
> 
> +
> 
> +__copyright_dsc__ = """## @file
> 
> +#
> 
> +#  Copyright (c) %04d, Intel Corporation. All rights reserved.
> 
> +#  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> +#
> 
> +##
> 
> +
> 
> +[PcdsDynamicVpd.Upd]
> 
> +  #
> 
> +  # Global definitions in BSF
> 
> +  # !BSF BLOCK:{NAME:"FSP UPD Configuration", VER:"0.1"}
> 
> +  #
> 
> +
> 
> +"""
> 
> +
> 
> +
> 
> +def Bytes2Val(Bytes):
> 
> +return reduce(lambda x, y: (x << 8) | y, Bytes[::-1])
> 
> +
> 
> +
> 
> +class CFspBsf2Dsc:
> 
> +
> 
> +def __init__(self, bsf_file):
> 
> +self.cfg_list = CFspBsf2Dsc.parse_bsf(bsf_file)
> 
> +
> 
> +def get_dsc_lines(self):
> 
> +return CFspBsf2Dsc.generate_dsc(self.cfg_list)
> 
> +
> 
> +def save_dsc(self, dsc_file):
> 
> +return CFspBsf2Dsc.generate_dsc(self.cfg_list, dsc_file)
> 
> +
> 
> +@staticmethod
> 
> +def parse_bsf(bsf_file):
> 
> +
> 
> +fd = open(bsf_file, 'r')
> 
> +bsf_txt = fd.read()
> 
> +fd.close()
> 
> +
> 
> +find_list = []
> 
> +regex = re.compile(r'\s+Fi

Re: [edk2-devel] [edk2-platforms][Patch 1/3] CoffeelakeSiliconPkg/BaseSmbusLib: Fix SmBusSendByte value

2021-06-10 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kinney, Michael D 
> Sent: Friday, June 11, 2021 6:46 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Chaganty, Rangasai V
> 
> Subject: [edk2-platforms][Patch 1/3] CoffeelakeSiliconPkg/BaseSmbusLib: Fix
> SmBusSendByte value
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3450
> 
> Update SmBusSendByte() to write value to Command Register instead of Host
> Data registers.
> 
> Cc: Chasel Chiu 
> Cc: Sai Chaganty 
> Signed-off-by: Michael D Kinney 
> ---
>  .../Pch/Library/BaseSmbusLib/BaseSmbusLib.c   | 24 +--
>  1 file changed, 17 insertions(+), 7 deletions(-)
> 
> diff --git
> a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbusLib.c
> b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbusLib.c
> index 3d6386d433..dacf9d03b2 100644
> ---
> a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbusLib.c
> +++ b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSm
> +++ busLib.c
> @@ -203,14 +203,24 @@ InternalSmBusNonBlock (
>  AuxiliaryControl |= B_SMBUS_IO_AAC;
>}
>//
> -  // Set Host Commond Register.
> +  // We do not need Data Register for SendByte Command
>//
> -  IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HCMD, (UINT8)
> SMBUS_LIB_COMMAND (SmBusAddress));
> -  //
> -  // Write value to Host Data 0 and Host Data 1 Registers.
> -  //
> -  IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HD0, (UINT8) Value);
> -  IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HD1, (UINT8) (Value >> 8));
> +  if ((HostControl == V_SMBUS_IO_SMB_CMD_BYTE) && ((SmBusAddress &
> BIT0) == B_SMBUS_IO_WRITE)) {
> +//
> +// Set Host Command Register.
> +//
> +IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HCMD, (UINT8)Value);  }
> + else {
> +//
> +// Set Host Command Register.
> +//
> +IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HCMD, (UINT8)
> SMBUS_LIB_COMMAND (SmBusAddress));
> +//
> +// Write value to Host Data 0 and Host Data 1 Registers.
> +//
> +IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HD0, (UINT8) Value);
> +IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HD1, (UINT8) (Value >>
> + 8));  }
>//
>// Set Auxiliary Control Regiester.
>//
> --
> 2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76349): https://edk2.groups.io/g/devel/message/76349
Mute This Topic: https://groups.io/mt/83456848/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 2/3] KabylakeSiliconPkg/BaseSmbusLib: Fix SmBusSendByte value

2021-06-10 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Kinney, Michael D 
> Sent: Friday, June 11, 2021 6:46 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms][Patch 2/3] KabylakeSiliconPkg/BaseSmbusLib: Fix
> SmBusSendByte value
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3451
> 
> Update SmBusSendByte() to write value to Command Register instead of Host
> Data registers.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Signed-off-by: Michael D Kinney 
> ---
>  .../Pch/Library/BaseSmbusLib/BaseSmbusLib.c   | 24 +--
>  1 file changed, 17 insertions(+), 7 deletions(-)
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbusLib.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbusLib.c
> index 5d09e18613..68dc698aaf 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbusLib.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbu
> +++ sLib.c
> @@ -201,14 +201,24 @@ InternalSmBusNonBlock (
>  HostControl  |= B_PCH_SMBUS_PEC_EN;
>}
>//
> -  // Set Host Commond Register.
> +  // We do not need Data Register for SendByte Command
>//
> -  IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HCMD, (UINT8)
> SMBUS_LIB_COMMAND (SmBusAddress));
> -  //
> -  // Write value to Host Data 0 and Host Data 1 Registers.
> -  //
> -  IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HD0, (UINT8) Value);
> -  IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HD1, (UINT8) (Value >> 8));
> +  if ((HostControl == V_PCH_SMBUS_SMB_CMD_BYTE) && ((SmBusAddress &
> BIT0) == B_PCH_SMBUS_WRITE)) {
> +//
> +// Set Host Command Register.
> +//
> +IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HCMD, (UINT8)Value);  }
> + else {
> +//
> +// Set Host Command Register.
> +//
> +IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HCMD, (UINT8)
> SMBUS_LIB_COMMAND (SmBusAddress));
> +//
> +// Write value to Host Data 0 and Host Data 1 Registers.
> +//
> +IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HD0, (UINT8) Value);
> +IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HD1, (UINT8) (Value >>
> + 8));  }
>//
>// Set Auxiliary Control Regiester.
>//
> --
> 2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76350): https://edk2.groups.io/g/devel/message/76350
Mute This Topic: https://groups.io/mt/83456851/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 v3 32/41] CoffeelakeSiliconPkg: Remove PCH SPI PPI and Protocol from package

2021-06-18 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Friday, June 18, 2021 10:07 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Chaganty, Rangasai V
> ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms][PATCH v3 32/41] CoffeelakeSiliconPkg: Remove PCH
> SPI PPI and Protocol from package
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> The following PPI and Protocols have moved to IntelSiliconPkg. The remaining
> definitions in CoffeelakeSiliconPkg are removed and libs/ modules that need to
> reference IntelSiliconPkg are updated.
> 
> 1. gPchSpiProtocolGuid
> 2. gPchSmmSpiProtocolGuid
> 3. gPchSpiPpiGuid
> 
> Cc: Chasel Chiu 
> Cc: Sai Chaganty 
> Signed-off-by: Michael Kubacki 
> Reviewed-by: Nate DeSimone 
> ---
>  Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Ppi/Spi.h
> |  27 --
>  Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Protocol/Spi.h
> | 295 
>  Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.inf
> |   1 +
> 
> Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiCommonLib/
> BasePchSpiCommonLib.inf |   1 +
>  Silicon/Intel/CoffeelakeSiliconPkg/Pch/Spi/Smm/PchSpiSmm.inf
> |   1 +
>  Silicon/Intel/CoffeelakeSiliconPkg/SiPkg.dec 
>   |   3 -
>  6 files changed, 3 insertions(+), 325 deletions(-)
> 
> diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Ppi/Spi.h
> b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Ppi/Spi.h
> deleted file mode 100644
> index d3ff152742cf..
> --- a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Ppi/Spi.h
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -/** @file
> -  This file defines the PCH SPI PPI which implements the
> -  Intel(R) PCH SPI Host Controller Compatibility Interface.
> -
> -  Copyright (c) 2019 Intel Corporation. All rights reserved. 
> -
> -  SPDX-License-Identifier: BSD-2-Clause-Patent -**/
> -
> -#ifndef _PCH_SPI_PPI_H_
> -#define _PCH_SPI_PPI_H_
> -
> -#include 
> -
> -//
> -// Extern the GUID for PPI users.
> -//
> -extern EFI_GUID   gPchSpiPpiGuid;
> -
> -/**
> -  Reuse the PCH_SPI_PROTOCOL definitions
> -  This is possible becaues the PPI implementation does not rely on a 
> PeiService
> pointer,
> -  as it uses EDKII Glue Lib to do IO accesses -**/ -typedef PCH_SPI_PROTOCOL
> PCH_SPI_PPI;
> -
> -#endif
> diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Protocol/Spi.h
> b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Protocol/Spi.h
> deleted file mode 100644
> index 22df7fe35147..
> --- a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Protocol/Spi.h
> +++ /dev/null
> @@ -1,295 +0,0 @@
> -/** @file
> -  This file defines the PCH SPI Protocol which implements the
> -  Intel(R) PCH SPI Host Controller Compatibility Interface.
> -
> -  Copyright (c) 2019 Intel Corporation. All rights reserved. 
> -
> -  SPDX-License-Identifier: BSD-2-Clause-Patent -**/
> -
> -#ifndef _PCH_SPI_PROTOCOL_H_
> -#define _PCH_SPI_PROTOCOL_H_
> -
> -//
> -// Extern the GUID for protocol users.
> -//
> -extern EFI_GUID   gPchSpiProtocolGuid;
> -extern EFI_GUID   gPchSmmSpiProtocolGuid;
> -
> -//
> -// Forward reference for ANSI C compatibility -// -typedef struct
> _PCH_SPI_PROTOCOL  PCH_SPI_PROTOCOL;
> -
> -//
> -// SPI protocol data structures and definitions -//
> -
> -/**
> -  Flash Region Type
> -**/
> -typedef enum {
> -  FlashRegionDescriptor,
> -  FlashRegionBios,
> -  FlashRegionMe,
> -  FlashRegionGbE,
> -  FlashRegionPlatformData,
> -  FlashRegionDer,
> -  FlashRegionEC = 8,
> -  FlashRegionAll,
> -  FlashRegionMax
> -} FLASH_REGION_TYPE;
> -
> -//
> -// Protocol member functions
> -//
> -
> -/**
> -  Read data from the flash part.
> -
> -  @param[in] This Pointer to the PCH_SPI_PROTOCOL instance.
> -  @param[in] FlashRegionType  The Flash Region type for flash cycle 
> which is
> listed in the Descriptor.
> -  @param[in] Address  The Flash Linear Address must fall within 
> a region
> for which BIOS has access permissions.
> -  @param[in] ByteCountNumber of bytes in the data portion of the 
> SPI
> cycle.
> -  @param[out] Buffer  The Pointer to caller-allocated buffer 
> containing
> the dada received.
> -  It is the caller's responsibility to make 
> sure Buffer is large
> enough for the total number of bytes read.
> -
> -  @retval EFI_SUCCESS Com

Re: [edk2-devel] [edk2-platforms][PATCH v3 39/41] KabylakeSiliconPkg: Identify flash regions by GUID

2021-06-18 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Friday, June 18, 2021 10:07 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Chaganty, Rangasai V
> ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms][PATCH v3 39/41] KabylakeSiliconPkg: Identify flash
> regions by GUID
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> Updates the code to identify flash regions by GUID and internally map the GUID
> entries to values specific to KabylakeSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Rangasai V Chaganty 
> Cc: Nate DeSimone 
> Signed-off-by: Michael Kubacki 
> ---
>  Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/SecureMemoryMapConfiguration.c
> | 106 ++-
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/LibraryPrivate/BasePchSpiCommonLib/SpiC
> ommon.c | 140 
>  Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/HstiSiliconDxe.inf
> |   9 ++
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/IncludePrivate/Library/PchSpiCommonLib.
> h   |  20 +--
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/LibraryPrivate/BasePchSpiCommonLib/Bas
> ePchSpiCommonLib.inf |  11 ++
>  5 files changed, 247 insertions(+), 39 deletions(-)
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/SecureMemoryMapConfiguration.c
> b/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/SecureMemoryMapConfiguration.c
> index a3c9bbebeaa9..ccf63b216f70 100644
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/SecureMemoryMapConfiguration.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/SecureMemoryMapConfigura
> +++ tion.c
> @@ -2,11 +2,14 @@
>This file contains the tests for the SecureMemoryMapConfiguration bit
> 
>  Copyright (c) 2017, Intel Corporation. All rights reserved.
> +Copyright (c) Microsoft Corporation.
> +
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> 
>  #include "HstiSiliconDxe.h"
> +#include 
> 
>  typedef struct {
>UINT64   Base;
> @@ -100,6 +103,90 @@ MEMORY_RANGE
> mNonLockableMemoryRange[NonLockableMemoryRangeMax] = {  // 14.
> SPI_BAR0 (BDF 0:31:5 + 0x10)  };
> 
> +typedef enum {
> +  FlashRegionDescriptor,
> +  FlashRegionBios,
> +  FlashRegionMe,
> +  FlashRegionGbe,
> +  FlashRegionPlatformData,
> +  FlashRegionDer,
> +  FlashRegionAll,
> +  FlashRegionMax
> +} FLASH_REGION_TYPE;
> +
> +typedef struct {
> +  EFI_GUID*Guid;
> +  FLASH_REGION_TYPE   Type;
> +} FLASH_REGION_MAPPING;
> +
> +FLASH_REGION_MAPPING mFlashRegionTypes[] = {
> +  {
> +,
> +FlashRegionDescriptor
> +  },
> +  {
> +,
> +FlashRegionBios
> +  },
> +  {
> +,
> +FlashRegionMe
> +  },
> +  {
> +,
> +FlashRegionGbe
> +  },
> +  {
> +,
> +FlashRegionPlatformData
> +  },
> +  {
> +,
> +FlashRegionDer
> +  },
> +  {
> +,
> +FlashRegionAll
> +  },
> +  {
> +,
> +FlashRegionMax
> +  }
> +};
> +
> +/**
> +  Returns the type of a flash region given its GUID.
> +
> +  @param[in]FlashRegionGuid   Pointer to the flash region GUID.
> +  @param[out]   FlashRegionType   Pointer to a buffer that will be set to the
> flash region type value.
> +
> +  @retval   EFI_SUCCESS The flash region type was found for 
> the given
> flash region GUID.
> +  @retval   EFI_INVALID_PARAMETER   A pointer argument passed to the
> function is NULL.
> +  @retval   EFI_NOT_FOUND   The flash region type was not found 
> for
> the given flash region GUID.
> +
> +**/
> +EFI_STATUS
> +GetFlashRegionType (
> +  IN EFI_GUID   *FlashRegionGuid,
> +  OUTFLASH_REGION_TYPE  *FlashRegionType
> +  )
> +{
> +  UINTN   Index;
> +
> +  if (FlashRegionGuid == NULL || FlashRegionType == NULL) {
> +return EFI_INVALID_PARAMETER;
> +  }
> +
> +  for (Index = 0; Index < ARRAY_SIZE (mFlashRegionTypes); Index++) {
> +if (CompareGuid (mFlashRegionTypes[Index].Guid, FlashRegionGuid)) {
> +  *FlashRegionType = mFlashRegionTypes[Index].Type;
> +  return EFI_SUCCESS;
> +}
> +  }
> +
> +  return EFI_NOT_FOUND;
> +}
> +
>  /**
>Check for overlaps in single range array
> 
> @@ -224,7 +311,7 @@ AcquireSpiBar0 (
>  {
>UINT32  SpiBar0;
>UINTN   PchSpiBase;
> -
> +
>//
>// Init PCH spi reserved MMIO address.
>//
> @@ -270,7 +357,7 @@ ReleaseSpiBar0 (
>Get the SPI region base and size, based on the enum type
> 
>@param[in] This

Re: [edk2-devel] [edk2-platforms][PATCH v3 27/41] KabylakeSiliconPkg: Remove SmmSpiFlashCommonLib

2021-06-18 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Friday, June 18, 2021 10:07 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Chaganty, Rangasai V
> ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms][PATCH v3 27/41] KabylakeSiliconPkg: Remove
> SmmSpiFlashCommonLib
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> The library has been consolidated with instances in other Intel silicon 
> packages
> as a single instance in IntelSiliconPkg
> 
> Cc: Chasel Chiu 
> Cc: Sai Chaganty 
> Signed-off-by: Michael Kubacki 
> Reviewed-by: Nate DeSimone 
> ---
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SpiFlashC
> ommon.c | 196 
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SpiFlashC
> ommonSmmLib.c   |  54 --
>  Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Library/SpiFlashCommonLib.h
> |  98 --
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SmmSpiFl
> ashCommonLib.inf |  53 --
>  4 files changed, 401 deletions(-)
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SpiFlas
> hCommon.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SpiFlas
> hCommon.c
> deleted file mode 100644
> index 7ee7ffab5001..
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SpiFlas
> hCommon.c
> +++ /dev/null
> @@ -1,196 +0,0 @@
> -/** @file
> -  Wrap EFI_SPI_PROTOCOL to provide some library level interfaces
> -  for module use.
> -
> -Copyright (c) 2017, Intel Corporation. All rights reserved.
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -
> -
> -PCH_SPI_PROTOCOL   *mSpiProtocol;
> -
> -//
> -// FlashAreaBaseAddress and Size for boottime and runtime usage.
> -//
> -UINTN mFlashAreaBaseAddress = 0;
> -UINTN mFlashAreaSize= 0;
> -
> -/**
> -  Enable block protection on the Serial Flash device.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashLock (
> -  VOID
> -  )
> -{
> -  return EFI_SUCCESS;
> -}
> -
> -/**
> -  Read NumBytes bytes of data from the address specified by
> -  PAddress into Buffer.
> -
> -  @param[in]  Address   The starting physical address of the read.
> -  @param[in,out]  NumBytes  On input, the number of bytes to read. On
> output, the number
> -of bytes actually read.
> -  @param[out] BufferThe destination data buffer for the read.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashRead (
> -  IN UINTNAddress,
> -  IN OUT UINT32   *NumBytes,
> - OUT UINT8*Buffer
> -  )
> -{
> -  ASSERT ((NumBytes != NULL) && (Buffer != NULL));
> -  if ((NumBytes == NULL) || (Buffer == NULL)) {
> -return EFI_INVALID_PARAMETER;
> -  }
> -
> -  //
> -  // This function is implemented specifically for those platforms
> -  // at which the SPI device is memory mapped for read. So this
> -  // function just do a memory copy for Spi Flash Read.
> -  //
> -  CopyMem (Buffer, (VOID *) Address, *NumBytes);
> -
> -  return EFI_SUCCESS;
> -}
> -
> -/**
> -  Write NumBytes bytes of data from Buffer to the address specified by
> -  PAddresss.
> -
> -  @param[in]  Address The starting physical address of the write.
> -  @param[in,out]  NumBytesOn input, the number of bytes to write. On
> output,
> -  the actual number of bytes written.
> -  @param[in]  Buffer  The source data buffer for the write.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashWrite (
> -  IN UINTN  Address,
> -  IN OUT UINT32 *NumBytes,
> -  IN UINT8  *Buffer
> -  )
> -{
> -  EFI_STATUSStatus;
> -  UINTN Offset;
> -  UINT32Length;
> -  UINT32RemainingBytes;
> -
> -  ASS

Re: [edk2-devel] [edk2-platforms][PATCH v3 33/41] KabylakeSiliconPkg: Remove PCH SPI PPI and Protocol from package

2021-06-18 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Friday, June 18, 2021 10:07 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Chaganty, Rangasai V
> ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms][PATCH v3 33/41] KabylakeSiliconPkg: Remove PCH SPI
> PPI and Protocol from package
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> The following PPI and Protocols have moved to IntelSiliconPkg. The remaining
> definitions in KabylakeSiliconPkg are removed and libs modules that need to
> reference IntelSiliconPkg are updated.
> 
> 1. gPchSpiProtocolGuid
> 2. gPchSmmSpiProtocolGuid
> 3. gPchSpiPpiGuid
> 
> Cc: Chasel Chiu 
> Cc: Sai Chaganty 
> Signed-off-by: Michael Kubacki 
> Reviewed-by: Chasel Chiu 
> Reviewed-by: Nate DeSimone 
> ---
>  Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/HstiSiliconDxe.inf |   3 +-
>  Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Ppi/Spi.h   |  26 --
>  Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Protocol/Spi.h  | 293 
> --
> --
>  Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.inf |   1 +
>  Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpiSmm.inf   |   1 +
>  Silicon/Intel/KabylakeSiliconPkg/SiPkg.dec   |   3 -
>  6 files changed, 4 insertions(+), 323 deletions(-)
> 
> diff --git a/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/HstiSiliconDxe.inf
> b/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/HstiSiliconDxe.inf
> index 52e3b6ceba3e..bd12fa691d40 100644
> --- a/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/HstiSiliconDxe.inf
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/HstiSiliconDxe.inf
> @@ -46,6 +46,7 @@ [Sources]
>  [Packages]
>MdePkg/MdePkg.dec
>UefiCpuPkg/UefiCpuPkg.dec
> +  IntelSiliconPkg/IntelSiliconPkg.dec
>KabylakeSiliconPkg/SiPkg.dec
>SecurityPkg/SecurityPkg.dec
> 
> @@ -92,7 +93,7 @@ [Protocols]
>gEfiMpServiceProtocolGuid  ## CONSUMES
>gDxeSiPolicyProtocolGuid   ## CONSUMES
>gHstiPublishCompleteProtocolGuid   ## PRODUCES
> -
> +
>  [FixedPcd]
>gSiPkgTokenSpaceGuid.PcdHstiIhvFeature1
>gSiPkgTokenSpaceGuid.PcdHstiIhvFeature2
> diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Ppi/Spi.h
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Ppi/Spi.h
> deleted file mode 100644
> index e11f82edcaea..
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Ppi/Spi.h
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -/** @file
> -  This file defines the PCH SPI PPI which implements the
> -  Intel(R) PCH SPI Host Controller Compatibility Interface.
> -
> -Copyright (c) 2017, Intel Corporation. All rights reserved.
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -#ifndef _PCH_SPI_PPI_H_
> -#define _PCH_SPI_PPI_H_
> -
> -#include 
> -
> -//
> -// Extern the GUID for PPI users.
> -//
> -extern EFI_GUID   gPchSpiPpiGuid;
> -
> -/**
> -  Reuse the PCH_SPI_PROTOCOL definitions
> -  This is possible becaues the PPI implementation does not rely on a 
> PeiService
> pointer,
> -  as it uses EDKII Glue Lib to do IO accesses -**/ -typedef PCH_SPI_PROTOCOL
> PCH_SPI_PPI;
> -
> -#endif
> diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Protocol/Spi.h
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Protocol/Spi.h
> deleted file mode 100644
> index 8c66e5063fa9..
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Protocol/Spi.h
> +++ /dev/null
> @@ -1,293 +0,0 @@
> -/** @file
> -  This file defines the PCH SPI Protocol which implements the
> -  Intel(R) PCH SPI Host Controller Compatibility Interface.
> -
> -Copyright (c) 2017, Intel Corporation. All rights reserved.
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -#ifndef _PCH_SPI_PROTOCOL_H_
> -#define _PCH_SPI_PROTOCOL_H_
> -
> -//
> -// Extern the GUID for protocol users.
> -//
> -extern EFI_GUID   gPchSpiProtocolGuid;
> -extern EFI_GUID   gPchSmmSpiProtocolGuid;
> -
> -//
> -// Forward reference for ANSI C compatibility -// -typedef struct
> _PCH_SPI_PROTOCOL  PCH_SPI_PROTOCOL;
> -
> -//
> -// SPI protocol data structures and definitions -//
> -
> -/**
> -  Flash Region Type
> -**/
> -typedef enum {
> -  FlashRegionDescriptor,
> -  FlashRegionBios,
> -  FlashRegionMe,
> -  FlashRegionGbE,
> -  FlashRegionPlatformData,
> -  FlashRegionDer,
> -  FlashRegionAll,
> -  FlashRegionMax
> -} FLASH_REGION_TYPE;
> -
> -//
> -// Protocol member functions
> -//
> -
> -/**
> -

Re: [edk2-devel] [edk2-platforms][PATCH v3 38/41] CoffeelakeSiliconPkg/BasePchSpiCommonLib: Identify flash regions by GUID

2021-06-18 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Friday, June 18, 2021 10:07 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Chaganty, Rangasai V
> ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms][PATCH v3 38/41]
> CoffeelakeSiliconPkg/BasePchSpiCommonLib: Identify flash regions by GUID
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> Updates the library to identify flash regions by GUID and internally map the
> GUID entries to values specific to CoffeelakeSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Rangasai V Chaganty 
> Cc: Nate DeSimone 
> Signed-off-by: Michael Kubacki 
> ---
> 
> Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiCommonLib/S
> piCommon.c | 144 
> 
> Silicon/Intel/CoffeelakeSiliconPkg/Pch/Include/Private/Library/PchSpiCommonLi
> b.h   |  16 +--
> 
> Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiCommonLib/
> BasePchSpiCommonLib.inf |  12 ++
>  3 files changed, 141 insertions(+), 31 deletions(-)
> 
> diff --git
> a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiCommonLib
> /SpiCommon.c
> b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiCommonLib
> /SpiCommon.c
> index bc84a4f27f1a..26a3d0e7db31 100644
> ---
> a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiCommonLib
> /SpiCommon.c
> +++ b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/Private/BasePchSpiC
> +++ ommonLib/SpiCommon.c
> @@ -2,11 +2,13 @@
>PCH SPI Common Driver implements the SPI Host Controller Compatibility
> Interface.
> 
>Copyright (c) 2019 Intel Corporation. All rights reserved. 
> +  Copyright (c) Microsoft Corporation.
> 
>SPDX-License-Identifier: BSD-2-Clause-Patent  **/
> 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -20,6 +22,95 @@
>  #include 
>  #include 
> 
> +typedef enum {
> +  FlashRegionDescriptor,
> +  FlashRegionBios,
> +  FlashRegionMe,
> +  FlashRegionGbe,
> +  FlashRegionPlatformData,
> +  FlashRegionDer,
> +  FlashRegionEc = 8,
> +  FlashRegionAll,
> +  FlashRegionMax
> +} FLASH_REGION_TYPE;
> +
> +typedef struct {
> +  EFI_GUID*Guid;
> +  FLASH_REGION_TYPE   Type;
> +} FLASH_REGION_MAPPING;
> +
> +FLASH_REGION_MAPPING mFlashRegionTypes[] = {
> +  {
> +,
> +FlashRegionDescriptor
> +  },
> +  {
> +,
> +FlashRegionBios
> +  },
> +  {
> +,
> +FlashRegionMe
> +  },
> +  {
> +,
> +FlashRegionGbe
> +  },
> +  {
> +,
> +FlashRegionPlatformData
> +  },
> +  {
> +,
> +FlashRegionDer
> +  },
> +  {
> +,
> +FlashRegionEc
> +  },
> +  {
> +,
> +FlashRegionAll
> +  },
> +  {
> +,
> +FlashRegionMax
> +  }
> +};
> +
> +/**
> +  Returns the type of a flash region given its GUID.
> +
> +  @param[in]FlashRegionGuid   Pointer to the flash region GUID.
> +  @param[out]   FlashRegionType   Pointer to a buffer that will be set to the
> flash region type value.
> +
> +  @retval   EFI_SUCCESS The flash region type was found for 
> the given
> flash region GUID.
> +  @retval   EFI_INVALID_PARAMETER   A pointer argument passed to the
> function is NULL.
> +  @retval   EFI_NOT_FOUND   The flash region type was not found 
> for
> the given flash region GUID.
> +
> +**/
> +EFI_STATUS
> +GetFlashRegionType (
> +  IN EFI_GUID   *FlashRegionGuid,
> +  OUTFLASH_REGION_TYPE  *FlashRegionType
> +  )
> +{
> +  UINTN   Index;
> +
> +  if (FlashRegionGuid == NULL || FlashRegionType == NULL) {
> +return EFI_INVALID_PARAMETER;
> +  }
> +
> +  for (Index = 0; Index < ARRAY_SIZE (mFlashRegionTypes); Index++) {
> +if (CompareGuid (mFlashRegionTypes[Index].Guid, FlashRegionGuid)) {
> +  *FlashRegionType = mFlashRegionTypes[Index].Type;
> +  return EFI_SUCCESS;
> +}
> +  }
> +
> +  return EFI_NOT_FOUND;
> +}
> +
>  /**
>Initialize an SPI protocol instance.
> 
> @@ -303,7 +394,7 @@ WaitForSpiCycleComplete (
>This function sends the programmed SPI command to the slave device.
> 
>@param[in] This Pointer to the PCH_SPI_PROTOCOL instance.
> -  @param[in] SpiRegionTypeThe SPI Region type for flash cycle which 
> is
> listed in the Descriptor
> +  @param[in] FlashRegionGuid  The Flash Region GUID for flash cycle which
> corresponds to the type in the descriptor.
>@param[in

Re: [edk2-devel][PATCH v5 3/7] SimicsOpenBoard: Move ReportCpuHob library path

2021-05-11 Thread Chiu, Chasel

Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Chuang, SofiaX 
> Sent: Tuesday, May 11, 2021 3:54 AM
> To: devel@edk2.groups.io
> Cc: Chuang, SofiaX ; Agyeman, Prince
> ; Chiu, Chasel 
> Subject: [edk2-devel][PATCH v5 3/7]
> SimicsOpenBoard: Move ReportCpuHob library path
> 
> From: SofiaX Chuang 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3298
> 
> Move ReportCpuHob library from MinPlatformPkg to IntelSiliconPkg.
> 
> Cc: Agyeman Prince 
> Cc: Chasel Chiu 
> ---
>  .../SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 11 ---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git
> a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
> b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
> index 77c408a326..93a7d1df55 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 - 2020, Intel Corporation. All rights reserved.
> 
> +# Copyright (c) 2019 - 2021, 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
> 
> 
> 
> @@ -137,6 +138,11 @@
>MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
> 
>VmgExitLib|UefiCpuPkg/Library/VmgExitLibNull/VmgExitLibNull.inf
> 
> 
> 
> +  #
> 
> +  # Silicon Package
> 
> +  #
> 
> +
> ReportCpuHobLib|IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.i
> nf
> 
> +
> 
>#
> 
># Platform Package
> 
>#
> 
> @@ -145,7 +151,6 @@
>  !endif
> 
> 
> TestPointLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointLib/PeiTestPointLib
> .inf
> 
> 
> SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheM
> trrLib.inf
> 
> -
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHob
> Lib/ReportCpuHobLib.inf
> 
> 
> 
>  [LibraryClasses.common.DXE_DRIVER]
> 
> 
> 
> --
> 2.27.0



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




Re: [edk2-devel][PATCH v5 4/7] KabylakeOpenBoard: Move ReportCpuHob library path

2021-05-11 Thread Chiu, Chasel

Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Chuang, SofiaX 
> Sent: Tuesday, May 11, 2021 3:54 AM
> To: devel@edk2.groups.io
> Cc: Chuang, SofiaX ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Jeremy Soller 
> Subject: [edk2-devel][PATCH v5 4/7]
> KabylakeOpenBoard: Move ReportCpuHob library path
> 
> From: SofiaX Chuang 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3298
> 
> Move ReportCpuHob library from MinPlatformPkg to IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Jeremy Soller 
> ---
>  .../KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc  | 11 ---
>  .../KabylakeRvp3/OpenBoardPkg.dsc | 11 ---
>  2 files changed, 16 insertions(+), 6 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> index 862e6a6655..302cb679b5 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 - 2020, Intel Corporation. All rights reserved.
> 
> +# Copyright (c) 2019 - 2021, 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,7 +161,11 @@
> 
> DebugLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDe
> bugLibReportStatusCode.inf
> 
>
> SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
> 
> 
> SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheM
> trrLibNull.inf
> 
> -
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHob
> Lib/ReportCpuHobLib.inf
> 
> +
> 
> +  ###
> 
> +  # Silicon Package
> 
> +  ###
> 
> +
> ReportCpuHobLib|IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.i
> nf
> 
> 
> 
>###
> 
># Platform Package
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> index 0b30da8f96..8523ab3f4f 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 - 2020, Intel Corporation. All rights reserved.
> 
> +# Copyright (c) 2017 - 2021, 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
> 
> 
> 
> @@ -201,6 +202,11 @@
> 
> SecBoardInitLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/SecBoardInitLibN
> ull/SecBoardInitLibNull.inf
> 
> 
> 
>  [LibraryClasses.common.PEIM]
> 
> +  ###
> 
> +  # Silicon Package
> 
> +  ###
> 
> +
> ReportCpuHobLib|IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.i
> nf
> 
> +
> 
>###
> 
># Platform Package
> 
>###
> 
> @@ -212,7 +218,6 @@
> 
> TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/Pei
> TestPointCheckLib.inf
> 
>  !endif
> 
> 
> SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheM
> trrLibNull.inf
> 
> -
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHob
> Lib/ReportCpuHobLib.inf
> 
> 
> 
>###
> 
># Board Package
> 
> --
> 2.27.0



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




Re: [edk2-devel][PATCH v5 5/7] WhiskeylakeOpenBoard: Move library path

2021-05-11 Thread Chiu, Chasel

Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Chuang, SofiaX 
> Sent: Tuesday, May 11, 2021 3:54 AM
> To: devel@edk2.groups.io
> Cc: Chuang, SofiaX ; Chiu, Chasel
> ; Desimone, Nathaniel L
> 
> Subject: [edk2-devel][PATCH v5 5/7] WhiskeylakeOpenBoard: Move library path
> 
> From: SofiaX Chuang 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3298
> 
> Move ReportCpuHob library from MinPlatformPkg to IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> ---
>  .../WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc  | 7 ---
>  .../WhiskeylakeURvp/OpenBoardPkg.dsc   | 7 ---
>  2 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> index fb493973e2..ee2aedd978 100644
> --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> @@ -1,7 +1,7 @@
>  ## @file
> 
>  #  The main build description file for the UpXtreme board.
> 
>  #
> 
> -#  Copyright (c) 2020, Intel Corporation. All rights reserved.
> 
> +#  Copyright (c) 2020 - 2021, 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
> 
> 
> 
> @@ -160,6 +161,7 @@
># Silicon Initialization Package
> 
>###
> 
> 
> SiliconInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiliconInitLib/PeiSiliconInitL
> ib.inf
> 
> +
> ReportCpuHobLib|IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.i
> nf
> 
> 
> 
>###
> 
># Platform Package
> 
> @@ -172,7 +174,6 @@
> 
> TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/Pei
> TestPointCheckLib.inf
> 
>  !endif
> 
> 
> SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheM
> trrLibNull.inf
> 
> -
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHob
> Lib/ReportCpuHobLib.inf
> 
> 
> 
>###
> 
># Board Package
> 
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.
> dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.
> dsc
> index 9a1f107faf..b69cc8deb0 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 - 2020, Intel Corporation. All rights reserved.
> 
> +#  Copyright (c) 2019 - 2021, 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
> 
> 
> 
> @@ -160,6 +161,7 @@
># Silicon Initialization Package
> 
>###
> 
> 
> SiliconInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiliconInitLib/PeiSiliconInitL
> ib.inf
> 
> +
> ReportCpuHobLib|IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.i
> nf
> 
> 
> 
>###
> 
># Platform Package
> 
> @@ -172,7 +174,6 @@
> 
> TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLib/Pei
> TestPointCheckLib.inf
> 
>  !endif
> 
> 
> SetCacheMtrrLib|$(PLATFORM_PACKAGE)/Library/SetCacheMtrrLib/SetCacheM
> trrLibNull.inf
> 
> -
> ReportCpuHobLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/ReportCpuHob
> Lib/ReportCpuHobLib.inf
> 
> 
> 
>###
> 
># Board Package
> 
> --
> 2.27.0



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




Re: [edk2-devel][PATCH v5 6/7] MiniPlatformPkg: Move ReportCpuHob library path

2021-05-11 Thread Chiu, Chasel

Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Chuang, SofiaX 
> Sent: Tuesday, May 11, 2021 3:54 AM
> To: devel@edk2.groups.io
> Cc: Chuang, SofiaX ; Chiu, Chasel
> ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [edk2-devel][PATCH v5 6/7]
> MiniPlatformPkg: Move ReportCpuHob library path
> 
> From: SofiaX Chuang 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3298
> 
> Move ReportCpuHob library from MinPlatformPkg to IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> ---
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc   | 2 +-
>  .../PlatformInit/PlatformInitPei/PlatformInitPreMem.inf| 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> index 707686055c..35cbd40abb 100644
> --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc
> @@ -94,7 +94,7 @@
>#
> 
> 
> FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPl
> atformLib/PeiFspWrapperPlatformLib.inf
> 
> 
> ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLi
> b.inf
> 
> -
> ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Repo
> rtCpuHobLib.inf
> 
> +
> ReportCpuHobLib|IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.i
> nf
> 
> 
> TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPoin
> tCheckLib.inf
> 
>TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
> 
> 
> SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNul
> l.inf
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPre
> Mem.inf
> b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPre
> Mem.inf
> index e37bcba560..fb997838ef 100644
> ---
> a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPre
> Mem.inf
> +++
> b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPre
> Mem.inf
> @@ -1,7 +1,7 @@
>  ### @file
> 
>  # Component information file for the Platform Init Pre-Memory PEI module.
> 
>  #
> 
> -# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
> 
> +# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
> 
>  #
> 
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  #
> 
> @@ -33,6 +33,7 @@
>MinPlatformPkg/MinPlatformPkg.dec
> 
>MdeModulePkg/MdeModulePkg.dec
> 
>MdePkg/MdePkg.dec
> 
> +  IntelSiliconPkg/IntelSiliconPkg.dec
> 
> 
> 
>  [Pcd]
> 
>gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode  ##
> CONSUMES
> 
> --
> 2.27.0



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




Re: [edk2-devel] [PATCH v3] IntelFsp2Pkg: YAML script bug fix

2021-05-17 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Loo, Tung Lun 
> Sent: Monday, May 17, 2021 12:04 PM
> To: devel@edk2.groups.io
> Cc: Loo, Tung Lun ; Ma, Maurice
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Chiu,
> Chasel 
> Subject: [PATCH v3] IntelFsp2Pkg: YAML script bug fix
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3395
> 
> This patch fixes the issue observed during BSF file to YAML file conversion. 
> It
> also addresses the issue during multibyte array data conversion check, for
> example the data representation of 0x instead of 0xFF, 0xFF would be
> thrown exception "Array size is not proper" without this patch.
> 
> Cc: Maurice Ma 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Chasel Chiu 
> Signed-off-by: Loo Tung Lun 
> ---
>  IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py | 11 +--
>  IntelFsp2Pkg/Tools/GenCfgOpt.py  |  3 ++-
>  2 files changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
> b/IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
> index cad9b60e73..d2ca7145ae 100644
> --- a/IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
> +++ b/IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
> @@ -46,6 +46,13 @@ def Bytes2Val(Bytes):
>  return reduce(lambda x, y: (x << 8) | y, Bytes[::-1])  +def 
> Str2Bytes(Value,
> Blen):+Result = bytearray(Value[1:-1], 'utf-8')  # Excluding quotes+if
> len(Result) < Blen:+Result.extend(b'\x00' * (Blen - len(Result)))+
> return
> Result++ class CFspBsf2Dsc:  def __init__(self, bsf_file):@@ -108,7 +115,8
> @@ class CFspBsf2Dsc:
>  cfg_item['find'] = prefix cfg_item['cname'] 
> = 'Signature'
> cfg_item['length'] = len(finds[0][1])-cfg_item['value'] = 
> '0x%X' %
> Bytes2Val(finds[0][1].encode('UTF-8'))+str2byte = 
> Str2Bytes("'" +
> finds[0][1] + "'", len(finds[0][1]))+cfg_item['value'] = 
> '0x%X' %
> Bytes2Val(str2byte) cfg_list.append(dict(cfg_item))   
>   cfg_item =
> dict(cfg_temp) find_list.pop(0)@@ -291,7 +299,6 @@ class
> CFspDsc2Yaml():
>  raise Exception('DSC variable creation error !') 
> else: raise
> Exception('Unsupported file "%s" !' % file_name)-
> gen_cfg_data.UpdateDefaultValue() self.gen_cfg_data = gen_cfg_data
> def print_dsc_line(self):diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> index 660824b740..714b2d8b1a 100644
> --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> @@ -708,7 +708,8 @@ EndList
>  for Page in PageList:
>  Page  = Page.strip()
> Match = re.match("(\w+):\"(.+)\"", Page)-
> self._CfgPageDict[Match.group(1)] = Match.group(2)+   
>  if
> Match != None:+
> self._CfgPageDict[Match.group(1)] =
> Match.group(2)  Match =
> re.match("(?:^|.+\s+)BLOCK:{NAME:\"(.+)\"\s*,\s*VER:\"(.+)\"\s*}", Remaining)
> if Match:--
> 2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75181): https://edk2.groups.io/g/devel/message/75181
Mute This Topic: https://groups.io/mt/82879268/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 v2 01/35] CometlakeOpenBoardPkg: Remove redundant IntelSiliconPkg.dec entry

2021-05-19 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu 

> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Wednesday, May 19, 2021 11:59 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Chaganty, Rangasai V
> ; Kethi Reddy, Deepika
> ; Esakkithevar, Kathappan
> 
> Subject: [edk2-platforms][PATCH v2 01/35] CometlakeOpenBoardPkg: Remove
> redundant IntelSiliconPkg.dec entry
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> Removes extra IntelSiliconPkg.dec entry in PeiPolicyUpdateLib.inf.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Rangasai V Chaganty 
> Cc: Deepika Kethi Reddy 
> Cc: Kathappan Esakkithevar 
> Signed-off-by: Michael Kubacki 
> ---
> 
> Platform/Intel/CometlakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/Pei
> PolicyUpdateLib.inf | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/P
> eiPolicyUpdateLib.inf
> b/Platform/Intel/CometlakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/P
> eiPolicyUpdateLib.inf
> index 014967c7f65a..fd51e2b8c40b 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/P
> eiPolicyUpdateLib.inf
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/P
> eiPolicyUpdateLib.inf
> @@ -52,7 +52,6 @@ [Packages]
>SecurityPkg/SecurityPkg.dec
>IntelSiliconPkg/IntelSiliconPkg.dec
>MinPlatformPkg/MinPlatformPkg.dec
> -  IntelSiliconPkg/IntelSiliconPkg.dec
> 
>  [FixedPcd]
>gSiPkgTokenSpaceGuid.PcdTsegSize ## CONSUMES
> --
> 2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75376): https://edk2.groups.io/g/devel/message/75376
Mute This Topic: https://groups.io/mt/82929204/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 v2 20/35] CometlakeOpenBoardPkg: Update SpiFvbService & SpiFlashCommonLib

2021-05-19 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Wednesday, May 19, 2021 12:00 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Chaganty, Rangasai V
> ; Kethi Reddy, Deepika
> ; Esakkithevar, Kathappan
> 
> Subject: [edk2-platforms][PATCH v2 20/35] CometlakeOpenBoardPkg: Update
> SpiFvbService & SpiFlashCommonLib
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> Updates CometlakeOpenBoardPkg to use the SmmSpiFlashCommonLib instance
> in IntelSiliconPkg and the SpiFvbServiceSmm driver in IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Rangasai V Chaganty 
> Cc: Deepika Kethi Reddy 
> Cc: Kathappan Esakkithevar 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc |
> 7 +--
> Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.fdf |
> 2 +-
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
> index 44a1bd54d6e9..316100e9a599 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.ds
> +++ c
> @@ -254,7 +254,7 @@ [LibraryClasses.X64.DXE_SMM_DRIVER]
>###
># Silicon Initialization Package
>###
> -
> SpiFlashCommonLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/SmmSpiFlashCom
> monLib/SmmSpiFlashCommonLib.inf
> +
> +
> SpiFlashCommonLib|IntelSiliconPkg/Library/SmmSpiFlashCommonLib/SmmSpiF
> + lashCommonLib.inf
> 
>###
># Platform Package
> @@ -401,6 +401,10 @@ [Components.X64]
>$(PLATFORM_SI_PACKAGE)/SystemAgent/SaInit/Dxe/SaInitDxe.inf
>$(PLATFORM_SI_BIN_PACKAGE)/Microcode/MicrocodeUpdates.inf
> 
> +!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> +  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +!endif
> +
>###
># Platform Package
>###
> @@ -421,7 +425,6 @@ [Components.X64]
> 
>  !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> 
> -  $(PLATFORM_PACKAGE)/Flash/SpiFvbService/SpiFvbServiceSmm.inf
>$(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
> 
>$(PLATFORM_PACKAGE)/Acpi/AcpiSmm/AcpiSmm.inf { diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.fdf
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.fdf
> index 6397d80d3895..e341285f4b1a 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.fdf
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.fd
> +++ f
> @@ -407,7 +407,7 @@ [FV.FvOsBootUncompact]  !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE  INF
> UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
>  INF
> $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
> -INF  $(PLATFORM_PACKAGE)/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +INF  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> 
>  INF  $(PLATFORM_PACKAGE)/Acpi/AcpiTables/AcpiPlatform.inf
>  INF  $(PLATFORM_PACKAGE)/Acpi/AcpiSmm/AcpiSmm.inf
> --
> 2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75375): https://edk2.groups.io/g/devel/message/75375
Mute This Topic: https://groups.io/mt/82929229/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 v2 33/35] KabylakeSiliconPkg: Remove PCH SPI PPI and Protocol from package

2021-05-19 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Wednesday, May 19, 2021 12:00 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Chaganty, Rangasai V
> 
> Subject: [edk2-platforms][PATCH v2 33/35] KabylakeSiliconPkg: Remove PCH SPI
> PPI and Protocol from package
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> The following PPI and Protocols have moved to IntelSiliconPkg. The remaining
> definitions in KabylakeSiliconPkg are removed and libs modules that need to
> reference IntelSiliconPkg are updated.
> 
> 1. gPchSpiProtocolGuid
> 2. gPchSmmSpiProtocolGuid
> 3. gPchSpiPpiGuid
> 
> Cc: Chasel Chiu 
> Cc: Sai Chaganty 
> Signed-off-by: Michael Kubacki 
> Reviewed-by: Chasel Chiu 
> ---
>  Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/HstiSiliconDxe.inf |   3 +-
>  Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Ppi/Spi.h   |  26 --
>  Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Protocol/Spi.h  | 293 
> --
> --
>  Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.inf |   1 +
>  Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpiSmm.inf   |   1 +
>  Silicon/Intel/KabylakeSiliconPkg/SiPkg.dec   |   3 -
>  6 files changed, 4 insertions(+), 323 deletions(-)
> 
> diff --git a/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/HstiSiliconDxe.inf
> b/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/HstiSiliconDxe.inf
> index 52e3b6ceba3e..bd12fa691d40 100644
> --- a/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/HstiSiliconDxe.inf
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Hsti/Dxe/HstiSiliconDxe.inf
> @@ -46,6 +46,7 @@ [Sources]
>  [Packages]
>MdePkg/MdePkg.dec
>UefiCpuPkg/UefiCpuPkg.dec
> +  IntelSiliconPkg/IntelSiliconPkg.dec
>KabylakeSiliconPkg/SiPkg.dec
>SecurityPkg/SecurityPkg.dec
> 
> @@ -92,7 +93,7 @@ [Protocols]
>gEfiMpServiceProtocolGuid  ## CONSUMES
>gDxeSiPolicyProtocolGuid   ## CONSUMES
>gHstiPublishCompleteProtocolGuid   ## PRODUCES
> -
> +
>  [FixedPcd]
>gSiPkgTokenSpaceGuid.PcdHstiIhvFeature1
>gSiPkgTokenSpaceGuid.PcdHstiIhvFeature2
> diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Ppi/Spi.h
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Ppi/Spi.h
> deleted file mode 100644
> index e11f82edcaea..
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Ppi/Spi.h
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -/** @file
> -  This file defines the PCH SPI PPI which implements the
> -  Intel(R) PCH SPI Host Controller Compatibility Interface.
> -
> -Copyright (c) 2017, Intel Corporation. All rights reserved.
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -#ifndef _PCH_SPI_PPI_H_
> -#define _PCH_SPI_PPI_H_
> -
> -#include 
> -
> -//
> -// Extern the GUID for PPI users.
> -//
> -extern EFI_GUID   gPchSpiPpiGuid;
> -
> -/**
> -  Reuse the PCH_SPI_PROTOCOL definitions
> -  This is possible becaues the PPI implementation does not rely on a 
> PeiService
> pointer,
> -  as it uses EDKII Glue Lib to do IO accesses -**/ -typedef PCH_SPI_PROTOCOL
> PCH_SPI_PPI;
> -
> -#endif
> diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Protocol/Spi.h
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Protocol/Spi.h
> deleted file mode 100644
> index 8c66e5063fa9..
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Protocol/Spi.h
> +++ /dev/null
> @@ -1,293 +0,0 @@
> -/** @file
> -  This file defines the PCH SPI Protocol which implements the
> -  Intel(R) PCH SPI Host Controller Compatibility Interface.
> -
> -Copyright (c) 2017, Intel Corporation. All rights reserved.
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -#ifndef _PCH_SPI_PROTOCOL_H_
> -#define _PCH_SPI_PROTOCOL_H_
> -
> -//
> -// Extern the GUID for protocol users.
> -//
> -extern EFI_GUID   gPchSpiProtocolGuid;
> -extern EFI_GUID   gPchSmmSpiProtocolGuid;
> -
> -//
> -// Forward reference for ANSI C compatibility -// -typedef struct
> _PCH_SPI_PROTOCOL  PCH_SPI_PROTOCOL;
> -
> -//
> -// SPI protocol data structures and definitions -//
> -
> -/**
> -  Flash Region Type
> -**/
> -typedef enum {
> -  FlashRegionDescriptor,
> -  FlashRegionBios,
> -  FlashRegionMe,
> -  FlashRegionGbE,
> -  FlashRegionPlatformData,
> -  FlashRegionDer,
> -  FlashRegionAll,
> -  FlashRegionMax
> -} FLASH_REGION_TYPE;
> -
> -//
> -// Protocol member functions
> -//
> -
> -/**
> -  Read data from the flash part.
> -
> -  @para

Re: [edk2-devel] [edk2-platforms][PATCH v2 31/35] KabylakeOpenBoardPkg/PeiSerialPortLibSpiFlash: Add IntelSiliconPkg.dec

2021-05-19 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Wednesday, May 19, 2021 12:00 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms][PATCH v2 31/35]
> KabylakeOpenBoardPkg/PeiSerialPortLibSpiFlash: Add IntelSiliconPkg.dec
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> This library now uses gPchSpiPpiGuid from IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Signed-off-by: Michael Kubacki 
> ---
> 
> Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSeria
> lPortLibSpiFlash.inf | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSe
> rialPortLibSpiFlash.inf
> b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSe
> rialPortLibSpiFlash.inf
> index 31518fb40ba7..b959cd1f4612 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSe
> rialPortLibSpiFlash.inf
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSe
> rialPortLibSpiFlash.inf
> @@ -32,6 +32,7 @@ [Packages]
>MdePkg/MdePkg.dec
>MdeModulePkg/MdeModulePkg.dec
>MinPlatformPkg/MinPlatformPkg.dec
> +  IntelSiliconPkg/IntelSiliconPkg.dec
>KabylakeSiliconPkg/SiPkg.dec
>KabylakeOpenBoardPkg/OpenBoardPkg.dec
> 
> --
> 2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75370): https://edk2.groups.io/g/devel/message/75370
Mute This Topic: https://groups.io/mt/82929241/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 v2 30/35] MinPlatformPkg: Remove SpiFlashCommonLibNull

2021-05-19 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Wednesday, May 19, 2021 12:00 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [edk2-platforms][PATCH v2 30/35] MinPlatformPkg: Remove
> SpiFlashCommonLibNull
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> The library instance has moved to IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Michael Kubacki 
> ---
> 
> Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlashC
> ommonLibNull.c   | 101 
> 
> Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlashC
> ommonLibNull.inf |  29 --
>  Platform/Intel/MinPlatformPkg/Include/Library/SpiFlashCommonLib.h
> |  98 ---
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec 
>|
> 2 -
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
>|
> 4 -
>  5 files changed, 234 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlas
> hCommonLibNull.c
> b/Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlas
> hCommonLibNull.c
> deleted file mode 100644
> index 403b16a1b421..
> ---
> a/Platform/Intel/MinPlatformPkg/Flash/Library/SpiFlashCommonLibNull/SpiFlas
> hCommonLibNull.c
> +++ /dev/null
> @@ -1,101 +0,0 @@
> -/** @file
> -  Null Library instance of SPI Flash Common Library Class
> -
> -Copyright (c) 2017, Intel Corporation. All rights reserved.
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -
> -#include 
> -#include 
> -
> -/**
> -  Enable block protection on the Serial Flash device.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashLock (
> -  VOID
> -  )
> -{
> -  return EFI_SUCCESS;
> -}
> -
> -/**
> -  Read NumBytes bytes of data from the address specified by
> -  PAddress into Buffer.
> -
> -  @param[in]  Address   The starting physical address of the read.
> -  @param[in,out]  NumBytes  On input, the number of bytes to read. On
> output, the number
> -of bytes actually read.
> -  @param[out] BufferThe destination data buffer for the read.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashRead (
> -  IN UINTNAddress,
> -  IN OUT UINT32   *NumBytes,
> - OUT UINT8*Buffer
> -  )
> -{
> -  ASSERT(FALSE);
> -  return EFI_SUCCESS;
> -}
> -
> -/**
> -  Write NumBytes bytes of data from Buffer to the address specified by
> -  PAddresss.
> -
> -  @param[in]  Address The starting physical address of the write.
> -  @param[in,out]  NumBytesOn input, the number of bytes to write. On
> output,
> -  the actual number of bytes written.
> -  @param[in]  Buffer  The source data buffer for the write.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashWrite (
> -  IN UINTN  Address,
> -  IN OUT UINT32 *NumBytes,
> -  IN UINT8  *Buffer
> -  )
> -{
> -  ASSERT(FALSE);
> -  return EFI_SUCCESS;
> -}
> -
> -/**
> -  Erase the block starting at Address.
> -
> -  @param[in]  Address The starting physical address of the block to 
> be
> erased.
> -  This library assume that caller garantee that 
> the PAddress
> -  is at the starting address of this block.
> -  @param[in]  NumBytesOn input, the number of bytes of the logical 
> block
> to be erased.
> -  On output, the actual number of bytes erased.
> -
> -  @retval EFI_SUCCESS.  Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashBlockErase (
> -  INUINTN Address,
> -  INUINTN  

Re: [edk2-devel] [edk2-platforms][PATCH v2 21/35] KabylakeOpenBoardPkg: Update SpiFvbService & SpiFlashCommonLib

2021-05-19 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael
> Kubacki
> Sent: Wednesday, May 19, 2021 12:00 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Jeremy Soller 
> Subject: [edk2-devel] [edk2-platforms][PATCH v2 21/35]
> KabylakeOpenBoardPkg: Update SpiFvbService & SpiFlashCommonLib
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> Updates KabylakeOpenBoardPkg to use the SmmSpiFlashCommonLib instance in
> IntelSiliconPkg and the SpiFvbServiceSmm driver in IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc   | 7
> +--
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf   | 2 +-
>  Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc | 7
> +--
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf | 2 +-
>  4 files changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> index 302cb679b5eb..89be744a9038 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> @@ -228,7 +228,7 @@ [LibraryClasses.X64.DXE_SMM_DRIVER]
>###
># Silicon Initialization Package
>###
> -
> SpiFlashCommonLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/SmmSpiFlashCom
> monLib/SmmSpiFlashCommonLib.inf
> +
> +
> SpiFlashCommonLib|IntelSiliconPkg/Library/SmmSpiFlashCommonLib/SmmSpiF
> + lashCommonLib.inf
> 
>###
># Platform Package
> @@ -377,6 +377,10 @@ [Components.X64]
>IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.inf
>$(PLATFORM_SI_BIN_PACKAGE)/Microcode/MicrocodeUpdates.inf
> 
> +!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> +  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +!endif
> +
>###
># Platform Package
>###
> @@ -393,7 +397,6 @@ [Components.X64]
> 
>  !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> 
> -  $(PLATFORM_PACKAGE)/Flash/SpiFvbService/SpiFvbServiceSmm.inf
>$(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
> 
>$(PLATFORM_PACKAGE)/Acpi/AcpiSmm/AcpiSmm.inf { diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
> index 39432d21b8b5..239b6b720a6a 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
> @@ -401,7 +401,7 @@ [FV.FvOsBootUncompact]  !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE  INF
> $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.inf
>  INF
> $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
> -INF  $(PLATFORM_PACKAGE)/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +INF  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> 
>  INF  $(PLATFORM_PACKAGE)/Acpi/AcpiTables/AcpiPlatform.inf
>  INF  $(PLATFORM_PACKAGE)/Acpi/AcpiSmm/AcpiSmm.inf
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> index 8523ab3f4fc1..f29393579c06 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> @@ -268,7 +268,7 @@ [LibraryClasses.X64.DXE_SMM_DRIVER]
>###
># Silicon Initialization Package
>###
> -
> SpiFlashCommonLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/SmmSpiFlashCom
> monLib/SmmSpiFlashCommonLib.inf
> +
> +
> SpiFlashCommonLib|IntelSiliconPkg/Library/SmmSpiFlashCommonLib/SmmSpiF
> + lashCommonLib.inf
> 
>###
># Platform Package
> @@ -456,6 +456,10 @@ [Components.X64]
>IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.inf
>$(PLATFORM_SI_BIN_PACKAGE)/Microcode/MicrocodeUpdates.inf
> 
> +!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> +  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +!endif
> +
>###

Re: [edk2-devel] [edk2-platforms][PATCH v2 25/35] MinPlatformPkg: Remove SpiFvbService modules

2021-05-19 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Wednesday, May 19, 2021 12:00 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [edk2-platforms][PATCH v2 25/35] MinPlatformPkg: Remove
> SpiFvbService modules
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> SpiFvbServiceSmm and SpiFvbServiceStandaloneMm have moved to
> IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c  
>|  94 -
> -
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon.c
> | 903 
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c
> | 271 --
> 
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneM
> m.c   |  32 -
> 
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditionalM
> m.c  |  32 -
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon.h
> | 158 
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.h
> |  22 -
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> |  68 --
> 
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneM
> m.inf |  67 --
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
>|   2 -
>  10 files changed, 1649 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c
> b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c
> deleted file mode 100644
> index 7f2678fa9e5a..
> --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c
> +++ /dev/null
> @@ -1,94 +0,0 @@
> -/**@file
> -  Defines data structure that is the volume header found.
> -  These data is intent to decouple FVB driver with FV header.
> -
> -Copyright (c) 2017, Intel Corporation. All rights reserved.
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -
> -#include "SpiFvbServiceCommon.h"
> -
> -#define FIRMWARE_BLOCK_SIZE 0x1
> -#define FVB_MEDIA_BLOCK_SIZEFIRMWARE_BLOCK_SIZE
> -
> -#define NV_STORAGE_BASE_ADDRESS
> FixedPcdGet32(PcdFlashNvStorageVariableBase)
> -#define SYSTEM_NV_BLOCK_NUM
> ((FixedPcdGet32(PcdFlashNvStorageVariableSize)+
> FixedPcdGet32(PcdFlashNvStorageFtwWorkingSize) +
> FixedPcdGet32(PcdFlashNvStorageFtwSpareSize))/ FVB_MEDIA_BLOCK_SIZE)
> -
> -typedef struct {
> -  EFI_PHYSICAL_ADDRESSBaseAddress;
> -  EFI_FIRMWARE_VOLUME_HEADER  FvbInfo;
> -  EFI_FV_BLOCK_MAP_ENTRY  End[1];
> -} EFI_FVB2_MEDIA_INFO;
> -
> -//
> -// This data structure contains a template of all correct FV headers, which 
> is
> used to restore
> -// Fv header if it's corrupted.
> -//
> -EFI_FVB2_MEDIA_INFO mPlatformFvbMediaInfo[] = {
> -  //
> -  // Systen NvStorage FVB
> -  //
> -  {
> -NV_STORAGE_BASE_ADDRESS,
> -{
> -  {0,}, //ZeroVector[16]
> -  EFI_SYSTEM_NV_DATA_FV_GUID,
> -  FVB_MEDIA_BLOCK_SIZE * SYSTEM_NV_BLOCK_NUM,
> -  EFI_FVH_SIGNATURE,
> -  0x0004feff, // check MdePkg/Include/Pi/PiFirmwareVolume.h for details 
> on
> EFI_FVB_ATTRIBUTES_2
> -  sizeof (EFI_FIRMWARE_VOLUME_HEADER) + sizeof
> (EFI_FV_BLOCK_MAP_ENTRY),
> -  0,//CheckSum which will be calucated dynamically.
> -  0,//ExtHeaderOffset
> -  {0,}, //Reserved[1]
> -  2,//Revision
> -  {
> -{
> -  SYSTEM_NV_BLOCK_NUM,
> -  FVB_MEDIA_BLOCK_SIZE,
> -}
> -  }
> -},
> -{
> -  {
> -0,
> -0
> -  }
> -}
> -  }
> -};
> -
> -EFI_STATUS
> -GetFvbInfo (
> -  IN  EFI_PHYSICAL_ADDRESS FvBaseAddress,
> -  OUT EFI_FIRMWARE_VOLUME_HEADER   **FvbInfo
> -  )
> -{
> -  UINTN   Index;
> -  EFI_FIRMWARE_VOLUME_HEADER  *FvHeader;
> -
> -  for (Index = 0; Index < sizeof (mPlatformFvbMediaInfo) / sizeof
> (EFI_FVB2_MEDIA_INFO); Index++) {
> -if (mPlatformFvbMediaInfo[Index].BaseAddress == FvBaseAddress) {
> -  FvHeader = [Index].FvbInfo;
> -
> -  //
> -  // Update the checksum value of FV header.
> -  //
> -  FvHeader->Checksum = CalculateCheckSum16 ( (UINT16 *) FvHeader,
> FvHeader->HeaderLength);
> -
> -  *FvbInfo = FvHeader;
> -
> -  DEBUG ((DEBUG_INFO, "BaseAddr: 0x%lx \n", FvBaseAddress));
> -  DEBUG (

Re: [edk2-devel] [edk2-platforms][PATCH v2 03/35] CometlakeOpenBoardPkg/PeiPolicyUpdateLib: Add missing GUID to INF

2021-05-19 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu 


> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Wednesday, May 19, 2021 11:59 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Chaganty, Rangasai V
> ; Kethi Reddy, Deepika
> ; Esakkithevar, Kathappan
> 
> Subject: [edk2-platforms][PATCH v2 03/35]
> CometlakeOpenBoardPkg/PeiPolicyUpdateLib: Add missing GUID to INF
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> gEfiMemoryTypeInformationGuid is used in PeiSaPolicyUpdatePreMem.c but not
> in the [Guids] section in PeiPolicyUpdateLib.inf.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Rangasai V Chaganty 
> Cc: Deepika Kethi Reddy 
> Cc: Kathappan Esakkithevar 
> Signed-off-by: Michael Kubacki 
> ---
> 
> Platform/Intel/CometlakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/Pei
> PolicyUpdateLib.inf | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/P
> eiPolicyUpdateLib.inf
> b/Platform/Intel/CometlakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/P
> eiPolicyUpdateLib.inf
> index fd51e2b8c40b..5213253f7313 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/P
> eiPolicyUpdateLib.inf
> +++ b/Platform/Intel/CometlakeOpenBoardPkg/Policy/Library/PeiPolicyUpdat
> +++ eLib/PeiPolicyUpdateLib.inf
> @@ -270,3 +270,4 @@ [Ppis]
>  [Guids]
>gTianoLogoGuid## CONSUMES
>gSiConfigGuid ## CONSUMES
> +  gEfiMemoryTypeInformationGuid ## PRODUCES
> --
> 2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75377): https://edk2.groups.io/g/devel/message/75377
Mute This Topic: https://groups.io/mt/82929213/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 v2 24/35] WhiskeylakeOpenBoardPkg: Update SpiFvbService & SpiFlashCommonLib

2021-05-19 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Wednesday, May 19, 2021 12:00 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms][PATCH v2 24/35] WhiskeylakeOpenBoardPkg: Update
> SpiFvbService & SpiFlashCommonLib
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> Updates WhiskeylakeOpenBoardPkg to use the SmmSpiFlashCommonLib
> instance in IntelSiliconPkg and the SpiFvbServiceSmm driver in 
> IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc|
> 7 +--
>  Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.fdf|
> 2 +-
> 
> Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.ds
> c | 7 +--
> Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fd
> f | 2 +-
>  4 files changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> index ee2aedd978e0..e9c1751df9ba 100644
> --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.dsc
> @@ -254,7 +254,7 @@ [LibraryClasses.X64.DXE_SMM_DRIVER]
>###
># Silicon Initialization Package
>###
> -
> SpiFlashCommonLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/SmmSpiFlashCom
> monLib/SmmSpiFlashCommonLib.inf
> +
> +
> SpiFlashCommonLib|IntelSiliconPkg/Library/SmmSpiFlashCommonLib/SmmSpiF
> + lashCommonLib.inf
> 
>###
># Platform Package
> @@ -395,6 +395,10 @@ [Components.X64]
>$(PLATFORM_SI_PACKAGE)/SystemAgent/SaInit/Dxe/SaInitDxe.inf
>$(PLATFORM_SI_BIN_PACKAGE)/Microcode/MicrocodeUpdates.inf
> 
> +!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> +  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +!endif
> +
>###
># Platform Package
>###
> @@ -415,7 +419,6 @@ [Components.X64]
> 
>  !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> 
> -  $(PLATFORM_PACKAGE)/Flash/SpiFvbService/SpiFvbServiceSmm.inf
>$(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
> 
>$(PLATFORM_PACKAGE)/Acpi/AcpiSmm/AcpiSmm.inf { diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.fdf
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.fdf
> index 8aea5aa475a0..ae0ba27c1f34 100644
> --- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.fdf
> +++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkg.fdf
> @@ -413,7 +413,7 @@ [FV.FvOsBootUncompact]  !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE  INF
> UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
>  INF
> $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
> -INF  $(PLATFORM_PACKAGE)/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +INF  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> 
>  INF  $(PLATFORM_PACKAGE)/Acpi/AcpiTables/AcpiPlatform.inf
>  INF  $(PLATFORM_PACKAGE)/Acpi/AcpiSmm/AcpiSmm.inf
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.
> dsc
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.
> dsc
> index b69cc8deb0a0..e3cf99639620 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.
> dsc
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPk
> +++ g.dsc
> @@ -254,7 +254,7 @@ [LibraryClasses.X64.DXE_SMM_DRIVER]
>###
># Silicon Initialization Package
>###
> -
> SpiFlashCommonLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/SmmSpiFlashCom
> monLib/SmmSpiFlashCommonLib.inf
> +
> +
> SpiFlashCommonLib|IntelSiliconPkg/Library/SmmSpiFlashCommonLib/SmmSpiF
> + lashCommonLib.inf
> 
>###
># Platform Package
> @@ -401,6 +401,10 @@ [Components.X64]
>$(PLATFORM_SI_PACKAGE)/SystemAgent/SaInit/Dxe/SaInitDxe.inf
>$(PLATFORM_SI_BIN_PACKAGE)/Microcode/MicrocodeUpdates.inf
> 
> +!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> +  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +!endif
> +

Re: [edk2-devel] [PATCH v3] IntelFsp2Pkg: YAML script bug fix

2021-05-17 Thread Chiu, Chasel


Pushed: 1fbf5e30ae8eb725f4e10984f7b0a208f78abbd0

Thanks,
Chasel


> -Original Message-
> From: Loo, Tung Lun 
> Sent: Monday, May 17, 2021 12:04 PM
> To: devel@edk2.groups.io
> Cc: Loo, Tung Lun ; Ma, Maurice
> ; Desimone, Nathaniel L
> ; Zeng, Star ; Chiu,
> Chasel 
> Subject: [PATCH v3] IntelFsp2Pkg: YAML script bug fix
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3395
> 
> This patch fixes the issue observed during BSF file to YAML file conversion. 
> It
> also addresses the issue during multibyte array data conversion check, for
> example the data representation of 0x instead of 0xFF, 0xFF would be
> thrown exception "Array size is not proper" without this patch.
> 
> Cc: Maurice Ma 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Chasel Chiu 
> Signed-off-by: Loo Tung Lun 
> ---
>  IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py | 11 +--
>  IntelFsp2Pkg/Tools/GenCfgOpt.py  |  3 ++-
>  2 files changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
> b/IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
> index cad9b60e73..d2ca7145ae 100644
> --- a/IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
> +++ b/IntelFsp2Pkg/Tools/FspDscBsf2Yaml.py
> @@ -46,6 +46,13 @@ def Bytes2Val(Bytes):
>  return reduce(lambda x, y: (x << 8) | y, Bytes[::-1])  +def 
> Str2Bytes(Value,
> Blen):+Result = bytearray(Value[1:-1], 'utf-8')  # Excluding quotes+if
> len(Result) < Blen:+Result.extend(b'\x00' * (Blen - len(Result)))+
> return
> Result++ class CFspBsf2Dsc:  def __init__(self, bsf_file):@@ -108,7 +115,8
> @@ class CFspBsf2Dsc:
>  cfg_item['find'] = prefix cfg_item['cname'] 
> = 'Signature'
> cfg_item['length'] = len(finds[0][1])-cfg_item['value'] = 
> '0x%X' %
> Bytes2Val(finds[0][1].encode('UTF-8'))+str2byte = 
> Str2Bytes("'" +
> finds[0][1] + "'", len(finds[0][1]))+cfg_item['value'] = 
> '0x%X' %
> Bytes2Val(str2byte) cfg_list.append(dict(cfg_item))   
>   cfg_item =
> dict(cfg_temp) find_list.pop(0)@@ -291,7 +299,6 @@ class
> CFspDsc2Yaml():
>  raise Exception('DSC variable creation error !') 
> else: raise
> Exception('Unsupported file "%s" !' % file_name)-
> gen_cfg_data.UpdateDefaultValue() self.gen_cfg_data = gen_cfg_data
> def print_dsc_line(self):diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> index 660824b740..714b2d8b1a 100644
> --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> @@ -708,7 +708,8 @@ EndList
>  for Page in PageList:
>  Page  = Page.strip()
> Match = re.match("(\w+):\"(.+)\"", Page)-
> self._CfgPageDict[Match.group(1)] = Match.group(2)+   
>  if
> Match != None:+
> self._CfgPageDict[Match.group(1)] =
> Match.group(2)  Match =
> re.match("(?:^|.+\s+)BLOCK:{NAME:\"(.+)\"\s*,\s*VER:\"(.+)\"\s*}", Remaining)
> if Match:--
> 2.28.0.windows.1



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




Re: [edk2-devel] [PATCH v1] IntelFsp2WrapperPkg: Remove microcode PCDs

2021-05-24 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Jason Lou
> Sent: Wednesday, April 14, 2021 10:34 AM
> To: devel@edk2.groups.io
> Cc: Lou, Yun ; Ni, Ray 
> Subject: [edk2-devel] [PATCH v1] IntelFsp2WrapperPkg: Remove microcode
> PCDs
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3334
> 
> IntelFsp2WrapperPkg defines following PCDs:
>   PcdCpuMicrocodePatchAddress
>   PcdCpuMicrocodePatchRegionSize
>   PcdFlashMicrocodeOffset
> 
> But the meanings of PcdCpuMicrocodePatchAddress and
> PcdCpuMicrocodePatchRegionSize are different from the ones that have The
> same name in UefiCpuPkg. To avoid confusion, remove the three PCDs defined
> in IntelFsp2WrapperPkg.
> 
> Signed-off-by: Jason Lou 
> Cc: Ray Ni 
> ---
> 
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInit
> Data.c  | 6 +++---
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> | 8 +---
> 
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFspWra
> pperPlatformSecLibSample.inf | 7 +++
>  3 files changed, 7 insertions(+), 14 deletions(-)
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamI
> nitData.c
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamI
> nitData.c
> index 96b47e23da..e57b5b57be 100644
> ---
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamI
> nitData.c
> +++ b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecR
> +++ amInitData.c
> @@ -1,7 +1,7 @@
>  /** @file   Sample to provide TempRamInitParams data. -  Copyright (c) 2014 -
> 2020, Intel Corporation. All rights reserved.+  Copyright (c) 2014 - 2021,
> Intel Corporation. All rights reserved.   SPDX-License-Identifier: BSD-2-
> Clause-Patent  **/@@ -52,8 +52,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED
> CONST FSPT_UPD_CORE_DATA FsptUpdDataPtr = {
>  }   },   {-((UINT32)FixedPcdGet64 (PcdCpuMicrocodePatchAddress) +
> FixedPcdGet32 (PcdFlashMicrocodeOffset)),-((UINT32)FixedPcdGet64
> (PcdCpuMicrocodePatchRegionSize) - FixedPcdGet32
> (PcdFlashMicrocodeOffset)),+FixedPcdGet32
> (PcdCpuMicrocodePatchAddress),+FixedPcdGet32
> (PcdCpuMicrocodePatchRegionSize), FixedPcdGet32
> (PcdFlashCodeCacheAddress), FixedPcdGet32 (PcdFlashCodeCacheSize),   }diff
> --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> index 6852bf1271..a3b9363779 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> @@ -1,7 +1,7 @@
>  ## @file # Provides drivers and definitions to support fsp in EDKII bios. #-#
> Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.+#
> Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved. # SPDX-
> License-Identifier: BSD-2-Clause-Patent # ##@@ -56,12 +56,6 @@
>## Provides the size of the BIOS Flash Device.
> gIntelFsp2WrapperTokenSpaceGuid.PcdFlashCodeCacheSize|0x0020|UINT
> 32|0x1002 -  ## Indicates the base address of the first Microcode Patch in
> the Microcode Region-
> gIntelFsp2WrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress|0x0|UINT6
> 4|0x1005-
> gIntelFsp2WrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize|0x0|UI
> NT64|0x1006-  ## Indicates the offset of the Cpu Microcode.-
> gIntelFsp2WrapperTokenSpaceGuid.PcdFlashMicrocodeOffset|0x90|UINT32|0x
> 1007-   ## Indicate the PEI memory size platform want to report
> gIntelFsp2WrapperTokenSpaceGuid.PcdPeiMinMemSize|0x180|UINT32|0x
> 4004   ## Indicate the PEI memory size platform want to reportdiff --git
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFspW
> rapperPlatformSecLibSample.inf
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFspW
> rapperPlatformSecLibSample.inf
> index d7f8301bef..027b127724 100644
> ---
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFspW
> rapperPlatformSecLibSample.inf
> +++ b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecF
> +++ spWrapperPlatformSecLibSample.inf
> @@ -1,7 +1,7 @@
>  ## @file #  Sample to provide FSP wrapper platform sec related function. #-#
> Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.+#
> Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved. # #  
> SPDX-
> License-Identifier: BSD-2-Clause-Patent #@@ -76,8 +76,7 @@
>gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress  ##
> CONSUMES  [FixedPcd]-
> gIntelFsp2WrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress ##
> CONSUMES-
> gIntelFsp2WrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize  ##
> CONSUMES-  gIntelFsp2WrapperTokenSpaceGuid.PcdFlashMicrocodeOffset
> ## CONSUMES+  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress
> ## CONSUMES+
> gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize##
> CONSUMES   gIntelFsp2WrapperTokenSpaceGuid.PcdFlashCodeCacheAddress
> ## CONSUMES   

Re: [edk2-devel] [PATCH v4] MinPlatformPkg: Rebase fail when python tools path exist whitespace exist whitespace REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3412

2021-05-30 Thread Chiu, Chasel


Patch has pushed: 86984c17d562fc60a6dabbc3a479d79163656a0c

> -Original Message-
> From: Kuo, IanX 
> Sent: Monday, May 24, 2021 6:49 AM
> To: devel@edk2.groups.io
> Cc: Kuo, IanX ; Chiu, Chasel ;
> Desimone, Nathaniel L 
> Subject: [PATCH v4] MinPlatformPkg: Rebase fail when python tools path exist
> whitespace exist whitespace REF:
> https://bugzilla.tianocore.org/show_bug.cgi?id=3412
> 
> From: IanX Kuo 
> 
> (a) C:\Users\\AppData\Local\Program\Python\Python38
> (b) C:\Python38
> (c) C:\Program Files\Python38
> Issue only happens on (a) and (c).
> (a) happen on  have whitespace. Ex: Tony Chen
> (c) happen on "Program Files" have whitespace.
> 
> Reviewed-by: Chasel Chiu 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Signed-off-by: IanX Kuo 
> ---
>  .../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py| 6 +++---
>  .../MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddres
> s.py
> b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddres
> s.py
> index 406e5ec130..f3cba2651a 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddres
> s.py
> +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAd
> +++ dress.py
> @@ -1,6 +1,6 @@
>  ## @ RebaseAndPatchFspBinBaseAddress.py #-# Copyright (c) 2017 - 2019, Intel
> Corporation. All rights reserved.+# Copyright (c) 2017 - 2021, Intel
> Corporation. All rights reserved. # SPDX-License-Identifier: BSD-2-Clause-
> Patent # @@ -93,13 +93,13 @@ fspTBaseAddress = flashBase + fspTBaseOffset
> # Re-base FSP bin file to new address and save it as fspBinFileRebased using
> SplitFspBin.py # rebaseArguments = fspBinFilePath + " -c s m t -b " +
> str(hex(fspSBaseAddress).rstrip("L")) + " " + 
> str(hex(fspMBaseAddress).rstrip("L"))
> + " " + str(hex(fspTBaseAddress).rstrip("L")) + " -o" + fspBinPath + " -n " +
> fspBinFileRebased-os.system(pythontool + " " + splitFspBinPath + " rebase -f" 
> +
> rebaseArguments)+os.system('"' + pythontool + '"' + " " + splitFspBinPath + "
> rebase -f" + rebaseArguments)  # # Split FSP bin to FSP-S/M/T segments #
> splitArguments = fspBinPath + os.sep + fspBinFileRebased + " -o " + 
> fspBinPath +
> " -n Fsp_Rebased.fd"-os.system(pythontool + " " + splitFspBinPath + " split 
> -f" +
> splitArguments)+os.system('"' + pythontool + '"' + " " + splitFspBinPath + " 
> split -
> f" + splitArguments)  # # Patch dsc file with the re-based FSP-S/M/T address, 
> so
> internally build will use the same.diff --git
> a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> index fb4cf4f9b7..b7e4bcf5f9 100644
> --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> @@ -1,6 +1,6 @@
>  ## @ RebaseFspBinBaseAddress.py #-# Copyright (c) 2019, Intel Corporation. 
> All
> rights reserved.+# Copyright (c) 2019 - 2021, Intel Corporation. All 
> rights
> reserved. # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -87,12
> +87,12 @@ fspTBaseAddress = flashBase + fspTBaseOffset  # Re-base FSP bin
> file to new address and save it as fspBinFileRebased using SplitFspBin.py #
> rebaseArguments = fspBinFilePath + " -c s m t -b " +
> str(hex(fspSBaseAddress).rstrip("L")) + " " + 
> str(hex(fspMBaseAddress).rstrip("L"))
> + " " + str(hex(fspTBaseAddress).rstrip("L")) + " -o" + fspBinPath + " -n " +
> fspBinFileRebased-os.system(pythontool + " " + splitFspBinPath + " rebase -f" 
> +
> rebaseArguments)+os.system('"' + pythontool + '"' + " " + splitFspBinPath + "
> rebase -f" + rebaseArguments)  # # Split FSP bin to FSP-S/M/T segments #
> splitArguments = fspBinPath + os.sep + fspBinFileRebased + " -o " + 
> fspBinPath +
> " -n Fsp_Rebased.fd"-os.system(pythontool + " " + splitFspBinPath + " split 
> -f" +
> splitArguments)+os.system('"' + pythontool + '"' + " " + splitFspBinPath + " 
> split -
> f" + splitArguments)  exit(0)--
> 2.27.0.windows.1



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




Re: [edk2-devel] [PATCH v3] MinPlatformPkg/Fsp: Rebase fail when python tools path exist whitespace REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3412

2021-05-24 Thread Chiu, Chasel


With subject format correction, Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kuo, IanX 
> Sent: Monday, May 24, 2021 6:38 AM
> To: devel@edk2.groups.io
> Cc: Kuo, IanX ; Chiu, Chasel ;
> Desimone, Nathaniel L 
> Subject: [PATCH v3] MinPlatformPkg/Fsp: Rebase fail when python tools path
> exist whitespace REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3412
> 
> From: IanX Kuo 
> 
> (a) C:\Users\\AppData\Local\Program\Python\Python38
> (b) C:\Python38
> (c) C:\Program Files\Python38
> Issue only happens on (a) and (c).
> (a) happen on  have whitespace. Ex: Tony Chen
> (c) happen on "Program Files" have whitespace.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Signed-off-by: IanX Kuo 
> ---
>  .../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py| 6 +++---
>  .../MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddres
> s.py
> b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddres
> s.py
> index 406e5ec130..f3cba2651a 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddres
> s.py
> +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAd
> +++ dress.py
> @@ -1,6 +1,6 @@
>  ## @ RebaseAndPatchFspBinBaseAddress.py #-# Copyright (c) 2017 - 2019, Intel
> Corporation. All rights reserved.+# Copyright (c) 2017 - 2021, Intel
> Corporation. All rights reserved. # SPDX-License-Identifier: BSD-2-Clause-
> Patent # @@ -93,13 +93,13 @@ fspTBaseAddress = flashBase + fspTBaseOffset
> # Re-base FSP bin file to new address and save it as fspBinFileRebased using
> SplitFspBin.py # rebaseArguments = fspBinFilePath + " -c s m t -b " +
> str(hex(fspSBaseAddress).rstrip("L")) + " " + 
> str(hex(fspMBaseAddress).rstrip("L"))
> + " " + str(hex(fspTBaseAddress).rstrip("L")) + " -o" + fspBinPath + " -n " +
> fspBinFileRebased-os.system(pythontool + " " + splitFspBinPath + " rebase -f" 
> +
> rebaseArguments)+os.system('"' + pythontool + '"' + " " + splitFspBinPath + "
> rebase -f" + rebaseArguments)  # # Split FSP bin to FSP-S/M/T segments #
> splitArguments = fspBinPath + os.sep + fspBinFileRebased + " -o " + 
> fspBinPath +
> " -n Fsp_Rebased.fd"-os.system(pythontool + " " + splitFspBinPath + " split 
> -f" +
> splitArguments)+os.system('"' + pythontool + '"' + " " + splitFspBinPath + " 
> split -
> f" + splitArguments)  # # Patch dsc file with the re-based FSP-S/M/T address, 
> so
> internally build will use the same.diff --git
> a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> index fb4cf4f9b7..b7e4bcf5f9 100644
> --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> @@ -1,6 +1,6 @@
>  ## @ RebaseFspBinBaseAddress.py #-# Copyright (c) 2019, Intel Corporation. 
> All
> rights reserved.+# Copyright (c) 2019 - 2021, Intel Corporation. All 
> rights
> reserved. # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -87,12
> +87,12 @@ fspTBaseAddress = flashBase + fspTBaseOffset  # Re-base FSP bin
> file to new address and save it as fspBinFileRebased using SplitFspBin.py #
> rebaseArguments = fspBinFilePath + " -c s m t -b " +
> str(hex(fspSBaseAddress).rstrip("L")) + " " + 
> str(hex(fspMBaseAddress).rstrip("L"))
> + " " + str(hex(fspTBaseAddress).rstrip("L")) + " -o" + fspBinPath + " -n " +
> fspBinFileRebased-os.system(pythontool + " " + splitFspBinPath + " rebase -f" 
> +
> rebaseArguments)+os.system('"' + pythontool + '"' + " " + splitFspBinPath + "
> rebase -f" + rebaseArguments)  # # Split FSP bin to FSP-S/M/T segments #
> splitArguments = fspBinPath + os.sep + fspBinFileRebased + " -o " + 
> fspBinPath +
> " -n Fsp_Rebased.fd"-os.system(pythontool + " " + splitFspBinPath + " split 
> -f" +
> splitArguments)+os.system('"' + pythontool + '"' + " " + splitFspBinPath + " 
> split -
> f" + splitArguments)  exit(0)--
> 2.27.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75505): https://edk2.groups.io/g/devel/message/75505
Mute This Topic: https://groups.io/mt/83047301/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] IntelFsp2WrapperPkg: Remove microcode related PCDs

2021-05-30 Thread Chiu, Chasel


Patch pushed: fe5da0927aad98f3c005088197fa30c1b8f9d3e8


> -Original Message-
> From: Lou, Yun 
> Sent: Thursday, April 15, 2021 2:49 PM
> To: devel@edk2.groups.io
> Cc: Lou, Yun ; Chiu, Chasel ;
> Desimone, Nathaniel L ; Zeng, Star
> ; Ni, Ray 
> Subject: [PATCH v2] IntelFsp2WrapperPkg: Remove microcode related PCDs
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3334
> 
> IntelFsp2WrapperPkg defines following PCDs:
>   PcdCpuMicrocodePatchAddress
>   PcdCpuMicrocodePatchRegionSize
>   PcdFlashMicrocodeOffset
> 
> But the PCD name caused confusion because UefiCpuPkg defines:
>   PcdCpuMicrocodePatchAddress
>   PcdCpuMicrocodePatchRegionSize
> 
> PcdCpuMicrocodePatchAddress in IntelFsp2WrapperPkg means the base address
> of the FV that holds the microcode.
> PcdCpuMicrocodePatchAddress in UefiCpuPkg means the address of the
> microcode.
> 
> The relationship between the PCDs is:
> IntelFsp2WrapperPkg.PcdCpuMicrocodePatchAddress
>  +  IntelFsp2WrapperPkg.PcdFlashMicrocodeOffset
>  == UefiCpuPkg.PcdCpuMicrocodePatchAddress
> 
> IntelFsp2WrapperPkg.PcdCpuMicrocodePatchRegionSize
>  -  IntelFsp2WrapperPkg.PcdFlashMicrocodeOffset
>  == UefiCpuPkg.PcdCpuMicrocodePatchRegionSize
> 
> To avoid confusion and actually the PCDs in IntelFsp2WrapperPkg are only used
> by a sample FSP-T wrapper, this patch removes the 3 PCDs defined in
> IntelFsp2WrapperPkg.
> 
> The FSP-T wrapper is updated to directly use the ones in UefiCpuPkg.
> 
> Signed-off-by: Jason Lou 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Ray Ni 
> ---
> 
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInit
> Data.c  | 6 +++---
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> | 8 +---
> 
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFspWra
> pperPlatformSecLibSample.inf | 7 +++
>  3 files changed, 7 insertions(+), 14 deletions(-)
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamI
> nitData.c
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamI
> nitData.c
> index 96b47e23da..e57b5b57be 100644
> ---
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamI
> nitData.c
> +++ b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecR
> +++ amInitData.c
> @@ -1,7 +1,7 @@
>  /** @file   Sample to provide TempRamInitParams data. -  Copyright (c) 2014 -
> 2020, Intel Corporation. All rights reserved.+  Copyright (c) 2014 - 2021,
> Intel Corporation. All rights reserved.   SPDX-License-Identifier: BSD-2-
> Clause-Patent  **/@@ -52,8 +52,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED
> CONST FSPT_UPD_CORE_DATA FsptUpdDataPtr = {
>  }   },   {-((UINT32)FixedPcdGet64 (PcdCpuMicrocodePatchAddress) +
> FixedPcdGet32 (PcdFlashMicrocodeOffset)),-((UINT32)FixedPcdGet64
> (PcdCpuMicrocodePatchRegionSize) - FixedPcdGet32
> (PcdFlashMicrocodeOffset)),+FixedPcdGet32
> (PcdCpuMicrocodePatchAddress),+FixedPcdGet32
> (PcdCpuMicrocodePatchRegionSize), FixedPcdGet32
> (PcdFlashCodeCacheAddress), FixedPcdGet32 (PcdFlashCodeCacheSize),   }diff
> --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> index 6852bf1271..a3b9363779 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> @@ -1,7 +1,7 @@
>  ## @file # Provides drivers and definitions to support fsp in EDKII bios. #-#
> Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.+#
> Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved. # SPDX-
> License-Identifier: BSD-2-Clause-Patent # ##@@ -56,12 +56,6 @@
>## Provides the size of the BIOS Flash Device.
> gIntelFsp2WrapperTokenSpaceGuid.PcdFlashCodeCacheSize|0x0020|UINT
> 32|0x1002 -  ## Indicates the base address of the first Microcode Patch in
> the Microcode Region-
> gIntelFsp2WrapperTokenSpaceGuid.PcdCpuMicrocodePatchAddress|0x0|UINT6
> 4|0x1005-
> gIntelFsp2WrapperTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize|0x0|UI
> NT64|0x1006-  ## Indicates the offset of the Cpu Microcode.-
> gIntelFsp2WrapperTokenSpaceGuid.PcdFlashMicrocodeOffset|0x90|UINT32|0x
> 1007-   ## Indicate the PEI memory size platform want to report
> gIntelFsp2WrapperTokenSpaceGuid.PcdPeiMinMemSize|0x180|UINT32|0x
> 4004   ## Indicate the PEI memory size platform want to reportdiff --git
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFspW
> rapperPlatformSecLibSample.inf
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFspW
> rapperPlatformSecLibSample.inf
> index d7f8301bef..

Re: [edk2-devel] [PATCH] IntelFsp2Pkg: PatchFv parseInfFile function modification

2021-07-04 Thread Chiu, Chasel


Thanks Ashraf.
Adding my comments below inline.


> -Original Message-
> From: S, Ashraf Ali 
> Sent: Sunday, July 4, 2021 7:23 PM
> To: devel@edk2.groups.io
> Cc: S, Ashraf Ali ; Ni, Ray ; Chiu,
> Chasel ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [PATCH] IntelFsp2Pkg: PatchFv parseInfFile function modification
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3476
> 
> parseInfFile currently reading the EFI_BASE_ADDRESS from INF, once the
> address found still it's continues to read the complete inf file which is not
> required. once the EFI_BASE_ADDRESS read from the INF no need to read
> the INF further.
> MSFT compiler can generate the map file address 8 or 16 based on which
> architecture the INF is compiler. currently it's support for IA32, it can be
> update the X64 in future.
> modification of few typo errors in parseModMapFile, getCurr function
> required
> 
> Signed-off-by: Ashraf Ali S 
> Cc: Ray Ni 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> ---
>  IntelFsp2Pkg/Tools/PatchFv.py | 17 +
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py
> index 112de4077a..236019b62d 100644
> --- a/IntelFsp2Pkg/Tools/PatchFv.py
> +++ b/IntelFsp2Pkg/Tools/PatchFv.py
> @@ -1,6 +1,6 @@
>  ## @ PatchFv.py
>  #
> -# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
> +# Copyright (c) 2014 - 2021, Intel Corporation. All rights
> +reserved.
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #  ## @@ -297,17 +297,17
> @@ class Symbols:
>  #
>  fvOffset= self.getFvOffsetInFd(infFile[0:-4] + ".Fv")
>  fdIn= open(infFile, "r")
> -rptLine = fdIn.readline()
> +rptLines = fdIn.readlines()




The target line "EFI_BASE_ADDRESS = 0x" is usually the second line in 
the generated INF file, do you think we really need to change to "readlines()" 
to read whole file?
It looks to me original readline() implementation is better in efficiency, but 
just need to break when the match found.




>  self.fdBase = 0x
> -while (rptLine != "" ):
> +for line in rptLines:
>  #EFI_BASE_ADDRESS = 0xFFFDF400
> -match = re.match("^EFI_BASE_ADDRESS\s*=\s*(0x[a-fA-F0-9]+)",
> rptLine)
> +match =
> + re.match("^EFI_BASE_ADDRESS\s*=\s*(0x[a-fA-F0-9]+)", line)
>  if match is not None:
>  self.fdBase = int(match.group(1), 16) - fvOffset
> -rptLine  = fdIn.readline()
> +break
>  fdIn.close()
>  if self.fdBase == 0x:
> -raise Exception("Could not find EFI_BASE_ADDRESS in INF file!" %
> fvFile)
> +raise Exception("Could not find EFI_BASE_ADDRESS in INF
> + file!" % infFile)
>  return 0
> 
>  #
> @@ -402,6 +402,7 @@ class Symbols:
>  #
>  #  retval  0   Parsed MOD MAP file successfully
>  #  retval  1   There is no moduleEntryPoint in modSymbols
> +#  retval  2   There is no offset for moduleEntryPoint in 
> modSymbols
>  #
>  def parseModMapFile(self, moduleName, mapFile):
>  #
> @@ -426,7 +427,7 @@ class Symbols:
>  else:
>  #MSFT
>  #0003:0190   _gComBase  7a50 
> SerialPo
> -patchMapFileMatchString =  "^\s[0-9a-fA-F]{4}:[0-9a-fA-
> F]{8}\s+(\w+)\s+([0-9a-fA-F]{8}\s+)"
> +patchMapFileMatchString =  "^\s[0-9a-fA-F]{4}:[0-9a-fA-
> F]{8}\s+(\w+)\s+([0-9a-fA-F]{8,16}\s+)"
>  matchKeyGroupIndex = 1
>  matchSymbolGroupIndex  = 2
>  prefix = ''
> @@ -498,7 +499,7 @@ class Symbols:
>  #
>  #  Get current character
>  #
> -#  retval  elf.string[self.index]
> +#  retval  self.string[self.index]
>  #  retval  ''   Exception
>  #
>  def getCurr(self):
> --
> 2.30.2.windows.1



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




Re: [edk2-devel] [PATCH v3] IntelFsp2Pkg: PatchFv parseInfFile function modification

2021-07-08 Thread Chiu, Chasel


Patch pushed: b560e9d9b67450d3baea56d0e211066722643c57

Thanks,
Chasel


> -Original Message-
> From: S, Ashraf Ali 
> Sent: Wednesday, July 7, 2021 2:42 AM
> To: devel@edk2.groups.io
> Cc: S, Ashraf Ali ; Ni, Ray ; Chiu,
> Chasel ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [PATCH v3] IntelFsp2Pkg: PatchFv parseInfFile function modification
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3476
> 
> parseInfFile currently reading the EFI_BASE_ADDRESS from INF, once the
> address found still it's continues to read the complete inf file which is not
> required. once the EFI_BASE_ADDRESS read from the INF no need to read the
> INF further.
> MSFT compiler can generate the map file address 8 or 16 based on which
> architecture the INF is compiler. currently it's support for IA32, modified 
> the
> patchfv to support for all.
> modification of few typo errors in parseModMapFile, getCurr function required
> 
> verification : Working Fine
> 
> Signed-off-by: Ashraf Ali S 
> Cc: Ray Ni 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> ---
>  IntelFsp2Pkg/Tools/PatchFv.py | 18 +-
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py
> index 112de4077a..eb130049b5 100644
> --- a/IntelFsp2Pkg/Tools/PatchFv.py
> +++ b/IntelFsp2Pkg/Tools/PatchFv.py
> @@ -1,6 +1,6 @@
>  ## @ PatchFv.py
>  #
> -# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
> +# Copyright (c) 2014 - 2021, Intel Corporation. All rights
> +reserved.
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #  ## @@ -304,10 +304,11 @@
> class Symbols:
>  match = re.match("^EFI_BASE_ADDRESS\s*=\s*(0x[a-fA-F0-9]+)", 
> rptLine)
>  if match is not None:
>  self.fdBase = int(match.group(1), 16) - fvOffset
> +break
>  rptLine  = fdIn.readline()
>  fdIn.close()
>  if self.fdBase == 0x:
> -raise Exception("Could not find EFI_BASE_ADDRESS in INF file!" % 
> fvFile)
> +raise Exception("Could not find EFI_BASE_ADDRESS in INF
> + file!" % infFile)
>  return 0
> 
>  #
> @@ -402,6 +403,7 @@ class Symbols:
>  #
>  #  retval  0   Parsed MOD MAP file successfully
>  #  retval  1   There is no moduleEntryPoint in modSymbols
> +#  retval  2   There is no offset for moduleEntryPoint in 
> modSymbols
>  #
>  def parseModMapFile(self, moduleName, mapFile):
>  #
> @@ -426,7 +428,7 @@ class Symbols:
>  else:
>  #MSFT
>  #0003:0190   _gComBase  7a50 
> SerialPo
> -patchMapFileMatchString =  "^\s[0-9a-fA-F]{4}:[0-9a-fA-
> F]{8}\s+(\w+)\s+([0-9a-fA-F]{8}\s+)"
> +patchMapFileMatchString =  "^\s[0-9a-fA-F]{4}:[0-9a-fA-
> F]{8}\s+(\w+)\s+([0-9a-fA-F]{8,16}\s+)"
>  matchKeyGroupIndex = 1
>  matchSymbolGroupIndex  = 2
>  prefix = ''
> @@ -455,7 +457,13 @@ class Symbols:
>  continue
> 
>  if not moduleEntryPoint in modSymbols:
> -return 1
> +if matchSymbolGroupIndex == 2:
> +if not '_ModuleEntryPoint' in modSymbols:
> +return 1
> +else:
> +moduleEntryPoint = "_ModuleEntryPoint"
> +else:
> +return 1
> 
>  modEntry = '%s:%s' % (moduleName,moduleEntryPoint)
>  if not modEntry in self.dictSymbolAddress:
> @@ -498,7 +506,7 @@ class Symbols:
>  #
>  #  Get current character
>  #
> -#  retval  elf.string[self.index]
> +#  retval  self.string[self.index]
>  #  retval  ''   Exception
>  #
>  def getCurr(self):
> --
> 2.30.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77583): https://edk2.groups.io/g/devel/message/77583
Mute This Topic: https://groups.io/mt/84027523/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 2/2] AdvancedFeaturePkg: Fail to build this package.

2021-07-08 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3484

Fixed the build failure of this package.

Cc: Nate DeSimone 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Isaac Oram 
Signed-off-by: Chasel Chiu 
---
 Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc | 19 
+--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc 
b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index ced0a97c37..0c7a29cc75 100644
--- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -7,7 +7,7 @@
 # 1. Present a consolidated and simplified view of all available advanced 
features to board packages.
 # 2. Provide a simple, single package build for all available advanced 
features.
 #
-# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -30,7 +30,12 @@
   PEI_ARCH= IA32
   DXE_ARCH= X64
 
-!include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

+[Packages]
+  MdePkg/MdePkg.dec
+  MinPlatformPkg/MinPlatformPkg.dec
+
+!include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+
 
 

 #
@@ -48,6 +53,16 @@
   gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable|TRUE
   gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable  |TRUE
   gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable  
|FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable
|FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable   
|FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable  
|FALSE
+
+#
+# Include common library
+#
+!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
 
 #
 # This package builds all advanced features.
-- 
2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77600): https://edk2.groups.io/g/devel/message/77600
Mute This Topic: https://groups.io/mt/84069087/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 0/2] Fail to build Intel/AdvancedFeaturePkg.

2021-07-08 Thread Chiu, Chasel
AdvancedFeaturePkg building failure caused by IpmiFeaturePkg code.
This patch series fixed the issue.

Cc: Nate DeSimone 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Isaac Oram 
Signed-off-by: Chasel Chiu 

Chasel Chiu (2):
  IpmiFeaturePkg: Fail to build this package.
  AdvancedFeaturePkg: Fail to build this package.

 Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc   
  | 19 +--
 
Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf
 |  1 +
 Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc  
  | 11 +++
 Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManagement.h   
  | 17 +
 4 files changed, 46 insertions(+), 2 deletions(-)

-- 
2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77599): https://edk2.groups.io/g/devel/message/77599
Mute This Topic: https://groups.io/mt/84069085/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 1/2] IpmiFeaturePkg: Fail to build this package.

2021-07-08 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3484

Fixed the build failure of this package.

Cc: Nate DeSimone 
Cc: Sai Chaganty 
Cc: Liming Gao 
Cc: Isaac Oram 
Signed-off-by: Chasel Chiu 
---
 
Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf
 |  1 +
 Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc  
  | 11 +++
 Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManagement.h   
  | 17 +
 3 files changed, 29 insertions(+)

diff --git 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf
 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf
index 0ef2c18116..bd995ef25f 100644
--- 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf
+++ 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/PeiGenericIpmi.inf
@@ -42,6 +42,7 @@
   DebugLib
   IoLib
   TimerLib
+  ReportStatusCodeLib
 
 [Guids]
 
diff --git 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc
index a1fcefad70..05a7d4f0af 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc
@@ -59,6 +59,12 @@
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
   
PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
+  
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
+
+  #
+  # IPMI Feature Package
+  #
+  
IpmiBaseLib|OutOfBandManagement/IpmiFeaturePkg/Library/PeiIpmiBaseLib/PeiIpmiBaseLib.inf
 
 [LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.UEFI_DRIVER]
   ###
@@ -72,6 +78,11 @@
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
 
+  #
+  # IPMI Feature Package
+  #
+  
IpmiBaseLib|OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLib/IpmiBaseLib.inf
+
 

 #
 # Component section - list of all components that need built for this feature.
diff --git 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManagement.h 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManagement.h
index 244b86e91a..7591f33aba 100644
--- 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManagement.h
+++ 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerManagement.h
@@ -149,6 +149,15 @@ typedef enum {
 #define UPPER_NON_RECOVER_GOING_LOW   0x400
 #define UPPER_NON_RECOVER_GOING_HI0x800
 
+//
+// Definitions for Get BMC Execution Context
+//
+#define EFI_FIRMWARE_GET_BMC_EXECUTION_CONTEXT  0x23
+//
+// Current Execution Context responses
+//
+#define EFI_FIRMWARE_BMC_IN_FORCED_UPDATE_MODE  0x11
+
 //
 // Server Management COM Addressing types
 //
@@ -318,6 +327,14 @@ typedef struct {
   UINT16  IoBasePort;
 } IPMI_HOB_DATA;
 
+//
+//  Constants and Structure definitions for "Get Device ID" command to follow 
here
+//
+typedef struct {
+  UINT8   CurrentExecutionContext;
+  UINT8   PartitionPointer;
+} EFI_IPMI_MSG_GET_BMC_EXEC_RSP;
+
 //
 // COM Layer Callback
 //
-- 
2.28.0.windows.1



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




Re: [edk2-devel] [PATCH] IntelFsp2Pkg: BaseCacheLib EfiProgramMtrr MtrrNumber Should be UINT32

2021-07-09 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu 


> -Original Message-
> From: S, Ashraf Ali 
> Sent: Friday, July 9, 2021 3:33 PM
> To: devel@edk2.groups.io
> Cc: S, Ashraf Ali ; Ni, Ray ; Chiu,
> Chasel ; Desimone, Nathaniel L
> ; Zeng, Star ;
> Solanki, Digant H ; V, Sangeetha
> 
> Subject: [PATCH] IntelFsp2Pkg: BaseCacheLib EfiProgramMtrr MtrrNumber
> Should be UINT32
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3485
> 
> CacheLib EfiProgramMtrr Function takes MTRR number as a input parameter,
> in the function the parameter is defined as UINTN were as the caller calling
> MTTR number in UINT32.
> 
> Signed-off-by: Ashraf Ali S 
> Cc: Ray Ni 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Digant H Solanki 
> Cc: Sangeetha V 
> ---
>  IntelFsp2Pkg/Library/BaseCacheLib/BaseCacheLib.inf | 4 ++--
>  IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c   | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Library/BaseCacheLib/BaseCacheLib.inf
> b/IntelFsp2Pkg/Library/BaseCacheLib/BaseCacheLib.inf
> index d9034bcbaf..9a513fb6df 100644
> --- a/IntelFsp2Pkg/Library/BaseCacheLib/BaseCacheLib.inf
> +++ b/IntelFsp2Pkg/Library/BaseCacheLib/BaseCacheLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  #  Instance of BaseCache.
>  #
> -#  Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
> +#  Copyright (c) 2014 - 2021, Intel Corporation. All rights
> +reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -15,7 +15,7 @@
>VERSION_STRING = 1.0
>LIBRARY_CLASS  = CacheLib
> 
> -[Sources.IA32]
> +[Sources]
>CacheLib.c
>CacheLibInternal.h
> 
> diff --git a/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c
> b/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c
> index 17e895c345..2365f7514e 100644
> --- a/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c
> +++ b/IntelFsp2Pkg/Library/BaseCacheLib/CacheLib.c
> @@ -1,6 +1,6 @@
>  /** @file
> 
> -  Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
> +  Copyright (c) 2014 - 2021, Intel Corporation. All rights
> + reserved.
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -164,7 +164,7 @@ EfiRecoverCacheMtrr (  **/  VOID  EfiProgramMtrr (
> -  IN  UINTN MtrrNumber,
> +  IN  UINT32MtrrNumber,
>IN  EFI_PHYSICAL_ADDRESS  MemoryAddress,
>IN  UINT64MemoryLength,
>IN  EFI_MEMORY_CACHE_TYPE MemoryCacheType,
> --
> 2.30.2.windows.1



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




Re: [edk2-devel] [PATCH v3] IntelFsp2Pkg: PatchFv parseInfFile function modification

2021-07-06 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: S, Ashraf Ali 
> Sent: Wednesday, July 7, 2021 2:42 AM
> To: devel@edk2.groups.io
> Cc: S, Ashraf Ali ; Ni, Ray ; Chiu,
> Chasel ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [PATCH v3] IntelFsp2Pkg: PatchFv parseInfFile function modification
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3476
> 
> parseInfFile currently reading the EFI_BASE_ADDRESS from INF, once the
> address found still it's continues to read the complete inf file which is not
> required. once the EFI_BASE_ADDRESS read from the INF no need to read the
> INF further.
> MSFT compiler can generate the map file address 8 or 16 based on which
> architecture the INF is compiler. currently it's support for IA32, modified 
> the
> patchfv to support for all.
> modification of few typo errors in parseModMapFile, getCurr function required
> 
> verification : Working Fine
> 
> Signed-off-by: Ashraf Ali S 
> Cc: Ray Ni 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> ---
>  IntelFsp2Pkg/Tools/PatchFv.py | 18 +-
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py
> index 112de4077a..eb130049b5 100644
> --- a/IntelFsp2Pkg/Tools/PatchFv.py
> +++ b/IntelFsp2Pkg/Tools/PatchFv.py
> @@ -1,6 +1,6 @@
>  ## @ PatchFv.py
>  #
> -# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
> +# Copyright (c) 2014 - 2021, Intel Corporation. All rights
> +reserved.
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #  ## @@ -304,10 +304,11 @@
> class Symbols:
>  match = re.match("^EFI_BASE_ADDRESS\s*=\s*(0x[a-fA-F0-9]+)", 
> rptLine)
>  if match is not None:
>  self.fdBase = int(match.group(1), 16) - fvOffset
> +break
>  rptLine  = fdIn.readline()
>  fdIn.close()
>  if self.fdBase == 0x:
> -raise Exception("Could not find EFI_BASE_ADDRESS in INF file!" % 
> fvFile)
> +raise Exception("Could not find EFI_BASE_ADDRESS in INF
> + file!" % infFile)
>  return 0
> 
>  #
> @@ -402,6 +403,7 @@ class Symbols:
>  #
>  #  retval  0   Parsed MOD MAP file successfully
>  #  retval  1   There is no moduleEntryPoint in modSymbols
> +#  retval  2   There is no offset for moduleEntryPoint in 
> modSymbols
>  #
>  def parseModMapFile(self, moduleName, mapFile):
>  #
> @@ -426,7 +428,7 @@ class Symbols:
>  else:
>  #MSFT
>  #0003:0190   _gComBase  7a50 
> SerialPo
> -patchMapFileMatchString =  "^\s[0-9a-fA-F]{4}:[0-9a-fA-
> F]{8}\s+(\w+)\s+([0-9a-fA-F]{8}\s+)"
> +patchMapFileMatchString =  "^\s[0-9a-fA-F]{4}:[0-9a-fA-
> F]{8}\s+(\w+)\s+([0-9a-fA-F]{8,16}\s+)"
>  matchKeyGroupIndex = 1
>  matchSymbolGroupIndex  = 2
>  prefix = ''
> @@ -455,7 +457,13 @@ class Symbols:
>  continue
> 
>  if not moduleEntryPoint in modSymbols:
> -return 1
> +if matchSymbolGroupIndex == 2:
> +if not '_ModuleEntryPoint' in modSymbols:
> +return 1
> +else:
> +moduleEntryPoint = "_ModuleEntryPoint"
> +else:
> +return 1
> 
>  modEntry = '%s:%s' % (moduleName,moduleEntryPoint)
>  if not modEntry in self.dictSymbolAddress:
> @@ -498,7 +506,7 @@ class Symbols:
>  #
>  #  Get current character
>  #
> -#  retval  elf.string[self.index]
> +#  retval  self.string[self.index]
>  #  retval  ''   Exception
>  #
>  def getCurr(self):
> --
> 2.30.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77539): https://edk2.groups.io/g/devel/message/77539
Mute This Topic: https://groups.io/mt/84027523/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] IntelFsp2Pkg: PatchFv parseInfFile function modification

2021-07-05 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: S, Ashraf Ali 
> Sent: Monday, July 5, 2021 4:11 PM
> To: devel@edk2.groups.io
> Cc: S, Ashraf Ali ; Ni, Ray ; Chiu,
> Chasel ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [PATCH v2] IntelFsp2Pkg: PatchFv parseInfFile function modification
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3476
> 
> parseInfFile currently reading the EFI_BASE_ADDRESS from INF, once the
> address found still it's continues to read the complete inf file which is not
> required. once the EFI_BASE_ADDRESS read from the INF no need to read the
> INF further.
> MSFT compiler can generate the map file address 8 or 16 based on which
> architecture the INF is compiler. currently it's support for IA32, modified 
> the
> patchfv to support for all.
> modification of few typo errors in parseModMapFile, getCurr function required
> 
> Signed-off-by: Ashraf Ali S 
> Cc: Ray Ni 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> ---
>  IntelFsp2Pkg/Tools/PatchFv.py | 18 +-
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py
> index 112de4077a..64b4e927a0 100644
> --- a/IntelFsp2Pkg/Tools/PatchFv.py
> +++ b/IntelFsp2Pkg/Tools/PatchFv.py
> @@ -1,6 +1,6 @@
>  ## @ PatchFv.py
>  #
> -# Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
> +# Copyright (c) 2014 - 2021, Intel Corporation. All rights
> +reserved.
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #  ## @@ -304,10 +304,11 @@
> class Symbols:
>  match = re.match("^EFI_BASE_ADDRESS\s*=\s*(0x[a-fA-F0-9]+)", 
> rptLine)
>  if match is not None:
>  self.fdBase = int(match.group(1), 16) - fvOffset
> +break
>  rptLine  = fdIn.readline()
>  fdIn.close()
>  if self.fdBase == 0x:
> -raise Exception("Could not find EFI_BASE_ADDRESS in INF file!" % 
> fvFile)
> +raise Exception("Could not find EFI_BASE_ADDRESS in INF
> + file!" % infFile)
>  return 0
> 
>  #
> @@ -402,6 +403,7 @@ class Symbols:
>  #
>  #  retval  0   Parsed MOD MAP file successfully
>  #  retval  1   There is no moduleEntryPoint in modSymbols
> +#  retval  2   There is no offset for moduleEntryPoint in 
> modSymbols
>  #
>  def parseModMapFile(self, moduleName, mapFile):
>  #
> @@ -426,7 +428,7 @@ class Symbols:
>  else:
>  #MSFT
>  #0003:0190   _gComBase  7a50 
> SerialPo
> -patchMapFileMatchString =  "^\s[0-9a-fA-F]{4}:[0-9a-fA-
> F]{8}\s+(\w+)\s+([0-9a-fA-F]{8}\s+)"
> +patchMapFileMatchString =  "^\s[0-9a-fA-F]{4}:[0-9a-fA-
> F]{8}\s+(\w+)\s+([0-9a-fA-F]{8,16}\s+)"
>  matchKeyGroupIndex = 1
>  matchSymbolGroupIndex  = 2
>  prefix = ''
> @@ -455,7 +457,13 @@ class Symbols:
>  continue
> 
>  if not moduleEntryPoint in modSymbols:
> -return 1
> +if matchSymbolGroupIndex == 1:
> +if not '_ModuleEntryPoint' in modSymbols:
> +return 1
> +else:
> +moduleEntryPoint = "_ModuleEntryPoint"
> +else:
> +return 1
> 
>  modEntry = '%s:%s' % (moduleName,moduleEntryPoint)
>  if not modEntry in self.dictSymbolAddress:
> @@ -498,7 +506,7 @@ class Symbols:
>  #
>  #  Get current character
>  #
> -#  retval  elf.string[self.index]
> +#  retval  self.string[self.index]
>  #  retval  ''   Exception
>  #
>  def getCurr(self):
> --
> 2.30.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77498): https://edk2.groups.io/g/devel/message/77498
Mute This Topic: https://groups.io/mt/83993064/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 1/2] IpmiFeaturePkg: Fail to build this package.

2021-07-09 Thread Chiu, Chasel


Change pushed: 
8cb431b46a0888a8ee8e442dc3ea50d7de79e473
107af998afe1a34c7b6aff5240abd9918e51b073

Thanks,
Chasel


> -Original Message-
> From: Chaganty, Rangasai V 
> Sent: Friday, July 9, 2021 2:33 PM
> To: Chiu, Chasel ; devel@edk2.groups.io
> Cc: Desimone, Nathaniel L ; Liming Gao
> ; Oram, Isaac W 
> Subject: RE: [edk2-platforms: PATCH 1/2] IpmiFeaturePkg: Fail to build this
> package.
> 
> Sounds good.
> 
> -----Original Message-
> From: Chiu, Chasel 
> Sent: Thursday, July 08, 2021 11:32 PM
> To: Chaganty, Rangasai V ;
> devel@edk2.groups.io
> Cc: Desimone, Nathaniel L ; Liming Gao
> ; Oram, Isaac W 
> Subject: RE: [edk2-platforms: PATCH 1/2] IpmiFeaturePkg: Fail to build this
> package.
> 
> 
> Hi Sai,
> 
> We will fix the build failure first and macro naming convention will be
> checked separately later.
> 
> Thanks,
> Chasel
> 
> 
> > -Original Message-
> > From: Chaganty, Rangasai V 
> > Sent: Friday, July 9, 2021 10:25 AM
> > To: Chiu, Chasel ; devel@edk2.groups.io
> > Cc: Desimone, Nathaniel L ; Liming Gao
> > ; Oram, Isaac W 
> > Subject: RE: [edk2-platforms: PATCH 1/2] IpmiFeaturePkg: Fail to build
> > this package.
> >
> > In ServerManagment.h, please make sure the newly added macros and
> > structure names are EFI/PI spec defined.
> > If they are not, please remove "EFI_" prefix from the names.
> > With that:
> > Reviewed-by: Sai Chaganty 
> >
> > -Original Message-
> > From: Chiu, Chasel 
> > Sent: Thursday, July 08, 2021 7:41 AM
> > To: devel@edk2.groups.io
> > Cc: Chiu, Chasel ; Desimone, Nathaniel L
> > ; Chaganty, Rangasai V
> > ; Liming Gao
> > ; Oram, Isaac W 
> > Subject: [edk2-platforms: PATCH 1/2] IpmiFeaturePkg: Fail to build
> > this package.
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3484
> >
> > Fixed the build failure of this package.
> >
> > Cc: Nate DeSimone 
> > Cc: Sai Chaganty 
> > Cc: Liming Gao 
> > Cc: Isaac Oram 
> > Signed-off-by: Chasel Chiu 
> > ---
> >
> >
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/P
> > eiGenericIpmi.inf |  1 +
> >
> >
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeatu
> > re.dsc| 11 +++
> >
> >
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerMa
> > nagement.h | 17 +
> >  3 files changed, 29 insertions(+)
> >
> > diff --git
> >
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei
> > /PeiGenericIpmi.inf
> >
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei
> > /PeiGenericIpmi.inf
> > index 0ef2c18116..bd995ef25f 100644
> > ---
> >
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei
> > /PeiGenericIpmi.inf
> > +++
> >
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei
> > /PeiGenericIpmi.inf
> > @@ -42,6 +42,7 @@
> >DebugLib
> >
> >IoLib
> >
> >TimerLib
> >
> > +  ReportStatusCodeLib
> >
> >
> >
> >  [Guids]
> >
> >
> >
> > diff --git
> >
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> > ture.dsc
> >
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> > ture.dsc
> > index a1fcefad70..05a7d4f0af 100644
> > ---
> >
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> > ture.dsc
> > +++
> >
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> > ture.dsc
> > @@ -59,6 +59,12 @@
> >PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
> >
> >PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
> >
> >
> > PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibId
> > PeiServicesTablePointerLib|t/P
> > eiServicesTablePointerLibIdt.inf
> >
> > +
> >
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiR
> > eportStatusCodeLib.inf
> >
> > +
> >
> > +  #
> >
> > +  # IPMI Feature Package
> >
> > +  #
> >
> > +
> >
> IpmiBaseLib|OutOfBandManagement/IpmiFeaturePkg/Library/PeiIpmiBaseL
> > ib/PeiIpmiBaseLib.inf
> >
> >
> >
> >
> [LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.UEFI_DRIVER]

Re: [edk2-devel] [edk2-platforms: PATCH 1/2] IpmiFeaturePkg: Fail to build this package.

2021-07-09 Thread Chiu, Chasel


Hi Sai,

We will fix the build failure first and macro naming convention will be checked 
separately later.

Thanks,
Chasel


> -Original Message-
> From: Chaganty, Rangasai V 
> Sent: Friday, July 9, 2021 10:25 AM
> To: Chiu, Chasel ; devel@edk2.groups.io
> Cc: Desimone, Nathaniel L ; Liming Gao
> ; Oram, Isaac W 
> Subject: RE: [edk2-platforms: PATCH 1/2] IpmiFeaturePkg: Fail to build this
> package.
> 
> In ServerManagment.h, please make sure the newly added macros and
> structure names are EFI/PI spec defined.
> If they are not, please remove "EFI_" prefix from the names.
> With that:
> Reviewed-by: Sai Chaganty 
> 
> -Original Message-
> From: Chiu, Chasel 
> Sent: Thursday, July 08, 2021 7:41 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Chaganty, Rangasai V
> ; Liming Gao ;
> Oram, Isaac W 
> Subject: [edk2-platforms: PATCH 1/2] IpmiFeaturePkg: Fail to build this
> package.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3484
> 
> Fixed the build failure of this package.
> 
> Cc: Nate DeSimone 
> Cc: Sai Chaganty 
> Cc: Liming Gao 
> Cc: Isaac Oram 
> Signed-off-by: Chasel Chiu 
> ---
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei/P
> eiGenericIpmi.inf |  1 +
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeatu
> re.dsc| 11 +++
> 
> Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/ServerMa
> nagement.h | 17 +
>  3 files changed, 29 insertions(+)
> 
> diff --git
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei
> /PeiGenericIpmi.inf
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei
> /PeiGenericIpmi.inf
> index 0ef2c18116..bd995ef25f 100644
> ---
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei
> /PeiGenericIpmi.inf
> +++
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Pei
> /PeiGenericIpmi.inf
> @@ -42,6 +42,7 @@
>DebugLib
> 
>IoLib
> 
>TimerLib
> 
> +  ReportStatusCodeLib
> 
> 
> 
>  [Guids]
> 
> 
> 
> diff --git
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> ture.dsc
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> ture.dsc
> index a1fcefad70..05a7d4f0af 100644
> ---
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> ture.dsc
> +++
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFea
> ture.dsc
> @@ -59,6 +59,12 @@
>PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
> 
>PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
> 
> 
> PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/P
> eiServicesTablePointerLibIdt.inf
> 
> +
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiR
> eportStatusCodeLib.inf
> 
> +
> 
> +  #
> 
> +  # IPMI Feature Package
> 
> +  #
> 
> +
> IpmiBaseLib|OutOfBandManagement/IpmiFeaturePkg/Library/PeiIpmiBaseL
> ib/PeiIpmiBaseLib.inf
> 
> 
> 
>  [LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.UEFI_DRIVER]
> 
>###
> 
> @@ -72,6 +78,11 @@
>UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> 
> 
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
> /UefiRuntimeServicesTableLib.inf
> 
> 
> 
> +  #
> 
> +  # IPMI Feature Package
> 
> +  #
> 
> +
> IpmiBaseLib|OutOfBandManagement/IpmiFeaturePkg/Library/IpmiBaseLib/
> IpmiBaseLib.inf
> 
> +
> 
> 
> ##
> ##
> 
>  #
> 
>  # Component section - list of all components that need built for this 
> feature.
> 
> diff --git
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/Server
> Management.h
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/Server
> Management.h
> index 244b86e91a..7591f33aba 100644
> ---
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/Server
> Management.h
> +++
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Include/Server
> Management.h
> @@ -149,6 +149,15 @@ typedef enum {
>  #define UPPER_NON_RECOVER_GOING_LOW   0x400
> 
>  #define UPPER_NON_RECOVER_GOING_HI0x800
> 
> 
> 
> +//
> 
> +// Definitions for Get BMC Execution Context
> 
> +//
> 
> +#define EFI_FIRMWARE_

Re: [edk2-devel] [edk2-platforms][PATCH v4 27/41] KabylakeSiliconPkg: Remove SmmSpiFlashCommonLib

2021-06-27 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu 



> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Saturday, June 26, 2021 5:21 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Chaganty, Rangasai V
> ; Desimone, Nathaniel L
> 
> Subject: [edk2-platforms][PATCH v4 27/41] KabylakeSiliconPkg: Remove
> SmmSpiFlashCommonLib
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> The library has been consolidated with instances in other Intel silicon 
> packages
> as a single instance in IntelSiliconPkg
> 
> Cc: Chasel Chiu 
> Cc: Sai Chaganty 
> Signed-off-by: Michael Kubacki 
> Reviewed-by: Nate DeSimone 
> Reviewed-by: Chasel Chiu 
> ---
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SpiFlashC
> ommon.c | 196 
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SpiFlashC
> ommonSmmLib.c   |  54 --
>  Silicon/Intel/KabylakeSiliconPkg/Pch/Include/Library/SpiFlashCommonLib.h
> |  98 --
> 
> Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SmmSpiFl
> ashCommonLib.inf |  53 --
>  4 files changed, 401 deletions(-)
> 
> diff --git
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SpiFlas
> hCommon.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SpiFlas
> hCommon.c
> deleted file mode 100644
> index 7ee7ffab5001..
> ---
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/SmmSpiFlashCommonLib/SpiFlas
> hCommon.c
> +++ /dev/null
> @@ -1,196 +0,0 @@
> -/** @file
> -  Wrap EFI_SPI_PROTOCOL to provide some library level interfaces
> -  for module use.
> -
> -Copyright (c) 2017, Intel Corporation. All rights reserved.
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -
> -
> -PCH_SPI_PROTOCOL   *mSpiProtocol;
> -
> -//
> -// FlashAreaBaseAddress and Size for boottime and runtime usage.
> -//
> -UINTN mFlashAreaBaseAddress = 0;
> -UINTN mFlashAreaSize= 0;
> -
> -/**
> -  Enable block protection on the Serial Flash device.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashLock (
> -  VOID
> -  )
> -{
> -  return EFI_SUCCESS;
> -}
> -
> -/**
> -  Read NumBytes bytes of data from the address specified by
> -  PAddress into Buffer.
> -
> -  @param[in]  Address   The starting physical address of the read.
> -  @param[in,out]  NumBytes  On input, the number of bytes to read. On
> output, the number
> -of bytes actually read.
> -  @param[out] BufferThe destination data buffer for the read.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashRead (
> -  IN UINTNAddress,
> -  IN OUT UINT32   *NumBytes,
> - OUT UINT8*Buffer
> -  )
> -{
> -  ASSERT ((NumBytes != NULL) && (Buffer != NULL));
> -  if ((NumBytes == NULL) || (Buffer == NULL)) {
> -return EFI_INVALID_PARAMETER;
> -  }
> -
> -  //
> -  // This function is implemented specifically for those platforms
> -  // at which the SPI device is memory mapped for read. So this
> -  // function just do a memory copy for Spi Flash Read.
> -  //
> -  CopyMem (Buffer, (VOID *) Address, *NumBytes);
> -
> -  return EFI_SUCCESS;
> -}
> -
> -/**
> -  Write NumBytes bytes of data from Buffer to the address specified by
> -  PAddresss.
> -
> -  @param[in]  Address The starting physical address of the write.
> -  @param[in,out]  NumBytesOn input, the number of bytes to write. On
> output,
> -  the actual number of bytes written.
> -  @param[in]  Buffer  The source data buffer for the write.
> -
> -  @retval EFI_SUCCESS   Opertion is successful.
> -  @retval EFI_DEVICE_ERROR  If there is any device errors.
> -
> -**/
> -EFI_STATUS
> -EFIAPI
> -SpiFlashWrite (
> -  IN UINTN  Address,
> -  IN OUT UINT32 *NumBytes,
> -  IN UINT8  *Buffer
> -  )
> -{
> -  EFI_STATUSStatus;
> -  UINTN Offset;
> -  UINT32Length;
> -  UINT32RemainingByt

Re: [edk2-devel] [edk2-platforms][PATCH v4 21/41] KabylakeOpenBoardPkg: Update SpiFvbService & SpiFlashCommonLib

2021-06-27 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Saturday, June 26, 2021 5:21 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Jeremy Soller 
> Subject: [edk2-platforms][PATCH v4 21/41] KabylakeOpenBoardPkg: Update
> SpiFvbService & SpiFlashCommonLib
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> Updates KabylakeOpenBoardPkg to use the SmmSpiFlashCommonLib instance in
> IntelSiliconPkg and the SpiFvbServiceSmm driver in IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> Reviewed-by: Nate DeSimone 
> Reviewed-by: Chasel Chiu 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc   | 7
> +--
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf   | 2 +-
>  Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc | 7
> +--
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf | 2 +-
>  4 files changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> index 302cb679b5eb..89be744a9038 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> @@ -228,7 +228,7 @@ [LibraryClasses.X64.DXE_SMM_DRIVER]
>###
># Silicon Initialization Package
>###
> -
> SpiFlashCommonLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/SmmSpiFlashCom
> monLib/SmmSpiFlashCommonLib.inf
> +
> +
> SpiFlashCommonLib|IntelSiliconPkg/Library/SmmSpiFlashCommonLib/SmmSpiF
> + lashCommonLib.inf
> 
>###
># Platform Package
> @@ -377,6 +377,10 @@ [Components.X64]
>IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.inf
>$(PLATFORM_SI_BIN_PACKAGE)/Microcode/MicrocodeUpdates.inf
> 
> +!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> +  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +!endif
> +
>###
># Platform Package
>###
> @@ -393,7 +397,6 @@ [Components.X64]
> 
>  !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> 
> -  $(PLATFORM_PACKAGE)/Flash/SpiFvbService/SpiFvbServiceSmm.inf
>$(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
> 
>$(PLATFORM_PACKAGE)/Acpi/AcpiSmm/AcpiSmm.inf { diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
> index 39432d21b8b5..239b6b720a6a 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
> @@ -401,7 +401,7 @@ [FV.FvOsBootUncompact]  !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE  INF
> $(PLATFORM_PACKAGE)/PlatformInit/SiliconPolicyDxe/SiliconPolicyDxe.inf
>  INF
> $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
> -INF  $(PLATFORM_PACKAGE)/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +INF  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> 
>  INF  $(PLATFORM_PACKAGE)/Acpi/AcpiTables/AcpiPlatform.inf
>  INF  $(PLATFORM_PACKAGE)/Acpi/AcpiSmm/AcpiSmm.inf
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> index 8523ab3f4fc1..f29393579c06 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> @@ -268,7 +268,7 @@ [LibraryClasses.X64.DXE_SMM_DRIVER]
>###
># Silicon Initialization Package
>###
> -
> SpiFlashCommonLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/SmmSpiFlashCom
> monLib/SmmSpiFlashCommonLib.inf
> +
> +
> SpiFlashCommonLib|IntelSiliconPkg/Library/SmmSpiFlashCommonLib/SmmSpiF
> + lashCommonLib.inf
> 
>###
># Platform Package
> @@ -456,6 +456,10 @@ [Components.X64]
>IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.inf
>$(PLATFORM_SI_BIN_PACKAGE)/Microcode/MicrocodeUpdates.inf
> 
> +!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> +  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +!endif
> +
>

Re: [edk2-devel] [edk2-platforms][PATCH v4 20/41] CometlakeOpenBoardPkg: Update SpiFvbService & SpiFlashCommonLib

2021-06-27 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu 



> -Original Message-
> From: mikub...@linux.microsoft.com 
> Sent: Saturday, June 26, 2021 5:21 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Chaganty, Rangasai V
> ; Kethi Reddy, Deepika
> ; Esakkithevar, Kathappan
> 
> Subject: [edk2-platforms][PATCH v4 20/41] CometlakeOpenBoardPkg: Update
> SpiFvbService & SpiFlashCommonLib
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> Updates CometlakeOpenBoardPkg to use the SmmSpiFlashCommonLib instance
> in IntelSiliconPkg and the SpiFvbServiceSmm driver in IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Rangasai V Chaganty 
> Cc: Deepika Kethi Reddy 
> Cc: Kathappan Esakkithevar 
> Signed-off-by: Michael Kubacki 
> Reviewed-by: Nate DeSimone 
> Reviewed-by: Chasel Chiu 
> ---
>  Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc |
> 7 +--
> Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.fdf |
> 2 +-
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
> index 44a1bd54d6e9..316100e9a599 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.dsc
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.ds
> +++ c
> @@ -254,7 +254,7 @@ [LibraryClasses.X64.DXE_SMM_DRIVER]
>###
># Silicon Initialization Package
>###
> -
> SpiFlashCommonLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/SmmSpiFlashCom
> monLib/SmmSpiFlashCommonLib.inf
> +
> +
> SpiFlashCommonLib|IntelSiliconPkg/Library/SmmSpiFlashCommonLib/SmmSpiF
> + lashCommonLib.inf
> 
>###
># Platform Package
> @@ -401,6 +401,10 @@ [Components.X64]
>$(PLATFORM_SI_PACKAGE)/SystemAgent/SaInit/Dxe/SaInitDxe.inf
>$(PLATFORM_SI_BIN_PACKAGE)/Microcode/MicrocodeUpdates.inf
> 
> +!if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> +  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +!endif
> +
>###
># Platform Package
>###
> @@ -421,7 +425,6 @@ [Components.X64]
> 
>  !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE
> 
> -  $(PLATFORM_PACKAGE)/Flash/SpiFvbService/SpiFvbServiceSmm.inf
>$(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
> 
>$(PLATFORM_PACKAGE)/Acpi/AcpiSmm/AcpiSmm.inf { diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.fdf
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.fdf
> index 6397d80d3895..e341285f4b1a 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.fdf
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.fd
> +++ f
> @@ -407,7 +407,7 @@ [FV.FvOsBootUncompact]  !if
> gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == FALSE  INF
> UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
>  INF
> $(PLATFORM_PACKAGE)/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
> -INF  $(PLATFORM_PACKAGE)/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> +INF  IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> 
>  INF  $(PLATFORM_PACKAGE)/Acpi/AcpiTables/AcpiPlatform.inf
>  INF  $(PLATFORM_PACKAGE)/Acpi/AcpiSmm/AcpiSmm.inf
> --
> 2.28.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77143): https://edk2.groups.io/g/devel/message/77143
Mute This Topic: https://groups.io/mt/83794802/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 v4 25/41] MinPlatformPkg: Remove SpiFvbService modules

2021-06-27 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 



> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Michael
> Kubacki
> Sent: Saturday, June 26, 2021 5:21 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric 
> Subject: [edk2-devel] [edk2-platforms][PATCH v4 25/41] MinPlatformPkg:
> Remove SpiFvbService modules
> 
> From: Michael Kubacki 
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3307
> 
> SpiFvbServiceSmm and SpiFvbServiceStandaloneMm have moved to
> IntelSiliconPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Michael Kubacki 
> Reviewed-by: Nate DeSimone 
> Reviewed-by: Chasel Chiu 
> ---
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c  
>|  94 -
> -
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon.c
> | 903 
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.c
> | 271 --
> 
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneM
> m.c   |  32 -
> 
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceTraditionalM
> m.c  |  32 -
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceCommon.h
> | 158 
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceMm.h
> |  22 -
>  Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceSmm.inf
> |  68 --
> 
> Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/SpiFvbServiceStandaloneM
> m.inf |  67 --
>  Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc 
>|   2 -
>  10 files changed, 1649 deletions(-)
> 
> diff --git a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c
> b/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c
> deleted file mode 100644
> index 7f2678fa9e5a..
> --- a/Platform/Intel/MinPlatformPkg/Flash/SpiFvbService/FvbInfo.c
> +++ /dev/null
> @@ -1,94 +0,0 @@
> -/**@file
> -  Defines data structure that is the volume header found.
> -  These data is intent to decouple FVB driver with FV header.
> -
> -Copyright (c) 2017, Intel Corporation. All rights reserved.
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -
> -#include "SpiFvbServiceCommon.h"
> -
> -#define FIRMWARE_BLOCK_SIZE 0x1
> -#define FVB_MEDIA_BLOCK_SIZEFIRMWARE_BLOCK_SIZE
> -
> -#define NV_STORAGE_BASE_ADDRESS
> FixedPcdGet32(PcdFlashNvStorageVariableBase)
> -#define SYSTEM_NV_BLOCK_NUM
> ((FixedPcdGet32(PcdFlashNvStorageVariableSize)+
> FixedPcdGet32(PcdFlashNvStorageFtwWorkingSize) +
> FixedPcdGet32(PcdFlashNvStorageFtwSpareSize))/ FVB_MEDIA_BLOCK_SIZE)
> -
> -typedef struct {
> -  EFI_PHYSICAL_ADDRESSBaseAddress;
> -  EFI_FIRMWARE_VOLUME_HEADER  FvbInfo;
> -  EFI_FV_BLOCK_MAP_ENTRY  End[1];
> -} EFI_FVB2_MEDIA_INFO;
> -
> -//
> -// This data structure contains a template of all correct FV headers, which 
> is
> used to restore
> -// Fv header if it's corrupted.
> -//
> -EFI_FVB2_MEDIA_INFO mPlatformFvbMediaInfo[] = {
> -  //
> -  // Systen NvStorage FVB
> -  //
> -  {
> -NV_STORAGE_BASE_ADDRESS,
> -{
> -  {0,}, //ZeroVector[16]
> -  EFI_SYSTEM_NV_DATA_FV_GUID,
> -  FVB_MEDIA_BLOCK_SIZE * SYSTEM_NV_BLOCK_NUM,
> -  EFI_FVH_SIGNATURE,
> -  0x0004feff, // check MdePkg/Include/Pi/PiFirmwareVolume.h for details 
> on
> EFI_FVB_ATTRIBUTES_2
> -  sizeof (EFI_FIRMWARE_VOLUME_HEADER) + sizeof
> (EFI_FV_BLOCK_MAP_ENTRY),
> -  0,//CheckSum which will be calucated dynamically.
> -  0,//ExtHeaderOffset
> -  {0,}, //Reserved[1]
> -  2,//Revision
> -  {
> -{
> -  SYSTEM_NV_BLOCK_NUM,
> -  FVB_MEDIA_BLOCK_SIZE,
> -}
> -  }
> -},
> -{
> -  {
> -0,
> -0
> -  }
> -}
> -  }
> -};
> -
> -EFI_STATUS
> -GetFvbInfo (
> -  IN  EFI_PHYSICAL_ADDRESS FvBaseAddress,
> -  OUT EFI_FIRMWARE_VOLUME_HEADER   **FvbInfo
> -  )
> -{
> -  UINTN   Index;
> -  EFI_FIRMWARE_VOLUME_HEADER  *FvHeader;
> -
> -  for (Index = 0; Index < sizeof (mPlatformFvbMediaInfo) / sizeof
> (EFI_FVB2_MEDIA_INFO); Index++) {
> -if (mPlatformFvbMediaInfo[Index].BaseAddress == FvBaseAddress) {
> -  FvHeader = [Index].FvbInfo;
> -
> -  //
> -  // Update the checksum value of FV header.
> -  //
> -  FvHeader->Checksum = CalculateCheckSum16 ( (UINT16 *) FvHeader,
> FvHeader->HeaderLength);
> -
> -  *FvbInfo = FvHead

<    1   2   3   4   5   6   7   8   9   10   >