summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/secure_boot.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2020-12-15 01:27:23 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-12-15 01:27:23 +0100
commit4b4193256c8d3bc3a5397b5cd9494c2ad386317d (patch)
treeb6b070f8893384b5d563fc616018e7d5644b2ece /arch/powerpc/kernel/secure_boot.c
parentInput: goodix - add upside-down quirk for Teclast X98 Pro tablet (diff)
parentInput: da7280 - fix spelling mistake "sequemce" -> "sequence" (diff)
downloadlinux-4b4193256c8d3bc3a5397b5cd9494c2ad386317d.tar.xz
linux-4b4193256c8d3bc3a5397b5cd9494c2ad386317d.zip
Merge branch 'next' into for-linus
Prepare input updates for 5.11 merge window.
Diffstat (limited to 'arch/powerpc/kernel/secure_boot.c')
-rw-r--r--arch/powerpc/kernel/secure_boot.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/secure_boot.c b/arch/powerpc/kernel/secure_boot.c
index 4b982324d368..f9af305d9579 100644
--- a/arch/powerpc/kernel/secure_boot.c
+++ b/arch/powerpc/kernel/secure_boot.c
@@ -23,12 +23,19 @@ bool is_ppc_secureboot_enabled(void)
{
struct device_node *node;
bool enabled = false;
+ u32 secureboot;
node = get_ppc_fw_sb_node();
enabled = of_property_read_bool(node, "os-secureboot-enforcing");
-
of_node_put(node);
+ if (enabled)
+ goto out;
+
+ if (!of_property_read_u32(of_root, "ibm,secure-boot", &secureboot))
+ enabled = (secureboot > 1);
+
+out:
pr_info("Secure boot mode %s\n", enabled ? "enabled" : "disabled");
return enabled;
@@ -38,12 +45,19 @@ bool is_ppc_trustedboot_enabled(void)
{
struct device_node *node;
bool enabled = false;
+ u32 trustedboot;
node = get_ppc_fw_sb_node();
enabled = of_property_read_bool(node, "trusted-enabled");
-
of_node_put(node);
+ if (enabled)
+ goto out;
+
+ if (!of_property_read_u32(of_root, "ibm,trusted-boot", &trustedboot))
+ enabled = (trustedboot > 0);
+
+out:
pr_info("Trusted boot mode %s\n", enabled ? "enabled" : "disabled");
return enabled;