kernel/eka/kernel/win32/k_entry.cpp
author Slion
Wed, 03 Feb 2010 22:15:32 +0100
branchanywhere
changeset 50 999bb78c71ac
parent 0 a41df078684a
permissions -rw-r--r--
Starting to boot the kernel. We need ecust.dll now.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     1
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     2
// All rights reserved.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     3
// This component and the accompanying materials are made available
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     4
// under the terms of the License "Eclipse Public License v1.0"
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     5
// which accompanies this distribution, and is available
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     7
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     8
// Initial Contributors:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    10
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    11
// Contributors:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    12
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    13
// Description:
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    14
// e32\kernel\win32\k_entry.cpp
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    15
// 
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    16
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    17
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    18
#include <kernel/kernel.h>
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    19
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    20
// include the static data definitions
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    21
#define __FLTUSED
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    22
#include "win32crt.h"
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    23
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    24
// include compiler helpers
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    25
#include "x86hlp.inl"
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    26
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    27
GLREF_C void BootEpoc();
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    28
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    29
GLDEF_D TBool EmulRunExe;
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    30
50
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    31
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    32
#ifndef __SYMC__
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    33
0
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    34
extern "C"
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    35
int atexit(void (__cdecl *)(void))
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    36
	{
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    37
	return 0;
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    38
	}
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    39
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    40
extern "C"
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    41
EXPORT_C void _E32Startup(TBool aRunExe)
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    42
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    43
// Ordinal 1 - used by EXEs to boot EPOC
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    44
//
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    45
	{
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    46
	constructStatics();
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    47
	EmulRunExe = aRunExe;
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    48
	BootEpoc();
a41df078684a Convert Kernelhwsrv package from SFL to EPL
John Imhofe
parents:
diff changeset
    49
	}
50
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    50
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    51
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    52
#endif
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    53
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    54
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    55
#if defined __SYMC__
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    56
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    57
extern "C"
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    58
EXPORT_C void _E32Startup(TBool aRunExe)
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    59
//
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    60
// Ordinal 1 - used by EXEs to boot EPOC
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    61
//
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    62
	{
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    63
	//Done by CRT
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    64
	//constructStatics();
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    65
	//EmulRunExe = aRunExe;
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    66
	BootEpoc();
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    67
	}
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    68
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    69
TInt main()
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    70
	{
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    71
	_E32Startup(ETrue);
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    72
	}
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    73
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    74
#endif
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    75
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    76
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    77
999bb78c71ac Starting to boot the kernel. We need ecust.dll now.
Slion
parents: 0
diff changeset
    78