x86: Uses rbx for the initial vcoreid (XCC) Using rax prevents us from using SW contexts. Rebuild your toolchain. You don't need to make clean.
diff --git a/kern/arch/x86/process64.c b/kern/arch/x86/process64.c index 3e6dc38..b942722 100644 --- a/kern/arch/x86/process64.c +++ b/kern/arch/x86/process64.c
@@ -93,7 +93,7 @@ tf->tf_rip = entryp; /* Coupled closely with user's entry.S. id is the vcoreid, which entry.S * uses to determine what to do. vcoreid == 0 is the main core/context. */ - tf->tf_rax = vcoreid; + tf->tf_rbx = vcoreid; tf->tf_fsbase = tls_desc; proc_secure_ctx(ctx); }
diff --git a/user/parlib/include/x86/vcore32.h b/user/parlib/include/x86/vcore32.h index d3a3e3d..d133273 100644 --- a/user/parlib/include/x86/vcore32.h +++ b/user/parlib/include/x86/vcore32.h
@@ -316,7 +316,7 @@ // this is how we get our thread id on entry. #define __vcore_id_on_entry \ ({ \ - register int temp asm ("eax"); \ + register int temp asm ("ebx"); \ temp; \ })
diff --git a/user/parlib/include/x86/vcore64.h b/user/parlib/include/x86/vcore64.h index 9ae612d..d746392 100644 --- a/user/parlib/include/x86/vcore64.h +++ b/user/parlib/include/x86/vcore64.h
@@ -355,7 +355,7 @@ // this is how we get our thread id on entry. #define __vcore_id_on_entry \ ({ \ - register int temp asm ("rax"); \ + register int temp asm ("rbx"); \ temp; \ })