|
1 // Copyright (c) 2005-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\nkern\x86\nk_entry.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 #include <x86.h> |
|
19 |
|
20 extern "C" { |
|
21 extern TAny* malloc(TUint32 aSize); |
|
22 extern void free(TAny* aCell); |
|
23 } |
|
24 |
|
25 // include the static data definitions |
|
26 #define __FLTUSED |
|
27 #define __USE_MALLOC__ |
|
28 #include "win32crt.h" |
|
29 #include "nwdl.h" |
|
30 |
|
31 |
|
32 extern "C" void HwInit0(); |
|
33 extern "C" void KernelMain(); |
|
34 |
|
35 extern "C" |
|
36 int atexit(void (__cdecl *)(void)) |
|
37 { |
|
38 return 0; |
|
39 } |
|
40 |
|
41 extern "C" { |
|
42 |
|
43 extern TLinAddr RomHeaderAddress; |
|
44 extern TLinAddr SuperPageAddress; |
|
45 |
|
46 |
|
47 void _E32Startup_Body(TLinAddr aRomHeader, TLinAddr aSuperPage) |
|
48 // |
|
49 // The main startup program |
|
50 // aRomHeader is address of ROM header passed in by bootstrap |
|
51 // aSuperPage is address of super page passed in by bootstrap |
|
52 // |
|
53 { |
|
54 RomHeaderAddress = aRomHeader; |
|
55 SuperPageAddress = aSuperPage; |
|
56 |
|
57 HwInit0(); |
|
58 |
|
59 KPrintf("RomHeaderAddress = %08x", RomHeaderAddress); |
|
60 KPrintf("SuperPageAddress = %08x", SuperPageAddress); |
|
61 KPrintf("Calling global constructors..."); |
|
62 constructStatics(); |
|
63 KPrintf("Calling KernelMain()..."); |
|
64 KernelMain(); |
|
65 } |
|
66 } |
|
67 |