Print this page
acpica-unix2-20130823
PANKOVs restructure
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/intel/io/acpica/executer/exdump.c
+++ new/usr/src/common/acpica/components/executer/exdump.c
1 1 /******************************************************************************
2 2 *
3 3 * Module Name: exdump - Interpreter debug output routines
4 4 *
5 5 *****************************************************************************/
6 6
7 7 /*
8 - * Copyright (C) 2000 - 2011, Intel Corp.
8 + * Copyright (C) 2000 - 2013, Intel Corp.
9 9 * All rights reserved.
10 10 *
11 11 * Redistribution and use in source and binary forms, with or without
12 12 * modification, are permitted provided that the following conditions
13 13 * are met:
14 14 * 1. Redistributions of source code must retain the above copyright
15 15 * notice, this list of conditions, and the following disclaimer,
16 16 * without modification.
17 17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 18 * substantially similar to the "NO WARRANTY" disclaimer below
19 19 * ("Disclaimer") and any redistribution must be conditioned upon
20 20 * including a substantially similar Disclaimer requirement for further
21 21 * binary redistribution.
22 22 * 3. Neither the names of the above-listed copyright holders nor the names
23 23 * of any contributors may be used to endorse or promote products derived
24 24 * from this software without specific prior written permission.
25 25 *
26 26 * Alternatively, this software may be distributed under the terms of the
27 27 * GNU General Public License ("GPL") version 2 as published by the Free
28 28 * Software Foundation.
29 29 *
30 30 * NO WARRANTY
31 31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 41 * POSSIBILITY OF SUCH DAMAGES.
42 42 */
43 43
44 44 #define __EXDUMP_C__
45 45
46 46 #include "acpi.h"
47 47 #include "accommon.h"
48 48 #include "acinterp.h"
49 49 #include "amlcode.h"
50 50 #include "acnamesp.h"
51 51
52 52
53 53 #define _COMPONENT ACPI_EXECUTER
54 54 ACPI_MODULE_NAME ("exdump")
55 55
56 56 /*
57 57 * The following routines are used for debug output only
58 58 */
59 59 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
60 60
61 61 /* Local prototypes */
62 62
63 63 static void
64 64 AcpiExOutString (
65 65 char *Title,
66 66 char *Value);
67 67
68 68 static void
69 69 AcpiExOutPointer (
70 70 char *Title,
71 71 void *Value);
72 72
73 73 static void
74 74 AcpiExDumpObject (
75 75 ACPI_OPERAND_OBJECT *ObjDesc,
76 76 ACPI_EXDUMP_INFO *Info);
77 77
78 78 static void
79 79 AcpiExDumpReferenceObj (
80 80 ACPI_OPERAND_OBJECT *ObjDesc);
81 81
82 82 static void
83 83 AcpiExDumpPackageObj (
84 84 ACPI_OPERAND_OBJECT *ObjDesc,
85 85 UINT32 Level,
86 86 UINT32 Index);
87 87
88 88
89 89 /*******************************************************************************
90 90 *
91 91 * Object Descriptor info tables
92 92 *
93 93 * Note: The first table entry must be an INIT opcode and must contain
94 94 * the table length (number of table entries)
95 95 *
96 96 ******************************************************************************/
97 97
98 98 static ACPI_EXDUMP_INFO AcpiExDumpInteger[2] =
99 99 {
100 100 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpInteger), NULL},
101 101 {ACPI_EXD_UINT64, ACPI_EXD_OFFSET (Integer.Value), "Value"}
102 102 };
103 103
104 104 static ACPI_EXDUMP_INFO AcpiExDumpString[4] =
105 105 {
106 106 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpString), NULL},
107 107 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (String.Length), "Length"},
108 108 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (String.Pointer), "Pointer"},
109 109 {ACPI_EXD_STRING, 0, NULL}
110 110 };
111 111
112 112 static ACPI_EXDUMP_INFO AcpiExDumpBuffer[5] =
113 113 {
114 114 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpBuffer), NULL},
115 115 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Buffer.Length), "Length"},
116 116 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Buffer.Pointer), "Pointer"},
117 117 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Buffer.Node), "Parent Node"},
118 118 {ACPI_EXD_BUFFER, 0, NULL}
119 119 };
120 120
121 121 static ACPI_EXDUMP_INFO AcpiExDumpPackage[5] =
122 122 {
123 123 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpPackage), NULL},
↓ open down ↓ |
105 lines elided |
↑ open up ↑ |
124 124 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Package.Flags), "Flags"},
125 125 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Package.Count), "Elements"},
126 126 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Package.Elements), "Element List"},
127 127 {ACPI_EXD_PACKAGE, 0, NULL}
128 128 };
129 129
130 130 static ACPI_EXDUMP_INFO AcpiExDumpDevice[4] =
131 131 {
132 132 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpDevice), NULL},
133 133 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.Handler), "Handler"},
134 - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.SystemNotify), "System Notify"},
135 - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.DeviceNotify), "Device Notify"}
134 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.NotifyList[0]), "System Notify"},
135 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.NotifyList[1]), "Device Notify"}
136 136 };
137 137
138 138 static ACPI_EXDUMP_INFO AcpiExDumpEvent[2] =
139 139 {
140 140 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpEvent), NULL},
141 141 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Event.OsSemaphore), "OsSemaphore"}
142 142 };
143 143
144 144 static ACPI_EXDUMP_INFO AcpiExDumpMethod[9] =
145 145 {
146 146 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpMethod), NULL},
147 147 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Method.InfoFlags), "Info Flags"},
148 148 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Method.ParamCount), "Parameter Count"},
149 149 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Method.SyncLevel), "Sync Level"},
150 150 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Method.Mutex), "Mutex"},
151 151 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Method.OwnerId), "Owner Id"},
152 152 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Method.ThreadCount), "Thread Count"},
153 153 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Method.AmlLength), "Aml Length"},
154 154 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Method.AmlStart), "Aml Start"}
155 155 };
156 156
157 157 static ACPI_EXDUMP_INFO AcpiExDumpMutex[5] =
158 158 {
159 159 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpMutex), NULL},
160 160 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Mutex.SyncLevel), "Sync Level"},
161 161 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Mutex.OwnerThread), "Owner Thread"},
162 162 {ACPI_EXD_UINT16, ACPI_EXD_OFFSET (Mutex.AcquisitionDepth), "Acquire Depth"},
163 163 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Mutex.OsMutex), "OsMutex"}
164 164 };
165 165
166 166 static ACPI_EXDUMP_INFO AcpiExDumpRegion[7] =
167 167 {
168 168 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpRegion), NULL},
169 169 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Region.SpaceId), "Space Id"},
170 170 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Region.Flags), "Flags"},
171 171 {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET (Region.Address), "Address"},
↓ open down ↓ |
26 lines elided |
↑ open up ↑ |
172 172 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Region.Length), "Length"},
173 173 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Region.Handler), "Handler"},
174 174 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Region.Next), "Next"}
175 175 };
176 176
177 177 static ACPI_EXDUMP_INFO AcpiExDumpPower[5] =
178 178 {
179 179 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpPower), NULL},
180 180 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (PowerResource.SystemLevel), "System Level"},
181 181 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (PowerResource.ResourceOrder), "Resource Order"},
182 - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.SystemNotify), "System Notify"},
183 - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.DeviceNotify), "Device Notify"}
182 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.NotifyList[0]), "System Notify"},
183 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.NotifyList[1]), "Device Notify"}
184 184 };
185 185
186 186 static ACPI_EXDUMP_INFO AcpiExDumpProcessor[7] =
187 187 {
188 188 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpProcessor), NULL},
189 189 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Processor.ProcId), "Processor ID"},
190 190 {ACPI_EXD_UINT8 , ACPI_EXD_OFFSET (Processor.Length), "Length"},
191 191 {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET (Processor.Address), "Address"},
192 - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.SystemNotify), "System Notify"},
193 - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.DeviceNotify), "Device Notify"},
192 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.NotifyList[0]), "System Notify"},
193 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.NotifyList[1]), "Device Notify"},
194 194 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.Handler), "Handler"}
195 195 };
196 196
197 197 static ACPI_EXDUMP_INFO AcpiExDumpThermal[4] =
198 198 {
199 199 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpThermal), NULL},
200 - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (ThermalZone.SystemNotify), "System Notify"},
201 - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (ThermalZone.DeviceNotify), "Device Notify"},
200 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (ThermalZone.NotifyList[0]), "System Notify"},
201 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (ThermalZone.NotifyList[1]), "Device Notify"},
202 202 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (ThermalZone.Handler), "Handler"}
203 203 };
204 204
205 205 static ACPI_EXDUMP_INFO AcpiExDumpBufferField[3] =
206 206 {
207 207 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpBufferField), NULL},
208 208 {ACPI_EXD_FIELD, 0, NULL},
209 209 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (BufferField.BufferObj), "Buffer Object"}
210 210 };
211 211
212 -static ACPI_EXDUMP_INFO AcpiExDumpRegionField[3] =
212 +static ACPI_EXDUMP_INFO AcpiExDumpRegionField[5] =
213 213 {
214 214 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpRegionField), NULL},
215 215 {ACPI_EXD_FIELD, 0, NULL},
216 - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Field.RegionObj), "Region Object"}
216 + {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Field.AccessLength), "AccessLength"},
217 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Field.RegionObj), "Region Object"},
218 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Field.ResourceBuffer), "ResourceBuffer"}
217 219 };
218 220
219 221 static ACPI_EXDUMP_INFO AcpiExDumpBankField[5] =
220 222 {
221 223 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpBankField), NULL},
222 224 {ACPI_EXD_FIELD, 0, NULL},
223 225 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (BankField.Value), "Value"},
224 226 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (BankField.RegionObj), "Region Object"},
225 227 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (BankField.BankObj), "Bank Object"}
226 228 };
227 229
228 230 static ACPI_EXDUMP_INFO AcpiExDumpIndexField[5] =
229 231 {
230 232 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpBankField), NULL},
231 233 {ACPI_EXD_FIELD, 0, NULL},
232 234 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (IndexField.Value), "Value"},
233 235 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (IndexField.IndexObj), "Index Object"},
234 236 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (IndexField.DataObj), "Data Object"}
235 237 };
236 238
237 239 static ACPI_EXDUMP_INFO AcpiExDumpReference[8] =
238 240 {
239 241 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpReference), NULL},
240 242 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Reference.Class), "Class"},
241 243 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Reference.TargetType), "Target Type"},
242 244 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Reference.Value), "Value"},
243 245 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.Object), "Object Desc"},
244 246 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.Node), "Node"},
245 247 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.Where), "Where"},
246 248 {ACPI_EXD_REFERENCE,0, NULL}
247 249 };
248 250
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
249 251 static ACPI_EXDUMP_INFO AcpiExDumpAddressHandler[6] =
250 252 {
251 253 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpAddressHandler), NULL},
252 254 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (AddressSpace.SpaceId), "Space Id"},
253 255 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.Next), "Next"},
254 256 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.RegionList), "Region List"},
255 257 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.Node), "Node"},
256 258 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.Context), "Context"}
257 259 };
258 260
259 -static ACPI_EXDUMP_INFO AcpiExDumpNotify[3] =
261 +static ACPI_EXDUMP_INFO AcpiExDumpNotify[7] =
260 262 {
261 263 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpNotify), NULL},
262 264 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Node), "Node"},
263 - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Context), "Context"}
265 + {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Notify.HandlerType), "Handler Type"},
266 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Handler), "Handler"},
267 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Context), "Context"},
268 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Next[0]), "Next System Notify"},
269 + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Next[1]), "Next Device Notify"}
264 270 };
265 271
266 272
267 273 /* Miscellaneous tables */
268 274
269 275 static ACPI_EXDUMP_INFO AcpiExDumpCommon[4] =
270 276 {
271 277 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpCommon), NULL},
272 278 {ACPI_EXD_TYPE , 0, NULL},
273 279 {ACPI_EXD_UINT16, ACPI_EXD_OFFSET (Common.ReferenceCount), "Reference Count"},
274 280 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Common.Flags), "Flags"}
275 281 };
276 282
277 283 static ACPI_EXDUMP_INFO AcpiExDumpFieldCommon[7] =
278 284 {
279 285 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpFieldCommon), NULL},
280 286 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (CommonField.FieldFlags), "Field Flags"},
281 287 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (CommonField.AccessByteWidth), "Access Byte Width"},
282 288 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (CommonField.BitLength), "Bit Length"},
283 289 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (CommonField.StartFieldBitOffset),"Field Bit Offset"},
284 290 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (CommonField.BaseByteOffset), "Base Byte Offset"},
285 291 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (CommonField.Node), "Parent Node"}
286 292 };
287 293
288 294 static ACPI_EXDUMP_INFO AcpiExDumpNode[5] =
289 295 {
290 296 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpNode), NULL},
291 297 {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET (Flags), "Flags"},
292 298 {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET (OwnerId), "Owner Id"},
293 299 {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET (Child), "Child List"},
294 300 {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET (Peer), "Next Peer"}
295 301 };
296 302
297 303
298 304 /* Dispatch table, indexed by object type */
299 305
300 306 static ACPI_EXDUMP_INFO *AcpiExDumpInfo[] =
301 307 {
302 308 NULL,
303 309 AcpiExDumpInteger,
304 310 AcpiExDumpString,
305 311 AcpiExDumpBuffer,
306 312 AcpiExDumpPackage,
307 313 NULL,
308 314 AcpiExDumpDevice,
309 315 AcpiExDumpEvent,
310 316 AcpiExDumpMethod,
311 317 AcpiExDumpMutex,
312 318 AcpiExDumpRegion,
313 319 AcpiExDumpPower,
314 320 AcpiExDumpProcessor,
315 321 AcpiExDumpThermal,
316 322 AcpiExDumpBufferField,
317 323 NULL,
318 324 NULL,
319 325 AcpiExDumpRegionField,
320 326 AcpiExDumpBankField,
321 327 AcpiExDumpIndexField,
322 328 AcpiExDumpReference,
323 329 NULL,
324 330 NULL,
325 331 AcpiExDumpNotify,
326 332 AcpiExDumpAddressHandler,
327 333 NULL,
328 334 NULL,
329 335 NULL
330 336 };
331 337
332 338
333 339 /*******************************************************************************
334 340 *
335 341 * FUNCTION: AcpiExDumpObject
336 342 *
337 343 * PARAMETERS: ObjDesc - Descriptor to dump
338 344 * Info - Info table corresponding to this object
339 345 * type
340 346 *
341 347 * RETURN: None
342 348 *
343 349 * DESCRIPTION: Walk the info table for this object
↓ open down ↓ |
70 lines elided |
↑ open up ↑ |
344 350 *
345 351 ******************************************************************************/
346 352
347 353 static void
348 354 AcpiExDumpObject (
349 355 ACPI_OPERAND_OBJECT *ObjDesc,
350 356 ACPI_EXDUMP_INFO *Info)
351 357 {
352 358 UINT8 *Target;
353 359 char *Name;
360 + const char *ReferenceName;
354 361 UINT8 Count;
355 362
356 363
357 364 if (!Info)
358 365 {
359 366 AcpiOsPrintf (
360 367 "ExDumpObject: Display not implemented for object type %s\n",
361 368 AcpiUtGetObjectTypeName (ObjDesc));
362 369 return;
363 370 }
364 371
365 372 /* First table entry must contain the table length (# of table entries) */
366 373
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
367 374 Count = Info->Offset;
368 375
369 376 while (Count)
370 377 {
371 378 Target = ACPI_ADD_PTR (UINT8, ObjDesc, Info->Offset);
372 379 Name = Info->Name;
373 380
374 381 switch (Info->Opcode)
375 382 {
376 383 case ACPI_EXD_INIT:
384 +
377 385 break;
378 386
379 387 case ACPI_EXD_TYPE:
380 388
381 389 AcpiExOutString ("Type", AcpiUtGetObjectTypeName (ObjDesc));
382 390 break;
383 391
384 392 case ACPI_EXD_UINT8:
385 393
386 394 AcpiOsPrintf ("%20s : %2.2X\n", Name, *Target);
387 395 break;
388 396
389 397 case ACPI_EXD_UINT16:
390 398
391 399 AcpiOsPrintf ("%20s : %4.4X\n", Name, ACPI_GET16 (Target));
392 400 break;
393 401
394 402 case ACPI_EXD_UINT32:
395 403
396 404 AcpiOsPrintf ("%20s : %8.8X\n", Name, ACPI_GET32 (Target));
397 405 break;
398 406
399 407 case ACPI_EXD_UINT64:
400 408
401 409 AcpiOsPrintf ("%20s : %8.8X%8.8X\n", "Value",
402 410 ACPI_FORMAT_UINT64 (ACPI_GET64 (Target)));
403 411 break;
404 412
405 413 case ACPI_EXD_POINTER:
406 414 case ACPI_EXD_ADDRESS:
407 415
408 416 AcpiExOutPointer (Name, *ACPI_CAST_PTR (void *, Target));
409 417 break;
410 418
411 419 case ACPI_EXD_STRING:
412 420
413 421 AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
414 422 AcpiOsPrintf ("\n");
415 423 break;
416 424
417 425 case ACPI_EXD_BUFFER:
418 426
419 427 ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length);
420 428 break;
421 429
422 430 case ACPI_EXD_PACKAGE:
423 431
424 432 /* Dump the package contents */
425 433
426 434 AcpiOsPrintf ("\nPackage Contents:\n");
↓ open down ↓ |
40 lines elided |
↑ open up ↑ |
427 435 AcpiExDumpPackageObj (ObjDesc, 0, 0);
428 436 break;
429 437
430 438 case ACPI_EXD_FIELD:
431 439
432 440 AcpiExDumpObject (ObjDesc, AcpiExDumpFieldCommon);
433 441 break;
434 442
435 443 case ACPI_EXD_REFERENCE:
436 444
437 - AcpiExOutString ("Class Name",
438 - ACPI_CAST_PTR (char, AcpiUtGetReferenceName (ObjDesc)));
445 + ReferenceName = AcpiUtGetReferenceName (ObjDesc);
446 + AcpiExOutString ("Class Name", ACPI_CAST_PTR (char, ReferenceName));
439 447 AcpiExDumpReferenceObj (ObjDesc);
440 448 break;
441 449
442 450 default:
443 451
444 452 AcpiOsPrintf ("**** Invalid table opcode [%X] ****\n",
445 453 Info->Opcode);
446 454 return;
447 455 }
448 456
449 457 Info++;
450 458 Count--;
451 459 }
452 460 }
453 461
454 462
455 463 /*******************************************************************************
456 464 *
457 465 * FUNCTION: AcpiExDumpOperand
458 466 *
459 467 * PARAMETERS: *ObjDesc - Pointer to entry to be dumped
460 468 * Depth - Current nesting depth
461 469 *
462 470 * RETURN: None
463 471 *
464 472 * DESCRIPTION: Dump an operand object
465 473 *
466 474 ******************************************************************************/
467 475
468 476 void
469 477 AcpiExDumpOperand (
↓ open down ↓ |
21 lines elided |
↑ open up ↑ |
470 478 ACPI_OPERAND_OBJECT *ObjDesc,
471 479 UINT32 Depth)
472 480 {
473 481 UINT32 Length;
474 482 UINT32 Index;
475 483
476 484
477 485 ACPI_FUNCTION_NAME (ExDumpOperand)
478 486
479 487
480 - if (!((ACPI_LV_EXEC & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
488 + /* Check if debug output enabled */
489 +
490 + if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_EXEC, _COMPONENT))
481 491 {
482 492 return;
483 493 }
484 494
485 495 if (!ObjDesc)
486 496 {
487 497 /* This could be a null element of a package */
488 498
489 499 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n"));
490 500 return;
491 501 }
492 502
493 503 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED)
494 504 {
495 505 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p Namespace Node: ", ObjDesc));
496 506 ACPI_DUMP_ENTRY (ObjDesc, ACPI_LV_EXEC);
497 507 return;
498 508 }
499 509
500 510 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
501 511 {
502 512 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
503 513 "%p is not a node or operand object: [%s]\n",
504 514 ObjDesc, AcpiUtGetDescriptorName (ObjDesc)));
505 515 ACPI_DUMP_BUFFER (ObjDesc, sizeof (ACPI_OPERAND_OBJECT));
506 516 return;
507 517 }
508 518
509 519 /* ObjDesc is a valid object */
510 520
511 521 if (Depth > 0)
512 522 {
513 523 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p ",
514 524 Depth, " ", Depth, ObjDesc));
515 525 }
516 526 else
517 527 {
518 528 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", ObjDesc));
519 529 }
520 530
521 531 /* Decode object type */
522 532
523 533 switch (ObjDesc->Common.Type)
524 534 {
525 535 case ACPI_TYPE_LOCAL_REFERENCE:
↓ open down ↓ |
35 lines elided |
↑ open up ↑ |
526 536
527 537 AcpiOsPrintf ("Reference: [%s] ", AcpiUtGetReferenceName (ObjDesc));
528 538
529 539 switch (ObjDesc->Reference.Class)
530 540 {
531 541 case ACPI_REFCLASS_DEBUG:
532 542
533 543 AcpiOsPrintf ("\n");
534 544 break;
535 545
536 -
537 546 case ACPI_REFCLASS_INDEX:
538 547
539 548 AcpiOsPrintf ("%p\n", ObjDesc->Reference.Object);
540 549 break;
541 550
542 -
543 551 case ACPI_REFCLASS_TABLE:
544 552
545 553 AcpiOsPrintf ("Table Index %X\n", ObjDesc->Reference.Value);
546 554 break;
547 555
548 -
549 556 case ACPI_REFCLASS_REFOF:
550 557
551 558 AcpiOsPrintf ("%p [%s]\n", ObjDesc->Reference.Object,
552 559 AcpiUtGetTypeName (((ACPI_OPERAND_OBJECT *)
553 560 ObjDesc->Reference.Object)->Common.Type));
554 561 break;
555 562
556 -
557 563 case ACPI_REFCLASS_NAME:
558 564
559 565 AcpiOsPrintf ("- [%4.4s]\n", ObjDesc->Reference.Node->Name.Ascii);
560 566 break;
561 567
562 -
563 568 case ACPI_REFCLASS_ARG:
564 569 case ACPI_REFCLASS_LOCAL:
565 570
566 571 AcpiOsPrintf ("%X\n", ObjDesc->Reference.Value);
567 572 break;
568 573
569 -
570 574 default: /* Unknown reference class */
571 575
572 576 AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
573 577 break;
574 578 }
575 579 break;
576 580
577 -
578 581 case ACPI_TYPE_BUFFER:
579 582
580 583 AcpiOsPrintf ("Buffer length %.2X @ %p\n",
581 584 ObjDesc->Buffer.Length, ObjDesc->Buffer.Pointer);
582 585
583 586 /* Debug only -- dump the buffer contents */
584 587
585 588 if (ObjDesc->Buffer.Pointer)
586 589 {
587 590 Length = ObjDesc->Buffer.Length;
588 591 if (Length > 128)
↓ open down ↓ |
1 lines elided |
↑ open up ↑ |
589 592 {
590 593 Length = 128;
591 594 }
592 595
593 596 AcpiOsPrintf ("Buffer Contents: (displaying length 0x%.2X)\n",
594 597 Length);
595 598 ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, Length);
596 599 }
597 600 break;
598 601
599 -
600 602 case ACPI_TYPE_INTEGER:
601 603
602 604 AcpiOsPrintf ("Integer %8.8X%8.8X\n",
603 605 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
604 606 break;
605 607
606 -
607 608 case ACPI_TYPE_PACKAGE:
608 609
609 610 AcpiOsPrintf ("Package [Len %X] ElementArray %p\n",
610 611 ObjDesc->Package.Count, ObjDesc->Package.Elements);
611 612
612 613 /*
613 614 * If elements exist, package element pointer is valid,
614 615 * and debug_level exceeds 1, dump package's elements.
615 616 */
616 617 if (ObjDesc->Package.Count &&
617 618 ObjDesc->Package.Elements &&
618 619 AcpiDbgLevel > 1)
619 620 {
620 621 for (Index = 0; Index < ObjDesc->Package.Count; Index++)
621 622 {
622 623 AcpiExDumpOperand (ObjDesc->Package.Elements[Index], Depth+1);
623 624 }
624 625 }
625 626 break;
626 627
627 -
628 628 case ACPI_TYPE_REGION:
629 629
630 630 AcpiOsPrintf ("Region %s (%X)",
631 631 AcpiUtGetRegionName (ObjDesc->Region.SpaceId),
632 632 ObjDesc->Region.SpaceId);
633 633
634 634 /*
635 635 * If the address and length have not been evaluated,
636 636 * don't print them.
637 637 */
638 638 if (!(ObjDesc->Region.Flags & AOPOBJ_DATA_VALID))
639 639 {
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
640 640 AcpiOsPrintf ("\n");
641 641 }
642 642 else
643 643 {
644 644 AcpiOsPrintf (" base %8.8X%8.8X Length %X\n",
645 645 ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
646 646 ObjDesc->Region.Length);
647 647 }
648 648 break;
649 649
650 -
651 650 case ACPI_TYPE_STRING:
652 651
653 652 AcpiOsPrintf ("String length %X @ %p ",
654 653 ObjDesc->String.Length,
655 654 ObjDesc->String.Pointer);
656 655
657 656 AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
658 657 AcpiOsPrintf ("\n");
659 658 break;
660 659
661 -
662 660 case ACPI_TYPE_LOCAL_BANK_FIELD:
663 661
664 662 AcpiOsPrintf ("BankField\n");
665 663 break;
666 664
667 -
668 665 case ACPI_TYPE_LOCAL_REGION_FIELD:
669 666
670 667 AcpiOsPrintf ("RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at "
671 668 "byte=%X bit=%X of below:\n",
672 669 ObjDesc->Field.BitLength,
673 670 ObjDesc->Field.AccessByteWidth,
674 671 ObjDesc->Field.FieldFlags & AML_FIELD_LOCK_RULE_MASK,
675 672 ObjDesc->Field.FieldFlags & AML_FIELD_UPDATE_RULE_MASK,
676 673 ObjDesc->Field.BaseByteOffset,
677 674 ObjDesc->Field.StartFieldBitOffset);
678 675
679 676 AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth+1);
680 677 break;
681 678
682 -
683 679 case ACPI_TYPE_LOCAL_INDEX_FIELD:
684 680
685 681 AcpiOsPrintf ("IndexField\n");
686 682 break;
687 683
688 -
689 684 case ACPI_TYPE_BUFFER_FIELD:
690 685
691 686 AcpiOsPrintf ("BufferField: %X bits at byte %X bit %X of\n",
692 687 ObjDesc->BufferField.BitLength,
693 688 ObjDesc->BufferField.BaseByteOffset,
694 689 ObjDesc->BufferField.StartFieldBitOffset);
695 690
696 691 if (!ObjDesc->BufferField.BufferObj)
697 692 {
698 693 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL*\n"));
699 694 }
700 695 else if ((ObjDesc->BufferField.BufferObj)->Common.Type !=
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
701 696 ACPI_TYPE_BUFFER)
702 697 {
703 698 AcpiOsPrintf ("*not a Buffer*\n");
704 699 }
705 700 else
706 701 {
707 702 AcpiExDumpOperand (ObjDesc->BufferField.BufferObj, Depth+1);
708 703 }
709 704 break;
710 705
711 -
712 706 case ACPI_TYPE_EVENT:
713 707
714 708 AcpiOsPrintf ("Event\n");
715 709 break;
716 710
717 -
718 711 case ACPI_TYPE_METHOD:
719 712
720 713 AcpiOsPrintf ("Method(%X) @ %p:%X\n",
721 714 ObjDesc->Method.ParamCount,
722 715 ObjDesc->Method.AmlStart,
723 716 ObjDesc->Method.AmlLength);
724 717 break;
725 718
726 -
727 719 case ACPI_TYPE_MUTEX:
728 720
729 721 AcpiOsPrintf ("Mutex\n");
730 722 break;
731 723
732 -
733 724 case ACPI_TYPE_DEVICE:
734 725
735 726 AcpiOsPrintf ("Device\n");
736 727 break;
737 728
738 -
739 729 case ACPI_TYPE_POWER:
740 730
741 731 AcpiOsPrintf ("Power\n");
742 732 break;
743 733
744 -
745 734 case ACPI_TYPE_PROCESSOR:
746 735
747 736 AcpiOsPrintf ("Processor\n");
748 737 break;
749 738
750 -
751 739 case ACPI_TYPE_THERMAL:
752 740
753 741 AcpiOsPrintf ("Thermal\n");
754 742 break;
755 743
756 -
757 744 default:
745 +
758 746 /* Unknown Type */
759 747
760 748 AcpiOsPrintf ("Unknown Type %X\n", ObjDesc->Common.Type);
761 749 break;
762 750 }
763 751
764 752 return;
765 753 }
766 754
767 755
768 756 /*******************************************************************************
769 757 *
770 758 * FUNCTION: AcpiExDumpOperands
771 759 *
772 760 * PARAMETERS: Operands - A list of Operand objects
773 761 * OpcodeName - AML opcode name
774 762 * NumOperands - Operand count for this opcode
775 763 *
776 764 * DESCRIPTION: Dump the operands associated with the opcode
777 765 *
778 766 ******************************************************************************/
779 767
780 768 void
781 769 AcpiExDumpOperands (
782 770 ACPI_OPERAND_OBJECT **Operands,
783 771 const char *OpcodeName,
784 772 UINT32 NumOperands)
785 773 {
786 774 ACPI_FUNCTION_NAME (ExDumpOperands);
787 775
788 776
789 777 if (!OpcodeName)
790 778 {
791 779 OpcodeName = "UNKNOWN";
792 780 }
793 781
794 782 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
795 783 "**** Start operand dump for opcode [%s], %u operands\n",
796 784 OpcodeName, NumOperands));
797 785
798 786 if (NumOperands == 0)
799 787 {
800 788 NumOperands = 1;
801 789 }
802 790
803 791 /* Dump the individual operands */
804 792
805 793 while (NumOperands)
806 794 {
807 795 AcpiExDumpOperand (*Operands, 0);
808 796 Operands++;
809 797 NumOperands--;
810 798 }
811 799
812 800 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
813 801 "**** End operand dump for [%s]\n", OpcodeName));
814 802 return;
↓ open down ↓ |
47 lines elided |
↑ open up ↑ |
815 803 }
816 804
817 805
818 806 /*******************************************************************************
819 807 *
820 808 * FUNCTION: AcpiExOut* functions
821 809 *
822 810 * PARAMETERS: Title - Descriptive text
823 811 * Value - Value to be displayed
824 812 *
825 - * DESCRIPTION: Object dump output formatting functions. These functions
813 + * DESCRIPTION: Object dump output formatting functions. These functions
826 814 * reduce the number of format strings required and keeps them
827 815 * all in one place for easy modification.
828 816 *
829 817 ******************************************************************************/
830 818
831 819 static void
832 820 AcpiExOutString (
833 821 char *Title,
834 822 char *Value)
835 823 {
836 824 AcpiOsPrintf ("%20s : %s\n", Title, Value);
837 825 }
838 826
839 827 static void
840 828 AcpiExOutPointer (
841 829 char *Title,
842 830 void *Value)
843 831 {
844 832 AcpiOsPrintf ("%20s : %p\n", Title, Value);
845 833 }
846 834
847 835
848 836 /*******************************************************************************
849 837 *
850 838 * FUNCTION: AcpiExDumpNamespaceNode
851 839 *
852 840 * PARAMETERS: Node - Descriptor to dump
853 841 * Flags - Force display if TRUE
854 842 *
855 843 * DESCRIPTION: Dumps the members of the given.Node
856 844 *
857 845 ******************************************************************************/
858 846
859 847 void
↓ open down ↓ |
24 lines elided |
↑ open up ↑ |
860 848 AcpiExDumpNamespaceNode (
861 849 ACPI_NAMESPACE_NODE *Node,
862 850 UINT32 Flags)
863 851 {
864 852
865 853 ACPI_FUNCTION_ENTRY ();
866 854
867 855
868 856 if (!Flags)
869 857 {
870 - if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
858 + /* Check if debug output enabled */
859 +
860 + if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_OBJECTS, _COMPONENT))
871 861 {
872 862 return;
873 863 }
874 864 }
875 865
876 866 AcpiOsPrintf ("%20s : %4.4s\n", "Name", AcpiUtGetNodeName (Node));
877 867 AcpiExOutString ("Type", AcpiUtGetTypeName (Node->Type));
878 868 AcpiExOutPointer ("Attached Object", AcpiNsGetAttachedObject (Node));
879 869 AcpiExOutPointer ("Parent", Node->Parent);
880 870
881 871 AcpiExDumpObject (ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Node),
882 872 AcpiExDumpNode);
883 873 }
884 874
885 875
886 876 /*******************************************************************************
887 877 *
888 878 * FUNCTION: AcpiExDumpReferenceObj
889 879 *
890 880 * PARAMETERS: Object - Descriptor to dump
891 881 *
892 882 * DESCRIPTION: Dumps a reference object
893 883 *
894 884 ******************************************************************************/
895 885
896 886 static void
897 887 AcpiExDumpReferenceObj (
898 888 ACPI_OPERAND_OBJECT *ObjDesc)
899 889 {
900 890 ACPI_BUFFER RetBuf;
901 891 ACPI_STATUS Status;
902 892
903 893
904 894 RetBuf.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
905 895
906 896 if (ObjDesc->Reference.Class == ACPI_REFCLASS_NAME)
907 897 {
908 898 AcpiOsPrintf (" %p ", ObjDesc->Reference.Node);
909 899
910 900 Status = AcpiNsHandleToPathname (ObjDesc->Reference.Node, &RetBuf);
911 901 if (ACPI_FAILURE (Status))
912 902 {
913 903 AcpiOsPrintf (" Could not convert name to pathname\n");
914 904 }
915 905 else
916 906 {
917 907 AcpiOsPrintf ("%s\n", (char *) RetBuf.Pointer);
918 908 ACPI_FREE (RetBuf.Pointer);
919 909 }
920 910 }
921 911 else if (ObjDesc->Reference.Object)
922 912 {
923 913 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_OPERAND)
924 914 {
925 915 AcpiOsPrintf (" Target: %p", ObjDesc->Reference.Object);
926 916 if (ObjDesc->Reference.Class == ACPI_REFCLASS_TABLE)
927 917 {
928 918 AcpiOsPrintf (" Table Index: %X\n", ObjDesc->Reference.Value);
929 919 }
930 920 else
931 921 {
932 922 AcpiOsPrintf (" Target: %p [%s]\n", ObjDesc->Reference.Object,
933 923 AcpiUtGetTypeName (((ACPI_OPERAND_OBJECT *)
934 924 ObjDesc->Reference.Object)->Common.Type));
935 925 }
936 926 }
937 927 else
938 928 {
939 929 AcpiOsPrintf (" Target: %p\n", ObjDesc->Reference.Object);
940 930 }
941 931 }
942 932 }
943 933
944 934
945 935 /*******************************************************************************
946 936 *
947 937 * FUNCTION: AcpiExDumpPackageObj
948 938 *
949 939 * PARAMETERS: ObjDesc - Descriptor to dump
950 940 * Level - Indentation Level
951 941 * Index - Package index for this object
952 942 *
953 943 * DESCRIPTION: Dumps the elements of the package
954 944 *
955 945 ******************************************************************************/
956 946
957 947 static void
958 948 AcpiExDumpPackageObj (
959 949 ACPI_OPERAND_OBJECT *ObjDesc,
960 950 UINT32 Level,
961 951 UINT32 Index)
962 952 {
963 953 UINT32 i;
964 954
965 955
966 956 /* Indentation and index output */
967 957
968 958 if (Level > 0)
969 959 {
970 960 for (i = 0; i < Level; i++)
971 961 {
972 962 AcpiOsPrintf (" ");
973 963 }
974 964
975 965 AcpiOsPrintf ("[%.2d] ", Index);
976 966 }
977 967
978 968 AcpiOsPrintf ("%p ", ObjDesc);
979 969
980 970 /* Null package elements are allowed */
981 971
982 972 if (!ObjDesc)
983 973 {
984 974 AcpiOsPrintf ("[Null Object]\n");
985 975 return;
986 976 }
987 977
↓ open down ↓ |
107 lines elided |
↑ open up ↑ |
988 978 /* Packages may only contain a few object types */
989 979
990 980 switch (ObjDesc->Common.Type)
991 981 {
992 982 case ACPI_TYPE_INTEGER:
993 983
994 984 AcpiOsPrintf ("[Integer] = %8.8X%8.8X\n",
995 985 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
996 986 break;
997 987
998 -
999 988 case ACPI_TYPE_STRING:
1000 989
1001 990 AcpiOsPrintf ("[String] Value: ");
1002 - for (i = 0; i < ObjDesc->String.Length; i++)
1003 - {
1004 - AcpiOsPrintf ("%c", ObjDesc->String.Pointer[i]);
1005 - }
991 + AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
1006 992 AcpiOsPrintf ("\n");
1007 993 break;
1008 994
1009 -
1010 995 case ACPI_TYPE_BUFFER:
1011 996
1012 997 AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
1013 998 if (ObjDesc->Buffer.Length)
1014 999 {
1015 - AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
1000 + AcpiUtDebugDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
1016 1001 ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
1017 1002 }
1018 1003 else
1019 1004 {
1020 1005 AcpiOsPrintf ("\n");
1021 1006 }
1022 1007 break;
1023 1008
1024 -
1025 1009 case ACPI_TYPE_PACKAGE:
1026 1010
1027 1011 AcpiOsPrintf ("[Package] Contains %u Elements:\n",
1028 1012 ObjDesc->Package.Count);
1029 1013
1030 1014 for (i = 0; i < ObjDesc->Package.Count; i++)
1031 1015 {
1032 1016 AcpiExDumpPackageObj (ObjDesc->Package.Elements[i], Level+1, i);
1033 1017 }
1034 1018 break;
1035 1019
1036 -
1037 1020 case ACPI_TYPE_LOCAL_REFERENCE:
1038 1021
1039 1022 AcpiOsPrintf ("[Object Reference] Type [%s] %2.2X",
1040 1023 AcpiUtGetReferenceName (ObjDesc),
1041 1024 ObjDesc->Reference.Class);
1042 1025 AcpiExDumpReferenceObj (ObjDesc);
1043 1026 break;
1044 1027
1045 -
1046 1028 default:
1047 1029
1048 1030 AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Common.Type);
1049 1031 break;
1050 1032 }
1051 1033 }
1052 1034
1053 1035
1054 1036 /*******************************************************************************
1055 1037 *
1056 1038 * FUNCTION: AcpiExDumpObjectDescriptor
1057 1039 *
1058 1040 * PARAMETERS: ObjDesc - Descriptor to dump
1059 1041 * Flags - Force display if TRUE
1060 1042 *
1061 1043 * DESCRIPTION: Dumps the members of the object descriptor given.
1062 1044 *
1063 1045 ******************************************************************************/
1064 1046
1065 1047 void
1066 1048 AcpiExDumpObjectDescriptor (
1067 1049 ACPI_OPERAND_OBJECT *ObjDesc,
1068 1050 UINT32 Flags)
1069 1051 {
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
1070 1052 ACPI_FUNCTION_TRACE (ExDumpObjectDescriptor);
1071 1053
1072 1054
1073 1055 if (!ObjDesc)
1074 1056 {
1075 1057 return_VOID;
1076 1058 }
1077 1059
1078 1060 if (!Flags)
1079 1061 {
1080 - if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
1062 + /* Check if debug output enabled */
1063 +
1064 + if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_OBJECTS, _COMPONENT))
1081 1065 {
1082 1066 return_VOID;
1083 1067 }
1084 1068 }
1085 1069
1086 1070 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED)
1087 1071 {
1088 1072 AcpiExDumpNamespaceNode ((ACPI_NAMESPACE_NODE *) ObjDesc, Flags);
1089 1073
1090 1074 AcpiOsPrintf ("\nAttached Object (%p):\n",
1091 1075 ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object);
1092 1076
1093 1077 AcpiExDumpObjectDescriptor (
1094 1078 ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object, Flags);
1095 1079 return_VOID;
1096 1080 }
1097 1081
1098 1082 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
1099 1083 {
1100 1084 AcpiOsPrintf (
1101 1085 "ExDumpObjectDescriptor: %p is not an ACPI operand object: [%s]\n",
1102 1086 ObjDesc, AcpiUtGetDescriptorName (ObjDesc));
1103 1087 return_VOID;
1104 1088 }
1105 1089
1106 1090 if (ObjDesc->Common.Type > ACPI_TYPE_NS_NODE_MAX)
1107 1091 {
1108 1092 return_VOID;
1109 1093 }
1110 1094
1111 1095 /* Common Fields */
↓ open down ↓ |
21 lines elided |
↑ open up ↑ |
1112 1096
1113 1097 AcpiExDumpObject (ObjDesc, AcpiExDumpCommon);
1114 1098
1115 1099 /* Object-specific fields */
1116 1100
1117 1101 AcpiExDumpObject (ObjDesc, AcpiExDumpInfo[ObjDesc->Common.Type]);
1118 1102 return_VOID;
1119 1103 }
1120 1104
1121 1105 #endif
1122 -
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX