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 <soc/addressmap.h>
5 #include <soc/sdram.h>
6 #include <symbols.h>
7 
8 void *cbmem_top_chipset(void)
9 {
10  /* Make sure not to overlap with reserved ATF scratchpad */
11  return (void *)((uintptr_t)_dram + (sdram_size_mb() - 1) * MiB);
12 }
#define MiB
Definition: helpers.h:76
size_t sdram_size_mb(void)
Definition: sdram.c:24
void * cbmem_top_chipset(void)
Definition: cbmem.c:6
u8 _dram[]
unsigned long uintptr_t
Definition: stdint.h:21