Commit 06ed5bbc authored by Albert Ou's avatar Albert Ou
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 d88c2fa8
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