From 36a2356fb1bb85468de1d9e191df890c46ff3861 Mon Sep 17 00:00:00 2001 From: Marshall Dawson Date: Thu, 28 Sep 2017 17:21:09 -0600 Subject: amd/stoneyridge: Refactor SMI handler Rewrite the handler to be more compact and extendable. The old functionality is duplicated after the rewrite. All SMI source registers (except for SmiSciStatus) behave identically so these are consolidated. Register 0x80 contains sources 0-31, 0x81 sources 32-63, and so on. Create a table of mini-handlers to be supported in the soc directory. As SMI sources are discovered, attempt to find the corresponding handler and then execute it. Change-Id: Ic7050ecf65c2af036fe297f429a0bbdc709ad4c1 Signed-off-by: Marshall Dawson Reviewed-on: https://review.coreboot.org/21746 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones --- src/soc/amd/stoneyridge/include/soc/smi.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/soc/amd/stoneyridge/include') diff --git a/src/soc/amd/stoneyridge/include/soc/smi.h b/src/soc/amd/stoneyridge/include/soc/smi.h index 5e6f6ff31e..0a865b7496 100644 --- a/src/soc/amd/stoneyridge/include/soc/smi.h +++ b/src/soc/amd/stoneyridge/include/soc/smi.h @@ -194,6 +194,11 @@ enum smi_lvl { SMI_LVL_HIGH = 1, }; +struct smi_sources_t { + int type; + void (*handler)(void); +}; + uint16_t pm_acpi_smi_cmd_port(void); void configure_gevent_smi(uint8_t gevent, uint8_t mode, uint8_t level); void disable_gevent_smi(uint8_t gevent); -- cgit v1.2.3