intel/gm45: Use common ACPI S3 recovery

Change-Id: I3148dbbcb06676f48b6bc357124403b70b9bcb6a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15246
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Kyösti Mälkki 2016-06-17 22:52:16 +03:00
parent e6b5a4f5f0
commit c7204dfe0a
3 changed files with 3 additions and 27 deletions

View File

@ -179,15 +179,7 @@ void mainboard_romstage_entry(unsigned long bist)
* this is not a resume. In that case we just create the cbmem toc. * this is not a resume. In that case we just create the cbmem toc.
*/ */
if (s3resume && cbmem_initted) { if (s3resume && cbmem_initted) {
void *resume_backup_memory = cbmem_find(CBMEM_ID_RESUME); acpi_prepare_for_resume();
/* copy 1MB - 64K to high tables ram_base to prevent memory corruption
* through stage 2. We could keep stuff like stack and heap in high tables
* memory completely, but that's a wonderful clean up task for another
* day.
*/
if (resume_backup_memory)
memcpy(resume_backup_memory, (void *)CONFIG_RAMBASE, HIGH_MEMORY_SAVE);
/* Magic for S3 resume */ /* Magic for S3 resume */
pci_write_config32(PCI_DEV(0, 0, 0), D0F0_SKPD, SKPAD_ACPI_S3_MAGIC); pci_write_config32(PCI_DEV(0, 0, 0), D0F0_SKPD, SKPAD_ACPI_S3_MAGIC);

View File

@ -179,15 +179,7 @@ void mainboard_romstage_entry(unsigned long bist)
* this is not a resume. In that case we just create the cbmem toc. * this is not a resume. In that case we just create the cbmem toc.
*/ */
if (s3resume && cbmem_initted) { if (s3resume && cbmem_initted) {
void *resume_backup_memory = cbmem_find(CBMEM_ID_RESUME); acpi_prepare_for_resume();
/* copy 1MB - 64K to high tables ram_base to prevent memory corruption
* through stage 2. We could keep stuff like stack and heap in high tables
* memory completely, but that's a wonderful clean up task for another
* day.
*/
if (resume_backup_memory)
memcpy(resume_backup_memory, (void *)CONFIG_RAMBASE, HIGH_MEMORY_SAVE);
/* Magic for S3 resume */ /* Magic for S3 resume */
pci_write_config32(PCI_DEV(0, 0, 0), D0F0_SKPD, SKPAD_ACPI_S3_MAGIC); pci_write_config32(PCI_DEV(0, 0, 0), D0F0_SKPD, SKPAD_ACPI_S3_MAGIC);

View File

@ -192,15 +192,7 @@ void mainboard_romstage_entry(unsigned long bist)
* this is not a resume. In that case we just create the cbmem toc. * this is not a resume. In that case we just create the cbmem toc.
*/ */
if (s3resume && cbmem_initted) { if (s3resume && cbmem_initted) {
void *resume_backup_memory = cbmem_find(CBMEM_ID_RESUME); acpi_prepare_for_resume();
/* copy 1MB - 64K to high tables ram_base to prevent memory corruption
* through stage 2. We could keep stuff like stack and heap in high tables
* memory completely, but that's a wonderful clean up task for another
* day.
*/
if (resume_backup_memory)
memcpy(resume_backup_memory, (void *)CONFIG_RAMBASE, HIGH_MEMORY_SAVE);
/* Magic for S3 resume */ /* Magic for S3 resume */
pci_write_config32(PCI_DEV(0, 0, 0), D0F0_SKPD, SKPAD_ACPI_S3_MAGIC); pci_write_config32(PCI_DEV(0, 0, 0), D0F0_SKPD, SKPAD_ACPI_S3_MAGIC);