blob: 10952a39eec6b0c2d4bc4ae83a2cad713f79d152 [file] [log] [blame]
Ronald G. Minniche0e784a2014-11-26 19:25:47 +00001/*
2 * This file is part of the coreboot project.
3 *
Aaron Durbinc6588c52015-05-15 13:15:34 -05004 * Copyright 2015 Google Inc.
Jonathan Neuschäfer5f8cb142016-07-07 20:53:28 +02005 * Copyright 2016 Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Ronald G. Minniche0e784a2014-11-26 19:25:47 +00006 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; version 2 of
10 * the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000016 */
Aaron Durbinc6588c52015-05-15 13:15:34 -050017#include <boot_device.h>
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000018
Jonathan Neuschäfer5f8cb142016-07-07 20:53:28 +020019/*
20 * 0x80000000 is this start of RAM. We currently need to load coreboot.rom into
21 * RAM on SPIKE, because SPIKE doesn't support loading custom code into the
22 * boot ROM.
23 */
Aaron Durbin899d13d2015-05-15 23:39:23 -050024static const struct mem_region_device boot_dev =
Jonathan Neuschäfer5f8cb142016-07-07 20:53:28 +020025 MEM_REGION_DEV_RO_INIT(0x80000000, CONFIG_ROM_SIZE);
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000026
Aaron Durbinc6588c52015-05-15 13:15:34 -050027const struct region_device *boot_device_ro(void)
28{
Aaron Durbin899d13d2015-05-15 23:39:23 -050029 return &boot_dev.rdev;
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000030}