diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acnames.h | 1 | ||||
-rw-r--r-- | include/acpi/acpi_numa.h | 1 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 7 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 32 | ||||
-rw-r--r-- | include/acpi/acrestyp.h | 207 | ||||
-rw-r--r-- | include/acpi/actbl.h | 23 | ||||
-rw-r--r-- | include/acpi/actbl1.h | 57 | ||||
-rw-r--r-- | include/acpi/actbl3.h | 552 | ||||
-rw-r--r-- | include/acpi/actypes.h | 12 | ||||
-rw-r--r-- | include/linux/acpi.h | 20 | ||||
-rw-r--r-- | include/linux/acpi_io.h | 3 | ||||
-rw-r--r-- | include/linux/cpuidle.h | 7 |
12 files changed, 891 insertions, 31 deletions
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index fc1575fd4596..5b5af0d30a97 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h | |||
@@ -58,6 +58,7 @@ | |||
58 | #define METHOD_NAME__PRT "_PRT" | 58 | #define METHOD_NAME__PRT "_PRT" |
59 | #define METHOD_NAME__CRS "_CRS" | 59 | #define METHOD_NAME__CRS "_CRS" |
60 | #define METHOD_NAME__PRS "_PRS" | 60 | #define METHOD_NAME__PRS "_PRS" |
61 | #define METHOD_NAME__AEI "_AEI" | ||
61 | #define METHOD_NAME__PRW "_PRW" | 62 | #define METHOD_NAME__PRW "_PRW" |
62 | #define METHOD_NAME__SRS "_SRS" | 63 | #define METHOD_NAME__SRS "_SRS" |
63 | 64 | ||
diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h index 173972672175..451823cb8837 100644 --- a/include/acpi/acpi_numa.h +++ b/include/acpi/acpi_numa.h | |||
@@ -15,6 +15,7 @@ extern int pxm_to_node(int); | |||
15 | extern int node_to_pxm(int); | 15 | extern int node_to_pxm(int); |
16 | extern void __acpi_map_pxm_to_node(int, int); | 16 | extern void __acpi_map_pxm_to_node(int, int); |
17 | extern int acpi_map_pxm_to_node(int); | 17 | extern int acpi_map_pxm_to_node(int); |
18 | extern unsigned char acpi_srat_revision; | ||
18 | 19 | ||
19 | #endif /* CONFIG_ACPI_NUMA */ | 20 | #endif /* CONFIG_ACPI_NUMA */ |
20 | #endif /* __ACP_NUMA_H */ | 21 | #endif /* __ACP_NUMA_H */ |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 83062ed0ef2f..2fe8639b3ae7 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -238,13 +238,6 @@ acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, | |||
238 | /* | 238 | /* |
239 | * Miscellaneous | 239 | * Miscellaneous |
240 | */ | 240 | */ |
241 | acpi_status | ||
242 | acpi_os_validate_address(u8 space_id, acpi_physical_address address, | ||
243 | acpi_size length, char *name); | ||
244 | acpi_status | ||
245 | acpi_os_invalidate_address(u8 space_id, acpi_physical_address address, | ||
246 | acpi_size length); | ||
247 | |||
248 | u64 acpi_os_get_timer(void); | 241 | u64 acpi_os_get_timer(void); |
249 | 242 | ||
250 | acpi_status acpi_os_signal(u32 function, void *info); | 243 | acpi_status acpi_os_signal(u32 function, void *info); |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 7762bc2d8404..a28da35ba45e 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
49 | 49 | ||
50 | #define ACPI_CA_VERSION 0x20110623 | 50 | #define ACPI_CA_VERSION 0x20120111 |
51 | 51 | ||
52 | #include "actypes.h" | 52 | #include "actypes.h" |
53 | #include "actbl.h" | 53 | #include "actbl.h" |
@@ -74,6 +74,7 @@ extern u8 acpi_gbl_disable_auto_repair; | |||
74 | extern u32 acpi_current_gpe_count; | 74 | extern u32 acpi_current_gpe_count; |
75 | extern struct acpi_table_fadt acpi_gbl_FADT; | 75 | extern struct acpi_table_fadt acpi_gbl_FADT; |
76 | extern u8 acpi_gbl_system_awake_and_running; | 76 | extern u8 acpi_gbl_system_awake_and_running; |
77 | extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */ | ||
77 | 78 | ||
78 | extern u32 acpi_rsdt_forced; | 79 | extern u32 acpi_rsdt_forced; |
79 | /* | 80 | /* |
@@ -111,6 +112,11 @@ acpi_status acpi_install_interface(acpi_string interface_name); | |||
111 | 112 | ||
112 | acpi_status acpi_remove_interface(acpi_string interface_name); | 113 | acpi_status acpi_remove_interface(acpi_string interface_name); |
113 | 114 | ||
115 | u32 | ||
116 | acpi_check_address_range(acpi_adr_space_type space_id, | ||
117 | acpi_physical_address address, | ||
118 | acpi_size length, u8 warn); | ||
119 | |||
114 | /* | 120 | /* |
115 | * ACPI Memory management | 121 | * ACPI Memory management |
116 | */ | 122 | */ |
@@ -276,12 +282,23 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler); | |||
276 | acpi_status acpi_install_interface_handler(acpi_interface_handler handler); | 282 | acpi_status acpi_install_interface_handler(acpi_interface_handler handler); |
277 | 283 | ||
278 | /* | 284 | /* |
279 | * Event interfaces | 285 | * Global Lock interfaces |
280 | */ | 286 | */ |
281 | acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle); | 287 | acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle); |
282 | 288 | ||
283 | acpi_status acpi_release_global_lock(u32 handle); | 289 | acpi_status acpi_release_global_lock(u32 handle); |
284 | 290 | ||
291 | /* | ||
292 | * Interfaces to AML mutex objects | ||
293 | */ | ||
294 | acpi_status | ||
295 | acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout); | ||
296 | |||
297 | acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname); | ||
298 | |||
299 | /* | ||
300 | * Fixed Event interfaces | ||
301 | */ | ||
285 | acpi_status acpi_enable_event(u32 event, u32 flags); | 302 | acpi_status acpi_enable_event(u32 event, u32 flags); |
286 | 303 | ||
287 | acpi_status acpi_disable_event(u32 event, u32 flags); | 304 | acpi_status acpi_disable_event(u32 event, u32 flags); |
@@ -291,7 +308,7 @@ acpi_status acpi_clear_event(u32 event); | |||
291 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); | 308 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); |
292 | 309 | ||
293 | /* | 310 | /* |
294 | * GPE Interfaces | 311 | * General Purpose Event (GPE) Interfaces |
295 | */ | 312 | */ |
296 | acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); | 313 | acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); |
297 | 314 | ||
@@ -346,6 +363,10 @@ acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer); | |||
346 | #endif | 363 | #endif |
347 | 364 | ||
348 | acpi_status | 365 | acpi_status |
366 | acpi_get_event_resources(acpi_handle device_handle, | ||
367 | struct acpi_buffer *ret_buffer); | ||
368 | |||
369 | acpi_status | ||
349 | acpi_walk_resources(acpi_handle device, | 370 | acpi_walk_resources(acpi_handle device, |
350 | char *name, | 371 | char *name, |
351 | acpi_walk_resource_callback user_function, void *context); | 372 | acpi_walk_resource_callback user_function, void *context); |
@@ -360,6 +381,11 @@ acpi_status | |||
360 | acpi_resource_to_address64(struct acpi_resource *resource, | 381 | acpi_resource_to_address64(struct acpi_resource *resource, |
361 | struct acpi_resource_address64 *out); | 382 | struct acpi_resource_address64 *out); |
362 | 383 | ||
384 | acpi_status | ||
385 | acpi_buffer_to_resource(u8 *aml_buffer, | ||
386 | u16 aml_buffer_length, | ||
387 | struct acpi_resource **resource_ptr); | ||
388 | |||
363 | /* | 389 | /* |
364 | * Hardware (ACPI device) interfaces | 390 | * Hardware (ACPI device) interfaces |
365 | */ | 391 | */ |
diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index 0a66cc45dd6b..3506e39a66b1 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h | |||
@@ -61,11 +61,14 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (6 | |||
61 | #define ACPI_WRITE_COMBINING_MEMORY (u8) 0x02 | 61 | #define ACPI_WRITE_COMBINING_MEMORY (u8) 0x02 |
62 | #define ACPI_PREFETCHABLE_MEMORY (u8) 0x03 | 62 | #define ACPI_PREFETCHABLE_MEMORY (u8) 0x03 |
63 | 63 | ||
64 | /*! [Begin] no source code translation */ | ||
64 | /* | 65 | /* |
65 | * IO Attributes | 66 | * IO Attributes |
66 | * The ISA IO ranges are: n000-n0_fFh, n400-n4_fFh, n800-n8_fFh, n_c00-n_cFFh. | 67 | * The ISA IO ranges are: n000-n0FFh, n400-n4FFh, n800-n8FFh, nC00-nCFFh. |
67 | * The non-ISA IO ranges are: n100-n3_fFh, n500-n7_fFh, n900-n_bFFh, n_cd0-n_fFFh. | 68 | * The non-ISA IO ranges are: n100-n3FFh, n500-n7FFh, n900-nBFFh, nCD0-nFFFh. |
68 | */ | 69 | */ |
70 | /*! [End] no source code translation !*/ | ||
71 | |||
69 | #define ACPI_NON_ISA_ONLY_RANGES (u8) 0x01 | 72 | #define ACPI_NON_ISA_ONLY_RANGES (u8) 0x01 |
70 | #define ACPI_ISA_ONLY_RANGES (u8) 0x02 | 73 | #define ACPI_ISA_ONLY_RANGES (u8) 0x02 |
71 | #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) | 74 | #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) |
@@ -81,16 +84,26 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (6 | |||
81 | #define ACPI_DECODE_16 (u8) 0x01 /* 16-bit IO address decode */ | 84 | #define ACPI_DECODE_16 (u8) 0x01 /* 16-bit IO address decode */ |
82 | 85 | ||
83 | /* | 86 | /* |
84 | * IRQ Attributes | 87 | * Interrupt attributes - used in multiple descriptors |
85 | */ | 88 | */ |
89 | |||
90 | /* Triggering */ | ||
91 | |||
86 | #define ACPI_LEVEL_SENSITIVE (u8) 0x00 | 92 | #define ACPI_LEVEL_SENSITIVE (u8) 0x00 |
87 | #define ACPI_EDGE_SENSITIVE (u8) 0x01 | 93 | #define ACPI_EDGE_SENSITIVE (u8) 0x01 |
88 | 94 | ||
95 | /* Polarity */ | ||
96 | |||
89 | #define ACPI_ACTIVE_HIGH (u8) 0x00 | 97 | #define ACPI_ACTIVE_HIGH (u8) 0x00 |
90 | #define ACPI_ACTIVE_LOW (u8) 0x01 | 98 | #define ACPI_ACTIVE_LOW (u8) 0x01 |
99 | #define ACPI_ACTIVE_BOTH (u8) 0x02 | ||
100 | |||
101 | /* Sharing */ | ||
91 | 102 | ||
92 | #define ACPI_EXCLUSIVE (u8) 0x00 | 103 | #define ACPI_EXCLUSIVE (u8) 0x00 |
93 | #define ACPI_SHARED (u8) 0x01 | 104 | #define ACPI_SHARED (u8) 0x01 |
105 | #define ACPI_EXCLUSIVE_AND_WAKE (u8) 0x02 | ||
106 | #define ACPI_SHARED_AND_WAKE (u8) 0x03 | ||
94 | 107 | ||
95 | /* | 108 | /* |
96 | * DMA Attributes | 109 | * DMA Attributes |
@@ -127,6 +140,8 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (6 | |||
127 | #define ACPI_POS_DECODE (u8) 0x00 | 140 | #define ACPI_POS_DECODE (u8) 0x00 |
128 | #define ACPI_SUB_DECODE (u8) 0x01 | 141 | #define ACPI_SUB_DECODE (u8) 0x01 |
129 | 142 | ||
143 | /* Producer/Consumer */ | ||
144 | |||
130 | #define ACPI_PRODUCER (u8) 0x00 | 145 | #define ACPI_PRODUCER (u8) 0x00 |
131 | #define ACPI_CONSUMER (u8) 0x01 | 146 | #define ACPI_CONSUMER (u8) 0x01 |
132 | 147 | ||
@@ -192,6 +207,21 @@ struct acpi_resource_fixed_io { | |||
192 | u8 address_length; | 207 | u8 address_length; |
193 | }; | 208 | }; |
194 | 209 | ||
210 | struct acpi_resource_fixed_dma { | ||
211 | u16 request_lines; | ||
212 | u16 channels; | ||
213 | u8 width; | ||
214 | }; | ||
215 | |||
216 | /* Values for Width field above */ | ||
217 | |||
218 | #define ACPI_DMA_WIDTH8 0 | ||
219 | #define ACPI_DMA_WIDTH16 1 | ||
220 | #define ACPI_DMA_WIDTH32 2 | ||
221 | #define ACPI_DMA_WIDTH64 3 | ||
222 | #define ACPI_DMA_WIDTH128 4 | ||
223 | #define ACPI_DMA_WIDTH256 5 | ||
224 | |||
195 | struct acpi_resource_vendor { | 225 | struct acpi_resource_vendor { |
196 | u16 byte_length; | 226 | u16 byte_length; |
197 | u8 byte_data[1]; | 227 | u8 byte_data[1]; |
@@ -329,6 +359,166 @@ struct acpi_resource_generic_register { | |||
329 | u64 address; | 359 | u64 address; |
330 | }; | 360 | }; |
331 | 361 | ||
362 | struct acpi_resource_gpio { | ||
363 | u8 revision_id; | ||
364 | u8 connection_type; | ||
365 | u8 producer_consumer; /* For values, see Producer/Consumer above */ | ||
366 | u8 pin_config; | ||
367 | u8 sharable; /* For values, see Interrupt Attributes above */ | ||
368 | u8 io_restriction; | ||
369 | u8 triggering; /* For values, see Interrupt Attributes above */ | ||
370 | u8 polarity; /* For values, see Interrupt Attributes above */ | ||
371 | u16 drive_strength; | ||
372 | u16 debounce_timeout; | ||
373 | u16 pin_table_length; | ||
374 | u16 vendor_length; | ||
375 | struct acpi_resource_source resource_source; | ||
376 | u16 *pin_table; | ||
377 | u8 *vendor_data; | ||
378 | }; | ||
379 | |||
380 | /* Values for GPIO connection_type field above */ | ||
381 | |||
382 | #define ACPI_RESOURCE_GPIO_TYPE_INT 0 | ||
383 | #define ACPI_RESOURCE_GPIO_TYPE_IO 1 | ||
384 | |||
385 | /* Values for pin_config field above */ | ||
386 | |||
387 | #define ACPI_PIN_CONFIG_DEFAULT 0 | ||
388 | #define ACPI_PIN_CONFIG_PULLUP 1 | ||
389 | #define ACPI_PIN_CONFIG_PULLDOWN 2 | ||
390 | #define ACPI_PIN_CONFIG_NOPULL 3 | ||
391 | |||
392 | /* Values for io_restriction field above */ | ||
393 | |||
394 | #define ACPI_IO_RESTRICT_NONE 0 | ||
395 | #define ACPI_IO_RESTRICT_INPUT 1 | ||
396 | #define ACPI_IO_RESTRICT_OUTPUT 2 | ||
397 | #define ACPI_IO_RESTRICT_NONE_PRESERVE 3 | ||
398 | |||
399 | /* Common structure for I2C, SPI, and UART serial descriptors */ | ||
400 | |||
401 | #define ACPI_RESOURCE_SERIAL_COMMON \ | ||
402 | u8 revision_id; \ | ||
403 | u8 type; \ | ||
404 | u8 producer_consumer; /* For values, see Producer/Consumer above */\ | ||
405 | u8 slave_mode; \ | ||
406 | u8 type_revision_id; \ | ||
407 | u16 type_data_length; \ | ||
408 | u16 vendor_length; \ | ||
409 | struct acpi_resource_source resource_source; \ | ||
410 | u8 *vendor_data; | ||
411 | |||
412 | struct acpi_resource_common_serialbus { | ||
413 | ACPI_RESOURCE_SERIAL_COMMON}; | ||
414 | |||
415 | /* Values for the Type field above */ | ||
416 | |||
417 | #define ACPI_RESOURCE_SERIAL_TYPE_I2C 1 | ||
418 | #define ACPI_RESOURCE_SERIAL_TYPE_SPI 2 | ||
419 | #define ACPI_RESOURCE_SERIAL_TYPE_UART 3 | ||
420 | |||
421 | /* Values for slave_mode field above */ | ||
422 | |||
423 | #define ACPI_CONTROLLER_INITIATED 0 | ||
424 | #define ACPI_DEVICE_INITIATED 1 | ||
425 | |||
426 | struct acpi_resource_i2c_serialbus { | ||
427 | ACPI_RESOURCE_SERIAL_COMMON u8 access_mode; | ||
428 | u16 slave_address; | ||
429 | u32 connection_speed; | ||
430 | }; | ||
431 | |||
432 | /* Values for access_mode field above */ | ||
433 | |||
434 | #define ACPI_I2C_7BIT_MODE 0 | ||
435 | #define ACPI_I2C_10BIT_MODE 1 | ||
436 | |||
437 | struct acpi_resource_spi_serialbus { | ||
438 | ACPI_RESOURCE_SERIAL_COMMON u8 wire_mode; | ||
439 | u8 device_polarity; | ||
440 | u8 data_bit_length; | ||
441 | u8 clock_phase; | ||
442 | u8 clock_polarity; | ||
443 | u16 device_selection; | ||
444 | u32 connection_speed; | ||
445 | }; | ||
446 | |||
447 | /* Values for wire_mode field above */ | ||
448 | |||
449 | #define ACPI_SPI_4WIRE_MODE 0 | ||
450 | #define ACPI_SPI_3WIRE_MODE 1 | ||
451 | |||
452 | /* Values for device_polarity field above */ | ||
453 | |||
454 | #define ACPI_SPI_ACTIVE_LOW 0 | ||
455 | #define ACPI_SPI_ACTIVE_HIGH 1 | ||
456 | |||
457 | /* Values for clock_phase field above */ | ||
458 | |||
459 | #define ACPI_SPI_FIRST_PHASE 0 | ||
460 | #define ACPI_SPI_SECOND_PHASE 1 | ||
461 | |||
462 | /* Values for clock_polarity field above */ | ||
463 | |||
464 | #define ACPI_SPI_START_LOW 0 | ||
465 | #define ACPI_SPI_START_HIGH 1 | ||
466 | |||
467 | struct acpi_resource_uart_serialbus { | ||
468 | ACPI_RESOURCE_SERIAL_COMMON u8 endian; | ||
469 | u8 data_bits; | ||
470 | u8 stop_bits; | ||
471 | u8 flow_control; | ||
472 | u8 parity; | ||
473 | u8 lines_enabled; | ||
474 | u16 rx_fifo_size; | ||
475 | u16 tx_fifo_size; | ||
476 | u32 default_baud_rate; | ||
477 | }; | ||
478 | |||
479 | /* Values for Endian field above */ | ||
480 | |||
481 | #define ACPI_UART_LITTLE_ENDIAN 0 | ||
482 | #define ACPI_UART_BIG_ENDIAN 1 | ||
483 | |||
484 | /* Values for data_bits field above */ | ||
485 | |||
486 | #define ACPI_UART_5_DATA_BITS 0 | ||
487 | #define ACPI_UART_6_DATA_BITS 1 | ||
488 | #define ACPI_UART_7_DATA_BITS 2 | ||
489 | #define ACPI_UART_8_DATA_BITS 3 | ||
490 | #define ACPI_UART_9_DATA_BITS 4 | ||
491 | |||
492 | /* Values for stop_bits field above */ | ||
493 | |||
494 | #define ACPI_UART_NO_STOP_BITS 0 | ||
495 | #define ACPI_UART_1_STOP_BIT 1 | ||
496 | #define ACPI_UART_1P5_STOP_BITS 2 | ||
497 | #define ACPI_UART_2_STOP_BITS 3 | ||
498 | |||
499 | /* Values for flow_control field above */ | ||
500 | |||
501 | #define ACPI_UART_FLOW_CONTROL_NONE 0 | ||
502 | #define ACPI_UART_FLOW_CONTROL_HW 1 | ||
503 | #define ACPI_UART_FLOW_CONTROL_XON_XOFF 2 | ||
504 | |||
505 | /* Values for Parity field above */ | ||
506 | |||
507 | #define ACPI_UART_PARITY_NONE 0 | ||
508 | #define ACPI_UART_PARITY_EVEN 1 | ||
509 | #define ACPI_UART_PARITY_ODD 2 | ||
510 | #define ACPI_UART_PARITY_MARK 3 | ||
511 | #define ACPI_UART_PARITY_SPACE 4 | ||
512 | |||
513 | /* Values for lines_enabled bitfield above */ | ||
514 | |||
515 | #define ACPI_UART_CARRIER_DETECT (1<<2) | ||
516 | #define ACPI_UART_RING_INDICATOR (1<<3) | ||
517 | #define ACPI_UART_DATA_SET_READY (1<<4) | ||
518 | #define ACPI_UART_DATA_TERMINAL_READY (1<<5) | ||
519 | #define ACPI_UART_CLEAR_TO_SEND (1<<6) | ||
520 | #define ACPI_UART_REQUEST_TO_SEND (1<<7) | ||
521 | |||
332 | /* ACPI_RESOURCE_TYPEs */ | 522 | /* ACPI_RESOURCE_TYPEs */ |
333 | 523 | ||
334 | #define ACPI_RESOURCE_TYPE_IRQ 0 | 524 | #define ACPI_RESOURCE_TYPE_IRQ 0 |
@@ -348,7 +538,10 @@ struct acpi_resource_generic_register { | |||
348 | #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */ | 538 | #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */ |
349 | #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15 | 539 | #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15 |
350 | #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16 | 540 | #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16 |
351 | #define ACPI_RESOURCE_TYPE_MAX 16 | 541 | #define ACPI_RESOURCE_TYPE_GPIO 17 /* ACPI 5.0 */ |
542 | #define ACPI_RESOURCE_TYPE_FIXED_DMA 18 /* ACPI 5.0 */ | ||
543 | #define ACPI_RESOURCE_TYPE_SERIAL_BUS 19 /* ACPI 5.0 */ | ||
544 | #define ACPI_RESOURCE_TYPE_MAX 19 | ||
352 | 545 | ||
353 | /* Master union for resource descriptors */ | 546 | /* Master union for resource descriptors */ |
354 | 547 | ||
@@ -358,6 +551,7 @@ union acpi_resource_data { | |||
358 | struct acpi_resource_start_dependent start_dpf; | 551 | struct acpi_resource_start_dependent start_dpf; |
359 | struct acpi_resource_io io; | 552 | struct acpi_resource_io io; |
360 | struct acpi_resource_fixed_io fixed_io; | 553 | struct acpi_resource_fixed_io fixed_io; |
554 | struct acpi_resource_fixed_dma fixed_dma; | ||
361 | struct acpi_resource_vendor vendor; | 555 | struct acpi_resource_vendor vendor; |
362 | struct acpi_resource_vendor_typed vendor_typed; | 556 | struct acpi_resource_vendor_typed vendor_typed; |
363 | struct acpi_resource_end_tag end_tag; | 557 | struct acpi_resource_end_tag end_tag; |
@@ -370,6 +564,11 @@ union acpi_resource_data { | |||
370 | struct acpi_resource_extended_address64 ext_address64; | 564 | struct acpi_resource_extended_address64 ext_address64; |
371 | struct acpi_resource_extended_irq extended_irq; | 565 | struct acpi_resource_extended_irq extended_irq; |
372 | struct acpi_resource_generic_register generic_reg; | 566 | struct acpi_resource_generic_register generic_reg; |
567 | struct acpi_resource_gpio gpio; | ||
568 | struct acpi_resource_i2c_serialbus i2c_serial_bus; | ||
569 | struct acpi_resource_spi_serialbus spi_serial_bus; | ||
570 | struct acpi_resource_uart_serialbus uart_serial_bus; | ||
571 | struct acpi_resource_common_serialbus common_serial_bus; | ||
373 | 572 | ||
374 | /* Common fields */ | 573 | /* Common fields */ |
375 | 574 | ||
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index f1380287ed4d..8e1b92f6f650 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -255,6 +255,8 @@ struct acpi_table_fadt { | |||
255 | struct acpi_generic_address xpm_timer_block; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */ | 255 | struct acpi_generic_address xpm_timer_block; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */ |
256 | struct acpi_generic_address xgpe0_block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */ | 256 | struct acpi_generic_address xgpe0_block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */ |
257 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ | 257 | struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ |
258 | struct acpi_generic_address sleep_control; /* 64-bit Sleep Control register */ | ||
259 | struct acpi_generic_address sleep_status; /* 64-bit Sleep Status register */ | ||
258 | }; | 260 | }; |
259 | 261 | ||
260 | /* Masks for FADT Boot Architecture Flags (boot_flags) */ | 262 | /* Masks for FADT Boot Architecture Flags (boot_flags) */ |
@@ -264,6 +266,7 @@ struct acpi_table_fadt { | |||
264 | #define ACPI_FADT_NO_VGA (1<<2) /* 02: [V4] It is not safe to probe for VGA hardware */ | 266 | #define ACPI_FADT_NO_VGA (1<<2) /* 02: [V4] It is not safe to probe for VGA hardware */ |
265 | #define ACPI_FADT_NO_MSI (1<<3) /* 03: [V4] Message Signaled Interrupts (MSI) must not be enabled */ | 267 | #define ACPI_FADT_NO_MSI (1<<3) /* 03: [V4] Message Signaled Interrupts (MSI) must not be enabled */ |
266 | #define ACPI_FADT_NO_ASPM (1<<4) /* 04: [V4] PCIe ASPM control must not be enabled */ | 268 | #define ACPI_FADT_NO_ASPM (1<<4) /* 04: [V4] PCIe ASPM control must not be enabled */ |
269 | #define ACPI_FADT_NO_CMOS_RTC (1<<5) /* 05: [V5] No CMOS real-time clock present */ | ||
267 | 270 | ||
268 | #define FADT2_REVISION_ID 3 | 271 | #define FADT2_REVISION_ID 3 |
269 | 272 | ||
@@ -289,6 +292,8 @@ struct acpi_table_fadt { | |||
289 | #define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: [V4] System is compatible with remote power on (ACPI 3.0) */ | 292 | #define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: [V4] System is compatible with remote power on (ACPI 3.0) */ |
290 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ | 293 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ |
291 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ | 294 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ |
295 | #define ACPI_FADT_HW_REDUCED (1<<20) /* 20: [V5] ACPI hardware is not implemented (ACPI 5.0) */ | ||
296 | #define ACPI_FADT_LOW_POWER_S0 (1<<21) /* 21: [V5] S0 power savings are equal or better than S3 (ACPI 5.0) */ | ||
292 | 297 | ||
293 | /* Values for preferred_profile (Preferred Power Management Profiles) */ | 298 | /* Values for preferred_profile (Preferred Power Management Profiles) */ |
294 | 299 | ||
@@ -299,14 +304,16 @@ enum acpi_prefered_pm_profiles { | |||
299 | PM_WORKSTATION = 3, | 304 | PM_WORKSTATION = 3, |
300 | PM_ENTERPRISE_SERVER = 4, | 305 | PM_ENTERPRISE_SERVER = 4, |
301 | PM_SOHO_SERVER = 5, | 306 | PM_SOHO_SERVER = 5, |
302 | PM_APPLIANCE_PC = 6 | 307 | PM_APPLIANCE_PC = 6, |
308 | PM_PERFORMANCE_SERVER = 7, | ||
309 | PM_TABLET = 8 | ||
303 | }; | 310 | }; |
304 | 311 | ||
305 | /* Reset to default packing */ | 312 | /* Reset to default packing */ |
306 | 313 | ||
307 | #pragma pack() | 314 | #pragma pack() |
308 | 315 | ||
309 | #define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_fadt, f) | 316 | #define ACPI_FADT_OFFSET(f) (u16) ACPI_OFFSET (struct acpi_table_fadt, f) |
310 | 317 | ||
311 | /* | 318 | /* |
312 | * Internal table-related structures | 319 | * Internal table-related structures |
@@ -342,6 +349,7 @@ struct acpi_table_desc { | |||
342 | 349 | ||
343 | #include <acpi/actbl1.h> | 350 | #include <acpi/actbl1.h> |
344 | #include <acpi/actbl2.h> | 351 | #include <acpi/actbl2.h> |
352 | #include <acpi/actbl3.h> | ||
345 | 353 | ||
346 | /* | 354 | /* |
347 | * Sizes of the various flavors of FADT. We need to look closely | 355 | * Sizes of the various flavors of FADT. We need to look closely |
@@ -351,12 +359,15 @@ struct acpi_table_desc { | |||
351 | * FADT is the bottom line as to what the version really is. | 359 | * FADT is the bottom line as to what the version really is. |
352 | * | 360 | * |
353 | * For reference, the values below are as follows: | 361 | * For reference, the values below are as follows: |
354 | * FADT V1 size: 0x74 | 362 | * FADT V1 size: 0x074 |
355 | * FADT V2 size: 0x84 | 363 | * FADT V2 size: 0x084 |
356 | * FADT V3+ size: 0xF4 | 364 | * FADT V3 size: 0x0F4 |
365 | * FADT V4 size: 0x0F4 | ||
366 | * FADT V5 size: 0x10C | ||
357 | */ | 367 | */ |
358 | #define ACPI_FADT_V1_SIZE (u32) (ACPI_FADT_OFFSET (flags) + 4) | 368 | #define ACPI_FADT_V1_SIZE (u32) (ACPI_FADT_OFFSET (flags) + 4) |
359 | #define ACPI_FADT_V2_SIZE (u32) (ACPI_FADT_OFFSET (reserved4[0]) + 3) | 369 | #define ACPI_FADT_V2_SIZE (u32) (ACPI_FADT_OFFSET (reserved4[0]) + 3) |
360 | #define ACPI_FADT_V3_SIZE (u32) (sizeof (struct acpi_table_fadt)) | 370 | #define ACPI_FADT_V3_SIZE (u32) (ACPI_FADT_OFFSET (sleep_control)) |
371 | #define ACPI_FADT_V5_SIZE (u32) (sizeof (struct acpi_table_fadt)) | ||
361 | 372 | ||
362 | #endif /* __ACTBL_H__ */ | 373 | #endif /* __ACTBL_H__ */ |
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 7504bc99b29b..71e747beac8f 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h | |||
@@ -228,7 +228,8 @@ enum acpi_einj_actions { | |||
228 | ACPI_EINJ_EXECUTE_OPERATION = 5, | 228 | ACPI_EINJ_EXECUTE_OPERATION = 5, |
229 | ACPI_EINJ_CHECK_BUSY_STATUS = 6, | 229 | ACPI_EINJ_CHECK_BUSY_STATUS = 6, |
230 | ACPI_EINJ_GET_COMMAND_STATUS = 7, | 230 | ACPI_EINJ_GET_COMMAND_STATUS = 7, |
231 | ACPI_EINJ_ACTION_RESERVED = 8, /* 8 and greater are reserved */ | 231 | ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8, |
232 | ACPI_EINJ_ACTION_RESERVED = 9, /* 9 and greater are reserved */ | ||
232 | ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */ | 233 | ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */ |
233 | }; | 234 | }; |
234 | 235 | ||
@@ -240,7 +241,27 @@ enum acpi_einj_instructions { | |||
240 | ACPI_EINJ_WRITE_REGISTER = 2, | 241 | ACPI_EINJ_WRITE_REGISTER = 2, |
241 | ACPI_EINJ_WRITE_REGISTER_VALUE = 3, | 242 | ACPI_EINJ_WRITE_REGISTER_VALUE = 3, |
242 | ACPI_EINJ_NOOP = 4, | 243 | ACPI_EINJ_NOOP = 4, |
243 | ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */ | 244 | ACPI_EINJ_FLUSH_CACHELINE = 5, |
245 | ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */ | ||
246 | }; | ||
247 | |||
248 | struct acpi_einj_error_type_with_addr { | ||
249 | u32 error_type; | ||
250 | u32 vendor_struct_offset; | ||
251 | u32 flags; | ||
252 | u32 apic_id; | ||
253 | u64 address; | ||
254 | u64 range; | ||
255 | u32 pcie_id; | ||
256 | }; | ||
257 | |||
258 | struct acpi_einj_vendor { | ||
259 | u32 length; | ||
260 | u32 pcie_id; | ||
261 | u16 vendor_id; | ||
262 | u16 device_id; | ||
263 | u8 revision_id; | ||
264 | u8 reserved[3]; | ||
244 | }; | 265 | }; |
245 | 266 | ||
246 | /* EINJ Trigger Error Action Table */ | 267 | /* EINJ Trigger Error Action Table */ |
@@ -275,6 +296,7 @@ enum acpi_einj_command_status { | |||
275 | #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9) | 296 | #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9) |
276 | #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10) | 297 | #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10) |
277 | #define ACPI_EINJ_PLATFORM_FATAL (1<<11) | 298 | #define ACPI_EINJ_PLATFORM_FATAL (1<<11) |
299 | #define ACPI_EINJ_VENDOR_DEFINED (1<<31) | ||
278 | 300 | ||
279 | /******************************************************************************* | 301 | /******************************************************************************* |
280 | * | 302 | * |
@@ -631,7 +653,9 @@ enum acpi_madt_type { | |||
631 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, | 653 | ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, |
632 | ACPI_MADT_TYPE_LOCAL_X2APIC = 9, | 654 | ACPI_MADT_TYPE_LOCAL_X2APIC = 9, |
633 | ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, | 655 | ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, |
634 | ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */ | 656 | ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11, |
657 | ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12, | ||
658 | ACPI_MADT_TYPE_RESERVED = 13 /* 13 and greater are reserved */ | ||
635 | }; | 659 | }; |
636 | 660 | ||
637 | /* | 661 | /* |
@@ -752,11 +776,36 @@ struct acpi_madt_local_x2apic_nmi { | |||
752 | u8 reserved[3]; | 776 | u8 reserved[3]; |
753 | }; | 777 | }; |
754 | 778 | ||
779 | /* 11: Generic Interrupt (ACPI 5.0) */ | ||
780 | |||
781 | struct acpi_madt_generic_interrupt { | ||
782 | struct acpi_subtable_header header; | ||
783 | u16 reserved; /* Reserved - must be zero */ | ||
784 | u32 gic_id; | ||
785 | u32 uid; | ||
786 | u32 flags; | ||
787 | u32 parking_version; | ||
788 | u32 performance_interrupt; | ||
789 | u64 parked_address; | ||
790 | u64 base_address; | ||
791 | }; | ||
792 | |||
793 | /* 12: Generic Distributor (ACPI 5.0) */ | ||
794 | |||
795 | struct acpi_madt_generic_distributor { | ||
796 | struct acpi_subtable_header header; | ||
797 | u16 reserved; /* Reserved - must be zero */ | ||
798 | u32 gic_id; | ||
799 | u64 base_address; | ||
800 | u32 global_irq_base; | ||
801 | u32 reserved2; /* Reserved - must be zero */ | ||
802 | }; | ||
803 | |||
755 | /* | 804 | /* |
756 | * Common flags fields for MADT subtables | 805 | * Common flags fields for MADT subtables |
757 | */ | 806 | */ |
758 | 807 | ||
759 | /* MADT Local APIC flags (lapic_flags) */ | 808 | /* MADT Local APIC flags (lapic_flags) and GIC flags */ |
760 | 809 | ||
761 | #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ | 810 | #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ |
762 | 811 | ||
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h new file mode 100644 index 000000000000..c22ce80e9535 --- /dev/null +++ b/include/acpi/actbl3.h | |||
@@ -0,0 +1,552 @@ | |||
1 | /****************************************************************************** | ||
2 | * | ||
3 | * Name: actbl3.h - ACPI Table Definitions | ||
4 | * | ||
5 | *****************************************************************************/ | ||
6 | |||
7 | /* | ||
8 | * Copyright (C) 2000 - 2011, Intel Corp. | ||
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. | ||
17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
18 | * substantially similar to the "NO WARRANTY" disclaimer below | ||
19 | * ("Disclaimer") and any redistribution must be conditioned upon | ||
20 | * including a substantially similar Disclaimer requirement for further | ||
21 | * binary redistribution. | ||
22 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
23 | * of any contributors may be used to endorse or promote products derived | ||
24 | * from this software without specific prior written permission. | ||
25 | * | ||
26 | * Alternatively, this software may be distributed under the terms of the | ||
27 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
28 | * Software Foundation. | ||
29 | * | ||
30 | * NO WARRANTY | ||
31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | ||
34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
41 | * POSSIBILITY OF SUCH DAMAGES. | ||
42 | */ | ||
43 | |||
44 | #ifndef __ACTBL3_H__ | ||
45 | #define __ACTBL3_H__ | ||
46 | |||
47 | /******************************************************************************* | ||
48 | * | ||
49 | * Additional ACPI Tables (3) | ||
50 | * | ||
51 | * These tables are not consumed directly by the ACPICA subsystem, but are | ||
52 | * included here to support device drivers and the AML disassembler. | ||
53 | * | ||
54 | * The tables in this file are fully defined within the ACPI specification. | ||
55 | * | ||
56 | ******************************************************************************/ | ||
57 | |||
58 | /* | ||
59 | * Values for description table header signatures for tables defined in this | ||
60 | * file. Useful because they make it more difficult to inadvertently type in | ||
61 | * the wrong signature. | ||
62 | */ | ||
63 | #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ | ||
64 | #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */ | ||
65 | #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */ | ||
66 | #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */ | ||
67 | #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ | ||
68 | #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */ | ||
69 | #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */ | ||
70 | #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ | ||
71 | |||
72 | #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */ | ||
73 | #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */ | ||
74 | |||
75 | /* Reserved table signatures */ | ||
76 | |||
77 | #define ACPI_SIG_CSRT "CSRT" /* Core System Resources Table */ | ||
78 | #define ACPI_SIG_DBG2 "DBG2" /* Debug Port table 2 */ | ||
79 | #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */ | ||
80 | #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ | ||
81 | #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ | ||
82 | |||
83 | /* | ||
84 | * All tables must be byte-packed to match the ACPI specification, since | ||
85 | * the tables are provided by the system BIOS. | ||
86 | */ | ||
87 | #pragma pack(1) | ||
88 | |||
89 | /* | ||
90 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. | ||
91 | * This is the only type that is even remotely portable. Anything else is not | ||
92 | * portable, so do not use any other bitfield types. | ||
93 | */ | ||
94 | |||
95 | /******************************************************************************* | ||
96 | * | ||
97 | * BGRT - Boot Graphics Resource Table (ACPI 5.0) | ||
98 | * Version 1 | ||
99 | * | ||
100 | ******************************************************************************/ | ||
101 | |||
102 | struct acpi_table_bgrt { | ||
103 | struct acpi_table_header header; /* Common ACPI table header */ | ||
104 | u16 version; | ||
105 | u8 status; | ||
106 | u8 image_type; | ||
107 | u64 image_address; | ||
108 | u32 image_offset_x; | ||
109 | u32 image_offset_y; | ||
110 | }; | ||
111 | |||
112 | /******************************************************************************* | ||
113 | * | ||
114 | * DRTM - Dynamic Root of Trust for Measurement table | ||
115 | * | ||
116 | ******************************************************************************/ | ||
117 | |||
118 | struct acpi_table_drtm { | ||
119 | struct acpi_table_header header; /* Common ACPI table header */ | ||
120 | u64 entry_base_address; | ||
121 | u64 entry_length; | ||
122 | u32 entry_address32; | ||
123 | u64 entry_address64; | ||
124 | u64 exit_address; | ||
125 | u64 log_area_address; | ||
126 | u32 log_area_length; | ||
127 | u64 arch_dependent_address; | ||
128 | u32 flags; | ||
129 | }; | ||
130 | |||
131 | /* 1) Validated Tables List */ | ||
132 | |||
133 | struct acpi_drtm_vtl_list { | ||
134 | u32 validated_table_list_count; | ||
135 | }; | ||
136 | |||
137 | /* 2) Resources List */ | ||
138 | |||
139 | struct acpi_drtm_resource_list { | ||
140 | u32 resource_list_count; | ||
141 | }; | ||
142 | |||
143 | /* 3) Platform-specific Identifiers List */ | ||
144 | |||
145 | struct acpi_drtm_id_list { | ||
146 | u32 id_list_count; | ||
147 | }; | ||
148 | |||
149 | /******************************************************************************* | ||
150 | * | ||
151 | * FPDT - Firmware Performance Data Table (ACPI 5.0) | ||
152 | * Version 1 | ||
153 | * | ||
154 | ******************************************************************************/ | ||
155 | |||
156 | struct acpi_table_fpdt { | ||
157 | struct acpi_table_header header; /* Common ACPI table header */ | ||
158 | }; | ||
159 | |||
160 | /* FPDT subtable header */ | ||
161 | |||
162 | struct acpi_fpdt_header { | ||
163 | u16 type; | ||
164 | u8 length; | ||
165 | u8 revision; | ||
166 | }; | ||
167 | |||
168 | /* Values for Type field above */ | ||
169 | |||
170 | enum acpi_fpdt_type { | ||
171 | ACPI_FPDT_TYPE_BOOT = 0, | ||
172 | ACPI_FPDT_TYPE_S3PERF = 1, | ||
173 | }; | ||
174 | |||
175 | /* | ||
176 | * FPDT subtables | ||
177 | */ | ||
178 | |||
179 | /* 0: Firmware Basic Boot Performance Record */ | ||
180 | |||
181 | struct acpi_fpdt_boot { | ||
182 | struct acpi_fpdt_header header; | ||
183 | u8 reserved[4]; | ||
184 | u64 reset_end; | ||
185 | u64 load_start; | ||
186 | u64 startup_start; | ||
187 | u64 exit_services_entry; | ||
188 | u64 exit_services_exit; | ||
189 | }; | ||
190 | |||
191 | /* 1: S3 Performance Table Pointer Record */ | ||
192 | |||
193 | struct acpi_fpdt_s3pt_ptr { | ||
194 | struct acpi_fpdt_header header; | ||
195 | u8 reserved[4]; | ||
196 | u64 address; | ||
197 | }; | ||
198 | |||
199 | /* | ||
200 | * S3PT - S3 Performance Table. This table is pointed to by the | ||
201 | * FPDT S3 Pointer Record above. | ||
202 | */ | ||
203 | struct acpi_table_s3pt { | ||
204 | u8 signature[4]; /* "S3PT" */ | ||
205 | u32 length; | ||
206 | }; | ||
207 | |||
208 | /* | ||
209 | * S3PT Subtables | ||
210 | */ | ||
211 | struct acpi_s3pt_header { | ||
212 | u16 type; | ||
213 | u8 length; | ||
214 | u8 revision; | ||
215 | }; | ||
216 | |||
217 | /* Values for Type field above */ | ||
218 | |||
219 | enum acpi_s3pt_type { | ||
220 | ACPI_S3PT_TYPE_RESUME = 0, | ||
221 | ACPI_S3PT_TYPE_SUSPEND = 1, | ||
222 | }; | ||
223 | |||
224 | struct acpi_s3pt_resume { | ||
225 | struct acpi_s3pt_header header; | ||
226 | u32 resume_count; | ||
227 | u64 full_resume; | ||
228 | u64 average_resume; | ||
229 | }; | ||
230 | |||
231 | struct acpi_s3pt_suspend { | ||
232 | struct acpi_s3pt_header header; | ||
233 | u64 suspend_start; | ||
234 | u64 suspend_end; | ||
235 | }; | ||
236 | |||
237 | /******************************************************************************* | ||
238 | * | ||
239 | * GTDT - Generic Timer Description Table (ACPI 5.0) | ||
240 | * Version 1 | ||
241 | * | ||
242 | ******************************************************************************/ | ||
243 | |||
244 | struct acpi_table_gtdt { | ||
245 | struct acpi_table_header header; /* Common ACPI table header */ | ||
246 | u64 address; | ||
247 | u32 flags; | ||
248 | u32 secure_pl1_interrupt; | ||
249 | u32 secure_pl1_flags; | ||
250 | u32 non_secure_pl1_interrupt; | ||
251 | u32 non_secure_pl1_flags; | ||
252 | u32 virtual_timer_interrupt; | ||
253 | u32 virtual_timer_flags; | ||
254 | u32 non_secure_pl2_interrupt; | ||
255 | u32 non_secure_pl2_flags; | ||
256 | }; | ||
257 | |||
258 | /* Values for Flags field above */ | ||
259 | |||
260 | #define ACPI_GTDT_MAPPED_BLOCK_PRESENT 1 | ||
261 | |||
262 | /* Values for all "TimerFlags" fields above */ | ||
263 | |||
264 | #define ACPI_GTDT_INTERRUPT_MODE 1 | ||
265 | #define ACPI_GTDT_INTERRUPT_POLARITY 2 | ||
266 | |||
267 | /******************************************************************************* | ||
268 | * | ||
269 | * MPST - Memory Power State Table (ACPI 5.0) | ||
270 | * Version 1 | ||
271 | * | ||
272 | ******************************************************************************/ | ||
273 | |||
274 | #define ACPI_MPST_CHANNEL_INFO \ | ||
275 | u16 reserved1; \ | ||
276 | u8 channel_id; \ | ||
277 | u8 reserved2; \ | ||
278 | u16 power_node_count; | ||
279 | |||
280 | /* Main table */ | ||
281 | |||
282 | struct acpi_table_mpst { | ||
283 | struct acpi_table_header header; /* Common ACPI table header */ | ||
284 | ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ | ||
285 | }; | ||
286 | |||
287 | /* Memory Platform Communication Channel Info */ | ||
288 | |||
289 | struct acpi_mpst_channel { | ||
290 | ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ | ||
291 | }; | ||
292 | |||
293 | /* Memory Power Node Structure */ | ||
294 | |||
295 | struct acpi_mpst_power_node { | ||
296 | u8 flags; | ||
297 | u8 reserved1; | ||
298 | u16 node_id; | ||
299 | u32 length; | ||
300 | u64 range_address; | ||
301 | u64 range_length; | ||
302 | u8 num_power_states; | ||
303 | u8 num_physical_components; | ||
304 | u16 reserved2; | ||
305 | }; | ||
306 | |||
307 | /* Values for Flags field above */ | ||
308 | |||
309 | #define ACPI_MPST_ENABLED 1 | ||
310 | #define ACPI_MPST_POWER_MANAGED 2 | ||
311 | #define ACPI_MPST_HOT_PLUG_CAPABLE 4 | ||
312 | |||
313 | /* Memory Power State Structure (follows POWER_NODE above) */ | ||
314 | |||
315 | struct acpi_mpst_power_state { | ||
316 | u8 power_state; | ||
317 | u8 info_index; | ||
318 | }; | ||
319 | |||
320 | /* Physical Component ID Structure (follows POWER_STATE above) */ | ||
321 | |||
322 | struct acpi_mpst_component { | ||
323 | u16 component_id; | ||
324 | }; | ||
325 | |||
326 | /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */ | ||
327 | |||
328 | struct acpi_mpst_data_hdr { | ||
329 | u16 characteristics_count; | ||
330 | }; | ||
331 | |||
332 | struct acpi_mpst_power_data { | ||
333 | u8 revision; | ||
334 | u8 flags; | ||
335 | u16 reserved1; | ||
336 | u32 average_power; | ||
337 | u32 power_saving; | ||
338 | u64 exit_latency; | ||
339 | u64 reserved2; | ||
340 | }; | ||
341 | |||
342 | /* Values for Flags field above */ | ||
343 | |||
344 | #define ACPI_MPST_PRESERVE 1 | ||
345 | #define ACPI_MPST_AUTOENTRY 2 | ||
346 | #define ACPI_MPST_AUTOEXIT 4 | ||
347 | |||
348 | /* Shared Memory Region (not part of an ACPI table) */ | ||
349 | |||
350 | struct acpi_mpst_shared { | ||
351 | u32 signature; | ||
352 | u16 pcc_command; | ||
353 | u16 pcc_status; | ||
354 | u16 command_register; | ||
355 | u16 status_register; | ||
356 | u16 power_state_id; | ||
357 | u16 power_node_id; | ||
358 | u64 energy_consumed; | ||
359 | u64 average_power; | ||
360 | }; | ||
361 | |||
362 | /******************************************************************************* | ||
363 | * | ||
364 | * PCCT - Platform Communications Channel Table (ACPI 5.0) | ||
365 | * Version 1 | ||
366 | * | ||
367 | ******************************************************************************/ | ||
368 | |||
369 | struct acpi_table_pcct { | ||
370 | struct acpi_table_header header; /* Common ACPI table header */ | ||
371 | u32 flags; | ||
372 | u32 latency; | ||
373 | u32 reserved; | ||
374 | }; | ||
375 | |||
376 | /* Values for Flags field above */ | ||
377 | |||
378 | #define ACPI_PCCT_DOORBELL 1 | ||
379 | |||
380 | /* | ||
381 | * PCCT subtables | ||
382 | */ | ||
383 | |||
384 | /* 0: Generic Communications Subspace */ | ||
385 | |||
386 | struct acpi_pcct_subspace { | ||
387 | struct acpi_subtable_header header; | ||
388 | u8 reserved[6]; | ||
389 | u64 base_address; | ||
390 | u64 length; | ||
391 | struct acpi_generic_address doorbell_register; | ||
392 | u64 preserve_mask; | ||
393 | u64 write_mask; | ||
394 | }; | ||
395 | |||
396 | /* | ||
397 | * PCC memory structures (not part of the ACPI table) | ||
398 | */ | ||
399 | |||
400 | /* Shared Memory Region */ | ||
401 | |||
402 | struct acpi_pcct_shared_memory { | ||
403 | u32 signature; | ||
404 | u16 command; | ||
405 | u16 status; | ||
406 | }; | ||
407 | |||
408 | /******************************************************************************* | ||
409 | * | ||
410 | * PMTT - Platform Memory Topology Table (ACPI 5.0) | ||
411 | * Version 1 | ||
412 | * | ||
413 | ******************************************************************************/ | ||
414 | |||
415 | struct acpi_table_pmtt { | ||
416 | struct acpi_table_header header; /* Common ACPI table header */ | ||
417 | u32 reserved; | ||
418 | }; | ||
419 | |||
420 | /* Common header for PMTT subtables that follow main table */ | ||
421 | |||
422 | struct acpi_pmtt_header { | ||
423 | u8 type; | ||
424 | u8 reserved1; | ||
425 | u16 length; | ||
426 | u16 flags; | ||
427 | u16 reserved2; | ||
428 | }; | ||
429 | |||
430 | /* Values for Type field above */ | ||
431 | |||
432 | #define ACPI_PMTT_TYPE_SOCKET 0 | ||
433 | #define ACPI_PMTT_TYPE_CONTROLLER 1 | ||
434 | #define ACPI_PMTT_TYPE_DIMM 2 | ||
435 | #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */ | ||
436 | |||
437 | /* Values for Flags field above */ | ||
438 | |||
439 | #define ACPI_PMTT_TOP_LEVEL 0x0001 | ||
440 | #define ACPI_PMTT_PHYSICAL 0x0002 | ||
441 | #define ACPI_PMTT_MEMORY_TYPE 0x000C | ||
442 | |||
443 | /* | ||
444 | * PMTT subtables, correspond to Type in struct acpi_pmtt_header | ||
445 | */ | ||
446 | |||
447 | /* 0: Socket Structure */ | ||
448 | |||
449 | struct acpi_pmtt_socket { | ||
450 | struct acpi_pmtt_header header; | ||
451 | u16 socket_id; | ||
452 | u16 reserved; | ||
453 | }; | ||
454 | |||
455 | /* 1: Memory Controller subtable */ | ||
456 | |||
457 | struct acpi_pmtt_controller { | ||
458 | struct acpi_pmtt_header header; | ||
459 | u32 read_latency; | ||
460 | u32 write_latency; | ||
461 | u32 read_bandwidth; | ||
462 | u32 write_bandwidth; | ||
463 | u16 access_width; | ||
464 | u16 alignment; | ||
465 | u16 reserved; | ||
466 | u16 domain_count; | ||
467 | }; | ||
468 | |||
469 | /* 1a: Proximity Domain substructure */ | ||
470 | |||
471 | struct acpi_pmtt_domain { | ||
472 | u32 proximity_domain; | ||
473 | }; | ||
474 | |||
475 | /* 2: Physical Component Identifier (DIMM) */ | ||
476 | |||
477 | struct acpi_pmtt_physical_component { | ||
478 | struct acpi_pmtt_header header; | ||
479 | u16 component_id; | ||
480 | u16 reserved; | ||
481 | u32 memory_size; | ||
482 | u32 bios_handle; | ||
483 | }; | ||
484 | |||
485 | /******************************************************************************* | ||
486 | * | ||
487 | * RASF - RAS Feature Table (ACPI 5.0) | ||
488 | * Version 1 | ||
489 | * | ||
490 | ******************************************************************************/ | ||
491 | |||
492 | struct acpi_table_rasf { | ||
493 | struct acpi_table_header header; /* Common ACPI table header */ | ||
494 | u8 channel_id[12]; | ||
495 | }; | ||
496 | |||
497 | /* RASF Platform Communication Channel Shared Memory Region */ | ||
498 | |||
499 | struct acpi_rasf_shared_memory { | ||
500 | u32 signature; | ||
501 | u16 command; | ||
502 | u16 status; | ||
503 | u64 requested_address; | ||
504 | u64 requested_length; | ||
505 | u64 actual_address; | ||
506 | u64 actual_length; | ||
507 | u16 flags; | ||
508 | u8 speed; | ||
509 | }; | ||
510 | |||
511 | /* Masks for Flags and Speed fields above */ | ||
512 | |||
513 | #define ACPI_RASF_SCRUBBER_RUNNING 1 | ||
514 | #define ACPI_RASF_SPEED (7<<1) | ||
515 | |||
516 | /* Channel Commands */ | ||
517 | |||
518 | enum acpi_rasf_commands { | ||
519 | ACPI_RASF_GET_RAS_CAPABILITIES = 1, | ||
520 | ACPI_RASF_GET_PATROL_PARAMETERS = 2, | ||
521 | ACPI_RASF_START_PATROL_SCRUBBER = 3, | ||
522 | ACPI_RASF_STOP_PATROL_SCRUBBER = 4 | ||
523 | }; | ||
524 | |||
525 | /* Channel Command flags */ | ||
526 | |||
527 | #define ACPI_RASF_GENERATE_SCI (1<<15) | ||
528 | |||
529 | /* Status values */ | ||
530 | |||
531 | enum acpi_rasf_status { | ||
532 | ACPI_RASF_SUCCESS = 0, | ||
533 | ACPI_RASF_NOT_VALID = 1, | ||
534 | ACPI_RASF_NOT_SUPPORTED = 2, | ||
535 | ACPI_RASF_BUSY = 3, | ||
536 | ACPI_RASF_FAILED = 4, | ||
537 | ACPI_RASF_ABORTED = 5, | ||
538 | ACPI_RASF_INVALID_DATA = 6 | ||
539 | }; | ||
540 | |||
541 | /* Status flags */ | ||
542 | |||
543 | #define ACPI_RASF_COMMAND_COMPLETE (1) | ||
544 | #define ACPI_RASF_SCI_DOORBELL (1<<1) | ||
545 | #define ACPI_RASF_ERROR (1<<2) | ||
546 | #define ACPI_RASF_STATUS (0x1F<<3) | ||
547 | |||
548 | /* Reset to default packing */ | ||
549 | |||
550 | #pragma pack() | ||
551 | |||
552 | #endif /* __ACTBL3_H__ */ | ||
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index ed73f6705c86..d5dee7ce9474 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -712,8 +712,10 @@ typedef u8 acpi_adr_space_type; | |||
712 | #define ACPI_ADR_SPACE_CMOS (acpi_adr_space_type) 5 | 712 | #define ACPI_ADR_SPACE_CMOS (acpi_adr_space_type) 5 |
713 | #define ACPI_ADR_SPACE_PCI_BAR_TARGET (acpi_adr_space_type) 6 | 713 | #define ACPI_ADR_SPACE_PCI_BAR_TARGET (acpi_adr_space_type) 6 |
714 | #define ACPI_ADR_SPACE_IPMI (acpi_adr_space_type) 7 | 714 | #define ACPI_ADR_SPACE_IPMI (acpi_adr_space_type) 7 |
715 | #define ACPI_ADR_SPACE_GPIO (acpi_adr_space_type) 8 | ||
716 | #define ACPI_ADR_SPACE_GSBUS (acpi_adr_space_type) 9 | ||
715 | 717 | ||
716 | #define ACPI_NUM_PREDEFINED_REGIONS 8 | 718 | #define ACPI_NUM_PREDEFINED_REGIONS 10 |
717 | 719 | ||
718 | /* | 720 | /* |
719 | * Special Address Spaces | 721 | * Special Address Spaces |
@@ -957,6 +959,14 @@ acpi_status(*acpi_adr_space_handler) (u32 function, | |||
957 | 959 | ||
958 | #define ACPI_DEFAULT_HANDLER NULL | 960 | #define ACPI_DEFAULT_HANDLER NULL |
959 | 961 | ||
962 | /* Special Context data for generic_serial_bus/general_purpose_io (ACPI 5.0) */ | ||
963 | |||
964 | struct acpi_connection_info { | ||
965 | u8 *connection; | ||
966 | u16 length; | ||
967 | u8 access_length; | ||
968 | }; | ||
969 | |||
960 | typedef | 970 | typedef |
961 | acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle, | 971 | acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle, |
962 | u32 function, | 972 | u32 function, |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 627a3a42e4d8..3f968665899b 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -310,6 +310,11 @@ extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, | |||
310 | u32 *mask, u32 req); | 310 | u32 *mask, u32 req); |
311 | extern void acpi_early_init(void); | 311 | extern void acpi_early_init(void); |
312 | 312 | ||
313 | extern int acpi_nvs_register(__u64 start, __u64 size); | ||
314 | |||
315 | extern int acpi_nvs_for_each_region(int (*func)(__u64, __u64, void *), | ||
316 | void *data); | ||
317 | |||
313 | #else /* !CONFIG_ACPI */ | 318 | #else /* !CONFIG_ACPI */ |
314 | 319 | ||
315 | #define acpi_disabled 1 | 320 | #define acpi_disabled 1 |
@@ -352,15 +357,18 @@ static inline int acpi_table_parse(char *id, | |||
352 | { | 357 | { |
353 | return -1; | 358 | return -1; |
354 | } | 359 | } |
355 | #endif /* !CONFIG_ACPI */ | ||
356 | 360 | ||
357 | #ifdef CONFIG_ACPI_SLEEP | 361 | static inline int acpi_nvs_register(__u64 start, __u64 size) |
358 | int suspend_nvs_register(unsigned long start, unsigned long size); | ||
359 | #else | ||
360 | static inline int suspend_nvs_register(unsigned long a, unsigned long b) | ||
361 | { | 362 | { |
362 | return 0; | 363 | return 0; |
363 | } | 364 | } |
364 | #endif | 365 | |
366 | static inline int acpi_nvs_for_each_region(int (*func)(__u64, __u64, void *), | ||
367 | void *data) | ||
368 | { | ||
369 | return 0; | ||
370 | } | ||
371 | |||
372 | #endif /* !CONFIG_ACPI */ | ||
365 | 373 | ||
366 | #endif /*_LINUX_ACPI_H*/ | 374 | #endif /*_LINUX_ACPI_H*/ |
diff --git a/include/linux/acpi_io.h b/include/linux/acpi_io.h index 4afd7102459d..b0ffa219993e 100644 --- a/include/linux/acpi_io.h +++ b/include/linux/acpi_io.h | |||
@@ -12,4 +12,7 @@ static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys, | |||
12 | 12 | ||
13 | void __iomem *acpi_os_get_iomem(acpi_physical_address phys, unsigned int size); | 13 | void __iomem *acpi_os_get_iomem(acpi_physical_address phys, unsigned int size); |
14 | 14 | ||
15 | int acpi_os_map_generic_address(struct acpi_generic_address *addr); | ||
16 | void acpi_os_unmap_generic_address(struct acpi_generic_address *addr); | ||
17 | |||
15 | #endif | 18 | #endif |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 23f81de51829..712abcc205ae 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -186,7 +186,14 @@ struct cpuidle_governor { | |||
186 | extern int cpuidle_register_governor(struct cpuidle_governor *gov); | 186 | extern int cpuidle_register_governor(struct cpuidle_governor *gov); |
187 | extern void cpuidle_unregister_governor(struct cpuidle_governor *gov); | 187 | extern void cpuidle_unregister_governor(struct cpuidle_governor *gov); |
188 | 188 | ||
189 | #ifdef CONFIG_INTEL_IDLE | ||
190 | extern int intel_idle_cpu_init(int cpu); | ||
189 | #else | 191 | #else |
192 | static inline int intel_idle_cpu_init(int cpu) { return -1; } | ||
193 | #endif | ||
194 | |||
195 | #else | ||
196 | static inline int intel_idle_cpu_init(int cpu) { return -1; } | ||
190 | 197 | ||
191 | static inline int cpuidle_register_governor(struct cpuidle_governor *gov) | 198 | static inline int cpuidle_register_governor(struct cpuidle_governor *gov) |
192 | {return 0;} | 199 | {return 0;} |