Commit 8bf7e85c authored by Albert Ou's avatar Albert Ou Committed by Howard Mao
Browse files

bootrom: Fix race condition with interrupt_loop

To detect the presence of other harts in the system, hart 0 sets each
other hart's MSIP and then checks if the bit was successfully written.
However, if that hart somehow clears its own MSIP before the check
occurs, hart 0 will prematurely exit interrupt_loop and fail to bring up
the remaining harts.

This ensures that the other harts do not clear MSIP until hart 0
finishes executing interrupt_loop, which is signaled by hart 0 clearing
its own MSIP.
parent a15a6b65
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment