summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-06-23 20:03:50 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2013-09-11 07:22:00 +0200
commit0fbbff48bfc4543ebf2b778d3ed557aae58676da (patch)
treea5c7dd1d6eb2f63ee911cb961511eb985c76c6e8
parent625f103ae8c794c92e403f8749f0442d66966cab (diff)
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> Reviewed-on: http://review.coreboot.org/3906 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
-rw-r--r--src/include/cbmem.h1
-rw-r--r--src/lib/cbmem.c26
2 files changed, 13 insertions, 14 deletions
diff --git a/src/include/cbmem.h b/src/include/cbmem.h
index 83ccd1b695..b3d3fff281 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 a394f313d6..495ee5a955 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)