Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15477
-gerrit
commit 114b87bffdce9430a7d4707943da6df638502831
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Mon Jun 27 13:09:56 2016 +0300
ACPI S3: Drop early resume backup
No longer needed as low memory backup is implemented as part of
the ramstage loader, after MTRRs are set to write-back cache for
better performance.
Change-Id: I5f5ad94bae2afef915927b9737c79431b6f75f22
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/arch/x86/acpi_s3.c | 21 +--------------------
src/arch/x86/include/arch/acpi.h | 2 --
2 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/src/arch/x86/acpi_s3.c b/src/arch/x86/acpi_s3.c
index af833cb..10212ac 100644
--- a/src/arch/x86/acpi_s3.c
+++ b/src/arch/x86/acpi_s3.c
@@ -100,10 +100,6 @@ void backup_ramstage_section(u32 base, u32 size)
return;
size = ALIGN_UP(size, 4);
- if (!size) {
- base = backup_mem->base;
- size = backup_mem->size;
- }
/* FIXME: Sanity check CBMEM. */
@@ -114,22 +110,11 @@ void backup_ramstage_section(u32 base, u32 size)
backup_mem->magic = RESUME_BACKUP_MAGIC;
}
-/* Make backup of low-memory region, relying on the base and size
- * of the ramstage that was loaded before entry to ACPI S3.
- *
- * DEPRECATED
- */
-void acpi_prepare_for_resume(void)
-{
- backup_ramstage_section(0, 0);
-}
-
extern unsigned char _program, _eprogram;
void acpi_prepare_resume_backup(void)
{
size_t size = (u32)(&_eprogram - &_program);
- u32 base = (u32) &_program;
struct resume_backup *backup_mem;
if (IS_ENABLED(CONFIG_RELOCATABLE_RAMSTAGE))
@@ -140,9 +125,7 @@ void acpi_prepare_resume_backup(void)
/* Let's prepare the ACPI S3 Resume area now already, so we can rely on
* it being there during reboot time. If this fails, ACPI resume will
- * be disabled. We assume that ramstage does not change while in suspend,
- * so base and size of the currently running ramstage will match the one
- * we will load on resume path.
+ * be disabled.
*/
if (IS_ENABLED(CONFIG_LATE_CBMEM_INIT))
romstage_ram_stack_maybe_low(0);
@@ -155,8 +138,6 @@ void acpi_prepare_resume_backup(void)
return;
backup_mem->magic = 0;
- backup_mem->base = base;
- backup_mem->size = size;
}
#define WAKEUP_BASE 0x600
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index 3bda1c6..66cb1c9 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -629,14 +629,12 @@ int acpi_is_wakeup(void);
int acpi_is_wakeup_s3(void);
int acpi_is_wakeup_s4(void);
#endif
-void acpi_prepare_for_resume(void);
#else
#define acpi_slp_type 0
static inline int acpi_is_wakeup(void) { return 0; }
static inline int acpi_is_wakeup_s3(void) { return 0; }
static inline int acpi_is_wakeup_s4(void) { return 0; }
-static inline void acpi_prepare_for_resume(void) { }
#endif
static inline uintptr_t acpi_align_current(uintptr_t current)
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15472
-gerrit
commit 65537018621514028da93a98b5518991503e678f
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Sun Jun 26 15:44:05 2016 +0300
AMD k8 fam10: Fix romstage handoff
It is not possible for cbmem_add() to complete succesfully before
cbmem_recovery() is called. Adding more tables on S3 resume path
is also not possible.
Change-Id: Ic14857eeef2932562acee4a36f59c22ff4ca1a84
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/cpu/amd/car/post_cache_as_ram.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/src/cpu/amd/car/post_cache_as_ram.c b/src/cpu/amd/car/post_cache_as_ram.c
index ce1f930..dba2a06 100644
--- a/src/cpu/amd/car/post_cache_as_ram.c
+++ b/src/cpu/amd/car/post_cache_as_ram.c
@@ -133,19 +133,22 @@ void post_cache_as_ram(void)
if ((*lower_stack_boundary) != 0xdeadbeef)
printk(BIOS_WARNING, "BSP overran lower stack boundary. Undefined behaviour may result!\n");
- struct romstage_handoff *handoff;
- handoff = romstage_handoff_find_or_add();
- if (handoff != NULL)
- handoff->s3_resume = acpi_is_wakeup_s3();
- else
- printk(BIOS_DEBUG, "Romstage handoff structure not added!\n");
-
int s3resume = acpi_is_wakeup_s3();
- if (s3resume)
+
+ if (IS_ENABLED(CONFIG_EARLY_CBMEM_INIT) || s3resume)
cbmem_recovery(s3resume);
prepare_romstage_ramstack(s3resume);
+ if (IS_ENABLED(CONFIG_EARLY_CBMEM_INIT)) {
+ struct romstage_handoff *handoff;
+ handoff = romstage_handoff_find_or_add();
+ if (handoff != NULL)
+ handoff->s3_resume = s3resume;
+ else
+ printk(BIOS_DEBUG, "Romstage handoff structure not added!\n");
+ }
+
/* from here don't store more data in CAR */
if (family >= 0x1f && family <= 0x3f) {
/* Family 10h and 12h, 11h until shown otherwise */