Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: c9ff19705972e50ff84c52ba726008e37f7ba699
      
https://github.com/tianocore/edk2/commit/c9ff19705972e50ff84c52ba726008e37f7ba699
  Author: Patrick Rudolph <patrick.rudo...@9elements.com>
  Date:   2025-04-08 (Tue, 08 Apr 2025)

  Changed paths:
    M UefiPayloadPkg/Library/CbParseLib/CbParseLib.c
    M UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c

  Log Message:
  -----------
  UefiPayloadPkg: UefiPayloadEntry: Don't use reserved DRAM

Recent AMD platforms reserve parts of the lower DRAM where UefiPayload is
being loaded to and since UefiPayloadEntry doesn't care, it uses the reserved
memory for HOB and memory allocation.

The bootloader cannot prevent this, as it can only place the UEFI FV in
usable DRAM, but it has no control over EfiBootService memory allocations.

This issue prevents boot on those platforms without any specific error message.
It's not vendor specific and can happen on every platform.

Add the same logic as used on UniversalPayload and do the following:
- Walk bootloader provided memory information
- Skip everything that's not marked as usable DRAM
- Align entries to 1MiB boundary
- Don't use memory above 4GiB on x86_32
- Skip memory ranges too small
- Don't use memory currently occupied by the UEFI FV itself

Once a useable memory range is found pass it to HobConstructor().

TEST: Fixes boot on AMD/glinda, that reserved memory at 2000000h.

Signed-off-by: Patrick Rudolph <patrick.rudo...@9elements.com>



To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to