diff options
author | Bob Moore <robert.moore@intel.com> | 2011-11-15 21:57:28 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-01-17 03:36:28 -0500 |
commit | 22e5b40ab21fcac21db0ff25fbb844ffecc73a4a (patch) | |
tree | 6fe339a8c410d2f8f2a0f844c976046d3be47e17 | |
parent | 2355e10f07b2c550c671f98b68aedf323c299aeb (diff) |
ACPI 5.0: Implement hardware-reduced option
If HW-reduced flag is set in the FADT, do not attempt to access
or initialize any ACPI hardware, including SCI and global lock.
No FACS will be present.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/acpi/acpica/acglobal.h | 13 | ||||
-rw-r--r-- | drivers/acpi/acpica/evevent.c | 12 | ||||
-rw-r--r-- | drivers/acpi/acpica/evglock.c | 6 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbfadt.c | 22 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbutils.c | 7 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 1 |
6 files changed, 58 insertions, 3 deletions
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index 76dc02f15574..25912a93dea7 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h | |||
@@ -140,8 +140,19 @@ u32 acpi_gbl_trace_flags; | |||
140 | acpi_name acpi_gbl_trace_method_name; | 140 | acpi_name acpi_gbl_trace_method_name; |
141 | u8 acpi_gbl_system_awake_and_running; | 141 | u8 acpi_gbl_system_awake_and_running; |
142 | 142 | ||
143 | /* | ||
144 | * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning | ||
145 | * that the ACPI hardware is no longer required. A flag in the FADT indicates | ||
146 | * a reduced HW machine, and that flag is duplicated here for convenience. | ||
147 | */ | ||
148 | u8 acpi_gbl_reduced_hardware; | ||
149 | |||
143 | #endif | 150 | #endif |
144 | 151 | ||
152 | /* Do not disassemble buffers to resource descriptors */ | ||
153 | |||
154 | ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE); | ||
155 | |||
145 | /***************************************************************************** | 156 | /***************************************************************************** |
146 | * | 157 | * |
147 | * Debug support | 158 | * Debug support |
@@ -207,7 +218,7 @@ ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock; | |||
207 | 218 | ||
208 | /***************************************************************************** | 219 | /***************************************************************************** |
209 | * | 220 | * |
210 | * Mutual exlusion within ACPICA subsystem | 221 | * Mutual exclusion within ACPICA subsystem |
211 | * | 222 | * |
212 | ****************************************************************************/ | 223 | ****************************************************************************/ |
213 | 224 | ||
diff --git a/drivers/acpi/acpica/evevent.c b/drivers/acpi/acpica/evevent.c index d458b041e651..1f43be470199 100644 --- a/drivers/acpi/acpica/evevent.c +++ b/drivers/acpi/acpica/evevent.c | |||
@@ -71,6 +71,12 @@ acpi_status acpi_ev_initialize_events(void) | |||
71 | 71 | ||
72 | ACPI_FUNCTION_TRACE(ev_initialize_events); | 72 | ACPI_FUNCTION_TRACE(ev_initialize_events); |
73 | 73 | ||
74 | /* If Hardware Reduced flag is set, there are no fixed events */ | ||
75 | |||
76 | if (acpi_gbl_reduced_hardware) { | ||
77 | return_ACPI_STATUS(AE_OK); | ||
78 | } | ||
79 | |||
74 | /* | 80 | /* |
75 | * Initialize the Fixed and General Purpose Events. This is done prior to | 81 | * Initialize the Fixed and General Purpose Events. This is done prior to |
76 | * enabling SCIs to prevent interrupts from occurring before the handlers | 82 | * enabling SCIs to prevent interrupts from occurring before the handlers |
@@ -111,6 +117,12 @@ acpi_status acpi_ev_install_xrupt_handlers(void) | |||
111 | 117 | ||
112 | ACPI_FUNCTION_TRACE(ev_install_xrupt_handlers); | 118 | ACPI_FUNCTION_TRACE(ev_install_xrupt_handlers); |
113 | 119 | ||
120 | /* If Hardware Reduced flag is set, there is no ACPI h/w */ | ||
121 | |||
122 | if (acpi_gbl_reduced_hardware) { | ||
123 | return_ACPI_STATUS(AE_OK); | ||
124 | } | ||
125 | |||
114 | /* Install the SCI handler */ | 126 | /* Install the SCI handler */ |
115 | 127 | ||
116 | status = acpi_ev_install_sci_handler(); | 128 | status = acpi_ev_install_sci_handler(); |
diff --git a/drivers/acpi/acpica/evglock.c b/drivers/acpi/acpica/evglock.c index 56a562a1e5d7..af1e71af1b64 100644 --- a/drivers/acpi/acpica/evglock.c +++ b/drivers/acpi/acpica/evglock.c | |||
@@ -70,6 +70,12 @@ acpi_status acpi_ev_init_global_lock_handler(void) | |||
70 | 70 | ||
71 | ACPI_FUNCTION_TRACE(ev_init_global_lock_handler); | 71 | ACPI_FUNCTION_TRACE(ev_init_global_lock_handler); |
72 | 72 | ||
73 | /* If Hardware Reduced flag is set, there is no global lock */ | ||
74 | |||
75 | if (acpi_gbl_reduced_hardware) { | ||
76 | return_ACPI_STATUS(AE_OK); | ||
77 | } | ||
78 | |||
73 | /* Attempt installation of the global lock handler */ | 79 | /* Attempt installation of the global lock handler */ |
74 | 80 | ||
75 | status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL, | 81 | status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL, |
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c index 536fd2bc7a47..1e1a7de34439 100644 --- a/drivers/acpi/acpica/tbfadt.c +++ b/drivers/acpi/acpica/tbfadt.c | |||
@@ -253,8 +253,13 @@ void acpi_tb_parse_fadt(u32 table_index) | |||
253 | acpi_tb_install_table((acpi_physical_address) acpi_gbl_FADT.Xdsdt, | 253 | acpi_tb_install_table((acpi_physical_address) acpi_gbl_FADT.Xdsdt, |
254 | ACPI_SIG_DSDT, ACPI_TABLE_INDEX_DSDT); | 254 | ACPI_SIG_DSDT, ACPI_TABLE_INDEX_DSDT); |
255 | 255 | ||
256 | acpi_tb_install_table((acpi_physical_address) acpi_gbl_FADT.Xfacs, | 256 | /* If Hardware Reduced flag is set, there is no FACS */ |
257 | ACPI_SIG_FACS, ACPI_TABLE_INDEX_FACS); | 257 | |
258 | if (!acpi_gbl_reduced_hardware) { | ||
259 | acpi_tb_install_table((acpi_physical_address) acpi_gbl_FADT. | ||
260 | Xfacs, ACPI_SIG_FACS, | ||
261 | ACPI_TABLE_INDEX_FACS); | ||
262 | } | ||
258 | } | 263 | } |
259 | 264 | ||
260 | /******************************************************************************* | 265 | /******************************************************************************* |
@@ -297,6 +302,13 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length) | |||
297 | ACPI_MEMCPY(&acpi_gbl_FADT, table, | 302 | ACPI_MEMCPY(&acpi_gbl_FADT, table, |
298 | ACPI_MIN(length, sizeof(struct acpi_table_fadt))); | 303 | ACPI_MIN(length, sizeof(struct acpi_table_fadt))); |
299 | 304 | ||
305 | /* Take a copy of the Hardware Reduced flag */ | ||
306 | |||
307 | acpi_gbl_reduced_hardware = FALSE; | ||
308 | if (acpi_gbl_FADT.flags & ACPI_FADT_HW_REDUCED) { | ||
309 | acpi_gbl_reduced_hardware = TRUE; | ||
310 | } | ||
311 | |||
300 | /* Convert the local copy of the FADT to the common internal format */ | 312 | /* Convert the local copy of the FADT to the common internal format */ |
301 | 313 | ||
302 | acpi_tb_convert_fadt(); | 314 | acpi_tb_convert_fadt(); |
@@ -502,6 +514,12 @@ static void acpi_tb_validate_fadt(void) | |||
502 | acpi_gbl_FADT.Xdsdt = (u64) acpi_gbl_FADT.dsdt; | 514 | acpi_gbl_FADT.Xdsdt = (u64) acpi_gbl_FADT.dsdt; |
503 | } | 515 | } |
504 | 516 | ||
517 | /* If Hardware Reduced flag is set, we are all done */ | ||
518 | |||
519 | if (acpi_gbl_reduced_hardware) { | ||
520 | return; | ||
521 | } | ||
522 | |||
505 | /* Examine all of the 64-bit extended address fields (X fields) */ | 523 | /* Examine all of the 64-bit extended address fields (X fields) */ |
506 | 524 | ||
507 | for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) { | 525 | for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) { |
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 0f2d395feaba..da56a1908966 100644 --- a/drivers/acpi/acpica/tbutils.c +++ b/drivers/acpi/acpica/tbutils.c | |||
@@ -135,6 +135,13 @@ acpi_status acpi_tb_initialize_facs(void) | |||
135 | { | 135 | { |
136 | acpi_status status; | 136 | acpi_status status; |
137 | 137 | ||
138 | /* If Hardware Reduced flag is set, there is no FACS */ | ||
139 | |||
140 | if (acpi_gbl_reduced_hardware) { | ||
141 | acpi_gbl_FACS = NULL; | ||
142 | return (AE_OK); | ||
143 | } | ||
144 | |||
138 | status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS, | 145 | status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS, |
139 | ACPI_CAST_INDIRECT_PTR(struct | 146 | ACPI_CAST_INDIRECT_PTR(struct |
140 | acpi_table_header, | 147 | acpi_table_header, |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index f554a9313b43..9ba2e3aff5c6 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.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 | /* |