diff mbox series

[V2] acpi/boot: skip ACPI BOOT test on UEFI systems.

Message ID 20190919100930.11920-1-alex.hung@canonical.com
State Accepted
Headers show
Series [V2] acpi/boot: skip ACPI BOOT test on UEFI systems. | expand

Commit Message

Alex Hung Sept. 19, 2019, 10:09 a.m. UTC
BOOT table is for PC-AT BIOS, and UEFI systems shall use
SimpleBootFlag variable is stored in NVRAM.

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/acpi/boot/boot.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Colin Ian King Sept. 19, 2019, 10:10 a.m. UTC | #1
On 19/09/2019 12:09, Alex Hung wrote:
> BOOT table is for PC-AT BIOS, and UEFI systems shall use
> SimpleBootFlag variable is stored in NVRAM.
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/acpi/boot/boot.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/acpi/boot/boot.c b/src/acpi/boot/boot.c
> index 081b8b37..c1ea810c 100644
> --- a/src/acpi/boot/boot.c
> +++ b/src/acpi/boot/boot.c
> @@ -35,6 +35,10 @@ static int boot_init(fwts_framework *fw)
>  		fwts_log_error(fw, "Cannot read ACPI tables.");
>  		return FWTS_ERROR;
>  	}
> +	if (fwts_firmware_detect() == FWTS_FIRMWARE_UEFI) {
> +		fwts_log_error(fw, "ACPI BOOT table is depreciated on UEFI firmware, skipping test");
> +		return FWTS_SKIP;
> +	}
>  	if (table == NULL || (table && table->length == 0)) {
>  		fwts_log_error(fw, "ACPI BOOT table does not exist, skipping test");
>  		return FWTS_SKIP;
> 

Acked-by: Colin Ian King <colin.king@canonical.com>
Ivan Hu Sept. 20, 2019, 12:58 p.m. UTC | #2
On 9/19/19 6:09 PM, Alex Hung wrote:
> BOOT table is for PC-AT BIOS, and UEFI systems shall use
> SimpleBootFlag variable is stored in NVRAM.
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/acpi/boot/boot.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/acpi/boot/boot.c b/src/acpi/boot/boot.c
> index 081b8b37..c1ea810c 100644
> --- a/src/acpi/boot/boot.c
> +++ b/src/acpi/boot/boot.c
> @@ -35,6 +35,10 @@ static int boot_init(fwts_framework *fw)
>  		fwts_log_error(fw, "Cannot read ACPI tables.");
>  		return FWTS_ERROR;
>  	}
> +	if (fwts_firmware_detect() == FWTS_FIRMWARE_UEFI) {
> +		fwts_log_error(fw, "ACPI BOOT table is depreciated on UEFI firmware, skipping test");
> +		return FWTS_SKIP;
> +	}
>  	if (table == NULL || (table && table->length == 0)) {
>  		fwts_log_error(fw, "ACPI BOOT table does not exist, skipping test");
>  		return FWTS_SKIP;


Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox series

Patch

diff --git a/src/acpi/boot/boot.c b/src/acpi/boot/boot.c
index 081b8b37..c1ea810c 100644
--- a/src/acpi/boot/boot.c
+++ b/src/acpi/boot/boot.c
@@ -35,6 +35,10 @@  static int boot_init(fwts_framework *fw)
 		fwts_log_error(fw, "Cannot read ACPI tables.");
 		return FWTS_ERROR;
 	}
+	if (fwts_firmware_detect() == FWTS_FIRMWARE_UEFI) {
+		fwts_log_error(fw, "ACPI BOOT table is depreciated on UEFI firmware, skipping test");
+		return FWTS_SKIP;
+	}
 	if (table == NULL || (table && table->length == 0)) {
 		fwts_log_error(fw, "ACPI BOOT table does not exist, skipping test");
 		return FWTS_SKIP;