|
1 // Copyright (c) 1996-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // e32\memmodel\epoc\multiple\x86\xinit.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 #include <x86_mem.h> |
|
19 #include <e32uid.h> |
|
20 |
|
21 GLREF_C void DoProcessSwitch(); |
|
22 |
|
23 void MM::Init1() |
|
24 { |
|
25 __KTRACE_OPT(KBOOT,Kern::Printf("MM::Init1()")); |
|
26 |
|
27 K::MaxMemCopyInOneGo=KDefaultMaxMemCopyInOneGo; |
|
28 MM::MaxPagesInOneGo=KMaxPages; |
|
29 TheScheduler.SetProcessHandler((TLinAddr)DoProcessSwitch); |
|
30 |
|
31 __KTRACE_OPT(KBOOT,Kern::Printf("K::MaxMemCopyInOneGo=0x%x",K::MaxMemCopyInOneGo)); |
|
32 __KTRACE_OPT(KBOOT,Kern::Printf("MM::MaxPagesInOneGo=%d",MM::MaxPagesInOneGo)); |
|
33 } |
|
34 |
|
35 // Set up virtual addresses used for cache flushing if this is |
|
36 // done by data read or line allocate |
|
37 void M::SetupCacheFlushPtr(TInt aCache, SCacheInfo& aInfo) |
|
38 { |
|
39 } |
|
40 |
|
41 #ifdef __SMP__ |
|
42 void M::GetAPBootInfo(TInt /*aCpu*/, volatile SAPBootInfo* /*aInfo*/) |
|
43 { |
|
44 } |
|
45 |
|
46 void M::Init2AP() |
|
47 { |
|
48 __KTRACE_OPT(KBOOT,Kern::Printf("M::Init2AP()")); |
|
49 DThread& t = Kern::CurrentThread(); |
|
50 SubScheduler().iAddressSpace = t.iOwningProcess; |
|
51 t.iNThread.SetAddressSpace(t.iOwningProcess); |
|
52 t.iNThread.SetAttributes(KThreadAttAddressSpace); |
|
53 } |
|
54 #endif |