coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
console/console.h
>
4
#include <
device/device.h
>
5
6
static
void
mainboard_enable
(
struct
device
*dev)
7
{
8
/*
9
* Size of the emulated system RAM. On hardware, this would be external
10
* DDR memory.
11
*
12
* TODO: Get this size from the hardware-supplied configuration string.
13
*/
14
const
size_t
ram_size = 1*
GiB
;
15
16
if
(!dev) {
17
die
(
"No dev0; die\n"
);
18
}
19
20
ram_resource
(dev, 0, 0x80000000/
KiB
, ram_size/
KiB
);
21
}
22
23
struct
chip_operations
mainboard_ops
= {
24
.
enable_dev
=
mainboard_enable
,
25
};
mainboard_ops
struct chip_operations mainboard_ops
Definition:
mainboard.c:19
KiB
#define KiB
Definition:
helpers.h:75
GiB
#define GiB
Definition:
helpers.h:77
die
void __noreturn die(const char *fmt,...)
Definition:
die.c:17
console.h
mainboard_enable
static void mainboard_enable(struct device *dev)
Definition:
mainboard.c:6
device.h
ram_resource
#define ram_resource(dev, idx, basek, sizek)
Definition:
device.h:321
chip_operations
Definition:
device.h:23
chip_operations::enable_dev
void(* enable_dev)(struct device *dev)
Definition:
device.h:24
device
Definition:
device.h:107
src
mainboard
emulation
spike-riscv
mainboard.c
Generated by
1.9.1