soc/qualcomm/x1p42100: Add ASCII memory map diagram to memlayout.ld

The memlayout.ld for X1P42100 was copied from a previous SoC and
lacked clear documentation about the platform's specific memory
organization.

This commit adds a detailed ASCII art diagram that provides a visual
representation of the complete memory map. The diagram clarifies the
locations of all major regions, such as AOPSRAM, SSRAM, BSRAM, SHRM,
and the various DRAM segments, which greatly improves the clarity and
maintainability of the linker script.

TEST=Builds successfully for x1p42100.

Change-Id: Ia1714f8da25a22a13f5960d056df33463dd99f31
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88783
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Subrata Banik 2025-08-15 14:47:22 +05:30
commit bdee19ba87

View file

@ -4,6 +4,139 @@
#include <arch/header.ld>
#include <soc/memlayout.h>
/*
* The linker script below configures the memory layout for the Qualcomm X1P42100 SoC.
*
* The memory map and addressing scheme are implemented according to the official Qualcomm
* Hardware Reference Document (HRD) for this specific SoC.
*
* 0x10000000000 +----------------------------------------------------------+ <--------------
* | dram_space_2 | DRAM Space 2 ^
* 0x8800000000 +----------------------------------------------------------+ <--------- |
* | ... (Memory not mapped: Unavailable) ... | XXXXXXXXX |
* 0x1000000000 +----------------------------------------------------------+ <--------- |
* | dram_space_1 | DRAM Space 1 |
* 0x880000000 +----------------------------------------------------------+ <--------- |
* | ... (Memory not mapped: Unavailable) ... | XXXXXXXXX |
* 0x100000000 +----------------------------------------------------------+ <--------- |
* | dram_smem (Shared Memory) | ^ |
* 0xFF800000 +----------------------------------------------------------+ | |
* | CBMEM | | |
* +----------------------------------------------------------+ | |
* | ... Usable memory ... | | |
* 0xDF4C0000 +----------------------------------------------------------+ | |
* | dram_tz_rem (TrustZone Remainder) | | |
* 0xD81D6000 +----------------------------------------------------------+ | |
* | BL31 (ARM Trusted Firmware) | | |
* 0xD80D6000 +----------------------------------------------------------+ | |
* | dram_tz (TrustZone) | | |
* 0xD8000000 +----------------------------------------------------------+ | DRAM
* | ... Usable memory ... | | |
* 0xD7800000 +----------------------------------------------------------+ | |
* | Linux Kernel Reserve | | |
* 0xC7800000 +----------------------------------------------------------+ | |
* | ... Usable memory ... | | |
* 0xA1800000 +----------------------------------------------------------+ | |
* | RAMSTAGE | DRAM Space 0 |
* 0xA0800000 +----------------------------------------------------------+ | |
* | POSTRAM_CBFS_CACHE | | |
* 0x9F800000 +----------------------------------------------------------+ | |
* | ... Usable memory ... | | |
* 0x91380000 +----------------------------------------------------------+ | |
* | dram_aop | | |
* 0x81C00000 +----------------------------------------------------------+ | |
* | dram_ramdump | | |
* 0x81A00000 +----------------------------------------------------------+ | |
* | ... Usable memory ... | | |
* 0x815A0000 +----------------------------------------------------------+ | |
* | dram_cpucp | | |
* 0x80A00000 +----------------------------------------------------------+ | |
* | ... Usable memory ... | v v
* 0x80000000 +----------------------------------------------------------+ <--------------
* | ... (Memory not mapped: Unavailable) ... | XXXXXXXXX
* 0x24060000 +----------------------------------------------------------+ <---------
* | shrm | SHRM
* 0x24040000 +----------------------------------------------------------+ <---------
* | ... (Memory not mapped: Unavailable) ... | XXXXXXXXX
* 0x14A80000 +----------------------------------------------------------+ <---------
* | debug_policy | ^
* 0x14A7F000 +----------------------------------------------------------+ |
* | auth_metadata | |
* 0x14A7D000 +----------------------------------------------------------+ |
* | ... Usable memory ... | |
* 0x14A59000 +----------------------------------------------------------+ |
* | OVERLAP_DECOMPRESSOR_VERSTAGE_ROMSTAGE | |
* 0x14A38000 +----------------------------------------------------------+ |
* | PRERAM_CBMEM_CONSOLE | |
* 0x14A30000 +----------------------------------------------------------+ |
* | ... Usable memory ... | |
* 0x14A1A000 +----------------------------------------------------------+ |
* | CPR | |
* 0x14A17000 +----------------------------------------------------------+ |
* | qclib | |
* 0x14897000 +----------------------------------------------------------+ |
* | ... Usable memory ... | |
* 0x1488C000 +----------------------------------------------------------+ |
* | qc_blob_meta | |
* 0x14888000 +----------------------------------------------------------+ |
* | ddr_training | |
* 0x14878000 +----------------------------------------------------------+ |
* | dtb (Device Tree Blob) | |
* 0x14870000 +----------------------------------------------------------+ |
* | dcb (DDR Config Block) | |
* 0x14862000 +----------------------------------------------------------+ |
* | ... Usable memory ... | |
* 0x14860C00 +----------------------------------------------------------+ |
* | FMAP_CACHE | |
* 0x14860400 +----------------------------------------------------------+ |
* | ddr_information | |
* 0x14860000 +----------------------------------------------------------+ BSRAM
* | CBFS_MCACHE | |
* 0x1485C000 +----------------------------------------------------------+ |
* | qclib_serial_log | |
* 0x1485B000 +----------------------------------------------------------+ |
* | ... Usable memory ... | |
* 0x14859000 +----------------------------------------------------------+ |
* | DMA_COHERENT | |
* 0x14857000 +----------------------------------------------------------+ |
* | VBOOT2_WORK | |
* 0x14854000 +----------------------------------------------------------+ |
* | STACK | |
* 0x14850000 +----------------------------------------------------------+ |
* | TTB (Translation Table Base) | |
* 0x14842000 +----------------------------------------------------------+ |
* | TIMESTAMP | |
* 0x14841C00 +----------------------------------------------------------+ |
* | PRERAM_CBFS_CACHE | |
* 0x14828000 +----------------------------------------------------------+ |
* | BOOTBLOCK | |
* 0x14819000 +----------------------------------------------------------+ |
* | WATCHDOG_TOMBSTONE | |
* 0x14818FFC +----------------------------------------------------------+ |
* | ... Usable memory ... | |
* 0x14815000 +----------------------------------------------------------+ |
* | pbl_timestamps | v
* 0x14800000 +----------------------------------------------------------+ <---------
* | ... (Large Address Gap) ... |
* 0x146AB000 +----------------------------------------------------------+ <---------
* | shared_imem | ^
* 0x146A8000 +----------------------------------------------------------+ |
* | ... Usable memory ... | SSRAM
* 0x146A5000 +----------------------------------------------------------+ |
* | qcsdi | v
* 0x14699000 +----------------------------------------------------------+ <---------
* | ... (Memory not mapped: Unavailable) ... | XXXXXXXXX
* 0x0B100000 +----------------------------------------------------------+ <---------
* | aop_data_ram | ^
* 0x0B0E0000 +----------------------------------------------------------+ |
* | ... Usable memory ... | AOP SRAM
* 0x0B080000 +----------------------------------------------------------+ |
* | aop_code_ram | v
* 0x0B000000 +----------------------------------------------------------+ <---------
*
*/
SECTIONS
{
AOPSRAM_START(0x0B000000)