1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <cpu/x86/smm.h>
4 #include <ec/google/chromeec/smm.h>
7 #include <intelblocks/smihandler.h>
9 #include <variant/gpio.h>
11 void mainboard_smi_gpi_handler(const struct gpi_status
*sts
)
13 if (CONFIG(BOARD_INTEL_KBLRVP8
))
16 if (CONFIG(EC_GOOGLE_CHROMEEC
))
17 if (gpi_status_get(sts
, EC_SMI_GPI
))
18 chromeec_smi_process_events();
21 void mainboard_smi_sleep(u8 slp_typ
)
23 if (CONFIG(EC_GOOGLE_CHROMEEC
))
24 chromeec_smi_sleep(slp_typ
, MAINBOARD_EC_S3_WAKE_EVENTS
,
25 MAINBOARD_EC_S5_WAKE_EVENTS
);
28 int mainboard_smi_apmc(u8 apmc
)
30 if (CONFIG(EC_GOOGLE_CHROMEEC
))
31 chromeec_smi_apmc(apmc
, MAINBOARD_EC_SCI_EVENTS
,
32 MAINBOARD_EC_SMI_EVENTS
);