From deb2cb27e9bade18c4d186899edfaeabfc1131bd Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Fri, 28 Mar 2014 23:46:45 +0200 Subject: Static CBMEM / CAR: Flag boards with BROKEN_CAR_MIGRATE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use of CAR_GLOBAL is not safe after CAR is torn down, unless the board properly implements EARLY_CBMEM_INIT. Flag vulnerable boards that only do cbmem_recovery() in romstage on S3 resume and implementation with Intel FSP that invalidates cache before we have a chance to copy the contents. Change-Id: Iecd10dee9b73ab3f1f66826950fa0945675ff39f Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/5419 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/arch/x86/boot/cbmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/arch/x86/boot/cbmem.c') diff --git a/src/arch/x86/boot/cbmem.c b/src/arch/x86/boot/cbmem.c index c2d9a2ed87..8b2b6da678 100644 --- a/src/arch/x86/boot/cbmem.c +++ b/src/arch/x86/boot/cbmem.c @@ -49,13 +49,15 @@ void set_top_of_ram(uint64_t ramtop) backup_top_of_ram(ramtop); cbmem_late_set_table(ramtop - HIGH_MEMORY_SIZE, HIGH_MEMORY_SIZE); } +#endif /* !__PRE_RAM__ */ +#if CONFIG_BROKEN_CAR_MIGRATE || !defined(__PRE_RAM__) 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 #else -- cgit v1.2.3