Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2014 Google Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #include <memlayout.h> |
| 17 | |
| 18 | #include <arch/header.ld> |
| 19 | |
| 20 | /* |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 21 | * Memory map for qemu vexpress-a9 since |
| 22 | * 6ec1588e09770ac7e9c60194faff6101111fc7f0 (Jul 2014): |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 23 | * |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 24 | * 0x0000_0000: NOR flash |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 25 | * 0x1000_0000: I/O map address |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 26 | * 0x6000_0000: RAM |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 27 | */ |
| 28 | |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 29 | /* |
| 30 | * This map is designed to work with new qemu vexpress memory layout and |
| 31 | * with -bios option which neatly puts coreboot into flash and so payloads |
| 32 | * can find CBFS and we don't risk overwriting CBFS. |
| 33 | * |
| 34 | * Prior to Jul 2014 qemu aliased 0 to begining of RAM instead of flash |
| 35 | * and -bios was unusable as $pc pointed to 0 which was zero-filled as a |
| 36 | * workaround we suggested using -kernel but this still had all the issues |
| 37 | * of having fake-ROM in RAM. In fact it was even worse as fake ROM ends |
| 38 | * up exactly at addresses needed to load Linux. |
| 39 | */ |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 40 | SECTIONS |
| 41 | { |
| 42 | /* TODO: does this thing emulate SRAM? */ |
| 43 | |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 44 | BOOTBLOCK(0x00000, 64K) |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 45 | |
Vladimir Serbinenko | f2134f3 | 2016-02-18 16:21:15 +0100 | [diff] [blame] | 46 | DRAM_START(0x60000000) |
| 47 | STACK(0x60000000, 64K) |
| 48 | ROMSTAGE(0x60010000, 128K) |
| 49 | RAMSTAGE(0x60030000, 16M) |
Julius Werner | c01a9ab | 2018-04-27 15:19:51 -0700 | [diff] [blame^] | 50 | |
| 51 | /* TODO: Implement MMU support and move TTB to a better location. */ |
| 52 | TTB(0x61030000, 16K) |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 53 | } |