soc/intel/broadwell: Use cbmem_recovery()
For consistency with other soc/intel add s3resume variable, this helps towards unified chipset_power_state. Change-Id: I34a123f9fc13bd86264317c7762bf6e9ffd0f842 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50970 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
c5c3e3c594
commit
74cb3e7869
|
@ -41,7 +41,9 @@ void mainboard_romstage_entry(void)
|
||||||
/* Get power state */
|
/* Get power state */
|
||||||
struct chipset_power_state *const power_state = fill_power_state();
|
struct chipset_power_state *const power_state = fill_power_state();
|
||||||
|
|
||||||
elog_boot_notify(power_state->prev_sleep_state == ACPI_S3);
|
int s3resume = power_state->prev_sleep_state == ACPI_S3;
|
||||||
|
|
||||||
|
elog_boot_notify(s3resume);
|
||||||
|
|
||||||
/* Print useful platform information */
|
/* Print useful platform information */
|
||||||
report_platform_info();
|
report_platform_info();
|
||||||
|
@ -73,11 +75,10 @@ void mainboard_romstage_entry(void)
|
||||||
|
|
||||||
timestamp_add_now(TS_AFTER_INITRAM);
|
timestamp_add_now(TS_AFTER_INITRAM);
|
||||||
|
|
||||||
if (pei_data.boot_mode != ACPI_S3) {
|
int cbmem_was_initted = !cbmem_recovery(s3resume);
|
||||||
cbmem_initialize_empty();
|
if (s3resume && !cbmem_was_initted) {
|
||||||
} else if (cbmem_initialize()) {
|
|
||||||
printk(BIOS_DEBUG, "Failed to recover CBMEM in S3 resume.\n");
|
|
||||||
/* Failed S3 resume, reset to come up cleanly */
|
/* Failed S3 resume, reset to come up cleanly */
|
||||||
|
printk(BIOS_CRIT, "Failed to recover CBMEM in S3 resume.\n");
|
||||||
system_reset();
|
system_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +86,7 @@ void mainboard_romstage_entry(void)
|
||||||
|
|
||||||
setup_sdram_meminfo(&pei_data);
|
setup_sdram_meminfo(&pei_data);
|
||||||
|
|
||||||
romstage_handoff_init(power_state->prev_sleep_state == ACPI_S3);
|
romstage_handoff_init(s3resume);
|
||||||
|
|
||||||
mainboard_post_raminit(power_state->prev_sleep_state == ACPI_S3);
|
mainboard_post_raminit(s3resume);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue