coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
cbmem.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
cbmem.h
>
4
#include <
commonlib/helpers.h
>
5
#include <soc/addressmap.h>
6
#include <soc/sdram.h>
7
#include <symbols.h>
8
9
void
*
cbmem_top_chipset
(
void
)
10
{
11
return
(
void
*)
MIN
((
uintptr_t
)
_dram
+
sdram_size_mb
() *
MiB
,
12
MAX_DRAM_ADDRESS
);
13
}
MIN
#define MIN(a, b)
Definition:
helpers.h:37
MiB
#define MiB
Definition:
helpers.h:76
sdram_size_mb
size_t sdram_size_mb(void)
Definition:
sdram.c:24
cbmem.h
cbmem_top_chipset
void * cbmem_top_chipset(void)
Definition:
cbmem.c:6
helpers.h
_dram
u8 _dram[]
MAX_DRAM_ADDRESS
#define MAX_DRAM_ADDRESS
Definition:
cbmem.c:8
uintptr_t
unsigned long uintptr_t
Definition:
stdint.h:21
src
soc
rockchip
common
cbmem.c
Generated by
1.9.1