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/3906
-gerrit
commit bae7405f3563bbcf4ff5da3383d903a9d868adfe Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Sun Jun 23 20:03:50 2013 +0300
CBMEM: Rename high_tables variables and make them static
Old name was too much x86. All external references have been removed.
Change-Id: I982b9abfcee57a7ea421c245dadb84342949efae Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/include/cbmem.h | 1 - src/lib/cbmem.c | 26 +++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/include/cbmem.h b/src/include/cbmem.h index 83ccd1b..b3d3fff 100644 --- a/src/include/cbmem.h +++ b/src/include/cbmem.h @@ -130,7 +130,6 @@ u64 cbmem_entry_size(const struct cbmem_entry *entry); #else /* !CONFIG_DYNAMIC_CBMEM */
#ifndef __PRE_RAM__ -extern uint64_t high_tables_base, high_tables_size; void set_top_of_ram(uint64_t ramtop); void backup_top_of_ram(uint64_t ramtop); void cbmem_late_set_table(uint64_t base, uint64_t size); diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c index a394f31..495ee5a 100644 --- a/src/lib/cbmem.c +++ b/src/lib/cbmem.c @@ -43,8 +43,8 @@ struct cbmem_entry { } __attribute__((packed));
#ifndef __PRE_RAM__ -uint64_t high_tables_base = 0; -uint64_t high_tables_size = 0; +static uint64_t cbmem_base = 0; +static uint64_t cbmem_size = 0; #endif
static void cbmem_trace_location(uint64_t base, uint64_t size, const char *s) @@ -60,12 +60,12 @@ static void cbmem_locate_table(uint64_t *base, uint64_t *size) #ifdef __PRE_RAM__ get_cbmem_table(base, size); #else - if (!(high_tables_base && high_tables_size)) { - get_cbmem_table(&high_tables_base, &high_tables_size); - cbmem_trace_location(high_tables_base, high_tables_size, __FUNCTION__); + if (!(cbmem_base && cbmem_size)) { + get_cbmem_table(&cbmem_base, &cbmem_size); + cbmem_trace_location(cbmem_base, cbmem_size, __FUNCTION__); } - *base = high_tables_base; - *size = high_tables_size; + *base = cbmem_base; + *size = cbmem_size; #endif }
@@ -80,8 +80,8 @@ struct cbmem_entry *get_cbmem_toc(void) void cbmem_late_set_table(uint64_t base, uint64_t size) { cbmem_trace_location(base, size, __FUNCTION__); - high_tables_base = base; - high_tables_size = size; + cbmem_base = base; + cbmem_size = size; } #endif
@@ -262,18 +262,18 @@ BOOT_STATE_INIT_ENTRIES(cbmem_bscb) = {
int cbmem_base_check(void) { - if (!high_tables_base) { + if (!cbmem_base) { printk(BIOS_ERR, "ERROR: CBMEM Base is not set.\n"); // Are there any boards without? // Stepan thinks we should die() here! } - printk(BIOS_DEBUG, "CBMEM Base is %llx.\n", high_tables_base); - return !!high_tables_base; + printk(BIOS_DEBUG, "CBMEM Base is %llx.\n", cbmem_base); + return !!cbmem_base; }
void cbmem_add_lb_mem(struct lb_memory *mem) { - lb_add_memory_range(mem, LB_MEM_TABLE, high_tables_base, high_tables_size); + lb_add_memory_range(mem, LB_MEM_TABLE, cbmem_base, cbmem_size); }
void cbmem_list(void)