From e705c3900967713cb315d720056506028bb1542d Mon Sep 17 00:00:00 2001 From: Yidi Lin Date: Thu, 8 Jan 2026 22:23:24 +0800 Subject: [PATCH] libpayload/arch/arm64/mmu: Add CB_MEM_TAG to usedmem_ranges CB_MEM_TAG is considered as an reserved memory. But we want to mange this region in the payload and release this region when MTE is inactive. Add CB_MEM_TAG memory range to usedmem_ranges to get a page table mapping and mark it as used. BUG=b:438666196,b:474306129 TEST=Check the tag region is wiped out in DEV mode. Change-Id: I498407cbd44b1cc70ef769a63b8e40665ea67b28 Signed-off-by: Yidi Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/90702 Reviewed-by: Julius Werner Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- payloads/libpayload/arch/arm64/mmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/payloads/libpayload/arch/arm64/mmu.c b/payloads/libpayload/arch/arm64/mmu.c index e99fa37c5d..0b7d206a58 100644 --- a/payloads/libpayload/arch/arm64/mmu.c +++ b/payloads/libpayload/arch/arm64/mmu.c @@ -611,6 +611,7 @@ static void mmu_extract_ranges(struct memrange *cb_ranges, switch (cb_ranges[i].type) { case CB_MEM_TABLE: + case CB_MEM_TAG: /* Mark this memrange as used memory */ if (mmu_add_memrange(&usedmem_ranges, base, size, TYPE_NORMAL_MEM) == NULL)