diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2016-06-25 11:40:00 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2016-11-18 21:03:05 +0100 |
commit | e39a8a9c092ed66686632d591ec84ed7a6165a50 (patch) | |
tree | 498408ef8c9d41fd4adc3bd3cf1361f8a1c3f3e3 /src/northbridge/intel/sandybridge/early_init.c | |
parent | bfca67078cfddc18994fa6bbe9094a2ecca275a3 (diff) | |
download | coreboot-e39a8a9c092ed66686632d591ec84ed7a6165a50.tar.xz |
intel/sandybridge: Use romstage_handoff for S3
Don't use scratchpad registers when we have romstage_handoff
to pass S3 resume flag. Also fixes console log from reporting
early in ramstage "Normal boot" while on S3 resume path.
Change-Id: I5b218ce3046493b92952e47610c41b07efa4d1de
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17455
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/northbridge/intel/sandybridge/early_init.c')
-rw-r--r-- | src/northbridge/intel/sandybridge/early_init.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/northbridge/intel/sandybridge/early_init.c b/src/northbridge/intel/sandybridge/early_init.c index 86d1c002a5..ef97a1af84 100644 --- a/src/northbridge/intel/sandybridge/early_init.c +++ b/src/northbridge/intel/sandybridge/early_init.c @@ -23,6 +23,7 @@ #include <elog.h> #include <cbmem.h> #include <pc80/mc146818rtc.h> +#include <romstage_handoff.h> #include "sandybridge.h" static void sandybridge_setup_bars(void) @@ -226,19 +227,13 @@ void sandybridge_early_initialization(int chipset_type) void northbridge_romstage_finalize(int s3resume) { - MCHBAR16(SSKPD) = 0xCAFE; - -#if CONFIG_HAVE_ACPI_RESUME - /* If there is no high memory area, we didn't boot before, so - * this is not a resume. In that case we just create the cbmem toc. - */ + struct romstage_handoff *handoff; - if (s3resume) { + MCHBAR16(SSKPD) = 0xCAFE; - /* Magic for S3 resume */ - pci_write_config32(PCI_DEV(0, 0x00, 0), SKPAD, 0xcafed00d); - } else { - pci_write_config32(PCI_DEV(0, 0x00, 0), SKPAD, 0xcafebabe); - } -#endif + handoff = romstage_handoff_find_or_add(); + if (handoff != NULL) + handoff->s3_resume = s3resume; + else + printk(BIOS_DEBUG, "Romstage handoff structure not added!\n"); } |