From 3c29a0f04d71d1664a5360c11e8477f819c3e9b5 Mon Sep 17 00:00:00 2001 From: Raymond Diaz Date: Fri, 2 Aug 2024 15:25:11 -0700 Subject: [PATCH] Removed all instances of PcdAdvancedLoggerPeiInRam --- AdvLoggerPkg/AdvLoggerPkg.dec | 5 ---- AdvLoggerPkg/Docs/ReadMe.md | 3 +-- .../BaseArm/AdvancedLoggerLib.c | 1 - .../MmCoreArm/AdvancedLoggerLib.c | 1 - .../PeiCore/AdvancedLoggerLib.c | 23 ++++--------------- .../PeiCore/AdvancedLoggerLib.inf | 1 - 6 files changed, 5 insertions(+), 29 deletions(-) diff --git a/AdvLoggerPkg/AdvLoggerPkg.dec b/AdvLoggerPkg/AdvLoggerPkg.dec index f4bfd2589f..3c325a170e 100644 --- a/AdvLoggerPkg/AdvLoggerPkg.dec +++ b/AdvLoggerPkg/AdvLoggerPkg.dec @@ -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 diff --git a/AdvLoggerPkg/Docs/ReadMe.md b/AdvLoggerPkg/Docs/ReadMe.md index 0cdd30ff3f..cd0c23cbae 100644 --- a/AdvLoggerPkg/Docs/ReadMe.md +++ b/AdvLoggerPkg/Docs/ReadMe.md @@ -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. | @@ -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.| diff --git a/AdvLoggerPkg/Library/AdvancedLoggerLib/BaseArm/AdvancedLoggerLib.c b/AdvLoggerPkg/Library/AdvancedLoggerLib/BaseArm/AdvancedLoggerLib.c index 48dfdc2c4e..f64affe5d7 100644 --- a/AdvLoggerPkg/Library/AdvancedLoggerLib/BaseArm/AdvancedLoggerLib.c +++ b/AdvLoggerPkg/Library/AdvancedLoggerLib/BaseArm/AdvancedLoggerLib.c @@ -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 diff --git a/AdvLoggerPkg/Library/AdvancedLoggerLib/MmCoreArm/AdvancedLoggerLib.c b/AdvLoggerPkg/Library/AdvancedLoggerLib/MmCoreArm/AdvancedLoggerLib.c index 583ed85528..0bd4f4c511 100644 --- a/AdvLoggerPkg/Library/AdvancedLoggerLib/MmCoreArm/AdvancedLoggerLib.c +++ b/AdvLoggerPkg/Library/AdvancedLoggerLib/MmCoreArm/AdvancedLoggerLib.c @@ -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 diff --git a/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c b/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c index a97c0de4f4..60d57203c7 100644 --- a/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c +++ b/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.c @@ -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); @@ -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); diff --git a/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.inf b/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.inf index 5348657e4f..f766a7469d 100644 --- a/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.inf +++ b/AdvLoggerPkg/Library/AdvancedLoggerLib/PeiCore/AdvancedLoggerLib.inf @@ -54,7 +54,6 @@ gEfiPeiMemoryDiscoveredPpiGuid ## CONSUMES [FeaturePcd] - gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerPeiInRAM ## CONSUMES gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerFixedInRAM ## CONSUMES gAdvLoggerPkgTokenSpaceGuid.PcdAdvancedLoggerAutoWrapEnable