blob: 0c54e7abfd766941393657d96190280fce4bfef0 [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.
Ronald G. Minniche0e784a2014-11-26 19:25:47 +00005 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
9 * the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000015 */
Aaron Durbinc6588c52015-05-15 13:15:34 -050016#include <boot_device.h>
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000017
Aaron Durbinc6588c52015-05-15 13:15:34 -050018/* This assumes that the CBFS resides at 0x0, which is true for the default
19 * configuration. */
Aaron Durbin899d13d2015-05-15 23:39:23 -050020static const struct mem_region_device boot_dev =
Aaron Durbinc6588c52015-05-15 13:15:34 -050021 MEM_REGION_DEV_INIT(NULL, CONFIG_ROM_SIZE);
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000022
Aaron Durbinc6588c52015-05-15 13:15:34 -050023const struct region_device *boot_device_ro(void)
24{
Aaron Durbin899d13d2015-05-15 23:39:23 -050025 return &boot_dev.rdev;
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000026}