|
67 | 67 | <var name="Enable" type="uint8_t" size="1"/> |
68 | 68 | <var name="StartAddress" type="uint32_t" size="1"/> |
69 | 69 | <var name="EndAddress" type="uint32_t" size="1"/> |
70 | | - <var name="ExecuteNever" type="uint8_t" size="1"/> |
| 70 | + <var name="ExecuteNever" type="uint8_t" size="1"> |
| 71 | + <enum name="X" value="0x0"/> |
| 72 | + <enum name="XN" value="0x1"/> |
| 73 | + </var> |
71 | 74 | <var name="AccessPermissions" type="uint8_t" size="1"> |
72 | 75 | <enum name="Read/write by privileged code only" value="0x0"/> |
73 | 76 | <enum name="Read/write by any privilege level" value="0x1"/> |
|
81 | 84 | <enum name="Inner Shareable" value="0x3"/> |
82 | 85 | </var> |
83 | 86 | <var name="AttributeIndex" type="uint8_t" size="1"/> |
84 | | - <var name="PrivilegedExecuteNever" type="uint8_t" size="1"/> |
| 87 | + <var name="PrivilegedExecuteNever" type="uint8_t" size="1"> |
| 88 | + <enum name="X" value="0x0"/> |
| 89 | + <enum name="XN" value="0x1"/> |
| 90 | + </var> |
85 | 91 | </typedef> |
86 | 92 | </typedefs> |
87 | 93 | <objects> |
|
97 | 103 | <read name="MPU_Region" type="MPU_Region_t" offset="0xE000ED9C"/> |
98 | 104 | <read name="MPU_Attributes" type="MPU_Attributes_t" offset="0xE000EDC0"/> |
99 | 105 | <var name="Count" type="uint32_t" value="0"/> |
100 | | - |
| 106 | + <var name="InnerVal" type="uint32_t" value="0"/> |
| 107 | + <var name="OuterVal" type="uint32_t" value="0"/> |
| 108 | + <var name="DeviceVal" type="uint32_t" value="0"/> |
| 109 | + |
101 | 110 | <calc cond="1"> |
102 | 111 | MPU_Region.Number=(MPU_RNR_value>>0)&0xFF; |
103 | 112 | MPU_Region.Enable=(MPU_Region.MPU_RLAR_value>>0)&0x1; |
|
118 | 127 | </calc> |
119 | 128 | </list> |
120 | 129 | <out name="Memory Protection Unit"> |
121 | | - <item property="MPU Type (MPU_TYPE)" value="%x[MPU_TYPE_value]"> |
| 130 | + <item property="Type (MPU_TYPE)" value="%x[MPU_TYPE_value]"> |
122 | 131 | <item property="DREGION" value="%d[(MPU_TYPE_value>>8)&0xFF]" info="Number of regions supported by the MPU."/> |
123 | 132 | <item property="SEPARATE" value="%d[(MPU_TYPE_value>>0)&0x1]"/> |
124 | 133 | </item> |
125 | | - <item property="MPU Control (MPU_CTRL)" value="%x[MPU_CTRL_value]"> |
| 134 | + <item property="Control (MPU_CTRL)" value="%x[MPU_CTRL_value]"> |
126 | 135 | <item property="PRIVDEFENA" value="%d[(MPU_CTRL_value>>2)&0x1]"/> |
127 | 136 | <item property="HFNMIENA" value="%d[(MPU_CTRL_value>>1)&0x1]"/> |
128 | 137 | <item property="ENABLE" value="%d[(MPU_CTRL_value>>0)&0x1]"/> |
129 | 138 | </item> |
130 | | - <item property="MPU Region Number (MPU_RNR)" value="%x[MPU_RNR_value]"> |
| 139 | + <item property="Region Number (MPU_RNR)" value="%x[MPU_RNR_value]"> |
131 | 140 | <item property="REGION" value="%d[(MPU_RNR_value>>0)&0xFF]"/> |
132 | 141 | </item> |
133 | 142 | <!-- |
|
178 | 187 | <item property="Enable" value="%t[MPU_Region.Enable ? "yes" : "no"]"/> |
179 | 188 | <item property="Start Address" value="%x[MPU_Region.StartAddress]"/> |
180 | 189 | <item property="End Address" value="%x[MPU_Region.EndAddress]"/> |
181 | | - <item property="Execute Never" value="%t[MPU_Region.ExecuteNever ? "yes" : "no"]"/> |
| 190 | + <item property="Execute Never" value="%E[MPU_Region.ExecuteNever]"/> |
182 | 191 | <item property="Access permissions" value="%E[MPU_Region.AccessPermissions]"/> |
183 | 192 | <item property="Shareability" value="%E[MPU_Region.Shareability]"/> |
184 | 193 | <item> |
|
187 | 196 | <print property="Attribute index" value="%d[MPU_Region.AttributeIndex] (Outer:%E[MPU_Attributes.Attr_Outer[MPU_Region.AttributeIndex]], Inner: %E[MPU_Attributes.Attr_Inner[MPU_Region.AttributeIndex]])" cond="(MPU_Attributes.Attr_Outer[MPU_Region.AttributeIndex]!=0) && (MPU_Attributes.Attr_Inner[MPU_Region.AttributeIndex]!=0)"/> |
188 | 197 | <print property="Attribute index" value="%d[MPU_Region.AttributeIndex] (Outer:%E[MPU_Attributes.Attr_Outer[MPU_Region.AttributeIndex]], Inner: UNPREDICTABLE)" cond="(MPU_Attributes.Attr_Outer[MPU_Region.AttributeIndex]!=0) && (MPU_Attributes.Attr_Inner[MPU_Region.AttributeIndex]==0)"/> |
189 | 198 | </item> |
190 | | - <item property="Privileged execute never" value="%t[MPU_Region.PrivilegedExecuteNever ? "yes" : "no"]"/> |
| 199 | + <item property="Privileged execute never" value="%E[MPU_Region.PrivilegedExecuteNever]"/> |
191 | 200 | </item> |
192 | 201 |
|
193 | 202 | <item property="Attributes" value=""> |
194 | 203 | <list name="Count" start="0" limit="8"> |
| 204 | + <calc> |
| 205 | + InnerVal=MPU_Attributes.Attr_Inner[Count]; |
| 206 | + OuterVal=MPU_Attributes.Attr_Outer[Count]; |
| 207 | + DeviceVal=MPU_Attributes.Attr_Device[Count]; |
| 208 | + </calc> |
195 | 209 | <item> |
196 | | - <print property="%d[Count]" value="Device: %E[MPU_Attributes.Attr_Device[Count]]" cond="(MPU_Attributes.Attr_Outer[Count]==0) && ((MPU_Attributes.Attr_Device[Count]&3)==0)"/> |
197 | | - <print property="%d[Count]" value="Device: UNPREDICTABLE" cond="(MPU_Attributes.Attr_Outer[Count]==0) && ((MPU_Attributes.Attr_Device[Count]&3)!=0)"/> |
198 | | - <print property="%d[Count]" value="Outer:%E[MPU_Attributes.Attr_Outer[Count]], Inner: %E[MPU_Attributes.Attr_Inner[Count]]" cond="(MPU_Attributes.Attr_Outer[Count]!=0) && (MPU_Attributes.Attr_Inner[Count]!=0)"/> |
199 | | - <print property="%d[Count]" value="Outer:%E[MPU_Attributes.Attr_Outer[Count]], Inner: UNPREDICTABLE" cond="(MPU_Attributes.Attr_Outer[Count]!=0) && (MPU_Attributes.Attr_Inner[Count]==0)"/> |
200 | | - <item property="Attr<%d[Count]>[7:4]" value="%x[MPU_Attributes.Attr_Outer[Count]]" cond="1"/> |
201 | | - <item property="Attr<%d[Count]>[3:0]" value="%x[MPU_Attributes.Attr_Inner[Count]]" cond="1"/> |
| 210 | + <print property="%d[Count]" value="Device: %E[MPU_Attributes.Attr_Device[Count]]" cond="(OuterVal==0) && ((DeviceVal&3)==0)"/> |
| 211 | + <print property="%d[Count]" value="Device: UNPREDICTABLE" cond="(OuterVal==0) && ((DeviceVal&3)!=0)"/> |
| 212 | + <print property="%d[Count]" value="Outer:%E[MPU_Attributes.Attr_Outer[Count]], Inner: %E[MPU_Attributes.Attr_Inner[Count]]" cond="(OuterVal!=0) && (InnerVal!=0)"/> |
| 213 | + <print property="%d[Count]" value="Outer:%E[MPU_Attributes.Attr_Outer[Count]], Inner: UNPREDICTABLE" cond="(OuterVal!=0) && (InnerVal==0)"/> |
| 214 | + <item property="Attr<%d[Count]>[7:4]" value="%x[OuterVal]" cond="1"/> |
| 215 | + <item property="Attr<%d[Count]>[3:0]" value="%x[InnerVal]" cond="1"/> |
202 | 216 | </item> |
203 | 217 | </list> |
204 | 218 | </item> |
|
0 commit comments