|
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\moving\arm\xinit.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 #include "arm_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 |
|
32 // Set up virtual addresses used for cache flushing if this is |
|
33 // done by data read or line allocate |
|
34 void M::SetupCacheFlushPtr(TInt aCache, SCacheInfo& aInfo) |
|
35 { |
|
36 #if defined(__CPU_CACHE_FLUSH_BY_DATA_READ) || defined(__CPU_CACHE_FLUSH_BY_LINE_ALLOC) |
|
37 #ifdef __CPU_HAS_ALT_D_CACHE |
|
38 if (aCache==KCacheNumAltD) |
|
39 { |
|
40 aInfo.iFlushPtr=KAltDCacheFlushArea; |
|
41 aInfo.iFlushMask=KAltDCacheFlushAreaLimit; |
|
42 } |
|
43 #endif |
|
44 if (aCache==KCacheNumD) |
|
45 { |
|
46 aInfo.iFlushPtr=KDCacheFlushArea; |
|
47 aInfo.iFlushMask=KDCacheFlushAreaLimit; |
|
48 } |
|
49 #endif |
|
50 } |