From: Ard Biesheuvel Date: Thu, 2 Feb 2023 17:30:06 +0000 (+0100) Subject: efi: Accept version 2 of memory attributes table X-Git-Tag: baikal/aarch64/sdk6.1~80 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=6a3ef369100160520f45911fc8c16badcd6a03f3;p=kernel.git efi: Accept version 2 of memory attributes table commit 636ab417a7aec4ee993916e688eb5c5977570836 upstream. UEFI v2.10 introduces version 2 of the memory attributes table, which turns the reserved field into a flags field, but is compatible with version 1 in all other respects. So let's not complain about version 2 if we encounter it. Cc: Signed-off-by: Ard Biesheuvel Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/firmware/efi/memattr.c b/drivers/firmware/efi/memattr.c index 0a9aba5f9ceff..f178b2984dfb2 100644 --- a/drivers/firmware/efi/memattr.c +++ b/drivers/firmware/efi/memattr.c @@ -33,7 +33,7 @@ int __init efi_memattr_init(void) return -ENOMEM; } - if (tbl->version > 1) { + if (tbl->version > 2) { pr_warn("Unexpected EFI Memory Attributes table version %d\n", tbl->version); goto unmap;