sl@0: // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\memmodel\epoc\moving\arm\xinit.cpp sl@0: // sl@0: // sl@0: sl@0: #include "arm_mem.h" sl@0: #include sl@0: sl@0: GLREF_C void DoProcessSwitch(); sl@0: sl@0: void MM::Init1() sl@0: { sl@0: __KTRACE_OPT(KBOOT,Kern::Printf("MM::Init1()")); sl@0: sl@0: K::MaxMemCopyInOneGo=KDefaultMaxMemCopyInOneGo; sl@0: MM::MaxPagesInOneGo=KMaxPages; sl@0: TheScheduler.SetProcessHandler((TLinAddr)DoProcessSwitch); sl@0: } sl@0: sl@0: // Set up virtual addresses used for cache flushing if this is sl@0: // done by data read or line allocate sl@0: void M::SetupCacheFlushPtr(TInt aCache, SCacheInfo& aInfo) sl@0: { sl@0: #if defined(__CPU_CACHE_FLUSH_BY_DATA_READ) || defined(__CPU_CACHE_FLUSH_BY_LINE_ALLOC) sl@0: #ifdef __CPU_HAS_ALT_D_CACHE sl@0: if (aCache==KCacheNumAltD) sl@0: { sl@0: aInfo.iFlushPtr=KAltDCacheFlushArea; sl@0: aInfo.iFlushMask=KAltDCacheFlushAreaLimit; sl@0: } sl@0: #endif sl@0: if (aCache==KCacheNumD) sl@0: { sl@0: aInfo.iFlushPtr=KDCacheFlushArea; sl@0: aInfo.iFlushMask=KDCacheFlushAreaLimit; sl@0: } sl@0: #endif sl@0: }