static int pdtt_init(fwts_framework *fw) { if (fwts_acpi_find_table(fw, "PDTT", 0, &table) != FWTS_OK) { fwts_log_error(fw, "Cannot load ACPI table"); return FWTS_ERROR; } if (table == NULL) { fwts_log_error(fw, "ACPI PDTT table does not exist, skipping test"); return FWTS_SKIP; } return FWTS_OK; }
static int waet_init(fwts_framework *fw) { if (fwts_acpi_find_table(fw, "WAET", 0, &table) != FWTS_OK) { fwts_log_error(fw, "Cannot read ACPI tables."); return FWTS_ERROR; } if (table == NULL || (table && table->length == 0)) { fwts_log_error(fw, "ACPI WAET table does not exist, skipping test"); return FWTS_SKIP; } return FWTS_OK; }
static int mcfg_init(fwts_framework *fw) { if (fwts_acpi_find_table(fw, "MCFG", 0, &mcfg_table) != FWTS_OK) { fwts_log_error(fw, "Cannot load ACPI table"); return FWTS_ERROR; } if (mcfg_table == NULL) { fwts_log_error(fw, "ACPI table MCFG not found. This table is " "required to check for PCI Express*"); return FWTS_ERROR; } return FWTS_OK; }
static int gtdt_init(fwts_framework *fw) { if (fwts_acpi_find_table(fw, "GTDT", 0, &table) != FWTS_OK) { fwts_log_error(fw, "Cannot read ACPI tables."); return FWTS_ERROR; } if (table == NULL || (table && table->length == 0)) { if (fw->flags & FWTS_FLAG_TEST_SBBR) { fwts_log_error(fw, "ACPI GTDT table does not exist"); return FWTS_ERROR; } else { fwts_log_error(fw, "ACPI GTDT table does not exist, skipping test"); return FWTS_SKIP; } } return FWTS_OK; }
static int spcr_init(fwts_framework *fw) { fwts_acpi_table_info *table; if (fwts_acpi_find_table(fw, "SPCR", 0, &table) != FWTS_OK) { fwts_log_error(fw, "Cannot read ACPI tables."); return FWTS_ERROR; } if (table == NULL || (table && table->length == 0)) { if (fw->flags & FWTS_FLAG_TEST_SBBR) { fwts_log_error(fw, "ACPI SPCR table does not exist"); return FWTS_ERROR; } else { fwts_log_error(fw, "ACPI SPCR table does not exist, skipping test"); return FWTS_SKIP; } } spcr = (const fwts_acpi_table_spcr*)table->data; return FWTS_OK; }