From f73a3a5e08d7906e4ce1152a820ac52a3547a842 Mon Sep 17 00:00:00 2001 From: Fred Reitberger Date: Fri, 14 Oct 2022 14:04:04 -0400 Subject: soc/amd/*/smihandler: Make fch_apmc_smi_handler common Rename soc/amd/common/block/cpu/smm/smi_ampc_helper.c to smi_apmc.c and add the fch_apmc_smi_handler function. Remove the duplicated function from picasso, cezanne, mendocino, and morgana SoC. The stoneyridge soc does not implement the APM_CNT_SMMINFO handler, so give the handler a unique name that does not conflict with the common handler name. Signed-off-by: Fred Reitberger Change-Id: I2e6fb59a1ee15b075ee3bbb5f95debe884b66789 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68441 Reviewed-by: Felix Held Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/soc/amd/mendocino/smihandler.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'src/soc/amd/mendocino') diff --git a/src/soc/amd/mendocino/smihandler.c b/src/soc/amd/mendocino/smihandler.c index de09dc3e5a..c05f3eea3e 100644 --- a/src/soc/amd/mendocino/smihandler.c +++ b/src/soc/amd/mendocino/smihandler.c @@ -19,34 +19,6 @@ #include #include -static void fch_apmc_smi_handler(void) -{ - const uint8_t cmd = inb(pm_acpi_smi_cmd_port()); - - switch (cmd) { - case APM_CNT_ACPI_ENABLE: - acpi_clear_pm_gpe_status(); - acpi_enable_sci(); - break; - case APM_CNT_ACPI_DISABLE: - acpi_disable_sci(); - break; - case APM_CNT_ELOG_GSMI: - if (CONFIG(ELOG_GSMI)) - handle_smi_gsmi(); - break; - case APM_CNT_SMMSTORE: - if (CONFIG(SMMSTORE)) - handle_smi_store(); - break; - case APM_CNT_SMMINFO: - psp_notify_smm(); - break; - } - - mainboard_smi_apmc(cmd); -} - /* * Both the psp_notify_sx_info and the smu_sx_entry call will clobber the SMN index register * during the SMN accesses. Since the SMI handler is the last thing that gets called before -- cgit v1.2.3