提交 b89b71a0 编写于 作者: B Bob Moore 提交者: Len Brown

ACPICA: Cleanup of FADT verification function.

Removed offset display, not needed.
Signed-off-by: NAlexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 0eaa14c0
...@@ -50,8 +50,7 @@ ...@@ -50,8 +50,7 @@
ACPI_MODULE_NAME("utinit") ACPI_MODULE_NAME("utinit")
/* Local prototypes */ /* Local prototypes */
static void static void acpi_ut_fadt_register_error(char *register_name, u32 value);
acpi_ut_fadt_register_error(char *register_name, u32 value, u8 offset);
static void acpi_ut_terminate(void); static void acpi_ut_terminate(void);
...@@ -61,21 +60,18 @@ static void acpi_ut_terminate(void); ...@@ -61,21 +60,18 @@ static void acpi_ut_terminate(void);
* *
* PARAMETERS: register_name - Pointer to string identifying register * PARAMETERS: register_name - Pointer to string identifying register
* Value - Actual register contents value * Value - Actual register contents value
* Offset - Byte offset in the FADT
* *
* RETURN: AE_BAD_VALUE * RETURN: None
* *
* DESCRIPTION: Display failure message * DESCRIPTION: Display failure message
* *
******************************************************************************/ ******************************************************************************/
static void static void acpi_ut_fadt_register_error(char *register_name, u32 value)
acpi_ut_fadt_register_error(char *register_name, u32 value, u8 offset)
{ {
ACPI_WARNING((AE_INFO, ACPI_WARNING((AE_INFO, "Invalid FADT value %s = %X",
"Invalid FADT value %s=%X at offset %X in FADT=%p", register_name, value));
register_name, value, offset, &acpi_gbl_FADT));
} }
/****************************************************************************** /******************************************************************************
...@@ -98,69 +94,54 @@ acpi_status acpi_ut_validate_fadt(void) ...@@ -98,69 +94,54 @@ acpi_status acpi_ut_validate_fadt(void)
* but don't abort on any problems, just display error * but don't abort on any problems, just display error
*/ */
if (acpi_gbl_FADT.pm1_event_length < 4) { if (acpi_gbl_FADT.pm1_event_length < 4) {
acpi_ut_fadt_register_error("PM1_EVT_LEN", acpi_ut_fadt_register_error("Pm1EventLength",
(u32) acpi_gbl_FADT. (u32) acpi_gbl_FADT.
pm1_event_length, pm1_event_length);
ACPI_FADT_OFFSET(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) { if (!acpi_gbl_FADT.pm1_control_length) {
acpi_ut_fadt_register_error("PM1_CNT_LEN", 0, acpi_ut_fadt_register_error("Pm1ControlLength", 0);
ACPI_FADT_OFFSET
(pm1_control_length));
} }
if (!acpi_gbl_FADT.xpm1a_event_block.address) { if (!acpi_gbl_FADT.xpm1a_event_block.address) {
acpi_ut_fadt_register_error("X_PM1a_EVT_BLK", 0, acpi_ut_fadt_register_error("XPm1aEventBlock.Address", 0);
ACPI_FADT_OFFSET(xpm1a_event_block.
address));
} }
if (!acpi_gbl_FADT.xpm1a_control_block.address) { if (!acpi_gbl_FADT.xpm1a_control_block.address) {
acpi_ut_fadt_register_error("X_PM1a_CNT_BLK", 0, acpi_ut_fadt_register_error("XPm1aControlBlock.Address", 0);
ACPI_FADT_OFFSET
(xpm1a_control_block.address));
} }
if (!acpi_gbl_FADT.xpm_timer_block.address) { if (!acpi_gbl_FADT.xpm_timer_block.address) {
acpi_ut_fadt_register_error("X_PM_TMR_BLK", 0, acpi_ut_fadt_register_error("XPmTimerBlock.Address", 0);
ACPI_FADT_OFFSET(xpm_timer_block.
address));
} }
if ((acpi_gbl_FADT.xpm2_control_block.address && if ((acpi_gbl_FADT.xpm2_control_block.address &&
!acpi_gbl_FADT.pm2_control_length)) { !acpi_gbl_FADT.pm2_control_length)) {
acpi_ut_fadt_register_error("PM2_CNT_LEN", acpi_ut_fadt_register_error("Pm2ControlLength",
(u32) acpi_gbl_FADT. (u32) acpi_gbl_FADT.
pm2_control_length, pm2_control_length);
ACPI_FADT_OFFSET
(pm2_control_length));
}
if (acpi_gbl_FADT.pm_timer_length < 4) {
acpi_ut_fadt_register_error("PM_TM_LEN",
(u32) acpi_gbl_FADT.pm_timer_length,
ACPI_FADT_OFFSET(pm_timer_length));
} }
/* Length of GPE blocks must be a multiple of 2 */ /* Length of GPE blocks must be a multiple of 2 */
if (acpi_gbl_FADT.xgpe0_block.address && if (acpi_gbl_FADT.xgpe0_block.address &&
(acpi_gbl_FADT.gpe0_block_length & 1)) { (acpi_gbl_FADT.gpe0_block_length & 1)) {
acpi_ut_fadt_register_error("(x)GPE0_BLK_LEN", acpi_ut_fadt_register_error("Gpe0BlockLength",
(u32) acpi_gbl_FADT. (u32) acpi_gbl_FADT.
gpe0_block_length, gpe0_block_length);
ACPI_FADT_OFFSET
(gpe0_block_length));
} }
if (acpi_gbl_FADT.xgpe1_block.address && if (acpi_gbl_FADT.xgpe1_block.address &&
(acpi_gbl_FADT.gpe1_block_length & 1)) { (acpi_gbl_FADT.gpe1_block_length & 1)) {
acpi_ut_fadt_register_error("(x)GPE1_BLK_LEN", acpi_ut_fadt_register_error("Gpe1BlockLength",
(u32) acpi_gbl_FADT. (u32) acpi_gbl_FADT.
gpe1_block_length, gpe1_block_length);
ACPI_FADT_OFFSET
(gpe1_block_length));
} }
return (AE_OK); return (AE_OK);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册