From: "Oram, Isaac W" <isaac.w.oram@intel.com>
To: devel@edk2.groups.io
Cc: Isaac Oram <isaac.w.oram@intel.com>,
Eric Dong <eric.dong@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 17/27] PostCodeDebugFeaturePkg: Complete as an advanced feature
Date: Tue, 11 Jan 2022 18:20:17 -0800 [thread overview]
Message-ID: <919e3268a0358c3d751c6ae5ce1e134d8ef35abc.1641953242.git.isaac.w.oram@intel.com> (raw)
In-Reply-To: <cover.1641953242.git.isaac.w.oram@intel.com>
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/PostCodeDebugFeature.dsc | 231 +++++---------------
Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMemory.fdf | 14 ++
Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemory.fdf | 13 ++
Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf | 2 +-
Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dec | 11 +
Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dsc | 30 +++
Features/Intel/Debugging/PostCodeDebugFeaturePkg/Readme.md | 31 ++-
7 files changed, 146 insertions(+), 186 deletions(-)
diff --git a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc
index 3d886fff38..31b0c02e79 100644
--- a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc
+++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.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/PostCodeMapLib.inf
-!include MdePkg/MdeLibs.dsc.inc
+[LibraryClasses.PEIM, LibraryClasses.PEI_CORE]
+ StatusCodeHandlerLib|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/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/BaseTimerLibNullTemplate.inf
- UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
- UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.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/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.inf
-[LibraryClasses.common.PEIM]
- #######################################
- # Edk2 Packages
- #######################################
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
- MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
- PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
+[LibraryClasses.DXE_SMM_DRIVER]
+ StatusCodeHandlerLib|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/SmmPostCodeStatusCodeHandlerLib.inf
-[LibraryClasses.IA32.PEIM,LibraryClasses.IA32.PEI_CORE,LibraryClasses.IA32.SEC]
- #######################################
- # Edk2 Packages
- #######################################
- ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
-
-[LibraryClasses.common.DXE_DRIVER]
- #######################################
- # Edk2 Packages
- #######################################
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-
-[LibraryClasses.common.DXE_RUNTIME_DRIVER]
- #######################################
- # Edk2 Packages
- #######################################
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf
-
-[LibraryClasses.common.UEFI_DRIVER]
- #######################################
- # Edk2 Packages
- #######################################
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-
-[LibraryClasses.X64.DXE_SMM_DRIVER]
- #######################################
- # Edk2 Packages
- #######################################
- SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf
- MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf
- SmmIoLib|MdePkg/Library/SmmIoLib/SmmIoLib.inf
- SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
- ReportStatusCodeLib|MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.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]
- #####################################
- # 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/PeiPostCodeStatusCodeHandlerLib.inf
+ MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.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_PEIM_FILENAME)
+ <LibraryClasses>
+ NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf
+ }
- # The following is an example for used with StatusCodeHandler:
-# MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf {
-# <LibraryClasses>
-# OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
-# SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
-# PostCodeLib|MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf
-# PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/PostCodeMapLib.inf
-# NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.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]
- #####################################
- # PostCode Debug Feature Package
- #####################################
+ MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.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/RuntimeDxePostCodeStatusCodeHandlerLib.inf
+ }
- # Add library instances here that are not included in package components and should be tested
- # in the package build.
- PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.inf
- PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/SmmPostCodeStatusCodeHandlerLib.inf
-
- # The following is an example for used with StatusCodeHandler:
-# MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf {
-# <LibraryClasses>
-# OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
-# SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
-# PostCodeLib|MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf
-# PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/PostCodeMapLib.inf
-# NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.inf
-# }
-
-# MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf {
-# <LibraryClasses>
-# OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
-# SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
-# PostCodeLib|MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf
-# PostCodeMapLib|PostCodeDebugFeaturePkg/Library/PostCodeMapLib/PostCodeMapLib.inf
-# NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/SmmPostCodeStatusCodeHandlerLib.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/StatusCodeHandlerSmm.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/SmmPostCodeStatusCodeHandlerLib.inf
+ }
diff --git a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMemory.fdf b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMemory.fdf
new file mode 100644
index 0000000000..1be9b369a8
--- /dev/null
+++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PostMemory.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/StatusCodeHandlerRuntimeDxe.inf
+INF FILE_GUID = $(POST_CODE_SMM_FILENAME) MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf
diff --git a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemory.fdf b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemory.fdf
new file mode 100644
index 0000000000..168ceb1712
--- /dev/null
+++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Include/PreMemory.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.inf
diff --git a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf
index c27578fe90..72df81c77f 100644
--- a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/PeiPostCodeStatusCodeHandlerLib.inf
+++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/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/PostCodeDebugFeaturePkg.dec b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dec
index 5ba7b30ab6..42ac756a7c 100644
--- a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dec
+++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dec
@@ -28,5 +28,16 @@
[Guids]
gPostCodeDebugFeaturePkgTokenSpaceGuid = {0x68886ac8, 0x7a29, 0x4845, {0xa7, 0x02, 0xe9, 0x83, 0xc8, 0x7f, 0xfb, 0xab}}
+[PcdsFeatureFlag]
+ gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEnable|FALSE|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/PostCodeDebugFeaturePkg.dsc b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dsc
index 4f0bec4a6f..349604098f 100644
--- a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dsc
+++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.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/BasePlatformHookLibNull.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/StatusCodeHandlerRuntimeDxe.inf {
<LibraryClasses>
NULL|PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.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.PcdPostCodeDebugFeatureEnable 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-12 2:20 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 ` Oram, Isaac W [this message]
2022-01-13 2:48 ` [edk2-devel][edk2-platforms][PATCH V1 17/27] PostCodeDebugFeaturePkg: Complete as an advanced feature Nate DeSimone
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=919e3268a0358c3d751c6ae5ce1e134d8ef35abc.1641953242.git.isaac.w.oram@intel.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