Files
system76-coreboot/src/mainboard/emulation/qemu-sbsa/cbmem.c
Maximilian Brune da336cd5c6 treewide: Move device_tree to commonlib
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I990d74d9fff06b17ec8a6ee962955e4b0df8b907
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77970
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-22 04:02:04 +00:00

21 lines
469 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <cbmem.h>
#include <symbols.h>
#include <commonlib/device_tree.h>
#include <console/console.h>
DECLARE_REGION(fdt_pointer)
uintptr_t cbmem_top_chipset(void)
{
const uint64_t top = fdt_get_memory_top((void *) *((uintptr_t *)_fdt_pointer));
if (top == 0) {
/* corrupted FDT? */
die("Could not find top of memory in FDT!");
}
printk(BIOS_DEBUG, "%s: 0x%llx\n", __func__, top);
return (uintptr_t)top;
}