[edk2-devel] [edk2-platforms] [PATCH V2 12/14] KabylakeOpenBoardPkg: Add support for PcdFspDispatchModeUseFspPeiMain

Nate DeSimone posted 14 patches 6 years, 2 months ago
Only 13 patches received!
[edk2-devel] [edk2-platforms] [PATCH V2 12/14] KabylakeOpenBoardPkg: Add support for PcdFspDispatchModeUseFspPeiMain
Posted by Nate DeSimone 6 years, 2 months ago
If PcdFspDispatchModeUseFspPeiMain is FALSE, then the BoardPkg
should include PeiMain in FvPreMemory.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 .../KabylakeRvp3/OpenBoardPkg.fdf             |  5 +++--
 .../KabylakeRvp3/OpenBoardPkgPcd.dsc          | 20 +++++++++++++++++++
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
index 98eb7dcb5a..3b3b153b68 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
@@ -229,10 +229,11 @@ READ_LOCK_STATUS   = TRUE
 FvNameGuid         = FC8FE6B5-CD9B-411E-BD8F-31824D0CDE3D
 
 INF  UefiCpuPkg/SecCore/SecCore.inf
-!if (gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode == FALSE) || (gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection == 1)
+!if (gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode == FALSE) || (gMinPlatformPkgTokenSpaceGuid.PcdFspDispatchModeUseFspPeiMain == FALSE) || (gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection == 1)
 #
 # PeiMain is needed only for FSP API mode or EDK2 build,
-# in FSP dispatch mode the one inside FSP Binary is launched.
+# in FSP dispatch mode the one inside FSP Binary is launched
+# unless requested otherwise (PcdFspDispatchModeUseFspPeiMain == FALSE).
 #
 INF  MdeModulePkg/Core/Pei/PeiMain.inf
 !endif
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
index 580504cbc1..5474edd01c 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
@@ -39,6 +39,26 @@
   #
   gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode|TRUE
 
+  #
+  # FALSE: The PEI Main included in FvPreMemory is used to dispatch all PEIMs
+  #        (both inside FSP and outside FSP).
+  #        Pros:
+  #          * PEI Main is re-built from source and is always the latest version
+  #          * Platform code can link any desired LibraryClass to PEI Main
+  #            (Ex: Custom DebugLib instance, SerialPortLib, etc.)
+  #        Cons:
+  #          * The PEI Main being used to execute FSP PEIMs is not the PEI Main
+  #            that the FSP PEIMs were tested with, adding risk of breakage.
+  #          * Two copies of PEI Main will exist in the final binary,
+  #            #1 in FSP-M, #2 in FvPreMemory. The copy in FSP-M is never
+  #            executed, wasting space.
+  #
+  # <b>TRUE</b>:  The PEI Main included in FSP is used to dispatch all PEIMs
+  #        (both inside FSP and outside FSP). PEI Main will not be included in
+  #        FvPreMemory. This is the default and is the recommended choice.
+  #
+  gMinPlatformPkgTokenSpaceGuid.PcdFspDispatchModeUseFspPeiMain|TRUE
+
   #
   # FSP Base address PCD will be updated in FDF basing on flash map.
   #
-- 
2.24.0.windows.2


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

View/Reply Online (#51019): https://edk2.groups.io/g/devel/message/51019
Mute This Topic: https://groups.io/mt/61073539/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms] [PATCH V2 12/14] KabylakeOpenBoardPkg: Add support for PcdFspDispatchModeUseFspPeiMain
Posted by Chiu, Chasel 6 years, 2 months ago
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>


> -----Original Message-----
> From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
> Sent: Thursday, November 21, 2019 4:59 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>
> Subject: [edk2-platforms] [PATCH V2 12/14] KabylakeOpenBoardPkg: Add
> support for PcdFspDispatchModeUseFspPeiMain
> 
> If PcdFspDispatchModeUseFspPeiMain is FALSE, then the BoardPkg should
> include PeiMain in FvPreMemory.
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Michael Kubacki <michael.a.kubacki@intel.com>
> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> ---
>  .../KabylakeRvp3/OpenBoardPkg.fdf             |  5 +++--
>  .../KabylakeRvp3/OpenBoardPkgPcd.dsc          | 20
> +++++++++++++++++++
>  2 files changed, 23 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> index 98eb7dcb5a..3b3b153b68 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> @@ -229,10 +229,11 @@ READ_LOCK_STATUS   = TRUE
>  FvNameGuid         = FC8FE6B5-CD9B-411E-BD8F-31824D0CDE3D  INF
> UefiCpuPkg/SecCore/SecCore.inf-!if
> (gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode == FALSE) ||
> (gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection == 1)+!if
> (gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode == FALSE) ||
> (gMinPlatformPkgTokenSpaceGuid.PcdFspDispatchModeUseFspPeiMain ==
> FALSE) || (gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection == 1) #
> # PeiMain is needed only for FSP API mode or EDK2 build,-# in FSP dispatch
> mode the one inside FSP Binary is launched.+# in FSP dispatch mode the one
> inside FSP Binary is launched+# unless requested otherwise
> (PcdFspDispatchModeUseFspPeiMain == FALSE). # INF
> MdeModulePkg/Core/Pei/PeiMain.inf !endifdiff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.d
> sc
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.d
> sc
> index 580504cbc1..5474edd01c 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.d
> sc
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.d
> +++ sc
> @@ -39,6 +39,26 @@
>    #   gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode|TRUE +
> #+  # FALSE: The PEI Main included in FvPreMemory is used to dispatch all
> PEIMs+  #        (both inside FSP and outside FSP).+  #        Pros:+
> #          * PEI Main is re-built from source and is always the latest
> version+  #          * Platform code can link any desired LibraryClass to
> PEI Main+  #            (Ex: Custom DebugLib instance, SerialPortLib,
> etc.)+  #        Cons:+  #          * The PEI Main being used to
> execute FSP PEIMs is not the PEI Main+  #            that the FSP PEIMs
> were tested with, adding risk of breakage.+  #          * Two copies of
> PEI Main will exist in the final binary,+  #            #1 in FSP-M, #2 in
> FvPreMemory. The copy in FSP-M is never+  #            executed,
> wasting space.+  #+  # <b>TRUE</b>:  The PEI Main included in FSP is
> used to dispatch all PEIMs+  #        (both inside FSP and outside FSP).
> PEI Main will not be included in+  #        FvPreMemory. This is the
> default and is the recommended choice.+  #+
> gMinPlatformPkgTokenSpaceGuid.PcdFspDispatchModeUseFspPeiMain|TRUE
> +   #   # FSP Base address PCD will be updated in FDF basing on flash map.
> #--
> 2.24.0.windows.2


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

View/Reply Online (#51142): https://edk2.groups.io/g/devel/message/51142
Mute This Topic: https://groups.io/mt/61073539/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms] [PATCH V2 12/14] KabylakeOpenBoardPkg: Add support for PcdFspDispatchModeUseFspPeiMain
Posted by Kubacki, Michael A 6 years, 2 months ago
Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>

> -----Original Message-----
> From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
> Sent: Thursday, November 21, 2019 12:59 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>
> Subject: [edk2-platforms] [PATCH V2 12/14] KabylakeOpenBoardPkg: Add
> support for PcdFspDispatchModeUseFspPeiMain
> 
> If PcdFspDispatchModeUseFspPeiMain is FALSE, then the BoardPkg should
> include PeiMain in FvPreMemory.
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Michael Kubacki <michael.a.kubacki@intel.com>
> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> ---
>  .../KabylakeRvp3/OpenBoardPkg.fdf             |  5 +++--
>  .../KabylakeRvp3/OpenBoardPkgPcd.dsc          | 20 +++++++++++++++++++
>  2 files changed, 23 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> index 98eb7dcb5a..3b3b153b68 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> @@ -229,10 +229,11 @@ READ_LOCK_STATUS   = TRUE
>  FvNameGuid         = FC8FE6B5-CD9B-411E-BD8F-31824D0CDE3D  INF
> UefiCpuPkg/SecCore/SecCore.inf-!if
> (gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode == FALSE) ||
> (gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection == 1)+!if
> (gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode == FALSE) ||
> (gMinPlatformPkgTokenSpaceGuid.PcdFspDispatchModeUseFspPeiMain ==
> FALSE) || (gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection == 1)
> # # PeiMain is needed only for FSP API mode or EDK2 build,-# in FSP dispatch
> mode the one inside FSP Binary is launched.+# in FSP dispatch mode the one
> inside FSP Binary is launched+# unless requested otherwise
> (PcdFspDispatchModeUseFspPeiMain == FALSE). # INF
> MdeModulePkg/Core/Pei/PeiMain.inf !endifdiff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> dsc
> index 580504cbc1..5474edd01c 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> dsc
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.
> d
> +++ sc
> @@ -39,6 +39,26 @@
>    #   gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode|TRUE +
> #+  # FALSE: The PEI Main included in FvPreMemory is used to dispatch all
> PEIMs+  #        (both inside FSP and outside FSP).+  #        Pros:+  #          * PEI
> Main is re-built from source and is always the latest version+  #          *
> Platform code can link any desired LibraryClass to PEI Main+  #            (Ex:
> Custom DebugLib instance, SerialPortLib, etc.)+  #        Cons:+  #          * The PEI
> Main being used to execute FSP PEIMs is not the PEI Main+  #            that the
> FSP PEIMs were tested with, adding risk of breakage.+  #          * Two copies of
> PEI Main will exist in the final binary,+  #            #1 in FSP-M, #2 in
> FvPreMemory. The copy in FSP-M is never+  #            executed, wasting
> space.+  #+  # <b>TRUE</b>:  The PEI Main included in FSP is used to dispatch
> all PEIMs+  #        (both inside FSP and outside FSP). PEI Main will not be
> included in+  #        FvPreMemory. This is the default and is the recommended
> choice.+  #+
> gMinPlatformPkgTokenSpaceGuid.PcdFspDispatchModeUseFspPeiMain|TR
> UE+   #   # FSP Base address PCD will be updated in FDF basing on flash map.
> #--
> 2.24.0.windows.2


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

View/Reply Online (#51156): https://edk2.groups.io/g/devel/message/51156
Mute This Topic: https://groups.io/mt/61073539/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-