aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-04-29 22:03:52 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-06 18:54:59 -0400
commit3035ff70e6e6e15351e865fcc69dff182103b115 (patch)
tree5adc1c56f52fe29da7cb2e4b312334b72b53f5b7 /drivers/acpi
parentd87a2b75cd00a9e62c2b218e7d586c30961eb311 (diff)
ACPICA: Update global variable definitions. No functional change.
Move all of the public globals to acpixf.h for the convenience of users. Also: Adds #ifndef/#endif conditions arround ACPI_GLOBAL and ACPI_INIT_GLOBAL definition so that OSPMs might be able to: 1. Redefine ACPI_GLOBAL/ACPI_INIT_GLOBAL into no-op, and 2. Redefine external global variables into immediates to implement stubs for them. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpica/acglobal.h134
1 files changed, 2 insertions, 132 deletions
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index e7d73eb57366..115eedcade1e 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -44,144 +44,14 @@
44#ifndef __ACGLOBAL_H__ 44#ifndef __ACGLOBAL_H__
45#define __ACGLOBAL_H__ 45#define __ACGLOBAL_H__
46 46
47/*
48 * Ensure that the globals are actually defined and initialized only once.
49 *
50 * The use of these macros allows a single list of globals (here) in order
51 * to simplify maintenance of the code.
52 */
53#ifdef DEFINE_ACPI_GLOBALS
54#define ACPI_GLOBAL(type,name) \
55 extern type name; \
56 type name
57
58#define ACPI_INIT_GLOBAL(type,name,value) \
59 type name=value
60
61#else
62#define ACPI_GLOBAL(type,name) \
63 extern type name
64
65#define ACPI_INIT_GLOBAL(type,name,value) \
66 extern type name
67#endif
68
69#ifdef DEFINE_ACPI_GLOBALS
70
71/* Public globals, available from outside ACPICA subsystem */
72
73/***************************************************************************** 47/*****************************************************************************
74 * 48 *
75 * Runtime configuration (static defaults that can be overriden at runtime) 49 * Globals related to the ACPI tables
76 * 50 *
77 ****************************************************************************/ 51 ****************************************************************************/
78 52
79/* 53/* Master list of all ACPI tables that were found in the RSDT/XSDT */
80 * Enable "slack" in the AML interpreter? Default is FALSE, and the
81 * interpreter strictly follows the ACPI specification. Setting to TRUE
82 * allows the interpreter to ignore certain errors and/or bad AML constructs.
83 *
84 * Currently, these features are enabled by this flag:
85 *
86 * 1) Allow "implicit return" of last value in a control method
87 * 2) Allow access beyond the end of an operation region
88 * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
89 * 4) Allow ANY object type to be a source operand for the Store() operator
90 * 5) Allow unresolved references (invalid target name) in package objects
91 * 6) Enable warning messages for behavior that is not ACPI spec compliant
92 */
93ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);
94
95/*
96 * Automatically serialize all methods that create named objects? Default
97 * is TRUE, meaning that all non_serialized methods are scanned once at
98 * table load time to determine those that create named objects. Methods
99 * that create named objects are marked Serialized in order to prevent
100 * possible run-time problems if they are entered by more than one thread.
101 */
102ACPI_INIT_GLOBAL(u8, acpi_gbl_auto_serialize_methods, TRUE);
103
104/*
105 * Create the predefined _OSI method in the namespace? Default is TRUE
106 * because ACPICA is fully compatible with other ACPI implementations.
107 * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
108 */
109ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE);
110
111/*
112 * Optionally use default values for the ACPI register widths. Set this to
113 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
114 */
115ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE);
116
117/*
118 * Optionally enable output from the AML Debug Object.
119 */
120ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE);
121
122/*
123 * Optionally copy the entire DSDT to local memory (instead of simply
124 * mapping it.) There are some BIOSs that corrupt or replace the original
125 * DSDT, creating the need for this option. Default is FALSE, do not copy
126 * the DSDT.
127 */
128ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE);
129
130/*
131 * Optionally ignore an XSDT if present and use the RSDT instead.
132 * Although the ACPI specification requires that an XSDT be used instead
133 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
134 * some machines. Default behavior is to use the XSDT if present.
135 */
136ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE);
137
138/*
139 * Optionally use 32-bit FADT addresses if and when there is a conflict
140 * (address mismatch) between the 32-bit and 64-bit versions of the
141 * address. Although ACPICA adheres to the ACPI specification which
142 * requires the use of the corresponding 64-bit address if it is non-zero,
143 * some machines have been found to have a corrupted non-zero 64-bit
144 * address. Default is FALSE, do not favor the 32-bit addresses.
145 */
146ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, FALSE);
147
148/*
149 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
150 * with other ACPI implementations. NOTE: During ACPICA initialization,
151 * this value is set to TRUE if any Windows OSI strings have been
152 * requested by the BIOS.
153 */
154ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE);
155
156/*
157 * Disable runtime checking and repair of values returned by control methods.
158 * Use only if the repair is causing a problem on a particular machine.
159 */
160ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
161 54
162/*
163 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
164 * This can be useful for debugging ACPI problems on some machines.
165 */
166ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE);
167
168/*
169 * We keep track of the latest version of Windows that has been requested by
170 * the BIOS.
171 */
172ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
173
174#endif /* DEFINE_ACPI_GLOBALS */
175
176/*****************************************************************************
177 *
178 * ACPI Table globals
179 *
180 ****************************************************************************/
181
182/*
183 * Master list of all ACPI tables that were found in the RSDT/XSDT.
184 */
185ACPI_GLOBAL(struct acpi_table_list, acpi_gbl_root_table_list); 55ACPI_GLOBAL(struct acpi_table_list, acpi_gbl_root_table_list);
186 56
187/* DSDT information. Used to check for DSDT corruption */ 57/* DSDT information. Used to check for DSDT corruption */