; EAX is the current thread
mov ebx, eax
- mov eax, [ebx+40] ; Get Kernel Stack
+ mov eax, [ebx+12*4] ; Get Kernel Stack
sub eax, KSTACK_USERSTATE_SIZE
;
[global GetCPUNum]
GetCPUNum: ; TODO: Store in debug registers
- xor eax, eax
- str ax
- sub ax, 0x30
- shr ax, 3 ; ax /= 8
+; xor eax, eax
+; str ax
+; sub ax, 0x30
+; shr ax, 3 ; ax /= 8
+ mov eax, dr1
ret
; Usermode code exported by the kernel