[arm64] Add cpu_to_fdt32() when setting Secure Boot flag in FDT

This commit is contained in:
Ben Hutchings 2016-09-03 18:35:05 +01:00
parent 75b51a8352
commit a0fdc8e585
2 changed files with 12 additions and 2 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
linux (4.7.2-2) UNRELEASED; urgency=medium
* [arm64] Add cpu_to_fdt32() when setting Secure Boot flag in FDT
-- Ben Hutchings <ben@decadent.org.uk> Sat, 03 Sep 2016 18:34:31 +0100
linux (4.7.2-1) unstable; urgency=medium
* New upstream release: https://kernelnewbies.org/Linux_4.7

View File

@ -1,5 +1,5 @@
From: Linn Crosetto <linn@hpe.com>
Date: Mon, 22 Feb 2016 13:41:52 -0700
Date: Tue, 30 Aug 2016 11:54:38 -0600
Subject: arm64: add kernel config option to set securelevel when in Secure Boot mode
Add a kernel configuration option to enable securelevel, to restrict
@ -11,6 +11,10 @@ kernel using the FDT.
Signed-off-by: Linn Crosetto <linn@hpe.com>
---
v2:
- Add cpu_to_fdt32() when setting Secure Boot flag in FDT (Ben Hutchings)
arch/arm64/Kconfig | 13 +++++++++++++
drivers/firmware/efi/arm-init.c | 7 +++++++
drivers/firmware/efi/efi.c | 3 ++-
@ -103,7 +107,7 @@ Signed-off-by: Linn Crosetto <linn@hpe.com>
}
}
+
+ fdt_val32 = efi_get_secureboot(sys_table);
+ fdt_val32 = cpu_to_fdt32(efi_get_secureboot(sys_table));
+ status = fdt_setprop(fdt, node, "linux,uefi-secure-boot",
+ &fdt_val32, sizeof(fdt_val32));
+ if (status)