[PATCH 3/3] uefibootpath: add test for the UFS device path
Ivan Hu
ivan.hu at canonical.com
Thu Nov 5 09:00:53 UTC 2015
Sync up with uefi spec. 2.5 for new messaging device path, UFS device path.
Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
src/uefi/uefibootpath/uefibootpath.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/src/uefi/uefibootpath/uefibootpath.c b/src/uefi/uefibootpath/uefibootpath.c
index 3232bd1..ae6957c 100644
--- a/src/uefi/uefibootpath/uefibootpath.c
+++ b/src/uefi/uefibootpath/uefibootpath.c
@@ -563,6 +563,27 @@ static int uefibootpath_check_dev_path(fwts_framework *fw, fwts_uefi_dev_path *d
errors++;
}
break;
+ case FWTS_UEFI_UFS_DEVICE_PATH_SUBTYPE:
+ if (len != sizeof(fwts_uefi_ufs_dev_path)) {
+ fwts_failed(fw, LOG_LEVEL_MEDIUM, "UEFIUFSDevPathLength",
+ "The length of UFS(Universal Flash Storage) is %" PRIu16 " bytes "
+ "and differs from UEFI specification defined %" PRIu16 " bytes.",
+ len,
+ (uint16_t)sizeof(fwts_uefi_ufs_dev_path));
+ errors++;
+ }
+
+ fwts_uefi_ufs_dev_path *ufs = (fwts_uefi_ufs_dev_path *)dev_path;
+ if (ufs->target_id != 0) {
+ fwts_failed(fw, LOG_LEVEL_MEDIUM, "UEFIPUNFieldInvalid",
+ "The Target ID on the UFS interface(PUN) is %" PRIu8 " ."
+ "This value should be 0 for current UFS2.0 spec compliance "
+ "and reserve/introduce this field to support multiple devices "
+ "per UFS port.",
+ ufs->target_id);
+ errors++;
+ }
+ break;
default:
fwts_log_info_verbatum(fw, "Unknow subtype of Messaging Device PaERRORth.");
break;
--
1.9.1
More information about the fwts-devel
mailing list