Re: [PATCH v8 3/8] powerpc: detect the trusted boot state of the system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nayna Jain <nayna@xxxxxxxxxxxxx> 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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux