os/kernelhwsrv/kernel/eka/memmodel/epoc/direct/x86/xinit.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// e32\memmodel\epoc\direct\x86\xinit.cpp
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
#include <x86_mem.h>
sl@0
    19
#include <e32uid.h>
sl@0
    20
#include <kernel/cache.h>
sl@0
    21
sl@0
    22
void MM::Init1()
sl@0
    23
	{
sl@0
    24
	__KTRACE_OPT(KBOOT,Kern::Printf("MM::Init1()"));
sl@0
    25
sl@0
    26
	MM::RamBlockSize=0x1000;
sl@0
    27
	MM::RamBlockShift=12;
sl@0
    28
sl@0
    29
	PP::MaxUserThreadStack=0x14000;			// 80K - STDLIB asks for 64K for PosixServer!!!!
sl@0
    30
	PP::UserThreadStackGuard=0x2000;		// 8K
sl@0
    31
	PP::MaxStackSpacePerProcess=0x200000;	// 2Mb
sl@0
    32
	K::SupervisorThreadStackSize=0x1000;	// 4K
sl@0
    33
	PP::SupervisorThreadStackGuard=0x1000;	// 4K
sl@0
    34
sl@0
    35
	K::MachineConfig=(TMachineConfig*)(((TUint8*)SuperPageAddress)+0x800);	// HACK!!
sl@0
    36
sl@0
    37
	K::MaxMemCopyInOneGo = KDefaultMaxMemCopyInOneGo;
sl@0
    38
sl@0
    39
	PP::RamDriveStartAddress = TheSuperPage().iKernelLimit;
sl@0
    40
	PP::RamDriveMaxSize = TheRomHeader().iUserDataAddress - PP::RamDriveStartAddress;
sl@0
    41
	__KTRACE_OPT(KBOOT,Kern::Printf("RamDriveBase %08x RamDriveMaxSize %08x",PP::RamDriveStartAddress,PP::RamDriveMaxSize));
sl@0
    42
	__KTRACE_OPT(KBOOT,Kern::Printf("K::MaxMemCopyInOneGo=0x%x",K::MaxMemCopyInOneGo));
sl@0
    43
sl@0
    44
	K::MemModelAttributes=EMemModelTypeDirect|EMemModelAttrNonExProt|EMemModelAttrKernProt|EMemModelAttrWriteProt;
sl@0
    45
	}
sl@0
    46
sl@0
    47
#ifdef __CPU_HAS_CACHE
sl@0
    48
// Set up virtual addresses used for cache flushing if this is
sl@0
    49
// done by data read or line allocate
sl@0
    50
void M::SetupCacheFlushPtr(TInt aCache, SCacheInfo& aInfo)
sl@0
    51
	{
sl@0
    52
	}
sl@0
    53
#endif
sl@0
    54
sl@0
    55
#ifdef __SMP__
sl@0
    56
void M::GetAPBootInfo(TInt /*aCpu*/, volatile SAPBootInfo* /*aInfo*/)
sl@0
    57
	{
sl@0
    58
	}
sl@0
    59
sl@0
    60
void M::Init2AP()
sl@0
    61
	{
sl@0
    62
	__KTRACE_OPT(KBOOT,Kern::Printf("M::Init2AP()"));
sl@0
    63
	}
sl@0
    64
#endif