0
|
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\kernel\x86\cexec.cpp
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
#include <x86_mem.h>
|
|
19 |
#include "u32std.h"
|
|
20 |
#include <kernel/cache.h>
|
|
21 |
|
|
22 |
GLREF_C TInt CalcKernelHeapUsed();
|
|
23 |
void GetLatencyValues(TInt aMode, TInt& aCount, TInt* aDest);
|
|
24 |
void KernMsgTest();
|
|
25 |
void InvalidExecHandler();
|
|
26 |
void InvalidFastExec();
|
|
27 |
void PreprocessHandler();
|
|
28 |
|
|
29 |
|
|
30 |
/***********************************************************************************
|
|
31 |
* User-side executive handlers
|
|
32 |
***********************************************************************************/
|
|
33 |
#include "execs.h"
|
|
34 |
|
|
35 |
#ifdef KEXEC
|
|
36 |
TLinAddr UserReturnAddress()
|
|
37 |
{
|
|
38 |
TUint32* svcStackTop=(TUint32*)((TInt)TheCurrentThread->iSupervisorStack+TheCurrentThread->iSupervisorStackSize-4);
|
|
39 |
return svcStackTop[-4];
|
|
40 |
}
|
|
41 |
#endif
|
|
42 |
|
|
43 |
TInt ExecHandler::BreakPoint()
|
|
44 |
{
|
|
45 |
__KTRACE_OPT(KEXEC,Kern::Printf("ExecHandler::Breakpoint"));
|
|
46 |
return 0;
|
|
47 |
}
|
|
48 |
|
|
49 |
TInt ExecHandler::ProfileStart(TInt aProfile)
|
|
50 |
{
|
|
51 |
__KTRACE_OPT(KEXEC,Kern::Printf("ExecHandler::ProfileStart(%d) called from %08x",
|
|
52 |
aProfile,UserReturnAddress()));
|
|
53 |
return 0;
|
|
54 |
}
|
|
55 |
|
|
56 |
TInt ExecHandler::ProfileEnd(TInt aProfile)
|
|
57 |
{
|
|
58 |
__KTRACE_OPT(KEXEC,Kern::Printf("ExecHandler::ProfileEnd(%d) called from %08x",
|
|
59 |
aProfile,UserReturnAddress()));
|
|
60 |
return 0;
|
|
61 |
}
|
|
62 |
|
|
63 |
/***********************************************************************************
|
|
64 |
* Exec dispatch code
|
|
65 |
***********************************************************************************/
|
|
66 |
|
|
67 |
void InvalidExecHandler()
|
|
68 |
{
|
|
69 |
K::PanicKernExec(EInvalidSystemCall);
|
|
70 |
}
|
|
71 |
|
|
72 |
void GetLatencyValues(TInt /*aMode*/, TInt& /*aCount*/, TInt* /*aDest*/)
|
|
73 |
{
|
|
74 |
}
|
|
75 |
|
|
76 |
void dummyMsg(TAny*);
|
|
77 |
TMessageQue DummyMsgQ(dummyMsg,NULL,NULL,1);
|
|
78 |
|
|
79 |
GLDEF_C void InitDummyMsgQ()
|
|
80 |
{
|
|
81 |
DummyMsgQ.SetDfcQ(K::DfcQ0);
|
|
82 |
DummyMsgQ.Receive();
|
|
83 |
}
|
|
84 |
|
|
85 |
void dummyMsg(TAny*)
|
|
86 |
{
|
|
87 |
DummyMsgQ.iMessage->Complete(KErrNone,ETrue);
|
|
88 |
}
|
|
89 |
|
|
90 |
void KernMsgTest()
|
|
91 |
{
|
|
92 |
TMessageBase& m=Kern::Message();
|
|
93 |
m.SendReceive(&DummyMsgQ);
|
|
94 |
}
|
|
95 |
|
|
96 |
|
|
97 |
TInt ExecHandler::SetFloatingPointMode(TFloatingPointMode /*aMode*/, TFloatingPointRoundingMode /*aRoundingMode*/)
|
|
98 |
{
|
|
99 |
return KErrNotSupported;
|
|
100 |
}
|
|
101 |
|