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-or-later */
2
3
#include <
ramdetect.h
>
4
#include <symbols.h>
5
#include <
device/device.h
>
6
#include <
bootmem.h
>
7
8
void
bootmem_platform_add_ranges
(
void
)
9
{
10
bootmem_add_range
((
uintptr_t
)_bl31,
REGION_SIZE
(bl31),
BM_MEM_BL31
);
11
}
12
13
static
void
mainboard_enable
(
struct
device
*dev)
14
{
15
int
ram_size_mb =
probe_ramsize
((
uintptr_t
)
_dram
, CONFIG_DRAM_SIZE_MB);
16
ram_resource
(dev, 0, (
uintptr_t
)
_dram
/
KiB
, ram_size_mb *
KiB
);
17
}
18
19
struct
chip_operations
mainboard_ops
= {
20
.
enable_dev
=
mainboard_enable
,
21
};
22
23
struct
chip_operations
mainboard_emulation_qemu_aarch64_ops
= { };
mainboard_ops
struct chip_operations mainboard_ops
Definition:
mainboard.c:19
bootmem.h
BM_MEM_BL31
@ BM_MEM_BL31
Definition:
bootmem.h:30
bootmem_add_range
void bootmem_add_range(uint64_t start, uint64_t size, const enum bootmem_type tag)
Definition:
bootmem.c:88
KiB
#define KiB
Definition:
helpers.h:75
bootmem_platform_add_ranges
void bootmem_platform_add_ranges(void)
Definition:
mainboard.c:8
mainboard_emulation_qemu_aarch64_ops
struct chip_operations mainboard_emulation_qemu_aarch64_ops
Definition:
mainboard.c:23
mainboard_enable
static void mainboard_enable(struct device *dev)
Definition:
mainboard.c:13
device.h
ram_resource
#define ram_resource(dev, idx, basek, sizek)
Definition:
device.h:321
_dram
u8 _dram[]
REGION_SIZE
#define REGION_SIZE(name)
Definition:
symbols.h:10
ramdetect.h
probe_ramsize
size_t probe_ramsize(const uintptr_t dram_start, const size_t probe_size)
Definition:
ramdetect.c:40
uintptr_t
unsigned long uintptr_t
Definition:
stdint.h:21
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
qemu-aarch64
mainboard.c
Generated by
1.9.1