From 50099def6fdb69386dc15e11f475d2ec304c2232 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 26 Jan 2026 13:39:32 +0000 Subject: [PATCH] soc/qualcomm/x1p42100: Relocate CBMEM top to PIL region base The current CBMEM top is situated at the base of 'dram_xbl_log' (0x81A00000), leaving only 4.4MB of usable memory below it. This space has become insufficient for the growing size requirements of the coreboot configuration tables and boot services. Relocate the CBMEM top to the base of the PIL region (0x866C0000). This move increases the available contiguous memory for CBMEM allocation from 4.4MB to 7.3MB, ensuring sufficient headroom for the tables and reducing fragmentation for the OS and runtime services. Changes: - Update cbmem_top_chipset() to return _dram_pil as the new boundary. - Update memlayout.ld documentation to reflect CBMEM's new position directly below the PIL region. TEST=Verified CBMEM initialization on Bluey; confirmed coreboot tables are correctly allocated at the new high-memory boundary and no overlaps occur with reserved regions. Change-Id: I26d95b952634ce06ed2171c75bc6a129c15ec3b8 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/90912 Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) Reviewed-by: Avi Uday --- src/soc/qualcomm/x1p42100/cbmem.c | 2 +- src/soc/qualcomm/x1p42100/memlayout.ld | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/soc/qualcomm/x1p42100/cbmem.c b/src/soc/qualcomm/x1p42100/cbmem.c index 0524c67f03..568f23ab74 100644 --- a/src/soc/qualcomm/x1p42100/cbmem.c +++ b/src/soc/qualcomm/x1p42100/cbmem.c @@ -6,5 +6,5 @@ uintptr_t cbmem_top_chipset(void) { - return (uintptr_t)_dram_xbl_log; + return (uintptr_t)_dram_pil; } diff --git a/src/soc/qualcomm/x1p42100/memlayout.ld b/src/soc/qualcomm/x1p42100/memlayout.ld index c3d79b8890..2c06eccd24 100644 --- a/src/soc/qualcomm/x1p42100/memlayout.ld +++ b/src/soc/qualcomm/x1p42100/memlayout.ld @@ -51,6 +51,8 @@ * 0x91380000 +----------------------------------------------------------+ | | * | dram_pil | | | * 0x866C0000 +----------------------------------------------------------+ | | + * | CBMEM | | | + * +----------------------------------------------------------+ | | * | ... Usable memory ... | | | * 0x85F80000 +----------------------------------------------------------+ | | * | dram_wlan | | | @@ -81,8 +83,6 @@ * 0x81A40000 +----------------------------------------------------------+ | | * | dram_xbl_log | | | * 0x81A00000 +----------------------------------------------------------+ | | - * | CBMEM | | | - * +----------------------------------------------------------+ | | * | ... Usable memory ... | | | * 0x815A0000 +----------------------------------------------------------+ | | * | dram_cpucp | | |