CBMEM: Drop parameter from cbmem_reinit()

Function is always called with get_top_of_ram() - HIGH_MEMORY_SIZE
which equals cbmem_base, thus no need to pass it as a parameter.

Change-Id: If026cb567ff534716cd9200cdffa08b21ac0c162
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/3564
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
Kyösti Mälkki
2013-06-23 17:01:29 +03:00
parent 95c39c28a3
commit d50cdf108f
11 changed files with 17 additions and 52 deletions

View File

@@ -47,7 +47,6 @@ uint64_t high_tables_base = 0;
uint64_t high_tables_size = 0;
#endif
#if !defined(__PRE_RAM__)
static void cbmem_trace_location(uint64_t base, uint64_t size, const char *s)
{
if (base && size && s) {
@@ -55,7 +54,6 @@ static void cbmem_trace_location(uint64_t base, uint64_t size, const char *s)
base, base + size - 1, s);
}
}
#endif
static void cbmem_locate_table(uint64_t *base, uint64_t *size)
{
@@ -120,13 +118,15 @@ void cbmem_init(u64 baseaddr, u64 size)
};
}
int cbmem_reinit(u64 baseaddr)
int cbmem_reinit(void)
{
uint64_t baseaddr, size;
struct cbmem_entry *cbmem_toc;
cbmem_toc = (struct cbmem_entry *)(unsigned long)baseaddr;
printk(BIOS_DEBUG, "Re-Initializing CBMEM area to 0x%lx\n",
(unsigned long)baseaddr);
cbmem_locate_table(&baseaddr, &size);
cbmem_trace_location(baseaddr, size, __FUNCTION__);
cbmem_toc = (struct cbmem_entry *)(unsigned long)baseaddr;
return (cbmem_toc[0].magic == CBMEM_MAGIC);
}
@@ -226,7 +226,7 @@ int cbmem_initialize(void)
cbmem_locate_table(&base, &size);
/* We expect the romstage to always initialize it. */
if (!cbmem_reinit(base)) {
if (!cbmem_reinit()) {
#if CONFIG_HAVE_ACPI_RESUME && !defined(__PRE_RAM__)
/* Something went wrong, our high memory area got wiped */
if (acpi_slp_type == 3 || acpi_slp_type == 2)