Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3565
-gerrit
commit 5a204ba82dabb2247306f5722d734600859ffaad Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Wed Sep 4 14:36:31 2013 +0300
Drop parameters from cbmem_init()
Change-Id: Ia40350a5232dcbf30aca7b5998e7995114c44551 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/lib/cbmem.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c index 656b46d..df5a4a1 100644 --- a/src/lib/cbmem.c +++ b/src/lib/cbmem.c @@ -89,11 +89,12 @@ void set_cbmem_table(uint64_t base, uint64_t size) */
#if !defined(__PRE_RAM__) -static void cbmem_init(u64 baseaddr, u64 size) +static void cbmem_init(void) { + uint64_t baseaddr, size; struct cbmem_entry *cbmem_toc; - cbmem_toc = (struct cbmem_entry *)(unsigned long)baseaddr;
+ cbmem_locate_table(&baseaddr, &size); printk(BIOS_DEBUG, "Initializing CBMEM area to 0x%llx (%lld bytes)\n", baseaddr, size);
@@ -102,6 +103,7 @@ static void cbmem_init(u64 baseaddr, u64 size) for (;;) ; }
+ cbmem_toc = get_cbmem_toc(); memset(cbmem_toc, 0, CBMEM_TOC_RESERVED);
cbmem_toc[0] = (struct cbmem_entry) { @@ -212,11 +214,8 @@ void *cbmem_find(u32 id) /* Returns True if it was not initialized before. */ int cbmem_initialize(void) { - uint64_t base = 0, size = 0; int rv = 0;
- cbmem_locate_table(&base, &size); - /* We expect the romstage to always initialize it. */ if (!cbmem_reinit()) { #if CONFIG_HAVE_ACPI_RESUME && !defined(__PRE_RAM__) @@ -224,7 +223,7 @@ int cbmem_initialize(void) if (acpi_slp_type == 3 || acpi_slp_type == 2) acpi_slp_type = 0; #endif - cbmem_init(base, size); + cbmem_init(); rv = 1; } #ifndef __PRE_RAM__