Update contrib.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32\memmodel\epoc\multiple\x86\xmmu.cia
21 extern "C" void __DebugMsgFlushTLB();
22 extern "C" void __DebugMsgLocalFlushTLB();
23 extern "C" void __DebugMsgTotalFlushTLB();
24 extern "C" void __DebugMsgINVLPG(int a);
32 __NAKED__ void __fastcall DoInvalidateTLBForPage(TLinAddr /*aLinAddr*/)
34 // Flush a specified virtual address from the TLB.
37 ASM_DEBUG1(INVLPG,ecx)
42 // On 486 and Pentium this invalidates all TLB entries.
43 // On P6 and later CPUs it only invalidates non-global TLB entries.
44 __NAKED__ void DoLocalInvalidateTLB()
46 ASM_DEBUG0(LocalFlushTLB)
52 // This function is only used on P6 and later CPUs.
53 // It invalidates all TLB entries, including global ones.
54 extern "C" __NAKED__ void DoTotalInvalidateTLB()
56 ASM_DEBUG0(TotalFlushTLB)
70 // Invalidate all TLB entries regardless of CPU type.
71 __NAKED__ void DoInvalidateTLB()
74 asm("mov edx, [%a0]": : "i"(&X86_UseGlobalPTEs));
77 asm("jz no_global_pages");
88 asm("no_global_pages:");
94 __NAKED__ void DMemModelThread::RestoreAddressSpace()
98 asm("mov eax, [%a0]": : "i"(&TheScheduler.iCurrentThread));
100 // edx = current thread owning process...
102 asm("lea edx, [edx+%0]": : "i"_FOFF(DThread,iNThread));
104 asm("mov edx, [eax+edx+%0]": : "i"_FOFF(DThread,iOwningProcess));
106 // update page directory and address space values...
108 asm("mov [%a0], edx": :"i"(&TheScheduler.iAddressSpace));
109 asm("mov [eax+%0], edx": : "i"_FOFF(NThreadBase,iAddressSpace));
110 asm("mov edx, [edx+%0]": : "i"_FOFF(DMemModelProcess,iGlobalPageDir));