From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Oram, Isaac W" <isaac.w.oram@intel.com>
Cc: "Dong, Eric" <eric.dong@intel.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel][edk2-platforms][PATCH V1 17/27] PostCodeDebugFeaturePkg: Complete as an advanced feature
Date: Thu, 13 Jan 2022 02:48:21 +0000 [thread overview]
Message-ID: <MW4PR11MB5821E4B4078B66AA6ADAF150CD539@MW4PR11MB5821.namprd11.prod.outlook.com> (raw)
In-Reply-To: <919e3268a0358c3d751c6ae5ce1e134d8ef35abc.1641953242.git.isaac.w.oram@intel.com>
Hi Issac,
Comments inline.
Thanks,
Nate
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Oram,
> Isaac W
> Sent: Tuesday, January 11, 2022 6:20 PM
> To: devel@edk2.groups.io
> Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Dong, Eric
> <eric.dong@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
> Subject: [edk2-devel][edk2-platforms][PATCH V1 17/27]
> PostCodeDebugFeaturePkg: Complete as an advanced feature
>
> Add feature enable PCD.
> Use MinPlatformPkg build include files.
> Fix PEI_COR typo in PEI handler lib.
> Build StatusCodeHandler components with unique filename GUID.
> Add PreMemory.fdf and PostMemory.fdf include files.
> Improve Readme formatting and feature enabling checklist.
>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>
> Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
> ---
>
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCodeDe
> bugFeature.dsc | 231 +++++---------------
>
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMemor
> y.fdf | 14 ++
>
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemory.
> fdf | 13 ++
>
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStat
> usCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf | 2 +-
>
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeat
> urePkg.dec | 11 +
>
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeat
> urePkg.dsc | 30 +++
> Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md
> | 31 ++-
> 7 files changed, 146 insertions(+), 186 deletions(-)
>
> diff --git
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode
> DebugFeature.dsc
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode
> DebugFeature.dsc
> index 3d886fff38..31b0c02e79 100644
> ---
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode
> DebugFeature.dsc
> +++
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCode
> D
> +++ ebugFeature.dsc
> @@ -12,192 +12,71 @@
> #
> ##
>
> -
> ##########################################################
> ######################
> -#
> -# Defines Section - statements that will be processed to create a Makefile.
> -#
> -
> ##########################################################
> ######################
> [Defines]
> -!ifndef $(PEI_ARCH)
> - !error "PEI_ARCH must be specified to build this feature!"
> -!endif
> -!ifndef $(DXE_ARCH)
> - !error "DXE_ARCH must be specified to build this feature!"
> -!endif
> + !ifndef $(PEI_ARCH)
> + !error "PEI_ARCH must be specified to build this feature!"
> + !endif
> + !ifndef $(DXE_ARCH)
> + !error "DXE_ARCH must be specified to build this feature!"
> + !endif
>
> -
> ##########################################################
> ######################
> -#
> -# PCD Section - list of PCD Entries modified by the feature.
> -#
> -
> ##########################################################
> ######################
> + DEFINE POST_CODE_PEIM_FILENAME = 3ea07dd3-f837-40c0-ac56-
> f3e18a30d01b
> + DEFINE POST_CODE_DXE_FILENAME = e7d785f5-e2f3-45e3-b0e7-
> 2291a6c6dea6
> + DEFINE POST_CODE_SMM_FILENAME = 02a955c7-48c0-4178-989b-
> b3fea4b3c6a2
>
> -# Unmark the following and StatusCodeHandler.efi to build the .dsc file
> directly -#[PcdsDynamicDefault] -#
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode|
> TRUE
> +[PcdsDynamicExDefault]
> + #
> + # By default, make the functional control DynamicExDefault PCD so that it
> can be enabled when debugging.
> + #
> +
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode
>
> -
> ##########################################################
> ######################
> -#
> -# Library Class section - list of all Library Classes needed by this feature.
> -#
> -
> ##########################################################
> ######################
> +[LibraryClasses.Common]
> +
> +PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/Po
> stCodeM
> +apLib.inf
>
> -!include MdePkg/MdeLibs.dsc.inc
> +[LibraryClasses.PEIM, LibraryClasses.PEI_CORE]
> +
> +StatusCodeHandlerLib|PostCodeDebugFeaturePkg/Library/PostCodeStatus
> Code
> +HandlerLib/PeiPostCodeStatusCodeHandlerLib.inf
>
> -[LibraryClasses]
> - #######################################
> - # Edk2 Packages
> - #######################################
> - BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> - BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> - DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> - DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> - DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
> - PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
> - PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
> - PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -
> TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTem
> plate.inf
> -
> UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo
> otServicesTableLib.inf
> -
> UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry
> Point.inf
> - UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
> -
> UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib
> /UefiRuntimeServicesTableLib.inf
> - PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
> +[LibraryClasses.DXE_RUNTIME_DRIVER]
> +
> +StatusCodeHandlerLib|PostCodeDebugFeaturePkg/Library/PostCodeStatus
> Code
> +HandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.inf
>
> -[LibraryClasses.common.PEIM]
> - #######################################
> - # Edk2 Packages
> - #######################################
> - HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemory
> AllocationLib.inf
> -
> PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/P
> eiServicesTablePointerLibIdt.inf
> +[LibraryClasses.DXE_SMM_DRIVER]
> +
> +StatusCodeHandlerLib|PostCodeDebugFeaturePkg/Library/PostCodeStatus
> Code
> +HandlerLib/SmmPostCodeStatusCodeHandlerLib.inf
>
> -
> [LibraryClasses.IA32.PEIM,LibraryClasses.IA32.PEI_CORE,LibraryClasses.IA32.
> SEC]
> - #######################################
> - # Edk2 Packages
> - #######################################
> -
> ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiR
> eportStatusCodeLib.inf
> -
> -[LibraryClasses.common.DXE_DRIVER]
> - #######################################
> - # Edk2 Packages
> - #######################################
> - HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> -
> -[LibraryClasses.common.DXE_RUNTIME_DRIVER]
> - #######################################
> - # Edk2 Packages
> - #######################################
> - HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> - UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
> -
> ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCod
> eLib/RuntimeDxeReportStatusCodeLib.inf
> -
> -[LibraryClasses.common.UEFI_DRIVER]
> - #######################################
> - # Edk2 Packages
> - #######################################
> - HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo
> ryAllocationLib.inf
> -
> -[LibraryClasses.X64.DXE_SMM_DRIVER]
> - #######################################
> - # Edk2 Packages
> - #######################################
> -
> SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesT
> ableLib.inf
> -
> MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMe
> moryAllocationLib.inf
> - SmmIoLib|MdePkg/Library/SmmIoLib/SmmIoLib.inf
> - SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
> -
> ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/S
> mmReportStatusCodeLib.inf
> -
> -
> ##########################################################
> ######################
> -#
> -# Component section - list of all components that need built for this feature.
> -#
> -# Note: The EDK II DSC file is not used to specify how compiled binary
> images get placed
> -# into firmware volume images. This section is just a list of modules to
> compile from
> -# source into UEFI-compliant binaries.
> -# It is the FDF file that contains information on combining binary files into
> firmware
> -# volume images, whose concept is beyond UEFI and is described in PI
> specification.
> -# There may also be modules listed in this section that are not required in
> the FDF file,
> -# When a module listed here is excluded from FDF file, then UEFI-
> compliant binary will be
> -# generated for it, but the binary will not be put into any firmware
> volume.
> -#
> -
> ##########################################################
> ######################
> -#
> -# Feature PEI Components
> -#
> -
> -# @todo: Change below line to [Components.$(PEI_ARCH)] after
> https://bugzilla.tianocore.org/show_bug.cgi?id=2308
> -# is completed.
> [Components.IA32]
This should be changed to [Components.$(PEI_ARCH)]
> - #####################################
> - # PostCode Debug Feature Package
> - #####################################
>
> - # Add library instances here that are not included in package components
> and should be tested
> - # in the package build.
> -
> PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/PeiPost
> CodeStatusCodeHandlerLib.inf
> +
> MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.in
> f {
> + <Defines>
> + #
> + # Many boards already have StatusCodeHandler components built from
> the common core code
> + # Providing a unique name avoids collisions. Both status code handler
> components will
> + # install their listeners with the status code routers.
> + #
> + FILE_GUID = $(POST_CODE_PEIM_FILENAME)
> + <LibraryClasses>
> +
> +
> NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/P
> eiP
> + ostCodeStatusCodeHandlerLib.inf
> + }
>
> - # The following is an example for used with StatusCodeHandler:
> -#
> MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.in
> f {
> -# <LibraryClasses>
> -#
> OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibN
> ull/OemHookStatusCodeLibNull.inf
> -#
> SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.in
> f
> -#
> PostCodeLib|MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDeb
> ug.inf
> -#
> PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/Post
> CodeMapLib.inf
> -#
> NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/P
> eiPostCodeStatusCodeHandlerLib.inf
> -# }
> -
> - # Add components here that should be included in the package build.
> -
> -#
> -# Feature DXE Components
> -#
> -
> -# @todo: Change below line to [Components.$(DXE_ARCH)] after
> https://bugzilla.tianocore.org/show_bug.cgi?id=2308
> -# is completed.
> [Components.X64]
This should be changed to [Components.$(DXE_ARCH)]
> - #####################################
> - # PostCode Debug Feature Package
> - #####################################
> +
> MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan
> dlerRuntimeDxe.inf {
> + <Defines>
> + #
> + # Many boards already have StatusCodeHandler components built from
> the common core code
> + # Providing a unique name avoids collisions. Both status code handler
> components will
> + # install their listeners with the status code routers.
> + #
> + FILE_GUID = $(POST_CODE_DXE_FILENAME)
> + <LibraryClasses>
> +
> +
> NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/R
> unt
> + imeDxePostCodeStatusCodeHandlerLib.inf
> + }
>
> - # Add library instances here that are not included in package components
> and should be tested
> - # in the package build.
> -
> PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/Runtim
> eDxePostCodeStatusCodeHandlerLib.inf
> -
> PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/SmmPo
> stCodeStatusCodeHandlerLib.inf
> -
> - # The following is an example for used with StatusCodeHandler:
> -#
> MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan
> dlerRuntimeDxe.inf {
> -# <LibraryClasses>
> -#
> OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibN
> ull/OemHookStatusCodeLibNull.inf
> -#
> SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.in
> f
> -#
> PostCodeLib|MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDeb
> ug.inf
> -#
> PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/Post
> CodeMapLib.inf
> -#
> NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/R
> untimeDxePostCodeStatusCodeHandlerLib.inf
> -# }
> -
> -#
> MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSm
> m.inf {
> -# <LibraryClasses>
> -#
> OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibN
> ull/OemHookStatusCodeLibNull.inf
> -#
> SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.in
> f
> -#
> PostCodeLib|MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDeb
> ug.inf
> -#
> PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/Post
> CodeMapLib.inf
> -#
> NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/S
> mmPostCodeStatusCodeHandlerLib.inf
> -# }
> -
> - # Add components here that should be included in the package build.
> -
> -
> ##########################################################
> #########################################
> -#
> -# BuildOptions Section - Define the module specific tool chain flags that
> should be used as
> -# the default flags for a module. These flags are appended to any
> -# standard flags that are defined by the build process. They can
> be
> -# applied for any modules or only those modules with the
> specific
> -# module style (EDK or EDKII) specified in [Components] section.
> -#
> -# For advanced features, it is recommended to enable
> [BuildOptions] in
> -# the applicable INF file so it does not affect the whole board
> package
> -# build when this DSC file is active.
> -#
> -
> ##########################################################
> #########################################
> -[BuildOptions]
> +
> MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSm
> m.inf {
> + <Defines>
> + #
> + # Many boards already have StatusCodeHandler components built from
> the common core code
> + # Providing a unique name avoids collisions. Both status code handler
> components will
> + # install their listeners with the status code routers.
> + #
> + FILE_GUID = $(POST_CODE_SMM_FILENAME)
> + <LibraryClasses>
> +
> +
> NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/S
> mmP
> + ostCodeStatusCodeHandlerLib.inf
> + }
> diff --git
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMem
> ory.fdf
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMem
> ory.fdf
> new file mode 100644
> index 0000000000..1be9b369a8
> --- /dev/null
> +++
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMem
> or
> +++ y.fdf
> @@ -0,0 +1,14 @@
> +## @file
> +# FDF file for post-memory BeepDebugFeature advanced feature.
> +#
> +# This file is intended to be included into another package so
> +advanced features # can be conditionally included in the flash image
> +by enabling the respective # feature via its FeaturePCD.
> +#
> +# Copyright (C) 2022 Intel Corporation.
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent ##
> +
> +INF FILE_GUID = $(POST_CODE_DXE_FILENAME)
> +MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHa
> ndlerRu
> +ntimeDxe.inf INF FILE_GUID = $(POST_CODE_SMM_FILENAME)
> +MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerS
> mm.inf
> diff --git
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemo
> ry.fdf
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemo
> ry.fdf
> new file mode 100644
> index 0000000000..168ceb1712
> --- /dev/null
> +++
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemo
> ry
> +++ .fdf
> @@ -0,0 +1,13 @@
> +## @file
> +# FDF file for pre-memory BeepDebugFeature advanced feature.
> +#
> +# This file is intended to be included into another package so
> +advanced features # can be conditionally included in the flash image
> +by enabling the respective # feature via its FeaturePCD.
> +#
> +# Copyright (C) 2022 Intel Corporation.
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent ##
> +
> +INF FILE_GUID = $(POST_CODE_PEIM_FILENAME)
> +MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.i
> nf
> diff --git
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS
> tatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS
> tatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf
> index c27578fe90..72df81c77f 100644
> ---
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS
> tatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf
> +++
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeS
> +++ tatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf
> @@ -15,7 +15,7 @@
> FILE_GUID = FA32350A-63DB-4AC6-88D1-BC5327EE7ECE
> MODULE_TYPE = PEIM
> CONSTRUCTOR = PeiPostCodeStatusCodeHandlerLibConstructor
> - LIBRARY_CLASS = StatusCodeHandlerLib|SEC PEIM PEI_COR
> + LIBRARY_CLASS = StatusCodeHandlerLib|SEC PEIM PEI_CORE
>
> #
> # The following information is for reference only and not required by the
> build tools.
> diff --git
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe
> aturePkg.dec
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe
> aturePkg.dec
> index 5ba7b30ab6..42ac756a7c 100644
> ---
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe
> aturePkg.dec
> +++
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe
> at
> +++ urePkg.dec
> @@ -28,5 +28,16 @@
> [Guids]
> gPostCodeDebugFeaturePkgTokenSpaceGuid = {0x68886ac8, 0x7a29,
> 0x4845, {0xa7, 0x02, 0xe9, 0x83, 0xc8, 0x7f, 0xfb, 0xab}}
>
> +[PcdsFeatureFlag]
> +
> +gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureE
> nable|FA
> +LSE|BOOLEAN|0x00000002
> +
> [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
> + ## This PCD allows for dynamic control of post code use if so desired.
> + #
> + # The PCD value can be modified at boot time to activate and deactivate
> the feature functionality.
> + #
> + # Note that this differs from Pcd<FeatureName>FeatureEnable which
> + determines whether the feature is included # as an advanced feature
> + in the flash image. If enabled, the feature is then eligible to be
> activated/deactivated # via this PCD.
> + #
>
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode|
> FALSE|BOOLEAN|0x00000001
> diff --git
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe
> aturePkg.dsc
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe
> aturePkg.dsc
> index 4f0bec4a6f..349604098f 100644
> ---
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe
> aturePkg.dsc
> +++
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFe
> at
> +++ urePkg.dsc
> @@ -24,6 +24,36 @@
> PEI_ARCH = IA32
> DXE_ARCH = X64
>
> +[Packages]
> + MinPlatformPkg/MinPlatformPkg.dec
> +
> +[PcdsFeatureFlag]
> + #
> + # PCD needed for MinPlatform build includes
> + #
> + gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable
> |FALSE
> + gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable
> |FALSE
> + gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable
> |FALSE
> +
> +[PcdsDynamicExDefault]
> + #
> + # PCD needed for this feature to build
> + #
> +
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode|
> TRUE
> +
> +#
> +# Include common libraries
> +#
> +!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
> +!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> +!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
> +
> +[LibraryClasses.Common]
> + #
> + # Required by common status code handler infrastructure
> + #
> +
> +PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePl
> atfo
> +rmHookLibNull.inf
> +
> #
> # This package always builds the feature.
> #
> diff --git
> a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md
> b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md
> index c49db35999..3fc52f1c00 100644
> --- a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md
> +++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md
> @@ -16,7 +16,7 @@ It also provide a library of PostCodeMap lib, it map the
> status code to post cod A library of PostCode lib is needed by platform.
>
> In the library contstructor function, PostCodeStatusCodeHandlerLib register
> the call back function for ReportStatusCode.
> -When called, it call GetPostCodeFromStatusCode() in PostCodeMapLib to
> get post code from status code, and call PostCode() in PostCodeLib to show
> the post code.
> +When called, it call GetPostCodeFromStatusCode () in PostCodeMapLib to
> get post code from status code, and call PostCode () in PostCodeLib to show
> the post code.
>
> PostCodeStatusCodeHandlerLib include 3 libraries for PEI, RuntimeDxe,
> SMM:
> * PeiPostCodeStatusCodeHandlerLib
> @@ -38,6 +38,7 @@ This library provide a function to get post code from
> status code.
>
> ## Key Functions
> * In PeiPostCodeStatusCodeHandlerLib:
> +```
> EFI_STATUS
> EFIAPI
> PostCodeStatusCodeReportWorker (
> @@ -48,8 +49,10 @@ This library provide a function to get post code from
> status code.
> IN CONST EFI_GUID *CallerId,
> IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
> )
> +```
>
> * In RuntimeDxePostCodeStatusCodeHandlerLib:
> +```
> EFI_STATUS
> EFIAPI
> PostCodeStatusCodeReportWorker (
> @@ -59,8 +62,10 @@ This library provide a function to get post code from
> status code.
> IN EFI_GUID *CallerId,
> IN EFI_STATUS_CODE_DATA *Data OPTIONAL
> )
> +```
>
> * In SmmPostCodeStatusCodeHandlerLib:
> +```
> EFI_STATUS
> EFIAPI
> PostCodeStatusCodeReportWorker (
> @@ -70,23 +75,28 @@ This library provide a function to get post code from
> status code.
> IN EFI_GUID *CallerId,
> IN EFI_STATUS_CODE_DATA *Data OPTIONAL
> )
> +```
>
> * In PostCodeMapLib:
> +```
> UINT32
> EFIAPI
> GetPostCodeFromStatusCode (
> IN EFI_STATUS_CODE_TYPE CodeType,
> IN EFI_STATUS_CODE_VALUE Value
> )
> +```
>
> ## Configuration
> -* Link the library to StatusCodeHandler.efi.
> +* Link the library to StatusCodeHandler.efi to add this status code handler.
> +```
> Example:
>
> MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan
> dlerRuntimeDxe.inf {
> <LibraryClasses>
>
> NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/R
> untimeDxePostCodeStatusCodeHandlerLib.inf
> }
> - Refer to PostCodeDebugFeature.dsc for other example.
> +```
> + Refer to PostCodeDebugFeature.dsc for another example.
> * Config PCD
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode.
> In platform .dsc file, need to config the type of
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode.
> Use PcdsFixedAtBuild to save binary size, and use PcdsDynamic if want to
> enable/disable in runtime.
> @@ -98,20 +108,23 @@ This library provide a function to get post code from
> status code.
> Status Code (ReportStatusCode) -> Post Code
> (GetPostCodeFromStatusCode).
>
> ## Control Flows
> -ReportStatusCode() -> PostCodeStatusCodeReportWorker() ->
> GetPostCodeFromStatusCode() -> PostCode()
> +ReportStatusCode () -> PostCodeStatusCodeReportWorker () ->
> +GetPostCodeFromStatusCode () -> PostCode ()
>
> ## Build Flows
> -There is not special build flows.
> +There are not special build flows.
>
> ## Test Point Results
> -Verify the post code shown is correct.
> +There are no test points defined.
>
> ## Functional Exit Criteria
> N/A
>
> ## Feature Enabling Checklist
> -* Set the PCD
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode
> to TRUE.
> -* The post code can be shown.
> +* Set the PCD
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEn
> able to TRUE.
> +* Select the PCD type desired and set the PCD
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode
> to TRUE.
> +* Implemented a platform specific PostCodeMapLib if needed.
> +* Verify the post code can be shown correctly.
>
> ## Common Optimizations
> -* Implemented platform's special PostCodeMapLib if needed.
> +* Set
> gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUsePostCode
> +based on a larger, board specific, size
> + optimization or performance optimization setting.
> --
> 2.27.0.windows.1
>
>
>
>
>
next prev parent reply other threads:[~2022-01-13 2:48 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 2:20 [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build consistency Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 01/27] BeepDebugFeaturePkg: Use MinPlatformPkg build include files Oram, Isaac W
2022-01-13 2:47 ` Nate DeSimone
2022-01-19 23:30 ` Nate DeSimone
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 02/27] BeepDebugFeaturePkg: Fix all relative package paths Oram, Isaac W
2022-01-13 2:47 ` Nate DeSimone
2022-01-14 5:27 ` Chaganty, Rangasai V
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 03/27] AcpiDebugFeaturePkg: " Oram, Isaac W
2022-01-13 2:48 ` Nate DeSimone
2022-01-14 5:18 ` Chaganty, Rangasai V
2022-01-18 22:59 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 04/27] IpmiFeaturePkg: " Oram, Isaac W
2022-01-13 2:48 ` Nate DeSimone
2022-01-19 0:02 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 05/27] IpmiFeaturePkg: Fix build errors Oram, Isaac W
2022-01-13 2:48 ` Nate DeSimone
2022-01-18 23:38 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 06/27] S3FeaturePkg: Fix all relative package paths Oram, Isaac W
2022-01-13 2:48 ` Nate DeSimone
2022-01-14 5:19 ` Chaganty, Rangasai V
2022-01-19 1:11 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 07/27] S3FeaturePkg: Use MinPlatformPkg build include files Oram, Isaac W
2022-01-13 2:49 ` Nate DeSimone
2022-01-14 5:29 ` Chaganty, Rangasai V
2022-01-19 1:26 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 08/27] SmbiosFeaturePkg: Fix all relative package paths Oram, Isaac W
2022-01-13 2:49 ` Nate DeSimone
2022-01-14 5:31 ` Chaganty, Rangasai V
2022-01-19 1:40 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 09/27] SmbiosFeaturePkg: Use MinPlatformPkg build include files Oram, Isaac W
2022-01-13 2:49 ` Nate DeSimone
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 10/27] UserAuthFeaturePkg: Fix all relative package paths Oram, Isaac W
2022-01-13 2:49 ` Nate DeSimone
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 11/27] UserAuthFeaturePkg: Use MinPlatformPkg build include files Oram, Isaac W
2022-01-13 2:49 ` Nate DeSimone
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 12/27] VirtualKeyboardFeaturePkg: Fix all relative package paths Oram, Isaac W
2022-01-13 2:49 ` Nate DeSimone
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 13/27] VirtualKeyboardFeaturePkg: Use MinPlatformPkg build include files Oram, Isaac W
2022-01-13 2:49 ` Nate DeSimone
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 14/27] VirtualKeyboardFeaturePkg: Add feature enable PCD Oram, Isaac W
2022-01-13 2:49 ` Nate DeSimone
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files Oram, Isaac W
2022-01-13 2:49 ` Nate DeSimone
2022-01-14 5:57 ` Chaganty, Rangasai V
2022-01-19 2:31 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 16/27] LogoFeaturePkg: " Oram, Isaac W
2022-01-13 2:49 ` Nate DeSimone
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 17/27] PostCodeDebugFeaturePkg: Complete as an advanced feature Oram, Isaac W
2022-01-13 2:48 ` Nate DeSimone [this message]
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 18/27] AcpiDebugFeaturePkg: Use MinPlatformPkg build include files Oram, Isaac W
2022-01-13 2:47 ` Nate DeSimone
2022-01-19 23:30 ` Nate DeSimone
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 19/27] Usb3DebugFeaturePkg: Align with feature design guidelines Oram, Isaac W
2022-01-13 2:47 ` Nate DeSimone
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 20/27] SpcrFeaturePkg: Use MinPlatform build include files Oram, Isaac W
2022-01-13 2:50 ` Nate DeSimone
2022-01-14 6:10 ` Chaganty, Rangasai V
2022-01-19 19:09 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 21/27] TemplateFeaturePkg: " Oram, Isaac W
2022-01-13 2:50 ` Nate DeSimone
2022-01-14 6:05 ` Chaganty, Rangasai V
2022-01-19 19:13 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 22/27] AdvancedFeaturePkg: Fix all relative package paths Oram, Isaac W
2022-01-13 2:50 ` Nate DeSimone
2022-01-14 5:39 ` Chaganty, Rangasai V
2022-01-19 19:17 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 23/27] AdvancedFeaturePkg: Add missing features Oram, Isaac W
2022-01-13 2:50 ` Nate DeSimone
2022-01-14 5:36 ` Chaganty, Rangasai V
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 24/27] MinPlatformPkg/Build: Add an include file for the common SPI FV info Oram, Isaac W
2022-01-13 2:50 ` Nate DeSimone
2022-01-14 6:02 ` Chaganty, Rangasai V
2022-01-19 19:20 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 25/27] WhitleyOpenBoardPkg/Build: Use common SPI FV Header include Oram, Isaac W
2022-01-13 2:50 ` Nate DeSimone
2022-01-19 19:34 ` Oram, Isaac W
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 26/27] AdvancedFeaturePkg/Build: Add FDF to create FV for all features Oram, Isaac W
2022-01-13 2:47 ` Nate DeSimone
2022-01-12 2:20 ` [edk2-devel][edk2-platforms][PATCH V1 27/27] WhitleyOpenBoardPkg/Build: Enable Features/Intel features Oram, Isaac W
2022-01-13 2:51 ` Nate DeSimone
2022-01-13 2:47 ` [edk2-devel][edk2-platforms][PATCH V1 00/27] Improve feature build consistency Nate DeSimone
2022-01-13 3:15 ` Oram, Isaac W
2022-01-13 3:52 ` Nate DeSimone
2022-01-13 3:53 ` Nate DeSimone
2022-01-13 19:33 ` Oram, Isaac W
2022-01-19 23:30 ` Nate DeSimone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MW4PR11MB5821E4B4078B66AA6ADAF150CD539@MW4PR11MB5821.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox