SMM: add mainboard_apm_cnt() callback
[coreboot.git] / src / southbridge / intel / i82801gx / smihandler.c
index aefa2835716873a23a64ac951ac0b77e5596cb60..bccf6d5f0566dbe67b089ed05a34f036a640830d 100644 (file)
@@ -362,6 +362,9 @@ static void southbridge_smi_apmc(unsigned int node, smm_state_save_area_t *state
        /* Emulate B2 register as the FADT / Linux expects it */
 
        reg8 = inb(APM_CNT);
+       if (mainboard_apm_cnt && mainboard_apm_cnt(reg8))
+               return;
+
        switch (reg8) {
        case CST_CONTROL:
                /* Calling this function seems to cause