From bc90e15d3f8e841ccf229fca5d7df99436ff4bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 4 Sep 2013 13:26:11 +0300 Subject: CBMEM: Backup top_of_ram instead of cbmem_toc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AMD northbridges have a complex way to resolve top_of_ram. Once it is resolved, it is stored in NVRAM to be used on resume. TODO: Redesign these get_top_of_ram() functions from scratch. Change-Id: I3cceb7e9b8b07620dacf138e99f98dc818c65341 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/3557 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/arch/x86/boot/cbmem.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/arch') diff --git a/src/arch/x86/boot/cbmem.c b/src/arch/x86/boot/cbmem.c index 333ca55ccf..991a3e6f01 100644 --- a/src/arch/x86/boot/cbmem.c +++ b/src/arch/x86/boot/cbmem.c @@ -40,12 +40,18 @@ void get_cbmem_table(uint64_t *base, uint64_t *size) #endif #if !CONFIG_DYNAMIC_CBMEM && !defined(__PRE_RAM__) +void __attribute__((weak)) backup_top_of_ram(uint64_t ramtop) +{ + /* Do nothing. Chipset may have implementation to save ramtop in NVRAM. */ +} + /* This is for compatibility with old boards only. Any new chipset and board * must implement get_top_of_ram() for both romstage and ramstage to support * features like CAR_MIGRATION and CBMEM_CONSOLE. */ 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 -- cgit v1.2.3