diff --git a/boot/startup32.S b/boot/startup32.S index 801096d..38e95f7 100644 --- a/boot/startup32.S +++ b/boot/startup32.S @@ -80,7 +80,7 @@ startup: # need to take the mutex to protect our use of the stack. leal (startup_stack_mutex - startup)(%edi), %eax -0: lock bts $0, (%eax) +0: lock btsl $0, (%eax) jc 0b leal (startup_stack_top - startup)(%edi), %esp diff --git a/boot/startup64.S b/boot/startup64.S index b721c2c..0019354 100644 --- a/boot/startup64.S +++ b/boot/startup64.S @@ -145,7 +145,7 @@ startup: # Use the startup stack until we pick the correct one. We # need to take a mutex to protect our use of the stack. -0: lock bts $0, startup_stack_mutex(%rip) +0: lock btsl $0, startup_stack_mutex(%rip) jc 0b leaq startup_stack_top(%rip), %rsp