0
|
1 |
// Copyright (c) 2004-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 |
//
|
|
15 |
|
|
16 |
#ifndef __UBOOTLDRLDD_H__
|
|
17 |
#define __UBOOTLDRLDD_H__
|
|
18 |
|
|
19 |
#include <e32cmn.h>
|
|
20 |
#ifndef __KERNEL_MODE__
|
|
21 |
#include <e32std.h>
|
|
22 |
#endif
|
|
23 |
|
|
24 |
_LIT(KBootldrLddName,"ubootldr.ldd");
|
|
25 |
|
|
26 |
class RUBootldrLdd : public RBusLogicalChannel
|
|
27 |
{
|
|
28 |
public:
|
|
29 |
enum TControl
|
|
30 |
{
|
|
31 |
ECreateChunk,
|
|
32 |
EGetChunkHandle,
|
|
33 |
ECommitMemory,
|
|
34 |
ECloseChunk,
|
|
35 |
EIsDestroyed,
|
|
36 |
ECloseChunkHandle,
|
|
37 |
ERestart,
|
|
38 |
};
|
|
39 |
|
|
40 |
#ifndef __KERNEL_MODE__
|
|
41 |
public:
|
|
42 |
inline TInt Open()
|
|
43 |
{ return DoCreate(KBootldrLddName,TVersion(),KNullUnit,NULL,NULL,EOwnerProcess,ETrue); }
|
|
44 |
inline TInt CreateChunk(TInt aSize, TAny** aKernelAddress=0)
|
|
45 |
{
|
|
46 |
ASSERT((aSize&0xFFF)==0);// Round to pg size
|
|
47 |
return DoControl(ECreateChunk,(TAny*)aSize,aKernelAddress);
|
|
48 |
}
|
|
49 |
inline TInt GetChunkHandle(RChunk& aChunk)
|
|
50 |
{ return aChunk.SetReturnedHandle(DoControl(EGetChunkHandle)); }
|
|
51 |
inline TInt CommitMemory(TInt aSize, TUint32 aPhysAddr)
|
|
52 |
{
|
|
53 |
ASSERT((aPhysAddr&0xFFF)==0);
|
|
54 |
return DoControl(ECommitMemory,(TAny*)aSize, (TAny*)aPhysAddr);
|
|
55 |
}
|
|
56 |
inline TInt CloseChunk()
|
|
57 |
{ return DoControl(ECloseChunk); }
|
|
58 |
inline TBool IsDestroyed()
|
|
59 |
{ return DoControl(EIsDestroyed); }
|
|
60 |
inline TInt CloseChunkHandle(RChunk aChunk)
|
|
61 |
{ return DoControl(ECloseChunkHandle,(TAny*)aChunk.Handle()); }
|
|
62 |
inline TInt Reboot(TInt aReason)
|
|
63 |
{ return DoControl(ERestart,(TAny*)aReason); }
|
|
64 |
#endif
|
|
65 |
};
|
|
66 |
|
|
67 |
|
|
68 |
#endif // __UBOOTLDRLDD_H__
|