Angel Pons | 585495e | 2020-04-03 01:21:38 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 2 | |
| 3 | #include <memlayout.h> |
| 4 | |
| 5 | #include <arch/header.ld> |
| 6 | |
| 7 | /* |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 8 | * Memory map for qemu vexpress-a9 since |
| 9 | * 6ec1588e09770ac7e9c60194faff6101111fc7f0 (Jul 2014): |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 10 | * |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 11 | * 0x0000_0000: NOR flash |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 12 | * 0x1000_0000: I/O map address |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 13 | * 0x6000_0000: RAM |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 14 | */ |
| 15 | |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 16 | /* |
| 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 Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 27 | SECTIONS |
| 28 | { |
| 29 | /* TODO: does this thing emulate SRAM? */ |
| 30 | |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 31 | BOOTBLOCK(0x00000, 64K) |
Julius Werner | 8245bd2 | 2019-12-04 20:32:15 -0800 | [diff] [blame] | 32 | FMAP_CACHE(0x10000, 2K) |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 33 | |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 34 | DRAM_START(0x60000000) |
| 35 | STACK(0x60000000, 64K) |
| 36 | ROMSTAGE(0x60010000, 128K) |
| 37 | RAMSTAGE(0x60030000, 16M) |
Julius Werner | c01a9ab | 2018-04-27 15:19:51 -0700 | [diff] [blame] | 38 | |
| 39 | /* TODO: Implement MMU support and move TTB to a better location. */ |
| 40 | TTB(0x61030000, 16K) |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 41 | } |