ACK: [PATCH 2/3] uefibootpath: add test for eMMC device path
Alex Hung
alex.hung at canonical.com
Thu Sep 29 23:35:55 UTC 2016
On 2016-09-29 01:27 AM, Ivan Hu wrote:
> Sync up with uefi spec. 2.6 for new messaging device path, eMMC device path
>
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
> src/lib/include/fwts_uefi.h | 8 +++++++-
> src/uefi/uefibootpath/uefibootpath.c | 10 ++++++++++
> 2 files changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/src/lib/include/fwts_uefi.h b/src/lib/include/fwts_uefi.h
> index 5c6ef1c..2ba4755 100644
> --- a/src/lib/include/fwts_uefi.h
> +++ b/src/lib/include/fwts_uefi.h
> @@ -252,7 +252,8 @@ typedef enum {
> FWTS_UEFI_UFS_DEVICE_PATH_SUBTYPE = (0x19),
> FWTS_UEFI_SD_DEVICE_PATH_SUBTYPE = (0x1a),
> FWTS_UEFI_BLUETOOTH_DEVICE_PATH_SUBTYPE = (0x1b),
> - FWTS_UEFI_WIRELESS_DEVICE_PATH_SUBTYPE = (0x1c)
> + FWTS_UEFI_WIRELESS_DEVICE_PATH_SUBTYPE = (0x1c),
> + FWTS_UEFI_EMMC_DEVICE_PATH_SUBTYPE = (0x1d)
> } messaging_dev_path_subtypes;
>
> typedef enum {
> @@ -552,6 +553,11 @@ typedef struct {
>
> typedef struct {
> fwts_uefi_dev_path dev_path;
> + uint8_t slot_num;
> +} __attribute__((packed)) fwts_uefi_emmc_dev_path;
> +
> +typedef struct {
> + fwts_uefi_dev_path dev_path;
> uint32_t partition_number;
> uint64_t partition_start;
> uint64_t partition_size;
> diff --git a/src/uefi/uefibootpath/uefibootpath.c b/src/uefi/uefibootpath/uefibootpath.c
> index 48a57c8..e49885c 100644
> --- a/src/uefi/uefibootpath/uefibootpath.c
> +++ b/src/uefi/uefibootpath/uefibootpath.c
> @@ -612,6 +612,16 @@ static int uefibootpath_check_dev_path(fwts_framework *fw, fwts_uefi_dev_path *d
> errors++;
> }
> break;
> + case FWTS_UEFI_EMMC_DEVICE_PATH_SUBTYPE:
> + if (len != sizeof(fwts_uefi_emmc_dev_path)) {
> + fwts_failed(fw, LOG_LEVEL_MEDIUM, "UEFIEMMCDevPathLength",
> + "The length of eMMC device path is %" PRIu16 " bytes "
> + "and differs from UEFI specification defined %" PRIu16 " bytes.",
> + len,
> + (uint16_t)sizeof(fwts_uefi_emmc_dev_path));
> + errors++;
> + }
> + break;
> default:
> fwts_log_info_verbatim(fw, "Unknown subtype of Messaging Device Path.");
> break;
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list