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 | |
Patrick Rudolph | 6588652 | 2020-03-01 10:02:50 +0100 | [diff] [blame] | 31 | REGION(flash, 0, CONFIG_ROM_SIZE, 4K) |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 32 | |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 33 | DRAM_START(0x60000000) |
| 34 | STACK(0x60000000, 64K) |
Patrick Rudolph | 6588652 | 2020-03-01 10:02:50 +0100 | [diff] [blame] | 35 | BOOTBLOCK(0x60010000, 128K) |
| 36 | FMAP_CACHE(0x60030000, 4K) |
| 37 | TIMESTAMP(0x60031000, 1K) |
Julius Werner | baf27db | 2019-10-02 17:28:56 -0700 | [diff] [blame] | 38 | CBFS_MCACHE(0x60031400, 7K) |
Julius Werner | c01a9ab | 2018-04-27 15:19:51 -0700 | [diff] [blame] | 39 | /* TODO: Implement MMU support and move TTB to a better location. */ |
Patrick Rudolph | 6588652 | 2020-03-01 10:02:50 +0100 | [diff] [blame] | 40 | TTB(0x60034000, 16K) |
| 41 | ROMSTAGE(0x60038000, 128K) |
| 42 | RAMSTAGE(0x60060000, 16M) |
| 43 | POSTRAM_CBFS_CACHE(0x61060000, 8M) |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 44 | } |