ACK: [PATCH 2/3] uefi: uefidump: add the PIWG Firmware File subtype-6 support on media device path type for uefidump (LP: #1260147)

Alex Hung alex.hung at canonical.com
Mon Dec 23 06:14:02 UTC 2013


On 12/13/2013 11:33 AM, Ivan Hu wrote:
> Add the PIWG Firmware File subtype 6 support on media device path follow
> the section 9.3.6.6 on UEFI spec2.4. And the Firmware File Name is the type
> EFI_GUID, which is defined in the UEFI PI spec(vol.2_DXE, section 8.3).
>
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
>   src/lib/include/fwts_uefi.h  |    8 +++++++-
>   src/uefi/uefidump/uefidump.c |   13 +++++++++++++
>   2 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/src/lib/include/fwts_uefi.h b/src/lib/include/fwts_uefi.h
> index e59e9e1..8d71048 100644
> --- a/src/lib/include/fwts_uefi.h
> +++ b/src/lib/include/fwts_uefi.h
> @@ -219,7 +219,8 @@ typedef enum {
>   	FWTS_UEFI_CDROM_DEVICE_PATH_SUBTYPE =		(0x02),
>   	FWTS_UEFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE =	(0x03),
>   	FWTS_UEFI_FILE_PATH_DEVICE_PATH_SUBTYPE =	(0x04),
> -	FWTS_UEFI_PROTOCOL_DEVICE_PATH_SUBTYPE =	(0x05)
> +	FWTS_UEFI_PROTOCOL_DEVICE_PATH_SUBTYPE =	(0x05),
> +	FWTS_UEFI_PIWG_FW_FILE_DEVICE_PATH_SUBTYPE =	(0x06)
>   } media_dev_path_subtypes;
>
>   typedef enum {
> @@ -468,6 +469,11 @@ typedef struct {
>
>   typedef struct {
>   	fwts_uefi_dev_path dev_path;
> +	fwts_uefi_guid fw_file_name;
> +} __attribute__((packed)) fwts_piwg_fw_file_dev_path;
> +
> +typedef struct {
> +	fwts_uefi_dev_path dev_path;
>   	uint16_t device_type;
>   	uint16_t status_flags;
>     	char description[0];
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index e333603..50ee1e3 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -478,6 +478,19 @@ static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path, c
>   					m->protocol_guid.info4[6], m->protocol_guid.info4[7]);
>   			}
>   			break;
> +		case FWTS_UEFI_PIWG_FW_FILE_DEVICE_PATH_SUBTYPE:
> +			if (dev_path_len >= sizeof(fwts_piwg_fw_file_dev_path)) {
> +				fwts_piwg_fw_file_dev_path *p = (fwts_piwg_fw_file_dev_path *)dev_path;
> +				path = uefidump_vprintf(path, "\\FVFILE("
> +					"%08" PRIx32 "-%04" PRIx16 "-%04" PRIx16 "-"
> +					"%02" PRIx8 "-%02" PRIx8 "-"
> +					"%02" PRIx8 "-%02" PRIx8 "-%02" PRIx8 "-%02" PRIx8 "-%02" PRIx8 "-%02" PRIx8 ")",
> +					p->fw_file_name.info1, p->fw_file_name.info2, p->fw_file_name.info3,
> +					p->fw_file_name.info4[0], p->fw_file_name.info4[1], p->fw_file_name.info4[2],
> +					p->fw_file_name.info4[3], p->fw_file_name.info4[4], p->fw_file_name.info4[5],
> +					p->fw_file_name.info4[6], p->fw_file_name.info4[7]);
> +			}
> +			break;
>   		default:
>   			path = uefidump_vprintf(path, "\\Unknown-MEDIA-DEV-PATH(0x%" PRIx8 ")", dev_path->subtype);
>   			break;
>

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



More information about the fwts-devel mailing list