diff mbox

[3/3,RESEND] uefi: uefidump: Add support for VendorKeys

Message ID 1378450790-20650-1-git-send-email-ivan.hu@canonical.com
State Accepted
Headers show

Commit Message

Ivan Hu Sept. 6, 2013, 6:59 a.m. UTC
From: IvanHu <ivan.hu@canonical.com>

The VendorKeys variable is an 8-bit unsigned integer that defines whether the PK, KEK, db and dbx databases have been modified by anyone other than the platform vendor or a holder of the vendor-provided keys. This variable is new added to the UEFI spec version 2.4.

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/uefi/uefidump/uefidump.c |    8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Colin Ian King Sept. 6, 2013, 8:27 a.m. UTC | #1
On 06/09/13 07:59, Ivan Hu wrote:
> From: IvanHu <ivan.hu@canonical.com>
> 
> The VendorKeys variable is an 8-bit unsigned integer that defines whether the PK, KEK, db and dbx databases have been modified by anyone other than the platform vendor or a holder of the vendor-provided keys. This variable is new added to the UEFI spec version 2.4.
> 
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  src/uefi/uefidump/uefidump.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index 2a34d8e..7dd9683 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -723,6 +723,13 @@ static void uefidump_info_osindications_supported(fwts_framework *fw, fwts_uefi_
>  	}
>  }
>  
> +static void uefidump_info_vendor_keys(fwts_framework *fw, fwts_uefi_var *var)
> +{
> +	uint8_t value = (uint8_t)var->data[0];
> +
> +	fwts_log_info_verbatum(fw, "  Value: 0x%2.2" PRIx8 ".", value);
> +}
> +
>  static uefidump_info uefidump_info_table[] = {
>  	{ "PlatformLangCodes",	uefidump_info_platform_langcodes },
>  	{ "PlatformLang",	uefidump_info_platform_lang },
> @@ -749,6 +756,7 @@ static uefidump_info uefidump_info_table[] = {
>  	{ "SignatureSupport",	uefidump_info_signature_support },
>  	{ "HwErrRecSupport",	uefidump_info_hwerrrec_support },
>  	{ "OsIndicationsSupported",	uefidump_info_osindications_supported },
> +	{ "VendorKeys",		uefidump_info_vendor_keys },
>  	{ NULL, NULL }
>  };
>  
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
Keng-Yu Lin Sept. 9, 2013, 2:21 a.m. UTC | #2
On Fri, Sep 6, 2013 at 2:59 PM, Ivan Hu <ivan.hu@canonical.com> wrote:
> From: IvanHu <ivan.hu@canonical.com>
>
> The VendorKeys variable is an 8-bit unsigned integer that defines whether the PK, KEK, db and dbx databases have been modified by anyone other than the platform vendor or a holder of the vendor-provided keys. This variable is new added to the UEFI spec version 2.4.
>
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>  src/uefi/uefidump/uefidump.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index 2a34d8e..7dd9683 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -723,6 +723,13 @@ static void uefidump_info_osindications_supported(fwts_framework *fw, fwts_uefi_
>         }
>  }
>
> +static void uefidump_info_vendor_keys(fwts_framework *fw, fwts_uefi_var *var)
> +{
> +       uint8_t value = (uint8_t)var->data[0];
> +
> +       fwts_log_info_verbatum(fw, "  Value: 0x%2.2" PRIx8 ".", value);
> +}
> +
>  static uefidump_info uefidump_info_table[] = {
>         { "PlatformLangCodes",  uefidump_info_platform_langcodes },
>         { "PlatformLang",       uefidump_info_platform_lang },
> @@ -749,6 +756,7 @@ static uefidump_info uefidump_info_table[] = {
>         { "SignatureSupport",   uefidump_info_signature_support },
>         { "HwErrRecSupport",    uefidump_info_hwerrrec_support },
>         { "OsIndicationsSupported",     uefidump_info_osindications_supported },
> +       { "VendorKeys",         uefidump_info_vendor_keys },
>         { NULL, NULL }
>  };
>
> --
> 1.7.9.5
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
diff mbox

Patch

diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
index 2a34d8e..7dd9683 100644
--- a/src/uefi/uefidump/uefidump.c
+++ b/src/uefi/uefidump/uefidump.c
@@ -723,6 +723,13 @@  static void uefidump_info_osindications_supported(fwts_framework *fw, fwts_uefi_
 	}
 }
 
+static void uefidump_info_vendor_keys(fwts_framework *fw, fwts_uefi_var *var)
+{
+	uint8_t value = (uint8_t)var->data[0];
+
+	fwts_log_info_verbatum(fw, "  Value: 0x%2.2" PRIx8 ".", value);
+}
+
 static uefidump_info uefidump_info_table[] = {
 	{ "PlatformLangCodes",	uefidump_info_platform_langcodes },
 	{ "PlatformLang",	uefidump_info_platform_lang },
@@ -749,6 +756,7 @@  static uefidump_info uefidump_info_table[] = {
 	{ "SignatureSupport",	uefidump_info_signature_support },
 	{ "HwErrRecSupport",	uefidump_info_hwerrrec_support },
 	{ "OsIndicationsSupported",	uefidump_info_osindications_supported },
+	{ "VendorKeys",		uefidump_info_vendor_keys },
 	{ NULL, NULL }
 };