Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Aaron Durbin | c6588c5 | 2015-05-15 13:15:34 -0500 | [diff] [blame] | 4 | * Copyright 2015 Google Inc. |
Jonathan Neuschäfer | 5f8cb14 | 2016-07-07 20:53:28 +0200 | [diff] [blame] | 5 | * Copyright 2016 Jonathan Neuschäfer <j.neuschaefer@gmx.net> |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 6 | * |
| 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. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 16 | */ |
Aaron Durbin | c6588c5 | 2015-05-15 13:15:34 -0500 | [diff] [blame] | 17 | #include <boot_device.h> |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 18 | |
Jonathan Neuschäfer | 5f8cb14 | 2016-07-07 20:53:28 +0200 | [diff] [blame] | 19 | /* |
| 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 Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 24 | static const struct mem_region_device boot_dev = |
Jonathan Neuschäfer | 5f8cb14 | 2016-07-07 20:53:28 +0200 | [diff] [blame] | 25 | MEM_REGION_DEV_RO_INIT(0x80000000, CONFIG_ROM_SIZE); |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 26 | |
Aaron Durbin | c6588c5 | 2015-05-15 13:15:34 -0500 | [diff] [blame] | 27 | const struct region_device *boot_device_ro(void) |
| 28 | { |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 29 | return &boot_dev.rdev; |
Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 30 | } |