aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 15:01:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 15:01:29 -0400
commit0f5abd4020bfd2b1eec6975b91bd5068aa674a93 (patch)
tree2ed5f67c556bb48df2b8e299b5be154f3a215be2 /include/acpi
parent54e514b91b95d6441c12a7955addfb9f9d2afc65 (diff)
parent0ee0d34985ceffe4036319e1e46df8bff591b9e3 (diff)
Merge tag 'acpica-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPICA updates from Rafael Wysocki: "This updates the kernel's ACPICA code to upstream revision 20150410 and adds a fix for a GPE handling regression introduced during the 3.19 cycle on top of that. Included are two stable-candidate bug fixes (one of them fixing a 3.16 regression), multiple other fixes and a bunch of cleanups. Specifics: - Fix for a GPE handling regression on Dell Latitude D600 that caused GPE signaling to stop working on that machine, which appears to be due to a hardware glitch, but it used to work and it can be made work again in a relativly straightforward way (Rafael J Wysocki). - Fix for a mutex unlock regression related to the handling of ACPI tables introduced during the 3.16 development cycle (Octavian Purdila). - _REV modification to always return 2 which has been done by all versions of Windows since NT and the firmware people started to use it to distinguish between OSes in their AML and do some silly and wrong things on that basis (Bob Moore). - Fixes and cleanups related to the acpi_physicall_address data type including one stable-candidate fix for an issue occasionally occuring on 64-bit machines running 32-bit kernels where using offsets provided by the firmware may lead to address overflows (Lv Zheng). - External() opcode support infrastructure needed for recompiling disassembled ACPI tables in some cases including interpreter modification to ignore that opcode (Bob Moore). - Support for the "Windows 2015" string in _OSI (Bob Moore). - GPE debug interface change to return values read from hardware registers (Lv Zheng). - Removal of the __DATE__ macro usage in tools (Rasmus Villemoes). - Assorted minor fixes and cleanups (Lv Zheng, Rickard Strandqvist, Bob Moore)" * tag 'acpica-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits) ACPICA: Store GPE register enable masks upfront ACPICA: Update version to 20150410. ACPICA: Fix a couple issues with the local printf module. ACPICA: Disassembler: Some cleanup of the table dump module. ACPICA: iASL: Add support for MSDM ACPI table. ACPICA: Update for SLIC ACPI table. ACPICA: Add "//" before ascii output of buffers. ACPICA: Remove unused internal AML opcode. ACPICA: Permanently set _REV to the value '2'. ACPICA: Add "Windows 2015" string to _OSI support. ACPICA: Add infrastructure for External() opcode. ACPICA: iASL: Enhancement for constant folding. ACPICA: iASL/Disassembler: Add option to assume table contains valid AML. ACPICA: Update AML Debugger global variables. ACPICA: Update Resource descriptor dump module. ACPICA: Fix a sscanf format string. ACPICA: Casting changes around acpi_physical_address/acpi_size. ACPICA: Resources: Correct conditional compilation definitions. ACPICA: Utilities: Correct conditional compilation definitions. ACPICA: Tables: Move an iasl specific table function to iasl source file. ...
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpixf.h14
-rw-r--r--include/acpi/actbl2.h70
-rw-r--r--include/acpi/actypes.h50
-rw-r--r--include/acpi/platform/acenv.h1
4 files changed, 63 insertions, 72 deletions
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index d56f5d722138..08ef57bc8d63 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -46,7 +46,7 @@
46 46
47/* Current ACPICA subsystem version in YYYYMMDD format */ 47/* Current ACPICA subsystem version in YYYYMMDD format */
48 48
49#define ACPI_CA_VERSION 0x20150204 49#define ACPI_CA_VERSION 0x20150410
50 50
51#include <acpi/acconfig.h> 51#include <acpi/acconfig.h>
52#include <acpi/actypes.h> 52#include <acpi/actypes.h>
@@ -431,13 +431,13 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
431ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void)) 431ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
432 432
433ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init 433ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
434 acpi_find_root_pointer(acpi_size * rsdp_address)) 434 acpi_find_root_pointer(acpi_physical_address *
435 435 rsdp_address))
436ACPI_EXTERNAL_RETURN_STATUS(acpi_status 436ACPI_EXTERNAL_RETURN_STATUS(acpi_status
437 acpi_get_table_header(acpi_string signature, 437 acpi_get_table_header(acpi_string signature,
438 u32 instance, 438 u32 instance,
439 struct acpi_table_header 439 struct acpi_table_header
440 *out_table_header)) 440 *out_table_header))
441ACPI_EXTERNAL_RETURN_STATUS(acpi_status 441ACPI_EXTERNAL_RETURN_STATUS(acpi_status
442 acpi_get_table(acpi_string signature, u32 instance, 442 acpi_get_table(acpi_string signature, u32 instance,
443 struct acpi_table_header 443 struct acpi_table_header
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index f06d75e5fa54..cafdeb50fbdf 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -73,6 +73,7 @@
73#define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ 73#define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
74#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ 74#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
75#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ 75#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
76#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
76#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */ 77#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
77#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ 78#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
78#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ 79#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
@@ -845,7 +846,8 @@ struct acpi_lpit_header {
845 846
846enum acpi_lpit_type { 847enum acpi_lpit_type {
847 ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00, 848 ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
848 ACPI_LPIT_TYPE_SIMPLE_IO = 0x01 849 ACPI_LPIT_TYPE_SIMPLE_IO = 0x01,
850 ACPI_LPIT_TYPE_RESERVED = 0x02 /* 2 and above are reserved */
849}; 851};
850 852
851/* Masks for Flags field above */ 853/* Masks for Flags field above */
@@ -935,6 +937,21 @@ struct acpi_table_mchi {
935 937
936/******************************************************************************* 938/*******************************************************************************
937 * 939 *
940 * MSDM - Microsoft Data Management table
941 *
942 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
943 * November 29, 2011. Copyright 2011 Microsoft
944 *
945 ******************************************************************************/
946
947/* Basic MSDM table is only the common ACPI header */
948
949struct acpi_table_msdm {
950 struct acpi_table_header header; /* Common ACPI table header */
951};
952
953/*******************************************************************************
954 *
938 * MTMR - MID Timer Table 955 * MTMR - MID Timer Table
939 * Version 1 956 * Version 1
940 * 957 *
@@ -959,10 +976,9 @@ struct acpi_mtmr_entry {
959/******************************************************************************* 976/*******************************************************************************
960 * 977 *
961 * SLIC - Software Licensing Description Table 978 * SLIC - Software Licensing Description Table
962 * Version 1
963 * 979 *
964 * Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems", 980 * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
965 * Copyright 2006 981 * November 29, 2011. Copyright 2011 Microsoft
966 * 982 *
967 ******************************************************************************/ 983 ******************************************************************************/
968 984
@@ -972,52 +988,6 @@ struct acpi_table_slic {
972 struct acpi_table_header header; /* Common ACPI table header */ 988 struct acpi_table_header header; /* Common ACPI table header */
973}; 989};
974 990
975/* Common SLIC subtable header */
976
977struct acpi_slic_header {
978 u32 type;
979 u32 length;
980};
981
982/* Values for Type field above */
983
984enum acpi_slic_type {
985 ACPI_SLIC_TYPE_PUBLIC_KEY = 0,
986 ACPI_SLIC_TYPE_WINDOWS_MARKER = 1,
987 ACPI_SLIC_TYPE_RESERVED = 2 /* 2 and greater are reserved */
988};
989
990/*
991 * SLIC Subtables, correspond to Type in struct acpi_slic_header
992 */
993
994/* 0: Public Key Structure */
995
996struct acpi_slic_key {
997 struct acpi_slic_header header;
998 u8 key_type;
999 u8 version;
1000 u16 reserved;
1001 u32 algorithm;
1002 char magic[4];
1003 u32 bit_length;
1004 u32 exponent;
1005 u8 modulus[128];
1006};
1007
1008/* 1: Windows Marker Structure */
1009
1010struct acpi_slic_marker {
1011 struct acpi_slic_header header;
1012 u32 version;
1013 char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */
1014 char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
1015 char windows_flag[8];
1016 u32 slic_version;
1017 u8 reserved[16];
1018 u8 signature[128];
1019};
1020
1021/******************************************************************************* 991/*******************************************************************************
1022 * 992 *
1023 * SPCR - Serial Port Console Redirection table 993 * SPCR - Serial Port Console Redirection table
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index b034f1068dfe..f5ca0e989bba 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -199,9 +199,29 @@ typedef int s32;
199typedef s32 acpi_native_int; 199typedef s32 acpi_native_int;
200 200
201typedef u32 acpi_size; 201typedef u32 acpi_size;
202
203#ifdef ACPI_32BIT_PHYSICAL_ADDRESS
204
205/*
206 * OSPMs can define this to shrink the size of the structures for 32-bit
207 * none PAE environment. ASL compiler may always define this to generate
208 * 32-bit OSPM compliant tables.
209 */
202typedef u32 acpi_io_address; 210typedef u32 acpi_io_address;
203typedef u32 acpi_physical_address; 211typedef u32 acpi_physical_address;
204 212
213#else /* ACPI_32BIT_PHYSICAL_ADDRESS */
214
215/*
216 * It is reported that, after some calculations, the physical addresses can
217 * wrap over the 32-bit boundary on 32-bit PAE environment.
218 * https://bugzilla.kernel.org/show_bug.cgi?id=87971
219 */
220typedef u64 acpi_io_address;
221typedef u64 acpi_physical_address;
222
223#endif /* ACPI_32BIT_PHYSICAL_ADDRESS */
224
205#define ACPI_MAX_PTR ACPI_UINT32_MAX 225#define ACPI_MAX_PTR ACPI_UINT32_MAX
206#define ACPI_SIZE_MAX ACPI_UINT32_MAX 226#define ACPI_SIZE_MAX ACPI_UINT32_MAX
207 227
@@ -713,33 +733,32 @@ typedef u32 acpi_event_type;
713 * The encoding of acpi_event_status is illustrated below. 733 * The encoding of acpi_event_status is illustrated below.
714 * Note that a set bit (1) indicates the property is TRUE 734 * Note that a set bit (1) indicates the property is TRUE
715 * (e.g. if bit 0 is set then the event is enabled). 735 * (e.g. if bit 0 is set then the event is enabled).
716 * +-------------+-+-+-+-+ 736 * +-------------+-+-+-+-+-+
717 * | Bits 31:4 |3|2|1|0| 737 * | Bits 31:5 |4|3|2|1|0|
718 * +-------------+-+-+-+-+ 738 * +-------------+-+-+-+-+-+
719 * | | | | | 739 * | | | | | |
720 * | | | | +- Enabled? 740 * | | | | | +- Enabled?
721 * | | | +--- Enabled for wake? 741 * | | | | +--- Enabled for wake?
722 * | | +----- Set? 742 * | | | +----- Status bit set?
723 * | +------- Has a handler? 743 * | | +------- Enable bit set?
724 * +------------- <Reserved> 744 * | +--------- Has a handler?
745 * +--------------- <Reserved>
725 */ 746 */
726typedef u32 acpi_event_status; 747typedef u32 acpi_event_status;
727 748
728#define ACPI_EVENT_FLAG_DISABLED (acpi_event_status) 0x00 749#define ACPI_EVENT_FLAG_DISABLED (acpi_event_status) 0x00
729#define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01 750#define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01
730#define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02 751#define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02
731#define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04 752#define ACPI_EVENT_FLAG_STATUS_SET (acpi_event_status) 0x04
732#define ACPI_EVENT_FLAG_HAS_HANDLER (acpi_event_status) 0x08 753#define ACPI_EVENT_FLAG_ENABLE_SET (acpi_event_status) 0x08
754#define ACPI_EVENT_FLAG_HAS_HANDLER (acpi_event_status) 0x10
755#define ACPI_EVENT_FLAG_SET ACPI_EVENT_FLAG_STATUS_SET
733 756
734/* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */ 757/* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */
735 758
736#define ACPI_GPE_ENABLE 0 759#define ACPI_GPE_ENABLE 0
737#define ACPI_GPE_DISABLE 1 760#define ACPI_GPE_DISABLE 1
738#define ACPI_GPE_CONDITIONAL_ENABLE 2 761#define ACPI_GPE_CONDITIONAL_ENABLE 2
739#define ACPI_GPE_SAVE_MASK 4
740
741#define ACPI_GPE_ENABLE_SAVE (ACPI_GPE_ENABLE | ACPI_GPE_SAVE_MASK)
742#define ACPI_GPE_DISABLE_SAVE (ACPI_GPE_DISABLE | ACPI_GPE_SAVE_MASK)
743 762
744/* 763/*
745 * GPE info flags - Per GPE 764 * GPE info flags - Per GPE
@@ -1251,6 +1270,7 @@ struct acpi_memory_list {
1251#define ACPI_OSI_WIN_VISTA_SP2 0x0A 1270#define ACPI_OSI_WIN_VISTA_SP2 0x0A
1252#define ACPI_OSI_WIN_7 0x0B 1271#define ACPI_OSI_WIN_7 0x0B
1253#define ACPI_OSI_WIN_8 0x0C 1272#define ACPI_OSI_WIN_8 0x0C
1273#define ACPI_OSI_WIN_10 0x0D
1254 1274
1255/* Definitions of file IO */ 1275/* Definitions of file IO */
1256 1276
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index ad74dc51d5b7..ecdf9405dd3a 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -76,6 +76,7 @@
76#define ACPI_LARGE_NAMESPACE_NODE 76#define ACPI_LARGE_NAMESPACE_NODE
77#define ACPI_DATA_TABLE_DISASSEMBLY 77#define ACPI_DATA_TABLE_DISASSEMBLY
78#define ACPI_SINGLE_THREADED 78#define ACPI_SINGLE_THREADED
79#define ACPI_32BIT_PHYSICAL_ADDRESS
79#endif 80#endif
80 81
81/* acpi_exec configuration. Multithreaded with full AML debugger */ 82/* acpi_exec configuration. Multithreaded with full AML debugger */