kernel/eka/memmodel/epoc/direct/x86/xinit.cpp
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     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\direct\x86\xinit.cpp
       
    15 // 
       
    16 //
       
    17 
       
    18 #include <x86_mem.h>
       
    19 #include <e32uid.h>
       
    20 #include <kernel/cache.h>
       
    21 
       
    22 void MM::Init1()
       
    23 	{
       
    24 	__KTRACE_OPT(KBOOT,Kern::Printf("MM::Init1()"));
       
    25 
       
    26 	MM::RamBlockSize=0x1000;
       
    27 	MM::RamBlockShift=12;
       
    28 
       
    29 	PP::MaxUserThreadStack=0x14000;			// 80K - STDLIB asks for 64K for PosixServer!!!!
       
    30 	PP::UserThreadStackGuard=0x2000;		// 8K
       
    31 	PP::MaxStackSpacePerProcess=0x200000;	// 2Mb
       
    32 	K::SupervisorThreadStackSize=0x1000;	// 4K
       
    33 	PP::SupervisorThreadStackGuard=0x1000;	// 4K
       
    34 
       
    35 	K::MachineConfig=(TMachineConfig*)(((TUint8*)SuperPageAddress)+0x800);	// HACK!!
       
    36 
       
    37 	K::MaxMemCopyInOneGo = KDefaultMaxMemCopyInOneGo;
       
    38 
       
    39 	PP::RamDriveStartAddress = TheSuperPage().iKernelLimit;
       
    40 	PP::RamDriveMaxSize = TheRomHeader().iUserDataAddress - PP::RamDriveStartAddress;
       
    41 	__KTRACE_OPT(KBOOT,Kern::Printf("RamDriveBase %08x RamDriveMaxSize %08x",PP::RamDriveStartAddress,PP::RamDriveMaxSize));
       
    42 	__KTRACE_OPT(KBOOT,Kern::Printf("K::MaxMemCopyInOneGo=0x%x",K::MaxMemCopyInOneGo));
       
    43 
       
    44 	K::MemModelAttributes=EMemModelTypeDirect|EMemModelAttrNonExProt|EMemModelAttrKernProt|EMemModelAttrWriteProt;
       
    45 	}
       
    46 
       
    47 #ifdef __CPU_HAS_CACHE
       
    48 // Set up virtual addresses used for cache flushing if this is
       
    49 // done by data read or line allocate
       
    50 void M::SetupCacheFlushPtr(TInt aCache, SCacheInfo& aInfo)
       
    51 	{
       
    52 	}
       
    53 #endif
       
    54 
       
    55 #ifdef __SMP__
       
    56 void M::GetAPBootInfo(TInt /*aCpu*/, volatile SAPBootInfo* /*aInfo*/)
       
    57 	{
       
    58 	}
       
    59 
       
    60 void M::Init2AP()
       
    61 	{
       
    62 	__KTRACE_OPT(KBOOT,Kern::Printf("M::Init2AP()"));
       
    63 	}
       
    64 #endif