@@ -758,53 +758,33 @@ static void acpi_table_check_fadt_smi_cmd(fwts_framework *fw)
static void acpi_table_check_fadt_acpi_enable(fwts_framework *fw)
{
- if (fadt->acpi_enable == 0)
- if (fadt->smi_cmd == 0)
- fwts_passed(fw, "FADT SMI ACPI enable command is zero, "
- "which is allowed since SMM is not "
- "supported, or machine is in legacy mode.");
- else
- fwts_failed(fw, LOG_LEVEL_MEDIUM,
- "SMMHasNoAcpiEnableCmd",
- "FADT SMI ACPI enable command is zero, "
- "but this is not allowed when SMM "
- "is supported.");
- else
+ if (fadt->acpi_enable != 0) {
if (fadt->smi_cmd == 0)
- fwts_failed(fw, LOG_LEVEL_MEDIUM,
+ fwts_failed(fw, LOG_LEVEL_HIGH,
"SMMNeedsAcpiEnableCmd",
"FADT SMI ACPI enable command is non-zero, "
"but SMM is not supported.");
else
fwts_passed(fw, "FADT SMI ACPI enable command is "
"non-zero, and SMM is supported.");
+ }
+
return;
}
static void acpi_table_check_fadt_acpi_disable(fwts_framework *fw)
{
- if (fadt->acpi_disable == 0)
- if (fadt->smi_cmd == 0)
- fwts_passed(fw,
- "FADT SMI ACPI disable command is zero, "
- "which is allowed since SMM is not "
- "supported, or machine is in legacy mode.");
- else
- fwts_failed(fw, LOG_LEVEL_MEDIUM,
- "SMMHasNoAcpiDisableCmd",
- "FADT SMI ACPI disable command is zero, "
- "but this is not allowed when SMM "
- "is supported.");
- else
+ if (fadt->acpi_disable != 0) {
if (fadt->smi_cmd == 0)
- fwts_failed(fw, LOG_LEVEL_MEDIUM,
+ fwts_failed(fw, LOG_LEVEL_HIGH,
"SMMNeedsAcpiDisableCmd",
"FADT SMI ACPI disable command is "
"non-zero, but SMM is not supported.");
else
fwts_passed(fw, "FADT SMI ACPI disable command is "
"non-zero, and SMM is supported.");
+ }
return;
}
BugLink: https://bugs.launchpad.net/fwts/+bug/2032158 We should not ecpect smi_cmd to be zero if acpi_enable/acpi_disable is zero. Checking the ACPI specification, ACPI_ENABLE This field is reserved and must be zero on systems that do not support Legacy Mode. ACPI_DISABLE This field is reserved and must be zero on systems that do not support Legacy Mode. SMI_CMD This field is reserved and must be zero on system that does not support System Management mode. It doesn't force the SMI_COM shoud be zero if acpi_enable/acpi_disable is zero. Some projects enable ACPI mode with DXE_DRIVER and doesn't switch back to legacy mode once booted to OS. They support SMM as well. So it got, SMI_CMD is not zero ACPI_ENABLE is zero ACPI_DISABLE is zero Signed-off-by: Ivan Hu <ivan.hu@canonical.com> --- src/acpi/fadt/fadt.c | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-)