202 #error unknown ACPI_MACHINE_WIDTH |
202 #error unknown ACPI_MACHINE_WIDTH |
203 #endif |
203 #endif |
204 |
204 |
205 /******************************************************************************* |
205 /******************************************************************************* |
206 * |
206 * |
207 * OS-dependent and compiler-dependent types |
207 * OS-dependent types |
208 * |
208 * |
209 * If the defaults below are not appropriate for the host system, they can |
209 * If the defaults below are not appropriate for the host system, they can |
210 * be defined in the compiler-specific or OS-specific header, and this will |
210 * be defined in the OS-specific header, and this will take precedence. |
211 * take precedence. |
|
212 * |
211 * |
213 ******************************************************************************/ |
212 ******************************************************************************/ |
214 |
213 |
215 /* Value returned by acpi_os_get_thread_id */ |
214 /* Value returned by acpi_os_get_thread_id */ |
216 |
215 |
217 #ifndef acpi_thread_id |
216 #ifndef acpi_thread_id |
218 #define acpi_thread_id acpi_size |
217 #define acpi_thread_id acpi_size |
219 #endif |
218 #endif |
220 |
219 |
221 /* Object returned from acpi_os_create_lock */ |
220 /* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ |
|
221 |
|
222 #ifndef acpi_cpu_flags |
|
223 #define acpi_cpu_flags acpi_size |
|
224 #endif |
|
225 |
|
226 /* Object returned from acpi_os_create_cache */ |
|
227 |
|
228 #ifndef acpi_cache_t |
|
229 #ifdef ACPI_USE_LOCAL_CACHE |
|
230 #define acpi_cache_t struct acpi_memory_list |
|
231 #else |
|
232 #define acpi_cache_t void * |
|
233 #endif |
|
234 #endif |
|
235 |
|
236 /* |
|
237 * Synchronization objects - Mutexes, Semaphores, and spin_locks |
|
238 */ |
|
239 #if (ACPI_MUTEX_TYPE == ACPI_BINARY_SEMAPHORE) |
|
240 /* |
|
241 * These macros are used if the host OS does not support a mutex object. |
|
242 * Map the OSL Mutex interfaces to binary semaphores. |
|
243 */ |
|
244 #define acpi_mutex acpi_semaphore |
|
245 #define acpi_os_create_mutex(out_handle) acpi_os_create_semaphore (1, 1, out_handle) |
|
246 #define acpi_os_delete_mutex(handle) (void) acpi_os_delete_semaphore (handle) |
|
247 #define acpi_os_acquire_mutex(handle,time) acpi_os_wait_semaphore (handle, 1, time) |
|
248 #define acpi_os_release_mutex(handle) (void) acpi_os_signal_semaphore (handle, 1) |
|
249 #endif |
|
250 |
|
251 /* Configurable types for synchronization objects */ |
222 |
252 |
223 #ifndef acpi_spinlock |
253 #ifndef acpi_spinlock |
224 #define acpi_spinlock void * |
254 #define acpi_spinlock void * |
225 #endif |
255 #endif |
226 |
256 |
227 /* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ |
257 #ifndef acpi_semaphore |
228 |
258 #define acpi_semaphore void * |
229 #ifndef acpi_cpu_flags |
259 #endif |
230 #define acpi_cpu_flags acpi_size |
260 |
231 #endif |
261 #ifndef acpi_mutex |
232 |
262 #define acpi_mutex void * |
233 /* Object returned from acpi_os_create_cache */ |
263 #endif |
234 |
264 |
235 #ifndef acpi_cache_t |
265 /******************************************************************************* |
236 #define acpi_cache_t struct acpi_memory_list |
266 * |
237 #endif |
267 * Compiler-dependent types |
|
268 * |
|
269 * If the defaults below are not appropriate for the host compiler, they can |
|
270 * be defined in the compiler-specific header, and this will take precedence. |
|
271 * |
|
272 ******************************************************************************/ |
238 |
273 |
239 /* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ |
274 /* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ |
240 |
275 |
241 #ifndef acpi_uintptr_t |
276 #ifndef acpi_uintptr_t |
242 #define acpi_uintptr_t void * |
277 #define acpi_uintptr_t void * |
336 #define ACPI_MAX64_DECIMAL_DIGITS 20 |
408 #define ACPI_MAX64_DECIMAL_DIGITS 20 |
337 #define ACPI_MAX32_DECIMAL_DIGITS 10 |
409 #define ACPI_MAX32_DECIMAL_DIGITS 10 |
338 #define ACPI_MAX16_DECIMAL_DIGITS 5 |
410 #define ACPI_MAX16_DECIMAL_DIGITS 5 |
339 #define ACPI_MAX8_DECIMAL_DIGITS 3 |
411 #define ACPI_MAX8_DECIMAL_DIGITS 3 |
340 |
412 |
|
413 /* PM Timer ticks per second (HZ) */ |
|
414 |
|
415 #define PM_TIMER_FREQUENCY 3579545 |
|
416 |
341 /* |
417 /* |
342 * Constants with special meanings |
418 * Constants with special meanings |
343 */ |
419 */ |
344 #define ACPI_ROOT_OBJECT ACPI_ADD_PTR (acpi_handle, NULL, ACPI_MAX_PTR) |
420 #define ACPI_ROOT_OBJECT ACPI_ADD_PTR (acpi_handle, NULL, ACPI_MAX_PTR) |
|
421 #define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */ |
|
422 #define ACPI_DO_NOT_WAIT 0 |
|
423 |
|
424 /******************************************************************************* |
|
425 * |
|
426 * Commonly used macros |
|
427 * |
|
428 ******************************************************************************/ |
|
429 |
|
430 /* Data manipulation */ |
|
431 |
|
432 #define ACPI_LOWORD(l) ((u16)(u32)(l)) |
|
433 #define ACPI_HIWORD(l) ((u16)((((u32)(l)) >> 16) & 0xFFFF)) |
|
434 #define ACPI_LOBYTE(l) ((u8)(u16)(l)) |
|
435 #define ACPI_HIBYTE(l) ((u8)((((u16)(l)) >> 8) & 0xFF)) |
|
436 |
|
437 /* Full 64-bit integer must be available on both 32-bit and 64-bit platforms */ |
|
438 |
|
439 struct acpi_integer_overlay { |
|
440 u32 lo_dword; |
|
441 u32 hi_dword; |
|
442 }; |
|
443 |
|
444 #define ACPI_LODWORD(integer) (ACPI_CAST_PTR (struct acpi_integer_overlay, &integer)->lo_dword) |
|
445 #define ACPI_HIDWORD(integer) (ACPI_CAST_PTR (struct acpi_integer_overlay, &integer)->hi_dword) |
|
446 |
|
447 #define ACPI_SET_BIT(target,bit) ((target) |= (bit)) |
|
448 #define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit)) |
|
449 #define ACPI_MIN(a,b) (((a)<(b))?(a):(b)) |
|
450 #define ACPI_MAX(a,b) (((a)>(b))?(a):(b)) |
|
451 |
|
452 /* Size calculation */ |
|
453 |
|
454 #define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) |
|
455 |
|
456 /* Pointer manipulation */ |
|
457 |
|
458 #define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p)) |
|
459 #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (acpi_uintptr_t) (p)) |
|
460 #define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8, (a)) + (acpi_size)(b))) |
|
461 #define ACPI_PTR_DIFF(a, b) (acpi_size) (ACPI_CAST_PTR (u8, (a)) - ACPI_CAST_PTR (u8, (b))) |
|
462 |
|
463 /* Pointer/Integer type conversions */ |
|
464 |
|
465 #define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) NULL,(acpi_size) i) |
|
466 #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) NULL) |
|
467 #define ACPI_OFFSET(d, f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f), (void *) NULL) |
|
468 #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) |
|
469 #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) |
|
470 |
|
471 #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED |
|
472 #define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32, (a)) == *ACPI_CAST_PTR (u32, (b))) |
|
473 #else |
|
474 #define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) |
|
475 #endif |
|
476 |
|
477 /******************************************************************************* |
|
478 * |
|
479 * Miscellaneous constants |
|
480 * |
|
481 ******************************************************************************/ |
345 |
482 |
346 /* |
483 /* |
347 * Initialization sequence |
484 * Initialization sequence |
348 */ |
485 */ |
349 #define ACPI_FULL_INITIALIZATION 0x00 |
486 #define ACPI_FULL_INITIALIZATION 0x00 |
898 u8 *mapped_logical_address; |
1050 u8 *mapped_logical_address; |
899 acpi_size mapped_length; |
1051 acpi_size mapped_length; |
900 }; |
1052 }; |
901 |
1053 |
902 /* |
1054 /* |
903 * Definitions for Resource Attributes |
1055 * struct acpi_memory_list is used only if the ACPICA local cache is enabled |
904 */ |
1056 */ |
905 typedef u16 acpi_rs_length; /* Resource Length field is fixed at 16 bits */ |
1057 struct acpi_memory_list { |
906 typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (64_k-1)+3 */ |
1058 char *list_name; |
907 |
1059 void *list_head; |
908 /* |
1060 u16 object_size; |
909 * Memory Attributes |
1061 u16 max_depth; |
910 */ |
1062 u16 current_depth; |
911 #define ACPI_READ_ONLY_MEMORY (u8) 0x00 |
1063 u16 link_offset; |
912 #define ACPI_READ_WRITE_MEMORY (u8) 0x01 |
1064 |
913 |
1065 #ifdef ACPI_DBG_TRACK_ALLOCATIONS |
914 #define ACPI_NON_CACHEABLE_MEMORY (u8) 0x00 |
1066 |
915 #define ACPI_CACHABLE_MEMORY (u8) 0x01 |
1067 /* Statistics for debug memory tracking only */ |
916 #define ACPI_WRITE_COMBINING_MEMORY (u8) 0x02 |
1068 |
917 #define ACPI_PREFETCHABLE_MEMORY (u8) 0x03 |
1069 u32 total_allocated; |
918 |
1070 u32 total_freed; |
919 /* |
1071 u32 max_occupied; |
920 * IO Attributes |
1072 u32 total_size; |
921 * The ISA IO ranges are: n000-n0_fFh, n400-n4_fFh, n800-n8_fFh, n_c00-n_cFFh. |
1073 u32 current_total_size; |
922 * The non-ISA IO ranges are: n100-n3_fFh, n500-n7_fFh, n900-n_bFFh, n_cd0-n_fFFh. |
1074 u32 requests; |
923 */ |
1075 u32 hits; |
924 #define ACPI_NON_ISA_ONLY_RANGES (u8) 0x01 |
1076 #endif |
925 #define ACPI_ISA_ONLY_RANGES (u8) 0x02 |
|
926 #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) |
|
927 |
|
928 /* Type of translation - 1=Sparse, 0=Dense */ |
|
929 |
|
930 #define ACPI_SPARSE_TRANSLATION (u8) 0x01 |
|
931 |
|
932 /* |
|
933 * IO Port Descriptor Decode |
|
934 */ |
|
935 #define ACPI_DECODE_10 (u8) 0x00 /* 10-bit IO address decode */ |
|
936 #define ACPI_DECODE_16 (u8) 0x01 /* 16-bit IO address decode */ |
|
937 |
|
938 /* |
|
939 * IRQ Attributes |
|
940 */ |
|
941 #define ACPI_LEVEL_SENSITIVE (u8) 0x00 |
|
942 #define ACPI_EDGE_SENSITIVE (u8) 0x01 |
|
943 |
|
944 #define ACPI_ACTIVE_HIGH (u8) 0x00 |
|
945 #define ACPI_ACTIVE_LOW (u8) 0x01 |
|
946 |
|
947 #define ACPI_EXCLUSIVE (u8) 0x00 |
|
948 #define ACPI_SHARED (u8) 0x01 |
|
949 |
|
950 /* |
|
951 * DMA Attributes |
|
952 */ |
|
953 #define ACPI_COMPATIBILITY (u8) 0x00 |
|
954 #define ACPI_TYPE_A (u8) 0x01 |
|
955 #define ACPI_TYPE_B (u8) 0x02 |
|
956 #define ACPI_TYPE_F (u8) 0x03 |
|
957 |
|
958 #define ACPI_NOT_BUS_MASTER (u8) 0x00 |
|
959 #define ACPI_BUS_MASTER (u8) 0x01 |
|
960 |
|
961 #define ACPI_TRANSFER_8 (u8) 0x00 |
|
962 #define ACPI_TRANSFER_8_16 (u8) 0x01 |
|
963 #define ACPI_TRANSFER_16 (u8) 0x02 |
|
964 |
|
965 /* |
|
966 * Start Dependent Functions Priority definitions |
|
967 */ |
|
968 #define ACPI_GOOD_CONFIGURATION (u8) 0x00 |
|
969 #define ACPI_ACCEPTABLE_CONFIGURATION (u8) 0x01 |
|
970 #define ACPI_SUB_OPTIMAL_CONFIGURATION (u8) 0x02 |
|
971 |
|
972 /* |
|
973 * 16, 32 and 64-bit Address Descriptor resource types |
|
974 */ |
|
975 #define ACPI_MEMORY_RANGE (u8) 0x00 |
|
976 #define ACPI_IO_RANGE (u8) 0x01 |
|
977 #define ACPI_BUS_NUMBER_RANGE (u8) 0x02 |
|
978 |
|
979 #define ACPI_ADDRESS_NOT_FIXED (u8) 0x00 |
|
980 #define ACPI_ADDRESS_FIXED (u8) 0x01 |
|
981 |
|
982 #define ACPI_POS_DECODE (u8) 0x00 |
|
983 #define ACPI_SUB_DECODE (u8) 0x01 |
|
984 |
|
985 #define ACPI_PRODUCER (u8) 0x00 |
|
986 #define ACPI_CONSUMER (u8) 0x01 |
|
987 |
|
988 /* |
|
989 * If possible, pack the following structures to byte alignment |
|
990 */ |
|
991 #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED |
|
992 #pragma pack(1) |
|
993 #endif |
|
994 |
|
995 /* UUID data structures for use in vendor-defined resource descriptors */ |
|
996 |
|
997 struct acpi_uuid { |
|
998 u8 data[ACPI_UUID_LENGTH]; |
|
999 }; |
|
1000 |
|
1001 struct acpi_vendor_uuid { |
|
1002 u8 subtype; |
|
1003 u8 data[ACPI_UUID_LENGTH]; |
|
1004 }; |
|
1005 |
|
1006 /* |
|
1007 * Structures used to describe device resources |
|
1008 */ |
|
1009 struct acpi_resource_irq { |
|
1010 u8 descriptor_length; |
|
1011 u8 triggering; |
|
1012 u8 polarity; |
|
1013 u8 sharable; |
|
1014 u8 interrupt_count; |
|
1015 u8 interrupts[1]; |
|
1016 }; |
|
1017 |
|
1018 struct acpi_resource_dma { |
|
1019 u8 type; |
|
1020 u8 bus_master; |
|
1021 u8 transfer; |
|
1022 u8 channel_count; |
|
1023 u8 channels[1]; |
|
1024 }; |
|
1025 |
|
1026 struct acpi_resource_start_dependent { |
|
1027 u8 descriptor_length; |
|
1028 u8 compatibility_priority; |
|
1029 u8 performance_robustness; |
|
1030 }; |
|
1031 |
|
1032 /* |
|
1033 * END_DEPENDENT_FUNCTIONS_RESOURCE struct is not |
|
1034 * needed because it has no fields |
|
1035 */ |
|
1036 |
|
1037 struct acpi_resource_io { |
|
1038 u8 io_decode; |
|
1039 u8 alignment; |
|
1040 u8 address_length; |
|
1041 u16 minimum; |
|
1042 u16 maximum; |
|
1043 }; |
|
1044 |
|
1045 struct acpi_resource_fixed_io { |
|
1046 u16 address; |
|
1047 u8 address_length; |
|
1048 }; |
|
1049 |
|
1050 struct acpi_resource_vendor { |
|
1051 u16 byte_length; |
|
1052 u8 byte_data[1]; |
|
1053 }; |
|
1054 |
|
1055 /* Vendor resource with UUID info (introduced in ACPI 3.0) */ |
|
1056 |
|
1057 struct acpi_resource_vendor_typed { |
|
1058 u16 byte_length; |
|
1059 u8 uuid_subtype; |
|
1060 u8 uuid[ACPI_UUID_LENGTH]; |
|
1061 u8 byte_data[1]; |
|
1062 }; |
|
1063 |
|
1064 struct acpi_resource_end_tag { |
|
1065 u8 checksum; |
|
1066 }; |
|
1067 |
|
1068 struct acpi_resource_memory24 { |
|
1069 u8 write_protect; |
|
1070 u16 minimum; |
|
1071 u16 maximum; |
|
1072 u16 alignment; |
|
1073 u16 address_length; |
|
1074 }; |
|
1075 |
|
1076 struct acpi_resource_memory32 { |
|
1077 u8 write_protect; |
|
1078 u32 minimum; |
|
1079 u32 maximum; |
|
1080 u32 alignment; |
|
1081 u32 address_length; |
|
1082 }; |
|
1083 |
|
1084 struct acpi_resource_fixed_memory32 { |
|
1085 u8 write_protect; |
|
1086 u32 address; |
|
1087 u32 address_length; |
|
1088 }; |
|
1089 |
|
1090 struct acpi_memory_attribute { |
|
1091 u8 write_protect; |
|
1092 u8 caching; |
|
1093 u8 range_type; |
|
1094 u8 translation; |
|
1095 }; |
|
1096 |
|
1097 struct acpi_io_attribute { |
|
1098 u8 range_type; |
|
1099 u8 translation; |
|
1100 u8 translation_type; |
|
1101 u8 reserved1; |
|
1102 }; |
|
1103 |
|
1104 union acpi_resource_attribute { |
|
1105 struct acpi_memory_attribute mem; |
|
1106 struct acpi_io_attribute io; |
|
1107 |
|
1108 /* Used for the *word_space macros */ |
|
1109 |
|
1110 u8 type_specific; |
|
1111 }; |
|
1112 |
|
1113 struct acpi_resource_source { |
|
1114 u8 index; |
|
1115 u16 string_length; |
|
1116 char *string_ptr; |
|
1117 }; |
|
1118 |
|
1119 /* Fields common to all address descriptors, 16/32/64 bit */ |
|
1120 |
|
1121 #define ACPI_RESOURCE_ADDRESS_COMMON \ |
|
1122 u8 resource_type; \ |
|
1123 u8 producer_consumer; \ |
|
1124 u8 decode; \ |
|
1125 u8 min_address_fixed; \ |
|
1126 u8 max_address_fixed; \ |
|
1127 union acpi_resource_attribute info; |
|
1128 |
|
1129 struct acpi_resource_address { |
|
1130 ACPI_RESOURCE_ADDRESS_COMMON}; |
|
1131 |
|
1132 struct acpi_resource_address16 { |
|
1133 ACPI_RESOURCE_ADDRESS_COMMON u16 granularity; |
|
1134 u16 minimum; |
|
1135 u16 maximum; |
|
1136 u16 translation_offset; |
|
1137 u16 address_length; |
|
1138 struct acpi_resource_source resource_source; |
|
1139 }; |
|
1140 |
|
1141 struct acpi_resource_address32 { |
|
1142 ACPI_RESOURCE_ADDRESS_COMMON u32 granularity; |
|
1143 u32 minimum; |
|
1144 u32 maximum; |
|
1145 u32 translation_offset; |
|
1146 u32 address_length; |
|
1147 struct acpi_resource_source resource_source; |
|
1148 }; |
|
1149 |
|
1150 struct acpi_resource_address64 { |
|
1151 ACPI_RESOURCE_ADDRESS_COMMON u64 granularity; |
|
1152 u64 minimum; |
|
1153 u64 maximum; |
|
1154 u64 translation_offset; |
|
1155 u64 address_length; |
|
1156 struct acpi_resource_source resource_source; |
|
1157 }; |
|
1158 |
|
1159 struct acpi_resource_extended_address64 { |
|
1160 ACPI_RESOURCE_ADDRESS_COMMON u8 revision_iD; |
|
1161 u64 granularity; |
|
1162 u64 minimum; |
|
1163 u64 maximum; |
|
1164 u64 translation_offset; |
|
1165 u64 address_length; |
|
1166 u64 type_specific; |
|
1167 }; |
|
1168 |
|
1169 struct acpi_resource_extended_irq { |
|
1170 u8 producer_consumer; |
|
1171 u8 triggering; |
|
1172 u8 polarity; |
|
1173 u8 sharable; |
|
1174 u8 interrupt_count; |
|
1175 struct acpi_resource_source resource_source; |
|
1176 u32 interrupts[1]; |
|
1177 }; |
|
1178 |
|
1179 struct acpi_resource_generic_register { |
|
1180 u8 space_id; |
|
1181 u8 bit_width; |
|
1182 u8 bit_offset; |
|
1183 u8 access_size; |
|
1184 u64 address; |
|
1185 }; |
|
1186 |
|
1187 /* ACPI_RESOURCE_TYPEs */ |
|
1188 |
|
1189 #define ACPI_RESOURCE_TYPE_IRQ 0 |
|
1190 #define ACPI_RESOURCE_TYPE_DMA 1 |
|
1191 #define ACPI_RESOURCE_TYPE_START_DEPENDENT 2 |
|
1192 #define ACPI_RESOURCE_TYPE_END_DEPENDENT 3 |
|
1193 #define ACPI_RESOURCE_TYPE_IO 4 |
|
1194 #define ACPI_RESOURCE_TYPE_FIXED_IO 5 |
|
1195 #define ACPI_RESOURCE_TYPE_VENDOR 6 |
|
1196 #define ACPI_RESOURCE_TYPE_END_TAG 7 |
|
1197 #define ACPI_RESOURCE_TYPE_MEMORY24 8 |
|
1198 #define ACPI_RESOURCE_TYPE_MEMORY32 9 |
|
1199 #define ACPI_RESOURCE_TYPE_FIXED_MEMORY32 10 |
|
1200 #define ACPI_RESOURCE_TYPE_ADDRESS16 11 |
|
1201 #define ACPI_RESOURCE_TYPE_ADDRESS32 12 |
|
1202 #define ACPI_RESOURCE_TYPE_ADDRESS64 13 |
|
1203 #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */ |
|
1204 #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15 |
|
1205 #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16 |
|
1206 #define ACPI_RESOURCE_TYPE_MAX 16 |
|
1207 |
|
1208 union acpi_resource_data { |
|
1209 struct acpi_resource_irq irq; |
|
1210 struct acpi_resource_dma dma; |
|
1211 struct acpi_resource_start_dependent start_dpf; |
|
1212 struct acpi_resource_io io; |
|
1213 struct acpi_resource_fixed_io fixed_io; |
|
1214 struct acpi_resource_vendor vendor; |
|
1215 struct acpi_resource_vendor_typed vendor_typed; |
|
1216 struct acpi_resource_end_tag end_tag; |
|
1217 struct acpi_resource_memory24 memory24; |
|
1218 struct acpi_resource_memory32 memory32; |
|
1219 struct acpi_resource_fixed_memory32 fixed_memory32; |
|
1220 struct acpi_resource_address16 address16; |
|
1221 struct acpi_resource_address32 address32; |
|
1222 struct acpi_resource_address64 address64; |
|
1223 struct acpi_resource_extended_address64 ext_address64; |
|
1224 struct acpi_resource_extended_irq extended_irq; |
|
1225 struct acpi_resource_generic_register generic_reg; |
|
1226 |
|
1227 /* Common fields */ |
|
1228 |
|
1229 struct acpi_resource_address address; /* Common 16/32/64 address fields */ |
|
1230 }; |
|
1231 |
|
1232 struct acpi_resource { |
|
1233 u32 type; |
|
1234 u32 length; |
|
1235 union acpi_resource_data data; |
|
1236 }; |
|
1237 |
|
1238 /* restore default alignment */ |
|
1239 |
|
1240 #pragma pack() |
|
1241 |
|
1242 #define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */ |
|
1243 #define ACPI_RS_SIZE_MIN (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12) |
|
1244 #define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type)) |
|
1245 |
|
1246 #define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) |
|
1247 |
|
1248 struct acpi_pci_routing_table { |
|
1249 u32 length; |
|
1250 u32 pin; |
|
1251 acpi_integer address; /* here for 64-bit alignment */ |
|
1252 u32 source_index; |
|
1253 char source[4]; /* pad to 64 bits so sizeof() works in all cases */ |
|
1254 }; |
1077 }; |
1255 |
1078 |
1256 #endif /* __ACTYPES_H__ */ |
1079 #endif /* __ACTYPES_H__ */ |