e30c396ffa
Unused includes found using following commande: diff <(git grep -l '#include <stddef.h>' -- src/) <(git grep -l 'size_t\|ssize_t\|wchar_t\|wint_t\|NULL\|DEVTREE_EARLY\|DEVTREE_CONST\ |MAYBE_STATIC_NONZERO\|MAYBE_STATIC_BSS\|zeroptr' -- src/)|grep '<' |grep -v vendor |grep -vF '.h' Change-Id: Ic54b1db995fe7c61b416fa5e1c4022238e4a6ad5 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41150 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
13 lines
291 B
C
13 lines
291 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
#include <cbmem.h>
|
|
#include <commonlib/helpers.h>
|
|
#include <symbols.h>
|
|
#include <soc/emi.h>
|
|
|
|
#define MAX_DRAM_ADDRESS ((uintptr_t)4 * GiB)
|
|
|
|
void *cbmem_top_chipset(void)
|
|
{
|
|
return (void *)MIN((uintptr_t)_dram + sdram_size(), MAX_DRAM_ADDRESS);
|
|
}
|