aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/amd/cimx/sb800/cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/amd/cimx/sb800/cfg.c')
-rw-r--r--src/southbridge/amd/cimx/sb800/cfg.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/southbridge/amd/cimx/sb800/cfg.c b/src/southbridge/amd/cimx/sb800/cfg.c
index 90ad5a9f62..852054883e 100644
--- a/src/southbridge/amd/cimx/sb800/cfg.c
+++ b/src/southbridge/amd/cimx/sb800/cfg.c
@@ -37,9 +37,9 @@ int acpi_get_sleep_type(void)
#endif
#ifndef __PRE_RAM__
-void set_cbmem_toc(struct cbmem_entry *toc)
+void backup_top_of_ram(uint64_t ramtop)
{
- u32 dword = (u32) toc;
+ u32 dword = (u32) ramtop;
int nvram_pos = 0xf8, i; /* temp */
printk(BIOS_DEBUG, "dword=%x\n", dword);
for (i = 0; i<4; i++) {
@@ -51,18 +51,22 @@ void set_cbmem_toc(struct cbmem_entry *toc)
}
#endif
-struct cbmem_entry *get_cbmem_toc(void)
+#if CONFIG_HAVE_ACPI_RESUME
+unsigned long get_top_of_ram(void)
{
u32 xdata = 0;
int xnvram_pos = 0xf8, xi;
+ if (acpi_get_sleep_type() != 3)
+ return 0;
for (xi = 0; xi<4; xi++) {
outb(xnvram_pos, BIOSRAM_INDEX);
xdata &= ~(0xff << (xi * 8));
xdata |= inb(BIOSRAM_DATA) << (xi *8);
xnvram_pos++;
}
- return (struct cbmem_entry *) xdata;
+ return (unsigned long) xdata;
}
+#endif
/**
* @brief South Bridge CIMx configuration