From 1ae305efe1a0823c270767ddf6cc02c41ce146f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 4 Sep 2013 13:05:01 +0300 Subject: CBMEM: Add cbmem_late_set_table() and drop references to high_tables_base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This helper function is for compatibility only for chipsets that do not implement get_top_of_ram() to support early CBMEM. Also remove references to globals high_tables_base and _size under arch/ and from two ARMv7 boards. Change-Id: I17eee30635a0368b2ada06e0698425c5ef0ecc53 Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/3902 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Aaron Durbin --- src/lib/cbmem.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/lib') diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c index 9e2ce0df84..206fdbf887 100644 --- a/src/lib/cbmem.c +++ b/src/lib/cbmem.c @@ -42,6 +42,8 @@ struct cbmem_entry { } __attribute__((packed)); #ifndef __PRE_RAM__ +uint64_t high_tables_base = 0; +uint64_t high_tables_size = 0; static struct cbmem_entry *bss_cbmem_toc; struct cbmem_entry *__attribute__((weak)) get_cbmem_toc(void) @@ -60,7 +62,15 @@ struct cbmem_entry *__attribute__((weak)) get_cbmem_toc(void) printk(BIOS_WARNING, "WARNING: you need to define get_cbmem_toc() for your chipset\n"); return NULL; } +#endif +#if !defined(__PRE_RAM__) +void cbmem_late_set_table(uint64_t base, uint64_t size) +{ + printk(BIOS_DEBUG, "CBMEM region %llx-%llx (%s)\n", base, base+size-1, __FUNCTION__); + high_tables_base = base; + high_tables_size = size; +} #endif /** -- cgit v1.2.3