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
Please register or sign in to comment