[coreboot] logical error for smm hander in coreboot.

Nico Huber nico.huber at secunet.com
Tue Jan 3 13:37:32 CET 2017


Hi Tank,

On 03.01.2017 04:20, Tang Tank wrote:
> 
> Hi all,
> 
> 
>    For smm handler (func smm_handler_start) in coreboot/src/cpu/x86/smm/smm_module_handler.c,
> there may be a logical error.
> 
>    If I have 4 cores in my mainboard in the following special conditions:
>    1. core0 run into smm_handler_start and smi_handler_status will be SMI_LOCKED.
>    2. core1/2 run into smm_handler_start and pause since smi_handler_status is locked.
>    3. core0 release smi_handler_status and then core4 run into smm_handler_start, it will do
>        southbridge_smi_handler again.

looking at the code, I too see that possible race. But...

> 
>    So is there have a reliable way of doing smm multi processors services in coreboot?

...IMO, this isn't unreliable. After the first run of a cpu/northbridge
/southbridge_smi_handler() function, the cause of the SMI should be
handled and thus the second run should do nothing (but checking for the
SMI's cause).

Does that help? I wasn't sure if I got your question right.

Nico




More information about the coreboot mailing list