ACPICA: Delete stale FADT functions outside tbfadt.c.
Moved all FADT-related functions to a new file, tbfadt.c. Eliminated the acpi_hw_initialize function - the FADT registers are now validated when the table is loaded. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
这个提交包含在:
@@ -50,103 +50,8 @@
|
||||
ACPI_MODULE_NAME("utinit")
|
||||
|
||||
/* Local prototypes */
|
||||
static void acpi_ut_fadt_register_error(char *register_name, u32 value);
|
||||
|
||||
static void acpi_ut_terminate(void);
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_ut_fadt_register_error
|
||||
*
|
||||
* PARAMETERS: register_name - Pointer to string identifying register
|
||||
* Value - Actual register contents value
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Display failure message
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void acpi_ut_fadt_register_error(char *register_name, u32 value)
|
||||
{
|
||||
|
||||
ACPI_WARNING((AE_INFO, "Invalid FADT value %s = %X",
|
||||
register_name, value));
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_ut_validate_fadt
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Validate various ACPI registers in the FADT
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
acpi_status acpi_ut_validate_fadt(void)
|
||||
{
|
||||
|
||||
/*
|
||||
* Verify Fixed ACPI Description Table fields,
|
||||
* but don't abort on any problems, just display error
|
||||
*/
|
||||
if (acpi_gbl_FADT.pm1_event_length < 4) {
|
||||
acpi_ut_fadt_register_error("Pm1EventLength",
|
||||
(u32) acpi_gbl_FADT.
|
||||
pm1_event_length);
|
||||
}
|
||||
|
||||
if (acpi_gbl_FADT.pm_timer_length < 4) {
|
||||
acpi_ut_fadt_register_error("PmTimerLength",
|
||||
(u32) acpi_gbl_FADT.
|
||||
pm_timer_length);
|
||||
}
|
||||
|
||||
if (!acpi_gbl_FADT.pm1_control_length) {
|
||||
acpi_ut_fadt_register_error("Pm1ControlLength", 0);
|
||||
}
|
||||
|
||||
if (!acpi_gbl_FADT.xpm1a_event_block.address) {
|
||||
acpi_ut_fadt_register_error("XPm1aEventBlock.Address", 0);
|
||||
}
|
||||
|
||||
if (!acpi_gbl_FADT.xpm1a_control_block.address) {
|
||||
acpi_ut_fadt_register_error("XPm1aControlBlock.Address", 0);
|
||||
}
|
||||
|
||||
if (!acpi_gbl_FADT.xpm_timer_block.address) {
|
||||
acpi_ut_fadt_register_error("XPmTimerBlock.Address", 0);
|
||||
}
|
||||
|
||||
if ((acpi_gbl_FADT.xpm2_control_block.address &&
|
||||
!acpi_gbl_FADT.pm2_control_length)) {
|
||||
acpi_ut_fadt_register_error("Pm2ControlLength",
|
||||
(u32) acpi_gbl_FADT.
|
||||
pm2_control_length);
|
||||
}
|
||||
|
||||
/* Length of GPE blocks must be a multiple of 2 */
|
||||
|
||||
if (acpi_gbl_FADT.xgpe0_block.address &&
|
||||
(acpi_gbl_FADT.gpe0_block_length & 1)) {
|
||||
acpi_ut_fadt_register_error("Gpe0BlockLength",
|
||||
(u32) acpi_gbl_FADT.
|
||||
gpe0_block_length);
|
||||
}
|
||||
|
||||
if (acpi_gbl_FADT.xgpe1_block.address &&
|
||||
(acpi_gbl_FADT.gpe1_block_length & 1)) {
|
||||
acpi_ut_fadt_register_error("Gpe1BlockLength",
|
||||
(u32) acpi_gbl_FADT.
|
||||
gpe1_block_length);
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_ut_terminate
|
||||
|
@@ -127,20 +127,6 @@ acpi_status acpi_enable_subsystem(u32 flags)
|
||||
|
||||
ACPI_FUNCTION_TRACE(acpi_enable_subsystem);
|
||||
|
||||
/*
|
||||
* We must initialize the hardware before we can enable ACPI.
|
||||
* The values from the FADT are validated here.
|
||||
*/
|
||||
if (!(flags & ACPI_NO_HARDWARE_INIT)) {
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
|
||||
"[Init] Initializing ACPI hardware\n"));
|
||||
|
||||
status = acpi_hw_initialize();
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable ACPI mode */
|
||||
|
||||
if (!(flags & ACPI_NO_ACPI_ENABLE)) {
|
||||
|
在新工单中引用
屏蔽一个用户