48 #define _COMPONENT ACPI_TABLES
57 static
void acpi_tb_convert_fadt(
void);
59 static
void acpi_tb_validate_fadt(
void);
61 static
void acpi_tb_setup_fadt_registers(
void);
75 #define ACPI_FADT_OPTIONAL 0
76 #define ACPI_FADT_REQUIRED 1
77 #define ACPI_FADT_SEPARATE_LENGTH 2
137 #define ACPI_FADT_INFO_ENTRIES \
138 (sizeof (fadt_info_table) / sizeof (struct acpi_fadt_info))
167 #define ACPI_FADT_PM_INFO_ENTRIES \
168 (sizeof (fadt_pm_info_table) / sizeof (struct acpi_fadt_pm_info))
195 bit_width = (
u8)(byte_width * 8);
197 if (byte_width > 31) {
199 "%s - 32-bit FADT register is too long (%u bytes, %u bits) "
200 "to convert to GAS struct - 255 bits max, truncating",
201 register_name, byte_width, (byte_width * 8)));
214 generic_address->
space_id = space_id;
307 "FADT (revision %u) is longer than ACPI 5.0 version, "
308 "truncating length %u to %u",
331 acpi_tb_convert_fadt();
335 acpi_tb_validate_fadt();
339 acpi_tb_setup_fadt_registers();
376 static void acpi_tb_convert_fadt(
void)
394 "32/64 FACS address mismatch in FADT - two FACS tables!"));
402 "32/64 DSDT address mismatch in FADT - two DSDT tables!"));
444 fadt_info_table[i].address32);
448 fadt_info_table[i].address64);
454 if (address64->
address && address32 &&
457 "32/64X address mismatch in FADT/%s: "
458 "0x%8.8X/0x%8.8X%8.8X, using 32",
459 fadt_info_table[i].
name, address32,
471 acpi_tb_init_generic_address(address64,
478 fadt_info_table[i].
name);
503 static void acpi_tb_validate_fadt(
void)
518 "32/64X FACS address mismatch in FADT - "
519 "0x%8.8X/0x%8.8X%8.8X, using 32",
529 "32/64X DSDT address mismatch in FADT - "
530 "0x%8.8X/0x%8.8X%8.8X, using 32",
539 if (acpi_gbl_reduced_hardware) {
552 fadt_info_table[i].address64);
555 fadt_info_table[i].length);
556 name = fadt_info_table[
i].
name;
565 "32/64X length mismatch in FADT/%s: %u/%u",
575 if (!address64->
address || !length) {
577 "Required FADT field %s has zero address and/or length: "
590 if ((address64->
address && !length) ||
591 (!address64->
address && length)) {
593 "Optional FADT field %s has zero address or length: "
617 static void acpi_tb_setup_fadt_registers(
void)
621 u8 pm1_register_byte_width;
628 if (acpi_gbl_use_default_register_widths) {
633 fadt_info_table[i].address64);
644 "Invalid length for FADT/%s: %u, using default %u",
645 fadt_info_table[i].name,
663 pm1_register_byte_width = (
u8)
683 fadt_pm_info_table[i].
source);
686 acpi_tb_init_generic_address(fadt_pm_info_table[i].
688 pm1_register_byte_width,
690 (fadt_pm_info_table[i].
692 pm1_register_byte_width),