/* SPDX-License-Identifier: GPL-2.0-only */ #include #include #include #include #include #include uintptr_t cbmem_top_chipset(void) { uint64_t top; top = fdt_get_memory_top((void *)HLS()->fdt); ASSERT_MSG(top, "Failed reading memory range from FDT"); return MIN(top, (uint64_t)4 * GiB - 1); }