[PATCH 5/6] uefi: uefidump: Add support for AcpiGlobalVariable

IvanHu ivan.hu at canonical.com
Wed Sep 5 07:23:18 UTC 2012


On 09/03/2012 11:52 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> AcpiGlobalVariable contains the 64 bit address of the ACPI global
> variable memory region, so dump this out too.
> ---
>   src/uefi/uefidump/uefidump.c |   17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
>
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index 8f4c788..d7f4dd6 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -601,6 +601,22 @@ static void uefidump_info_morc(fwts_framework *fw, fwts_uefi_var *var)
>   	}
>   }
>
> +/*
> + *  Dump ACPI global variable address
> + */
> +static void uefidump_info_acpi_global_variable(fwts_framework *fw, fwts_uefi_var *var)
> +{
> +	if (var->datalen != 8) {
> +		/* Should be 8 bytes, of not, dump it out as a hex dump */
> +		uefidump_var_hexdump(fw, var);
> +	} else {
> +		uint64_t value;
> +
> +		memcpy(&value, var->data, sizeof(uint64_t));
> +		fwts_log_info_verbatum(fw, "  ACPI Global Variable Address: 0x%16.16llx.", (unsigned long long)value);
> +	}
> +}
> +
>   static uefidump_info uefidump_info_table[] = {
>   	{ "PlatformLangCodes",	uefidump_info_platform_langcodes },
>   	{ "PlatformLang",	uefidump_info_platform_lang },
> @@ -623,6 +639,7 @@ static uefidump_info uefidump_info_table[] = {
>   	{ "SecureBoot",		uefidump_info_secure_boot },
>   	{ "SetupMode",		uefidump_info_setup_mode },
>   	{ "MemoryOverwriteRequestControl",	uefidump_info_morc },
> +	{ "AcpiGlobalVariable",	uefidump_info_acpi_global_variable },
>   	{ NULL, NULL }
>   };
>
>


Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list