1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <cpu/x86/smm.h>
4 #include <ec/google/chromeec/ec.h>
5 #include <ec/google/chromeec/smm.h>
8 #include <intelblocks/smihandler.h>
10 #include <baseboard/variants.h>
11 #include <variant/gpio.h>
12 #include <variant/ec.h>
14 void mainboard_smi_espi_handler(void)
16 chromeec_smi_process_events();
19 void __weak
variant_smi_sleep(u8 slp_typ
) {}
21 void mainboard_smi_sleep(u8 slp_typ
)
23 const struct google_chromeec_event_info
*info
;
25 info
= variant_get_event_info();
27 variant_smi_sleep(slp_typ
);
28 chromeec_smi_sleep(slp_typ
, info
->s3_wake_events
, info
->s5_wake_events
);
31 int mainboard_smi_apmc(u8 apmc
)
33 const struct google_chromeec_event_info
*info
;
35 info
= variant_get_event_info();
37 chromeec_smi_apmc(apmc
, info
->sci_events
, info
->smi_events
);
42 void elog_gsmi_cb_mainboard_log_wake_source(void)
44 const struct google_chromeec_event_info
*info
;
46 info
= variant_get_event_info();
48 google_chromeec_log_events(info
->log_events
| info
->s0ix_wake_events
);