diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-09-04 13:26:11 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2013-09-11 07:18:02 +0200 |
commit | bc90e15d3f8e841ccf229fca5d7df99436ff4bdb (patch) | |
tree | bbbd4f2904b42d201d7e2fbccea5bfcbeeeed166 /src/southbridge/via/k8t890/early_car.c | |
parent | c04afd6433cd53acdc727ad760cde9c40090030b (diff) | |
download | coreboot-bc90e15d3f8e841ccf229fca5d7df99436ff4bdb.tar.xz |
CBMEM: Backup top_of_ram instead of cbmem_toc
AMD northbridges have a complex way to resolve top_of_ram.
Once it is resolved, it is stored in NVRAM to be used on resume.
TODO: Redesign these get_top_of_ram() functions from scratch.
Change-Id: I3cceb7e9b8b07620dacf138e99f98dc818c65341
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/3557
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/southbridge/via/k8t890/early_car.c')
-rw-r--r-- | src/southbridge/via/k8t890/early_car.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/southbridge/via/k8t890/early_car.c b/src/southbridge/via/k8t890/early_car.c index 000a5322ba..d7049ae3ba 100644 --- a/src/southbridge/via/k8t890/early_car.c +++ b/src/southbridge/via/k8t890/early_car.c @@ -183,6 +183,11 @@ static inline int s3_load_nvram_early(int size, u32 *old_dword, int nvram_pos) return nvram_pos; } -struct cbmem_entry *get_cbmem_toc(void) { - return (struct cbmem_entry *) inl(K8T890_NVRAM_IO_BASE+K8T890_NVRAM_CBMEM_TOC); +#if CONFIG_HAVE_ACPI_RESUME +unsigned long get_top_of_ram(void) +{ + if (!acpi_is_wakeup_early()) + return 0; + return (unsigned long) inl(K8T890_NVRAM_IO_BASE+K8T890_NVRAM_TOP_OF_RAM); } +#endif |