blob: 2fb1b1bb98c5371410494ac540d88cedf3ca9a46 [file] [log] [blame]
Julius Wernerec5e5e02014-08-20 15:29:56 -07001/*
2 * This file is part of the coreboot project.
3 *
Julius Wernerec5e5e02014-08-20 15:29:56 -07004 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
Julius Wernerec5e5e02014-08-20 15:29:56 -070013 */
14
15#include <memlayout.h>
Julius Wernerec5e5e02014-08-20 15:29:56 -070016#include <arch/header.ld>
Patrick Rudolphc6ba36f2019-06-12 09:48:31 +020017#include <mainboard/addressmap.h>
Julius Wernerec5e5e02014-08-20 15:29:56 -070018
Patrick Rudolph8a48c922019-06-12 16:22:11 +020019// Stages start after CBFS in DRAM
Patrick Rudolphc6ba36f2019-06-12 09:48:31 +020020#define STAGES_START (QEMU_VIRT_DRAM + CONFIG_ROM_SIZE)
Philipp Hug2ef569a2018-12-31 14:13:47 +010021
Julius Wernerec5e5e02014-08-20 15:29:56 -070022SECTIONS
23{
Patrick Rudolph8a48c922019-06-12 16:22:11 +020024 // the virt target doesn't emulate flash and just puts the CBFS into DRAM.
25 // fake SRAM where CBFS resides. It's only done for better integration.
26 SRAM_START(QEMU_VIRT_DRAM)
Patrick Rudolphc6ba36f2019-06-12 09:48:31 +020027 BOOTBLOCK(QEMU_VIRT_DRAM, 64K)
28 // CBFS goes here
Patrick Rudolph8a48c922019-06-12 16:22:11 +020029 SRAM_END(STAGES_START)
30 DRAM_START(STAGES_START)
31
32#if ENV_ROMSTAGE
33 ROMSTAGE(STAGES_START, 128K)
34#endif
Patrick Rudolph871d2c72019-07-05 19:41:24 +020035#if ENV_RAMSTAGE
36 REGION(opensbi, STAGES_START, 128K, 4K)
37#endif
Patrick Rudolph8a48c922019-06-12 16:22:11 +020038 PRERAM_CBMEM_CONSOLE(STAGES_START + 128K, 8K)
Julius Werner8245bd22019-12-04 20:32:15 -080039 FMAP_CACHE(STAGES_START + 136K, 2K)
Patrick Rudolphc6ba36f2019-06-12 09:48:31 +020040 RAMSTAGE(STAGES_START + 200K, 16M)
Patrick Rudolph8a48c922019-06-12 16:22:11 +020041 STACK(STAGES_START + 200K + 16M, 4K)
Julius Wernerec5e5e02014-08-20 15:29:56 -070042}