|
1 // Copyright (c) 2010 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 // e32test\demandpaging\t_printsysinfo.cpp |
|
15 // |
|
16 // |
|
17 |
|
18 |
|
19 #include <e32std.h> |
|
20 #include <e32test.h> |
|
21 #include <e32cmn.h> |
|
22 #include <dptest.h> |
|
23 #include "..\mmu\mmudetect.h" |
|
24 |
|
25 |
|
26 RTest test(_L("T_PRINTSYSINFO")); |
|
27 |
|
28 |
|
29 void PrintOutTheKernelVersion() |
|
30 { |
|
31 TVersion version = User::Version(); |
|
32 TInt8 major = version.iMajor; |
|
33 TInt8 minor = version.iMinor; |
|
34 TInt16 build = version.iBuild; |
|
35 |
|
36 test.Printf(_L("e32 version : %d.%d.%d\n"), major, minor, build); |
|
37 } |
|
38 |
|
39 |
|
40 |
|
41 void PrintOutTheMemoryModelInUse() |
|
42 { |
|
43 TUint32 memmodtype = MemModelType(); |
|
44 |
|
45 switch (memmodtype) |
|
46 { |
|
47 case EMemModelTypeDirect: |
|
48 test.Printf(_L("Memory model enabled is : Direct Memory Model\n")); |
|
49 break; |
|
50 case EMemModelTypeMoving: |
|
51 test.Printf(_L("Memory model enabled is : Moving Memory Model\n")); |
|
52 break; |
|
53 case EMemModelTypeMultiple: |
|
54 test.Printf(_L("Memory model enabled is : Multiple Memory Model\n")); |
|
55 break; |
|
56 case EMemModelTypeEmul: |
|
57 test.Printf(_L("Memory model enabled is : Emulator Memory Model\n")); |
|
58 break; |
|
59 case EMemModelTypeFlexible: |
|
60 test.Printf(_L("Memory model enabled is : Flexible Memory Model\n")); |
|
61 break; |
|
62 default: |
|
63 test(EFalse); |
|
64 } |
|
65 } |
|
66 |
|
67 void PrintOutTheEnabledPagingTypes() |
|
68 { |
|
69 if (DPTest::Attributes() & DPTest::ERomPaging) |
|
70 test.Printf(_L("Rom paging enabled\n")); |
|
71 if (DPTest::Attributes() & DPTest::ECodePaging) |
|
72 test.Printf(_L("Code paging enabled\n")); |
|
73 if (DPTest::Attributes() & DPTest::EDataPaging) |
|
74 test.Printf(_L("Data paging enabled\n")); |
|
75 } |
|
76 |
|
77 |
|
78 // |
|
79 // E32Main |
|
80 // |
|
81 // Main entry point. |
|
82 // |
|
83 |
|
84 TInt E32Main() |
|
85 { |
|
86 test.Title(); |
|
87 PrintOutTheKernelVersion(); |
|
88 PrintOutTheMemoryModelInUse(); |
|
89 PrintOutTheEnabledPagingTypes(); |
|
90 return 0; |
|
91 } |
|
92 |
|
93 |