blob: ebc8a78da3d3c336a89d785160d411be01af6d87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <cbmem.h>
#include <symbols.h>
#include <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;
}
|