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/lib/cbmem.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/lib') diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c index c5a11e3907..b6751defe4 100644 --- a/src/lib/cbmem.c +++ b/src/lib/cbmem.c @@ -45,12 +45,9 @@ struct cbmem_entry { #ifndef __PRE_RAM__ uint64_t high_tables_base = 0; uint64_t high_tables_size = 0; +#endif -void __attribute__((weak)) set_cbmem_toc(struct cbmem_entry * x) -{ - /* do nothing, this should be called by chipset to save TOC in NVRAM */ -} - +#if !defined(__PRE_RAM__) static void cbmem_trace_location(uint64_t base, uint64_t size, const char *s) { if (base && size && s) { @@ -113,10 +110,6 @@ void cbmem_init(u64 baseaddr, u64 size) for (;;) ; } - /* we don't need to call this in romstage, useful only from ramstage */ -#ifndef __PRE_RAM__ - set_cbmem_toc((struct cbmem_entry *)(unsigned long)baseaddr); -#endif memset(cbmem_toc, 0, CBMEM_TOC_RESERVED); cbmem_toc[0] = (struct cbmem_entry) { -- cgit v1.2.3