[coreboot] [PATCH 1/2] SMM: add mainboard_apm_cnt() callback

Sven Schnelle svens at stackframe.org
Sun Jun 5 20:06:57 CEST 2011


Stefan Reinauer <stefan.reinauer at coreboot.org> writes:

>> --- a/src/southbridge/intel/i82801gx/smihandler.c
>> +++ b/src/southbridge/intel/i82801gx/smihandler.c
>> @@ -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;
>
> Is it on purpose that the mainboard_apm_cnt function can prevent the
> generic 82801gx code (including the not implemented C state
> coordination) from running?

Yes, that's intentional. If one mainboard doesn't like the way how the
i82801gx handles some APM_CNT, it could say so and does it's own
implementation. Most callbacks will probably simply return 0, but's IMHO
it's nice to have this option.

Sven




More information about the coreboot mailing list