From b6585481e8cb30ed04a1673b170af3df9e0e4320 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Mon, 1 Jun 2020 15:11:14 +0300 Subject: arch/x86: Create helper for APM_CNT SMI triggers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Attempts to write to APM_CNT IO port should always be guarded with a test to verify SMI handler has been installed. Immediate followup removes redundant HAVE_SMI_HANDLER tests. Change-Id: If3fb0f1a8b32076f1d9f3fea9f817dd4b093ad98 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/41971 Reviewed-by: Angel Pons Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/include/cpu/x86/smm.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/include/cpu/x86') diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h index d7b68e5db8..67f958b8af 100644 --- a/src/include/cpu/x86/smm.h +++ b/src/include/cpu/x86/smm.h @@ -29,6 +29,9 @@ #define APM_CNT_ELOG_GSMI 0xef #define APM_STS 0xb3 +/* Send cmd to APM_CNT with HAVE_SMI_HANDLER checking. */ +int apm_control(u8 cmd); + void io_trap_handler(int smif); int southbridge_io_trap_handler(int smif); int mainboard_io_trap_handler(int smif); -- cgit v1.2.3