1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <amdblocks/iomap.h>
4 #include <amdblocks/memmap.h>
5 #include <amdblocks/root_complex.h>
6 #include <device/device.h>
10 * +--------------------------------+
18 * reserved_dram_end +--------------------------------+
20 * | verstage (if reqd) |
22 * +--------------------------------+ VERSTAGE_ADDR
26 * +--------------------------------+ FSP_M_ADDR
29 * +--------------------------------+ ROMSTAGE_ADDR = BOOTBLOCK_END
30 * | | X86_RESET_VECTOR = BOOTBLOCK_END - 0x10
32 * | (C_ENV_BOOTBLOCK_SIZE) |
33 * +--------------------------------+ BOOTBLOCK_ADDR = BOOTBLOCK_END - C_ENV_BOOTBLOCK_SIZE
36 * +--------------------------------+
37 * | FMAP cache (FMAP_SIZE) |
38 * +--------------------------------+ PSP_SHAREDMEM_BASE + PSP_SHAREDMEM_SIZE + PRERAM_CBMEM_CONSOLE_SIZE + 0x200
39 * | Early Timestamp region (512B) |
40 * +--------------------------------+ PSP_SHAREDMEM_BASE + PSP_SHAREDMEM_SIZE + PRERAM_CBMEM_CONSOLE_SIZE
41 * | Preram CBMEM console |
42 * | (PRERAM_CBMEM_CONSOLE_SIZE) |
43 * +--------------------------------+ PSP_SHAREDMEM_BASE + PSP_SHAREDMEM_SIZE
44 * | PSP shared (vboot workbuf) |
45 * | (PSP_SHAREDMEM_SIZE) |
46 * +--------------------------------+ PSP_SHAREDMEM_BASE
48 * +--------------------------------+ PSP_APOB_DRAM_ADDRESS
50 * | (EARLYRAM_BSP_STACK_SIZE) |
51 * reserved_dram_start +--------------------------------+ EARLY_RESERVED_DRAM_BASE
53 * +--------------------------------+ 0x100000
55 * +--------------------------------+ 0xc0000
57 * +--------------------------------+ 0xa0000
59 * +--------------------------------+ 0x0
61 void read_soc_memmap_resources(struct device
*dev
, unsigned long *idx
)
63 read_lower_soc_memmap_resources(dev
, idx
);
65 /* Reserve fixed IOMMU MMIO region */
66 mmio_range(dev
, (*idx
)++, IOMMU_RESERVED_MMIO_BASE
, IOMMU_RESERVED_MMIO_SIZE
);
68 read_fsp_resources(dev
, idx
);