blob: dd57849db470f4152a7685b57381bda3f004ae49 [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.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
Patrick Georgib890a122015-03-26 15:17:45 +010018 * Foundation, Inc.
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000019 */
Aaron Durbinc6588c52015-05-15 13:15:34 -050020#include <boot_device.h>
Ronald G. Minniche0e784a2014-11-26 19:25:47 +000021
Aaron Durbinc6588c52015-05-15 13:15:34 -050022/* This assumes that the CBFS resides at 0x0, which is true for the default
23 * configuration. */
Aaron Durbin899d13d2015-05-15 23:39:23 -050024static const struct mem_region_device boot_dev =
Aaron Durbinc6588c52015-05-15 13:15:34 -050025 MEM_REGION_DEV_INIT(NULL, 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}