ACK: [PATCH 2/6] uefidump: add dumping global variabl DeployedMode

Alex Hung alex.hung at canonical.com
Tue Dec 22 06:40:32 UTC 2015


On 12/18/2015 02:31 PM, Ivan Hu wrote:
> sync up with uefi spec 2.5
>
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
>   src/uefi/uefidump/uefidump.c | 25 +++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)
>
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index b89ed89..a96eb2f 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -1285,6 +1285,30 @@ static void uefidump_info_audit_mode(fwts_framework *fw, fwts_uefi_var *var)
>   	}
>   }
>
> +static void uefidump_info_deployed_mode(fwts_framework *fw, fwts_uefi_var *var)
> +{
> +	if (var->datalen != 1) {
> +		/* Should be 1 byte, of not, dump it out as a hex dump */
> +		uefidump_var_hexdump(fw, var);
> +	} else {
> +		char *mode;
> +		uint8_t value = (uint8_t)var->data[0];
> +
> +		switch (value) {
> +		case 0:
> +			mode = " (Not in Deployed Mode)";
> +			break;
> +		case 1:
> +			mode = " (In Deployed Mode)";
> +			break;
> +		default:
> +			mode = "";
> +			break;
> +		}
> +		fwts_log_info_verbatum(fw, "  Value: 0x%2.2x%s.", value, mode);
> +	}
> +}
> +
>   static uefidump_info uefidump_info_table[] = {
>   	{ "PlatformLangCodes",	uefidump_info_platform_langcodes },
>   	{ "PlatformLang",	uefidump_info_platform_lang },
> @@ -1316,6 +1340,7 @@ static uefidump_info uefidump_info_table[] = {
>   	{ "KEK",		uefidump_info_signaturedatabase },
>   	{ "PK",			uefidump_info_signaturedatabase },
>   	{ "AuditMode",		uefidump_info_audit_mode },
> +	{ "DeployedMode",	uefidump_info_deployed_mode },
>   	{ NULL, NULL }
>   };
>
>

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list