aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acconfig.h14
-rw-r--r--include/acpi/acglobal.h1
-rw-r--r--include/acpi/aclocal.h4
-rw-r--r--include/acpi/acmacros.h27
-rw-r--r--include/acpi/acpixf.h8
-rw-r--r--include/acpi/acresrc.h7
-rw-r--r--include/acpi/actypes.h23
-rw-r--r--include/acpi/platform/aclinux.h4
8 files changed, 66 insertions, 22 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index d371ec6b9812..08eafece3eed 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -63,7 +63,7 @@
63 63
64/* Current ACPICA subsystem version in YYYYMMDD format */ 64/* Current ACPICA subsystem version in YYYYMMDD format */
65 65
66#define ACPI_CA_VERSION 0x20051102 66#define ACPI_CA_VERSION 0x20051117
67 67
68/* 68/*
69 * OS name, used for the _OS object. The _OS object is essentially obsolete, 69 * OS name, used for the _OS object. The _OS object is essentially obsolete,
@@ -98,11 +98,6 @@
98 98
99#define ACPI_CA_SUPPORT_LEVEL 3 99#define ACPI_CA_SUPPORT_LEVEL 3
100 100
101/* String size constants */
102
103#define ACPI_MAX_STRING_LENGTH 512
104#define ACPI_PATHNAME_MAX 256 /* A full namespace pathname */
105
106/* Maximum count for a semaphore object */ 101/* Maximum count for a semaphore object */
107 102
108#define ACPI_MAX_SEMAPHORE_COUNT 256 103#define ACPI_MAX_SEMAPHORE_COUNT 256
@@ -134,14 +129,11 @@
134#define ACPI_METHOD_NUM_ARGS 7 129#define ACPI_METHOD_NUM_ARGS 7
135#define ACPI_METHOD_MAX_ARG 6 130#define ACPI_METHOD_MAX_ARG 6
136 131
137/* Maximum length of resulting string when converting from a buffer */ 132/* Length of _HID, _UID, _CID, and UUID values */
138
139#define ACPI_MAX_STRING_CONVERSION 200
140
141/* Length of _HID, _UID, and _CID values */
142 133
143#define ACPI_DEVICE_ID_LENGTH 0x09 134#define ACPI_DEVICE_ID_LENGTH 0x09
144#define ACPI_MAX_CID_LENGTH 48 135#define ACPI_MAX_CID_LENGTH 48
136#define ACPI_UUID_LENGTH 16
145 137
146/* 138/*
147 * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG 139 * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h
index cef51b1ddf94..bd344e51313b 100644
--- a/include/acpi/acglobal.h
+++ b/include/acpi/acglobal.h
@@ -223,6 +223,7 @@ ACPI_EXTERN u32 acpi_gbl_ps_find_count;
223ACPI_EXTERN u32 acpi_gbl_owner_id_mask; 223ACPI_EXTERN u32 acpi_gbl_owner_id_mask;
224ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; 224ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
225ACPI_EXTERN u16 acpi_gbl_global_lock_handle; 225ACPI_EXTERN u16 acpi_gbl_global_lock_handle;
226ACPI_EXTERN u8 acpi_gbl_last_owner_id;
226ACPI_EXTERN u8 acpi_gbl_debugger_configuration; 227ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
227ACPI_EXTERN u8 acpi_gbl_global_lock_acquired; 228ACPI_EXTERN u8 acpi_gbl_global_lock_acquired;
228ACPI_EXTERN u8 acpi_gbl_step_to_next_call; 229ACPI_EXTERN u8 acpi_gbl_step_to_next_call;
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h
index dca0d40ea395..0cb61a72d971 100644
--- a/include/acpi/aclocal.h
+++ b/include/acpi/aclocal.h
@@ -573,6 +573,8 @@ struct acpi_parse_obj_named {
573 573
574/* The parse node is the fundamental element of the parse tree */ 574/* The parse node is the fundamental element of the parse tree */
575 575
576#define ACPI_MAX_PARSEOP_NAME 20
577
576struct acpi_parse_obj_asl { 578struct acpi_parse_obj_asl {
577 ACPI_PARSE_COMMON union acpi_parse_object *child; 579 ACPI_PARSE_COMMON union acpi_parse_object *child;
578 union acpi_parse_object *parent_method; 580 union acpi_parse_object *parent_method;
@@ -597,7 +599,7 @@ struct acpi_parse_obj_asl {
597 u8 aml_opcode_length; 599 u8 aml_opcode_length;
598 u8 aml_pkg_len_bytes; 600 u8 aml_pkg_len_bytes;
599 u8 extra; 601 u8 extra;
600 char parse_op_name[12]; 602 char parse_op_name[ACPI_MAX_PARSEOP_NAME];
601}; 603};
602 604
603union acpi_parse_object { 605union acpi_parse_object {
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index e42222c3d34c..5b78ff4091b9 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -107,23 +107,29 @@
107 * Extract a byte of data using a pointer. Any more than a byte and we 107 * Extract a byte of data using a pointer. Any more than a byte and we
108 * get into potential aligment issues -- see the STORE macros below 108 * get into potential aligment issues -- see the STORE macros below
109 */ 109 */
110#define ACPI_GET8(addr) (*(u8*)(addr)) 110#define ACPI_GET8(ptr) *ACPI_CAST_PTR (u8, ptr)
111#define ACPI_GET16(ptr) *ACPI_CAST_PTR (u16, ptr)
112#define ACPI_GET32(ptr) *ACPI_CAST_PTR (u32, ptr)
113#define ACPI_GET64(ptr) *ACPI_CAST_PTR (u64, ptr)
114#define ACPI_SET8(ptr) *ACPI_CAST_PTR (u8, ptr)
115#define ACPI_SET16(ptr) *ACPI_CAST_PTR (u16, ptr)
116#define ACPI_SET32(ptr) *ACPI_CAST_PTR (u32, ptr)
117#define ACPI_SET64(ptr) *ACPI_CAST_PTR (u64, ptr)
111 118
112/* Pointer arithmetic */ 119/* Pointer manipulation */
113 120
114#define ACPI_PTR_ADD(t,a,b) (t *) (void *)((char *)(a) + (acpi_native_uint)(b)) 121#define ACPI_CAST_PTR(t, p) ((t *)(void *)(p))
122#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **)(void *)(p))
123#define ACPI_ADD_PTR(t,a,b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8, (a)) + (acpi_native_uint)(b)))
115#define ACPI_PTR_DIFF(a,b) (acpi_native_uint) ((char *)(a) - (char *)(b)) 124#define ACPI_PTR_DIFF(a,b) (acpi_native_uint) ((char *)(a) - (char *)(b))
116 125
117/* Pointer/Integer type conversions */ 126/* Pointer/Integer type conversions */
118 127
119#define ACPI_TO_POINTER(i) ACPI_PTR_ADD (void, (void *) NULL,(acpi_native_uint)i) 128#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) NULL,(acpi_native_uint)i)
120#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) 129#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL)
121#define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) 130#define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)
122#define ACPI_FADT_OFFSET(f) ACPI_OFFSET (FADT_DESCRIPTOR, f) 131#define ACPI_FADT_OFFSET(f) ACPI_OFFSET (FADT_DESCRIPTOR, f)
123 132
124#define ACPI_CAST_PTR(t, p) ((t *)(void *)(p))
125#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **)(void *)(p))
126
127#if ACPI_MACHINE_WIDTH == 16 133#if ACPI_MACHINE_WIDTH == 16
128#define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s) 134#define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s)
129#define ACPI_PHYSADDR_TO_PTR(i) (void *)(i) 135#define ACPI_PHYSADDR_TO_PTR(i) (void *)(i)
@@ -365,6 +371,13 @@
365#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) 371#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask)
366#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) 372#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask)
367 373
374/* Generate a UUID */
375
376#define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \
377 (b) & 0xFF, ((b) >> 8) & 0xFF, \
378 (c) & 0xFF, ((c) >> 8) & 0xFF, \
379 (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)
380
368/* 381/*
369 * An struct acpi_namespace_node * can appear in some contexts, 382 * An struct acpi_namespace_node * can appear in some contexts,
370 * where a pointer to an union acpi_operand_object can also 383 * where a pointer to an union acpi_operand_object can also
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 02f00a8fee03..2a88429bc4ec 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -272,6 +272,12 @@ acpi_status(*ACPI_WALK_RESOURCE_CALLBACK) (struct acpi_resource * resource,
272 void *context); 272 void *context);
273 273
274acpi_status 274acpi_status
275acpi_get_vendor_resource(acpi_handle device_handle,
276 char *name,
277 struct acpi_vendor_uuid *uuid,
278 struct acpi_buffer *ret_buffer);
279
280acpi_status
275acpi_get_current_resources(acpi_handle device_handle, 281acpi_get_current_resources(acpi_handle device_handle,
276 struct acpi_buffer *ret_buffer); 282 struct acpi_buffer *ret_buffer);
277 283
@@ -283,7 +289,7 @@ acpi_get_possible_resources(acpi_handle device_handle,
283 289
284acpi_status 290acpi_status
285acpi_walk_resources(acpi_handle device_handle, 291acpi_walk_resources(acpi_handle device_handle,
286 char *path, 292 char *name,
287 ACPI_WALK_RESOURCE_CALLBACK user_function, void *context); 293 ACPI_WALK_RESOURCE_CALLBACK user_function, void *context);
288 294
289acpi_status 295acpi_status
diff --git a/include/acpi/acresrc.h b/include/acpi/acresrc.h
index 2bf53940f259..ba281f7740a0 100644
--- a/include/acpi/acresrc.h
+++ b/include/acpi/acresrc.h
@@ -137,9 +137,14 @@ extern struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[];
137 137
138/* Resource tables indexed by raw AML resource descriptor type */ 138/* Resource tables indexed by raw AML resource descriptor type */
139 139
140extern const u8 acpi_gbl_resource_struct_sizes[];
140extern struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[]; 141extern struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[];
141 142
142extern const u8 acpi_gbl_resource_struct_sizes[]; 143struct acpi_vendor_walk_info {
144 struct acpi_vendor_uuid *uuid;
145 struct acpi_buffer *buffer;
146 acpi_status status;
147};
143 148
144/* 149/*
145 * rscreate 150 * rscreate
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 29b887017b18..11847592ed1b 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -326,7 +326,7 @@ typedef u64 acpi_integer;
326/* 326/*
327 * Constants with special meanings 327 * Constants with special meanings
328 */ 328 */
329#define ACPI_ROOT_OBJECT (acpi_handle) ACPI_PTR_ADD (char, NULL, ACPI_MAX_PTR) 329#define ACPI_ROOT_OBJECT ACPI_ADD_PTR (acpi_handle, NULL, ACPI_MAX_PTR)
330 330
331/* 331/*
332 * Initialization sequence 332 * Initialization sequence
@@ -986,6 +986,17 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (length+3) = (6
986#pragma pack(1) 986#pragma pack(1)
987#endif 987#endif
988 988
989/* UUID data structures for use in vendor-defined resource descriptors */
990
991struct acpi_uuid {
992 u8 data[ACPI_UUID_LENGTH];
993};
994
995struct acpi_vendor_uuid {
996 u8 subtype;
997 u8 data[ACPI_UUID_LENGTH];
998};
999
989/* 1000/*
990 * Structures used to describe device resources 1001 * Structures used to describe device resources
991 */ 1002 */
@@ -1033,6 +1044,15 @@ struct acpi_resource_vendor {
1033 u8 byte_data[1]; 1044 u8 byte_data[1];
1034}; 1045};
1035 1046
1047/* Vendor resource with UUID info (introduced in ACPI 3.0) */
1048
1049struct acpi_resource_vendor_typed {
1050 u16 byte_length;
1051 u8 uuid_subtype;
1052 u8 uuid[ACPI_UUID_LENGTH];
1053 u8 byte_data[1];
1054};
1055
1036struct acpi_resource_end_tag { 1056struct acpi_resource_end_tag {
1037 u8 checksum; 1057 u8 checksum;
1038}; 1058};
@@ -1184,6 +1204,7 @@ union acpi_resource_data {
1184 struct acpi_resource_io io; 1204 struct acpi_resource_io io;
1185 struct acpi_resource_fixed_io fixed_io; 1205 struct acpi_resource_fixed_io fixed_io;
1186 struct acpi_resource_vendor vendor; 1206 struct acpi_resource_vendor vendor;
1207 struct acpi_resource_vendor_typed vendor_typed;
1187 struct acpi_resource_end_tag end_tag; 1208 struct acpi_resource_end_tag end_tag;
1188 struct acpi_resource_memory24 memory24; 1209 struct acpi_resource_memory24 memory24;
1189 struct acpi_resource_memory32 memory32; 1210 struct acpi_resource_memory32 memory32;
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index c93e6562f0e1..1b9cbf05b79e 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -71,6 +71,10 @@
71#define acpi_cache_t kmem_cache_t 71#define acpi_cache_t kmem_cache_t
72#endif 72#endif
73 73
74/* Full namespace pathname length limit - arbitrary */
75
76#define ACPI_PATHNAME_MAX 256
77
74#else /* !__KERNEL__ */ 78#else /* !__KERNEL__ */
75 79
76#include <stdarg.h> 80#include <stdarg.h>