coreboot/src
Nico Huber dca081b5e6 soc/intel/common/pmc: Avoid unnecessary writes of AFTERG3_EN
pmc_set_power_failure_state() is usually called twice, once upon boot
(with `target_on == true`) and once from SMM when the system is shut
down (with `target_on == false`). Assuming settings didn't change
between these calls, there is only one case where we actually need
to write the register value: when updating the state for the
MAINBOARD_POWER_STATE_PREVIOUS feature.

This suits us well as we want to avoid unnecessary writes so we
don't clobber the value set upon boot from within SMM. Due to
inaccessible option backends, SMM might not know the current
option state.

The assumption above, that the option value didn't change, may not
be true if the user changed the option on purpose. In the future,
one would have to reboot the machine for option changes to take
effect. However, this doesn't seem to make a huge difference: One
already needed a controlled shutdown for the update to take effect
before. A reboot doesn't seem much more expensive.

Change-Id: I58dd74b8b073f4f07db090bf7fddb14b5df8239a
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55539
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-06-17 05:46:49 +00:00
..
acpi ACPI: Refactor use of global and device NVS 2021-06-14 19:45:56 +00:00
arch arch/x86/ioapic: Clear vector table first 2021-06-16 19:57:51 +00:00
commonlib timestamp,amd/common/apob_cache: Add timestamps for APOB 2021-06-16 22:42:05 +00:00
console src/console/init.c: Make get_log_level static inline again 2021-06-15 16:12:52 +00:00
cpu cpu/intel/haswell: Select HAVE_DISPLAY_MTRRS 2021-06-16 14:49:55 +00:00
device device/pnp: Always provide pnp_unset_and_set_config 2021-06-10 05:38:13 +00:00
drivers arch/x86/ioapic: Drop irq_on_fsb as a configurable item 2021-06-16 19:54:49 +00:00
ec ec/google/chromeec: Separate SMBIOS SKU functions 2021-06-09 05:18:35 +00:00
include cpu/intel/msr.h: Sort MSRs in ascending order 2021-06-15 07:45:59 +00:00
lib ChromeOS: Separate NVS from global GNVS 2021-06-14 19:44:08 +00:00
mainboard mb/*: Fix some indirect includes 2021-06-17 05:33:34 +00:00
northbridge MRC platforms: Fix MRC version printk format specifiers 2021-06-16 14:50:38 +00:00
security security/tpm/tspi: Reduce scope of tspi_init_crtm 2021-06-16 09:52:21 +00:00
soc soc/intel/common/pmc: Avoid unnecessary writes of AFTERG3_EN 2021-06-17 05:46:49 +00:00
southbridge sb/intel/i82870: Use ioapic utility functions 2021-06-16 19:55:09 +00:00
superio src: Retype option API to use unsigned integers 2021-05-06 14:48:15 +00:00
vendorcode vc/mediatek/mt8195: Match definition with declaration 2021-06-15 19:46:39 +00:00
Kconfig option: Allow mainboards to implement the API 2021-05-28 11:37:25 +00:00