Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CHERRY_PICK] AdvLoggerPkg: Use BootServicesData for PreMem Alloc
This is a very small portion cherry-picked from be9a3d2. This fixes a breakage for ARM64 platforms that initialize AdvLogger in PeiCore, which has a hardcoded assumption that memory is not available at its start (not true for ARM64 platforms) and so allocating a minimum of 16 pages for the runtime granularity will fail. This "pre-mem" buffer gets freed as soon as permanent memory is installed, so we can allocate it as EfiBootServicesData (which does not use the runtime allocation granularity of 64k). This also works on x86. If PcdAdvancedLoggerPeiInRAM is true, we can allocate the full amount and need the correct runtime type (I do not think this feature works, for the reason listed above, but that is outside the scope of this commit).
- Loading branch information