acobject.h (26f3cdf0) acobject.h (7b1019a6)
1
2/******************************************************************************
3 *
4 * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
5 *
6 *****************************************************************************/
7
8/*
1/******************************************************************************
2 *
3 * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
4 *
5 *****************************************************************************/
6
7/*
9 * Copyright (C) 2000 - 2011, Intel Corp.
8 * Copyright (C) 2000 - 2016, Intel Corp.
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.

--- 71 unchanged lines hidden (view full) ---

89 * Note: There are 3 bytes available here before the
90 * next natural alignment boundary (for both 32/64 cases)
91 */
92
93/* Values for Flag byte above */
94
95#define AOPOBJ_AML_CONSTANT 0x01 /* Integer is an AML constant */
96#define AOPOBJ_STATIC_POINTER 0x02 /* Data is part of an ACPI table, don't delete */
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.

--- 71 unchanged lines hidden (view full) ---

88 * Note: There are 3 bytes available here before the
89 * next natural alignment boundary (for both 32/64 cases)
90 */
91
92/* Values for Flag byte above */
93
94#define AOPOBJ_AML_CONSTANT 0x01 /* Integer is an AML constant */
95#define AOPOBJ_STATIC_POINTER 0x02 /* Data is part of an ACPI table, don't delete */
97#define AOPOBJ_DATA_VALID 0x04 /* Object is intialized and data is valid */
98#define AOPOBJ_OBJECT_INITIALIZED 0x08 /* Region is initialized, _REG was run */
99#define AOPOBJ_SETUP_COMPLETE 0x10 /* Region setup is complete */
100#define AOPOBJ_INVALID 0x20 /* Host OS won't allow a Region address */
96#define AOPOBJ_DATA_VALID 0x04 /* Object is initialized and data is valid */
97#define AOPOBJ_OBJECT_INITIALIZED 0x08 /* Region is initialized */
98#define AOPOBJ_REG_CONNECTED 0x10 /* _REG was run */
99#define AOPOBJ_SETUP_COMPLETE 0x20 /* Region setup is complete */
100#define AOPOBJ_INVALID 0x40 /* Host OS won't allow a Region address */
101
102
103/******************************************************************************
104 *
105 * Basic data types
106 *
107 *****************************************************************************/
108

--- 9 unchanged lines hidden (view full) ---

118 ACPI_OBJECT_COMMON_HEADER
119 UINT8 Fill[3]; /* Prevent warning on some compilers */
120 UINT64 Value;
121
122} ACPI_OBJECT_INTEGER;
123
124
125/*
101
102
103/******************************************************************************
104 *
105 * Basic data types
106 *
107 *****************************************************************************/
108

--- 9 unchanged lines hidden (view full) ---

118 ACPI_OBJECT_COMMON_HEADER
119 UINT8 Fill[3]; /* Prevent warning on some compilers */
120 UINT64 Value;
121
122} ACPI_OBJECT_INTEGER;
123
124
125/*
126 * Note: The String and Buffer object must be identical through the Pointer
127 * and length elements. There is code that depends on this.
126 * Note: The String and Buffer object must be identical through the
127 * pointer and length elements. There is code that depends on this.
128 *
129 * Fields common to both Strings and Buffers
130 */
131#define ACPI_COMMON_BUFFER_INFO(_Type) \
132 _Type *Pointer; \
133 UINT32 Length;
134
135

--- 73 unchanged lines hidden (view full) ---

209
210typedef struct acpi_object_method
211{
212 ACPI_OBJECT_COMMON_HEADER
213 UINT8 InfoFlags;
214 UINT8 ParamCount;
215 UINT8 SyncLevel;
216 union acpi_operand_object *Mutex;
128 *
129 * Fields common to both Strings and Buffers
130 */
131#define ACPI_COMMON_BUFFER_INFO(_Type) \
132 _Type *Pointer; \
133 UINT32 Length;
134
135

--- 73 unchanged lines hidden (view full) ---

209
210typedef struct acpi_object_method
211{
212 ACPI_OBJECT_COMMON_HEADER
213 UINT8 InfoFlags;
214 UINT8 ParamCount;
215 UINT8 SyncLevel;
216 union acpi_operand_object *Mutex;
217 union acpi_operand_object *Node;
217 UINT8 *AmlStart;
218 union
219 {
220 ACPI_INTERNAL_METHOD Implementation;
221 union acpi_operand_object *Handler;
222 } Dispatch;
223
224 UINT32 AmlLength;
225 UINT8 ThreadCount;
226 ACPI_OWNER_ID OwnerId;
227
228} ACPI_OBJECT_METHOD;
229
230/* Flags for InfoFlags field above */
231
232#define ACPI_METHOD_MODULE_LEVEL 0x01 /* Method is actually module-level code */
233#define ACPI_METHOD_INTERNAL_ONLY 0x02 /* Method is implemented internally (_OSI) */
234#define ACPI_METHOD_SERIALIZED 0x04 /* Method is serialized */
235#define ACPI_METHOD_SERIALIZED_PENDING 0x08 /* Method is to be marked serialized */
218 UINT8 *AmlStart;
219 union
220 {
221 ACPI_INTERNAL_METHOD Implementation;
222 union acpi_operand_object *Handler;
223 } Dispatch;
224
225 UINT32 AmlLength;
226 UINT8 ThreadCount;
227 ACPI_OWNER_ID OwnerId;
228
229} ACPI_OBJECT_METHOD;
230
231/* Flags for InfoFlags field above */
232
233#define ACPI_METHOD_MODULE_LEVEL 0x01 /* Method is actually module-level code */
234#define ACPI_METHOD_INTERNAL_ONLY 0x02 /* Method is implemented internally (_OSI) */
235#define ACPI_METHOD_SERIALIZED 0x04 /* Method is serialized */
236#define ACPI_METHOD_SERIALIZED_PENDING 0x08 /* Method is to be marked serialized */
236#define ACPI_METHOD_MODIFIED_NAMESPACE 0x10 /* Method modified the namespace */
237#define ACPI_METHOD_IGNORE_SYNC_LEVEL 0x10 /* Method was auto-serialized at table load time */
238#define ACPI_METHOD_MODIFIED_NAMESPACE 0x20 /* Method modified the namespace */
237
238
239/******************************************************************************
240 *
239
240
241/******************************************************************************
242 *
241 * Objects that can be notified. All share a common NotifyInfo area.
243 * Objects that can be notified. All share a common NotifyInfo area.
242 *
243 *****************************************************************************/
244
245/*
246 * Common fields for objects that support ASL notifications
247 */
248#define ACPI_COMMON_NOTIFY_INFO \
244 *
245 *****************************************************************************/
246
247/*
248 * Common fields for objects that support ASL notifications
249 */
250#define ACPI_COMMON_NOTIFY_INFO \
249 union acpi_operand_object *SystemNotify; /* Handler for system notifies */\
250 union acpi_operand_object *DeviceNotify; /* Handler for driver notifies */\
251 union acpi_operand_object *NotifyList[2]; /* Handlers for system/device notifies */\
251 union acpi_operand_object *Handler; /* Handler for Address space */
252
253
254typedef struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
255{
256 ACPI_OBJECT_COMMON_HEADER
257 ACPI_COMMON_NOTIFY_INFO
258

--- 38 unchanged lines hidden (view full) ---

297 ACPI_OBJECT_COMMON_HEADER
298 ACPI_COMMON_NOTIFY_INFO
299
300} ACPI_OBJECT_THERMAL_ZONE;
301
302
303/******************************************************************************
304 *
252 union acpi_operand_object *Handler; /* Handler for Address space */
253
254
255typedef struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
256{
257 ACPI_OBJECT_COMMON_HEADER
258 ACPI_COMMON_NOTIFY_INFO
259

--- 38 unchanged lines hidden (view full) ---

298 ACPI_OBJECT_COMMON_HEADER
299 ACPI_COMMON_NOTIFY_INFO
300
301} ACPI_OBJECT_THERMAL_ZONE;
302
303
304/******************************************************************************
305 *
305 * Fields. All share a common header/info field.
306 * Fields. All share a common header/info field.
306 *
307 *****************************************************************************/
308
309/*
310 * Common bitfield for the field objects
311 * "Field Datum" -- a datum from the actual field object
312 * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
313 */
314#define ACPI_COMMON_FIELD_INFO \
315 UINT8 FieldFlags; /* Access, update, and lock bits */\
316 UINT8 Attribute; /* From AccessAs keyword */\
317 UINT8 AccessByteWidth; /* Read/Write size in bytes */\
318 ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */\
319 UINT32 BitLength; /* Length of field in bits */\
320 UINT32 BaseByteOffset; /* Byte offset within containing object */\
321 UINT32 Value; /* Value to store into the Bank or Index register */\
322 UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
307 *
308 *****************************************************************************/
309
310/*
311 * Common bitfield for the field objects
312 * "Field Datum" -- a datum from the actual field object
313 * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
314 */
315#define ACPI_COMMON_FIELD_INFO \
316 UINT8 FieldFlags; /* Access, update, and lock bits */\
317 UINT8 Attribute; /* From AccessAs keyword */\
318 UINT8 AccessByteWidth; /* Read/Write size in bytes */\
319 ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */\
320 UINT32 BitLength; /* Length of field in bits */\
321 UINT32 BaseByteOffset; /* Byte offset within containing object */\
322 UINT32 Value; /* Value to store into the Bank or Index register */\
323 UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
324 UINT8 AccessLength; /* For serial regions/fields */
323
324
325typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
326{
327 ACPI_OBJECT_COMMON_HEADER
328 ACPI_COMMON_FIELD_INFO
329 union acpi_operand_object *RegionObj; /* Parent Operation Region object (REGION/BANK fields only) */
330
331} ACPI_OBJECT_FIELD_COMMON;
332
333
334typedef struct acpi_object_region_field
335{
336 ACPI_OBJECT_COMMON_HEADER
337 ACPI_COMMON_FIELD_INFO
325
326
327typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
328{
329 ACPI_OBJECT_COMMON_HEADER
330 ACPI_COMMON_FIELD_INFO
331 union acpi_operand_object *RegionObj; /* Parent Operation Region object (REGION/BANK fields only) */
332
333} ACPI_OBJECT_FIELD_COMMON;
334
335
336typedef struct acpi_object_region_field
337{
338 ACPI_OBJECT_COMMON_HEADER
339 ACPI_COMMON_FIELD_INFO
340 UINT16 ResourceLength;
338 union acpi_operand_object *RegionObj; /* Containing OpRegion object */
341 union acpi_operand_object *RegionObj; /* Containing OpRegion object */
342 UINT8 *ResourceBuffer; /* ResourceTemplate for serial regions/fields */
343 UINT16 PinNumberIndex; /* Index relative to previous Connection/Template */
339
340} ACPI_OBJECT_REGION_FIELD;
341
342
343typedef struct acpi_object_bank_field
344{
345 ACPI_OBJECT_COMMON_HEADER
346 ACPI_COMMON_FIELD_INFO

--- 34 unchanged lines hidden (view full) ---

381 * Objects for handlers
382 *
383 *****************************************************************************/
384
385typedef struct acpi_object_notify_handler
386{
387 ACPI_OBJECT_COMMON_HEADER
388 ACPI_NAMESPACE_NODE *Node; /* Parent device */
344
345} ACPI_OBJECT_REGION_FIELD;
346
347
348typedef struct acpi_object_bank_field
349{
350 ACPI_OBJECT_COMMON_HEADER
351 ACPI_COMMON_FIELD_INFO

--- 34 unchanged lines hidden (view full) ---

386 * Objects for handlers
387 *
388 *****************************************************************************/
389
390typedef struct acpi_object_notify_handler
391{
392 ACPI_OBJECT_COMMON_HEADER
393 ACPI_NAMESPACE_NODE *Node; /* Parent device */
389 ACPI_NOTIFY_HANDLER Handler;
394 UINT32 HandlerType; /* Type: Device/System/Both */
395 ACPI_NOTIFY_HANDLER Handler; /* Handler address */
390 void *Context;
396 void *Context;
397 union acpi_operand_object *Next[2]; /* Device and System handler lists */
391
392} ACPI_OBJECT_NOTIFY_HANDLER;
393
394
395typedef struct acpi_object_addr_handler
396{
397 ACPI_OBJECT_COMMON_HEADER
398 UINT8 SpaceId;
399 UINT8 HandlerFlags;
400 ACPI_ADR_SPACE_HANDLER Handler;
401 ACPI_NAMESPACE_NODE *Node; /* Parent device */
402 void *Context;
403 ACPI_ADR_SPACE_SETUP Setup;
398
399} ACPI_OBJECT_NOTIFY_HANDLER;
400
401
402typedef struct acpi_object_addr_handler
403{
404 ACPI_OBJECT_COMMON_HEADER
405 UINT8 SpaceId;
406 UINT8 HandlerFlags;
407 ACPI_ADR_SPACE_HANDLER Handler;
408 ACPI_NAMESPACE_NODE *Node; /* Parent device */
409 void *Context;
410 ACPI_ADR_SPACE_SETUP Setup;
404 union acpi_operand_object *RegionList; /* regions using this handler */
411 union acpi_operand_object *RegionList; /* Regions using this handler */
405 union acpi_operand_object *Next;
406
407} ACPI_OBJECT_ADDR_HANDLER;
408
409/* Flags for address handler (HandlerFlags) */
410
411#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01
412

--- 7 unchanged lines hidden (view full) ---

420/*
421 * The Reference object is used for these opcodes:
422 * Arg[0-6], Local[0-7], IndexOp, NameOp, RefOfOp, LoadOp, LoadTableOp, DebugOp
423 * The Reference.Class differentiates these types.
424 */
425typedef struct acpi_object_reference
426{
427 ACPI_OBJECT_COMMON_HEADER
412 union acpi_operand_object *Next;
413
414} ACPI_OBJECT_ADDR_HANDLER;
415
416/* Flags for address handler (HandlerFlags) */
417
418#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01
419

--- 7 unchanged lines hidden (view full) ---

427/*
428 * The Reference object is used for these opcodes:
429 * Arg[0-6], Local[0-7], IndexOp, NameOp, RefOfOp, LoadOp, LoadTableOp, DebugOp
430 * The Reference.Class differentiates these types.
431 */
432typedef struct acpi_object_reference
433{
434 ACPI_OBJECT_COMMON_HEADER
428 UINT8 Class; /* Reference Class */
429 UINT8 TargetType; /* Used for Index Op */
430 UINT8 Reserved;
431 void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */
432 ACPI_NAMESPACE_NODE *Node; /* RefOf or Namepath */
433 union acpi_operand_object **Where; /* Target of Index */
434 UINT32 Value; /* Used for Local/Arg/Index/DdbHandle */
435 UINT8 Class; /* Reference Class */
436 UINT8 TargetType; /* Used for Index Op */
437 UINT8 Reserved;
438 void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */
439 ACPI_NAMESPACE_NODE *Node; /* RefOf or Namepath */
440 union acpi_operand_object **Where; /* Target of Index */
441 UINT8 *IndexPointer; /* Used for Buffers and Strings */
442 UINT32 Value; /* Used for Local/Arg/Index/DdbHandle */
435
436} ACPI_OBJECT_REFERENCE;
437
438/* Values for Reference.Class above */
439
440typedef enum
441{
442 ACPI_REFCLASS_LOCAL = 0, /* Method local */

--- 15 unchanged lines hidden (view full) ---

458 * evaluated at run time.
459 *
460 * Currently: Region and FieldUnit types
461 */
462typedef struct acpi_object_extra
463{
464 ACPI_OBJECT_COMMON_HEADER
465 ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */
443
444} ACPI_OBJECT_REFERENCE;
445
446/* Values for Reference.Class above */
447
448typedef enum
449{
450 ACPI_REFCLASS_LOCAL = 0, /* Method local */

--- 15 unchanged lines hidden (view full) ---

466 * evaluated at run time.
467 *
468 * Currently: Region and FieldUnit types
469 */
470typedef struct acpi_object_extra
471{
472 ACPI_OBJECT_COMMON_HEADER
473 ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */
474 ACPI_NAMESPACE_NODE *ScopeNode;
466 void *RegionContext; /* Region-specific data */
467 UINT8 *AmlStart;
468 UINT32 AmlLength;
469
470} ACPI_OBJECT_EXTRA;
471
472
473/* Additional data that can be attached to namespace nodes */

--- 109 unchanged lines hidden ---
475 void *RegionContext; /* Region-specific data */
476 UINT8 *AmlStart;
477 UINT32 AmlLength;
478
479} ACPI_OBJECT_EXTRA;
480
481
482/* Additional data that can be attached to namespace nodes */

--- 109 unchanged lines hidden ---