Skip to content

Commit

Permalink
Removed all instances of PcdAdvancedLoggerPeiInRam
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond-MS committed Aug 28, 2024
1 parent 5d44a00 commit 3c29a0f
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 29 deletions.
5 changes: 0 additions & 5 deletions AdvLoggerPkg/AdvLoggerPkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@
#
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerFixedInRAM|FALSE|BOOLEAN|0x00010189

## PcdAdvancedLoggerPeiInRAM - Tells the PEI Advanced Logger that this PEI can allocate memory
# and there is no need for a temporary memory buffer
#
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerPeiInRAM|FALSE|BOOLEAN|0x00010185

## PcdAdvancedLoggerLocator - Tells the Advanced Logger to publish a variable with the logger info block address
#
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerLocator|FALSE|BOOLEAN|0x00010186
Expand Down
3 changes: 1 addition & 2 deletions AdvLoggerPkg/Docs/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following configurations are supported:
| --- | --- |
| DXE Only | Uses DxeCore, DxeRuntime, and Dxe AdvancedLoggerLib libraries for logging from start of DXE CORE through Exit Boot Services. Accepts the PEI Advanced Logger Hob if one is generated. Produces the AdvancedLogger protocol. |
| DXE+SMM | Requires DXE modules above, and adds the Smm AdvancedLoggerLib library. Collects SMM generated messages in the in memory log. |
| PEI | Uses PeiCore and Pei AdvancedLoggerLib libraries. Creates the Advanced Logger Hob if PcdAdvancedLoggerPeiInRAM is set. |
| PEI | Uses PeiCore and Pei AdvancedLoggerLib libraries. |
| SEC | Uses the Sec Advanced Logger Library. SEC requires a fixed load address, so it piggy backs on the Temporary RAM PCD information. Produces a Fixed Address temporary RAM log. When memory is added, the Sec Advanced Logger library converts the Temporary RAM logging information to the PEI Advanced Logger Hob. |
| PEI64 | Uses Pei64 Advanced Logger Library. Requires the SEC fixed address temporary log information in order to log Pei64 bit DEBUG messages. |
| MM | Standalone MM - Loads during PEI phase. |
Expand All @@ -25,7 +25,6 @@ PCD's used by Advanced Logger
| PCD | Function of the PCD|
| --- | --- |
|PcdAdvancedLoggerForceEnable | The default operation is to check if a Logs directory is present in the root of the filesystem. If the UefiLogs directory is present, logging is enabled. When PcdAdvancedLoggerForceEnable is TRUE, and the device is not a USB device, a UefiLogs directory will be created and logging is enabled. When logging is enabled, the proper log files will be created if not already preset.|
|PcdAdvancedLoggerPeiInRAM | For systems that have memory at PeiCore entry. The full in memory log buffer if PcdAdvancedLoggerPages is allocated in the Pei Core constructor and PcdAdvancedLoggerPreMemPages is ignored.|
|PcdAdvancedLoggerFixedInRAM | For systems that have a fixed memory buffer prior to UEFI. The full in memory log buffer is assumed.|
|PcdAdvancedHdwLoggerDebugPrintErrorLevel | The standard debug flags filter which log messages are produced. This PCD allow a subset of log messages to be forwarded to the Hdw Port Lib.|
|PcdAdvancedLoggerPreMemPages | Amount of temporary RAM used for the debug log.|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ ValidateInfoBlock (
The following PCD settings are assumed:
PcdAdvancedLoggerPeiInRAM -- TRUE
PcdAdvancedLoggerBase -- NOT NULL and pointer to memory to be used
PcdAdvancedLoggerPages -- > 64KB of pages
PcdAdvancedLoggerCarBase -- NOT USED, leave at default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
The following PCD settings are assumed:
PcdAdvancedLoggerPeiInRAM -- TRUE
PcdAdvancedLoggerBase -- NOT NULL and pointer to memory to be used
PcdAdvancedLoggerPages -- > 64KB of pages
PcdAdvancedLoggerCarBase -- NOT USED, leave at default
Expand Down
23 changes: 4 additions & 19 deletions AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,14 +553,9 @@ AdvancedLoggerGetLoggerInfo (
// Memory Discovered Ppi. At that time, the full in memory log buffer is allocated.
//

if (FeaturePcdGet (PcdAdvancedLoggerPeiInRAM)) {
Pages = FixedPcdGet32 (PcdAdvancedLoggerPages);
Type = EfiRuntimeServicesData;
} else {
Pages = FixedPcdGet32 (PcdAdvancedLoggerPreMemPages);
// This is to avoid the interim buffer being allocated to consume 64KB on ARM64 platforms.
Type = EfiBootServicesData;
}
Pages = FixedPcdGet32 (PcdAdvancedLoggerPreMemPages);
// This is to avoid the interim buffer being allocated to consume 64KB on ARM64 platforms.
Type = EfiBootServicesData;

BufferSize = EFI_PAGES_TO_SIZE (Pages);

Expand Down Expand Up @@ -623,17 +618,7 @@ AdvancedLoggerGetLoggerInfo (
Status = PeiServicesInstallPpi (mAdvancedLoggerPpiList);
ASSERT_EFI_ERROR (Status);

if (FeaturePcdGet (PcdAdvancedLoggerPeiInRAM)) {
LoggerInfo->InPermanentRAM = TRUE;
Status = MmUnblockMemoryRequest (NewLoggerInfo, Pages);
if (EFI_ERROR (Status)) {
if (Status != EFI_UNSUPPORTED) {
DEBUG ((DEBUG_ERROR, "%a: Unable to notify StandaloneMM. Code=%r\n", __FUNCTION__, Status));
}
} else {
DEBUG ((DEBUG_INFO, "%a: StandaloneMM Hob data published\n", __FUNCTION__));
}
} else if (FeaturePcdGet (PcdAdvancedLoggerFixedInRAM)) {
if (FeaturePcdGet (PcdAdvancedLoggerFixedInRAM)) {
DEBUG ((DEBUG_INFO, "%a: Standalone MM Hob of fixed data published\n", __FUNCTION__));
} else {
PeiServicesNotifyPpi (mMemoryDiscoveredNotifyList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
gEfiPeiMemoryDiscoveredPpiGuid ## CONSUMES

[FeaturePcd]
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerPeiInRAM ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerFixedInRAM ## CONSUMES
gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerAutoWrapEnable

Expand Down

0 comments on commit 3c29a0f

Please sign in to comment.