|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 using System; |
|
19 using System.Collections.Generic; |
|
20 using System.Text; |
|
21 using SymbianUtils.BasicTypes; |
|
22 using SymbianStructuresLib.Arm; |
|
23 using SymbianStructuresLib.Arm.Exceptions; |
|
24 using SymbianETMLib.Common.Types; |
|
25 |
|
26 namespace SymbianETMLib.Common.Packets |
|
27 { |
|
28 public class ETMPcktISyncInformation : ETMPcktBase |
|
29 { |
|
30 #region Enumerations |
|
31 public enum TType |
|
32 { |
|
33 ENormal = 0, |
|
34 ELoadOrStoreInProgress |
|
35 } |
|
36 |
|
37 public enum TReasonCode |
|
38 { |
|
39 EPeriodic = 0, |
|
40 ETracingEnabled = 1, |
|
41 ETracingRestartedAfterOverflow = 2, |
|
42 EProcessorExitedFromDebugState = 3 |
|
43 } |
|
44 #endregion |
|
45 |
|
46 #region Constructors |
|
47 public ETMPcktISyncInformation( SymByte aByte ) |
|
48 : base( aByte ) |
|
49 { |
|
50 } |
|
51 #endregion |
|
52 |
|
53 #region API |
|
54 #endregion |
|
55 |
|
56 #region From PcktBase |
|
57 #endregion |
|
58 |
|
59 #region Properties |
|
60 public TType Type |
|
61 { |
|
62 get |
|
63 { |
|
64 TType ret = TType.ENormal; |
|
65 SymByte mask = base.CreateMask( "10000000" ); |
|
66 if ( ( RawByte & mask ) == mask ) |
|
67 { |
|
68 ret = TType.ELoadOrStoreInProgress; |
|
69 } |
|
70 return ret; |
|
71 } |
|
72 } |
|
73 |
|
74 public bool IsSecure |
|
75 { |
|
76 get |
|
77 { |
|
78 bool ret = RawByte[ 3 ]; |
|
79 return ret; |
|
80 } |
|
81 } |
|
82 |
|
83 public TArmInstructionSet InstructionSet |
|
84 { |
|
85 get |
|
86 { |
|
87 TArmInstructionSet ret = TArmInstructionSet.EARM; |
|
88 // |
|
89 if ( RawByte[ 4 ] ) |
|
90 { |
|
91 ret = TArmInstructionSet.EJAZELLE; |
|
92 } |
|
93 // |
|
94 return ret; |
|
95 } |
|
96 } |
|
97 |
|
98 public TReasonCode ReasonCode |
|
99 { |
|
100 get |
|
101 { |
|
102 TReasonCode ret = TReasonCode.EPeriodic; |
|
103 SymByte mask = base.CreateMask( "01100000" ); |
|
104 SymByte val = RawByte & mask; |
|
105 val = val.HighestBitsShiftedRight( 5 ); |
|
106 ret = (TReasonCode) val.Value; |
|
107 return ret; |
|
108 } |
|
109 } |
|
110 #endregion |
|
111 |
|
112 #region Internal constants |
|
113 #endregion |
|
114 |
|
115 #region From System.Object |
|
116 #endregion |
|
117 |
|
118 #region Data members |
|
119 #endregion |
|
120 } |
|
121 } |