[PATCH v8 3/8] powerpc: detect the trusted boot state of the system
Michael Ellerman
mpe at ellerman.id.au
Wed Oct 23 10:38:38 AEDT 2019
Nayna Jain <nayna at linux.ibm.com> writes:
> diff --git a/arch/powerpc/kernel/secure_boot.c b/arch/powerpc/kernel/secure_boot.c
> index 99bba7915629..9753470ab08a 100644
> --- a/arch/powerpc/kernel/secure_boot.c
> +++ b/arch/powerpc/kernel/secure_boot.c
> @@ -28,3 +39,16 @@ bool is_ppc_secureboot_enabled(void)
> pr_info("Secure boot mode %s\n", enabled ? "enabled" : "disabled");
> return enabled;
> }
> +
> +bool is_ppc_trustedboot_enabled(void)
> +{
> + struct device_node *node;
> + bool enabled = false;
> +
> + node = get_ppc_fw_sb_node();
> + enabled = of_property_read_bool(node, "trusted-enabled");
Also here you need:
of_node_put(node);
> +
> + pr_info("Trusted boot mode %s\n", enabled ? "enabled" : "disabled");
> +
> + return enabled;
> +}
cheers
More information about the Linuxppc-dev
mailing list