Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/55069 )
Change subject: lib/bootmem.c: Use only e820 compatible types ......................................................................
lib/bootmem.c: Use only e820 compatible types
With Linuxboot [0-0xfff] and cbmem get marked as type which is not a valid type in the E820 table.
Change-Id: I4797ac9dca1a8f43f104654d0e113236205a288a Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/lib/bootmem.c 1 file changed, 10 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/55069/1
diff --git a/src/lib/bootmem.c b/src/lib/bootmem.c index 1fe23c2..c23fa9f 100644 --- a/src/lib/bootmem.c +++ b/src/lib/bootmem.c @@ -43,13 +43,21 @@ case BM_MEM_UNUSABLE: return LB_MEM_UNUSABLE; case BM_MEM_VENDOR_RSVD: - return LB_MEM_VENDOR_RSVD; + /* Use only e820 compatible types */ + if (ARCH_X86) + return LB_MEM_RESERVED; + else + return LB_MEM_VENDOR_RSVD; case BM_MEM_OPENSBI: return LB_MEM_RESERVED; case BM_MEM_BL31: return LB_MEM_RESERVED; case BM_MEM_TABLE: - return LB_MEM_TABLE; + /* Use only e820 compatible types */ + if (ARCH_X86) + return LB_MEM_RESERVED; + else + return LB_MEM_TABLE; default: printk(BIOS_ERR, "ERROR: Unsupported tag %u\n", tag); return LB_MEM_RESERVED;