blob: 9d76d9ddd02282328fe2bd798188092f0978d4ea [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
Vladimir Serbinenkof2134f32016-02-18 16:21:15 +010031 BOOTBLOCK(0x00000, 64K)
Julius Werner8245bd22019-12-04 20:32:15 -080032 FMAP_CACHE(0x10000, 2K)
Julius Wernerec5e5e02014-08-20 15:29:56 -070033
Vladimir Serbinenkof2134f32016-02-18 16:21:15 +010034 DRAM_START(0x60000000)
35 STACK(0x60000000, 64K)
36 ROMSTAGE(0x60010000, 128K)
37 RAMSTAGE(0x60030000, 16M)
Julius Wernerc01a9ab2018-04-27 15:19:51 -070038
39 /* TODO: Implement MMU support and move TTB to a better location. */
40 TTB(0x61030000, 16K)
Julius Wernerec5e5e02014-08-20 15:29:56 -070041}