blob: 5f32d8b7cce6c5ad3d3021a9a845ab1becaf3436 [file] [log] [blame]
Angel Pons585495e2020-04-03 01:21:38 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Julius Wernerec5e5e02014-08-20 15:29:56 -07002
3#include <memlayout.h>
4
5#include <arch/header.ld>
6
7/*
Vladimir Serbinenkof2134f32016-02-18 16:21:15 +01008 * Memory map for qemu vexpress-a9 since
9 * 6ec1588e09770ac7e9c60194faff6101111fc7f0 (Jul 2014):
Julius Wernerec5e5e02014-08-20 15:29:56 -070010 *
Vladimir Serbinenkof2134f32016-02-18 16:21:15 +010011 * 0x0000_0000: NOR flash
Julius Wernerec5e5e02014-08-20 15:29:56 -070012 * 0x1000_0000: I/O map address
Vladimir Serbinenkof2134f32016-02-18 16:21:15 +010013 * 0x6000_0000: RAM
Julius Wernerec5e5e02014-08-20 15:29:56 -070014 */
15
Vladimir Serbinenkof2134f32016-02-18 16:21:15 +010016/*
17 * This map is designed to work with new qemu vexpress memory layout and
18 * with -bios option which neatly puts coreboot into flash and so payloads
19 * can find CBFS and we don't risk overwriting CBFS.
20 *
21 * Prior to Jul 2014 qemu aliased 0 to begining of RAM instead of flash
22 * and -bios was unusable as $pc pointed to 0 which was zero-filled as a
23 * workaround we suggested using -kernel but this still had all the issues
24 * of having fake-ROM in RAM. In fact it was even worse as fake ROM ends
25 * up exactly at addresses needed to load Linux.
26 */
Julius Wernerec5e5e02014-08-20 15:29:56 -070027SECTIONS
28{
29 /* TODO: does this thing emulate SRAM? */
30
Patrick Rudolph65886522020-03-01 10:02:50 +010031 REGION(flash, 0, CONFIG_ROM_SIZE, 4K)
Julius Wernerec5e5e02014-08-20 15:29:56 -070032
Vladimir Serbinenkof2134f32016-02-18 16:21:15 +010033 DRAM_START(0x60000000)
34 STACK(0x60000000, 64K)
Patrick Rudolph65886522020-03-01 10:02:50 +010035 BOOTBLOCK(0x60010000, 128K)
36 FMAP_CACHE(0x60030000, 4K)
37 TIMESTAMP(0x60031000, 1K)
Julius Wernerbaf27db2019-10-02 17:28:56 -070038 CBFS_MCACHE(0x60031400, 7K)
Julius Wernerc01a9ab2018-04-27 15:19:51 -070039 /* TODO: Implement MMU support and move TTB to a better location. */
Patrick Rudolph65886522020-03-01 10:02:50 +010040 TTB(0x60034000, 16K)
41 ROMSTAGE(0x60038000, 128K)
42 RAMSTAGE(0x60060000, 16M)
43 POSTRAM_CBFS_CACHE(0x61060000, 8M)
Julius Wernerec5e5e02014-08-20 15:29:56 -070044}