kernel/eka/nkernsmp/x86/ncutils.cia
changeset 90 947f0dc9f7a8
parent 0 a41df078684a
child 257 3e88ff8f41d5
--- a/kernel/eka/nkernsmp/x86/ncutils.cia	Tue Feb 02 01:24:03 2010 +0200
+++ b/kernel/eka/nkernsmp/x86/ncutils.cia	Fri Apr 16 16:24:37 2010 +0300
@@ -18,7 +18,7 @@
 #include <x86.h>
 #include <apic.h>
 
-extern "C" __NAKED__ void NKIdle(TInt)
+extern "C" __NAKED__ void NKIdle(TUint32)
 	{
 	asm("sti");
 	asm("hlt");
@@ -68,7 +68,7 @@
 	asm("mov edx, eax ");
 	asm("cmp eax, 0 ");
 	asm("jnz short atomic_set_1 ");
-	asm("mov edx, [%a0]" : : "i" (&TheScheduler.iActiveCpus1));
+	asm("mov edx, [%a0]" : : "i" (&TheScheduler.iIpiAcceptCpus));
 	asm("shl edx, 16 ");
 	asm("atomic_set_1: ");
 	asm("or edx, [esi+%0]" : : "i" _FOFF(TSubScheduler,iCpuMask));
@@ -90,7 +90,7 @@
 	asm("jmp short crash_halt ");
 
 	asm("first_to_crash: ");
-	asm("mov ebp, [esi+60+%0]" : : "i" _FOFF(TSubScheduler,iExtras));	// points to SCpuData
+	asm("mov ebp, [esi+%0]" : : "i" _FOFF(TSubScheduler,iSSX.iTss));	// points to SCpuData
 	asm("lea ebp, [ebp+%0]" : : "i" _FOFF(SCpuData,iRegs));
 	asm("pop dword ptr [ebp+%0]" : : "i" _FOFF(SFullX86RegSet,iEsi));
 	asm("pop dword ptr [ebp+%0]" : : "i" _FOFF(SFullX86RegSet,iEbp));
@@ -111,7 +111,7 @@
 	asm("mov [eax+12], fs ");
 	asm("mov [eax+16], gs ");
 	asm("mov [eax+20], ss ");
-	asm("lea ebx, [esi+52+%0]" : : "i" _FOFF(TSubScheduler,iExtras));	// points to i_IrqNestCount
+	asm("lea ebx, [esi+%0]" : : "i" _FOFF(TSubScheduler,iSSX.iIrqNestCount));
 	asm("mov eax, 0x80000000 ");
 	asm("lock xchg eax, [ebx] ");
 	asm("mov [ebp+%0], eax" : : "i" _FOFF(SFullX86RegSet,iIrqNestCount));
@@ -137,7 +137,7 @@
 	asm("not eax ");
 	asm("mov edx, %0": :"i" (addressof_CrashState)); 
 	asm("lock and [edx+2], ax ");
-	asm("mov dword ptr [esi+44+%0], 1" : : "i" _FOFF(TSubScheduler, iExtras));	// flag that this CPU is done
+	asm("mov dword ptr [esi+%0], 1" : : "i" _FOFF(TSubScheduler, iSSX.iCrashState));	// flag that this CPU is done
 	asm("xor ecx, ecx ");
 	asm("wait_other_cpus: ");
 	asm("mov ax, [edx+2] ");