diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-06-23 17:01:29 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-09-11 07:20:25 +0200 |
commit | d50cdf108f9d4b598aa8f6c3205d9a93c3e67131 (patch) | |
tree | f8a1ba756eafaa855b69c9e1ad4e043886b80d68 /src/cpu | |
parent | 95c39c28a3d4beb10143ad9c749241fcbdbfb2dc (diff) |
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>
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/amd/agesa/s3_resume.c | 11 | ||||
-rw-r--r-- | src/cpu/amd/car/post_cache_as_ram.c | 9 |
2 files changed, 2 insertions, 18 deletions
diff --git a/src/cpu/amd/agesa/s3_resume.c b/src/cpu/amd/agesa/s3_resume.c index fcc1604ad1..ef19b53044 100644 --- a/src/cpu/amd/agesa/s3_resume.c +++ b/src/cpu/amd/agesa/s3_resume.c @@ -109,18 +109,9 @@ void restore_mtrr(void) inline void *backup_resume(void) { - unsigned long high_ram_base; void *resume_backup_memory; - /* Start address of high memory tables */ - high_ram_base = (u32) get_cbmem_toc(); - - /* - * printk(BIOS_DEBUG, "CBMEM TOC is at: %x\n", (u32_t)high_ram_base); - * printk(BIOS_DEBUG, "CBMEM TOC 0-size:%x\n ",(u32_t)(high_ram_base + HIGH_MEMORY_SIZE + 4096)); - */ - - if (!cbmem_reinit((u64)high_ram_base)) + if (!cbmem_reinit()) return NULL; resume_backup_memory = cbmem_find(CBMEM_ID_RESUME); diff --git a/src/cpu/amd/car/post_cache_as_ram.c b/src/cpu/amd/car/post_cache_as_ram.c index d20c393a82..eca7673df3 100644 --- a/src/cpu/amd/car/post_cache_as_ram.c +++ b/src/cpu/amd/car/post_cache_as_ram.c @@ -32,20 +32,13 @@ static void inline __attribute__((always_inline)) memcopy(void *dest, const voi #if CONFIG_HAVE_ACPI_RESUME static inline void *backup_resume(void) { - unsigned long high_ram_base; void *resume_backup_memory; int suspend = acpi_is_wakeup_early(); if (!suspend) return NULL; - /* Start address of high memory tables */ - high_ram_base = (u32) get_cbmem_toc(); - - print_debug_pcar("CBMEM TOC is at: ", (uint32_t)high_ram_base); - print_debug_pcar("CBMEM TOC 0-size: ",(uint32_t)(high_ram_base + HIGH_MEMORY_SIZE + 4096)); - - if (!cbmem_reinit((u64)high_ram_base)) + if (!cbmem_reinit()) return NULL; resume_backup_memory = cbmem_find(CBMEM_ID_RESUME); |