summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/boot/cbmem.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/arch/x86/boot/cbmem.c b/src/arch/x86/boot/cbmem.c
index 80588c385d..a1452237e3 100644
--- a/src/arch/x86/boot/cbmem.c
+++ b/src/arch/x86/boot/cbmem.c
@@ -57,23 +57,20 @@ void set_top_of_ram(uint64_t ramtop)
}
#endif /* !__PRE_RAM__ */
-#if IS_ENABLED(CONFIG_LATE_CBMEM_INIT)
unsigned long __attribute__((weak)) get_top_of_ram(void)
{
printk(BIOS_WARNING, "WARNING: you need to define get_top_of_ram() for your chipset\n");
return 0;
}
-#endif
-
-#else
+#if IS_ENABLED(CONFIG_DYNAMIC_CBMEM)
void *cbmem_top(void)
{
/* Top of cbmem is at lowest usable DRAM address below 4GiB. */
return (void *)get_top_of_ram();
}
-
-#endif /* DYNAMIC_CBMEM */
+#endif
+#endif /* !DYNAMIC_CBMEM */
void cbmem_run_init_hooks(void)
{