CBMEM: Fail builds on missing get_top_of_ram()
Dummy get_top_of_ram() is removed from romstage to fail already at build-time for cases where cbmem_initialize() would not complete. The mechanisms behind CAR_GLOBAL migration only work correctly when romstage can succesfully make the cbmem_initialize() call. Change-Id: I359820fb196ef187b9aa2e8a3e8f658a0550f237 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/3969 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
parent
1a279046cd
commit
082c19ea89
|
@ -18,12 +18,6 @@
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <cbmem.h>
|
#include <cbmem.h>
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !CONFIG_DYNAMIC_CBMEM
|
#if !CONFIG_DYNAMIC_CBMEM
|
||||||
void get_cbmem_table(uint64_t *base, uint64_t *size)
|
void get_cbmem_table(uint64_t *base, uint64_t *size)
|
||||||
{
|
{
|
||||||
|
@ -37,9 +31,8 @@ void get_cbmem_table(uint64_t *base, uint64_t *size)
|
||||||
*size = 0;
|
*size = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !CONFIG_DYNAMIC_CBMEM && !defined(__PRE_RAM__)
|
#if !defined(__PRE_RAM__)
|
||||||
void __attribute__((weak)) backup_top_of_ram(uint64_t ramtop)
|
void __attribute__((weak)) backup_top_of_ram(uint64_t ramtop)
|
||||||
{
|
{
|
||||||
/* Do nothing. Chipset may have implementation to save ramtop in NVRAM. */
|
/* Do nothing. Chipset may have implementation to save ramtop in NVRAM. */
|
||||||
|
@ -54,4 +47,12 @@ void set_top_of_ram(uint64_t ramtop)
|
||||||
backup_top_of_ram(ramtop);
|
backup_top_of_ram(ramtop);
|
||||||
cbmem_late_set_table(ramtop - HIGH_MEMORY_SIZE, HIGH_MEMORY_SIZE);
|
cbmem_late_set_table(ramtop - HIGH_MEMORY_SIZE, HIGH_MEMORY_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 /* !__PRE_RAM__ */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue