mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
efi: device path for nvme
This allows our EFI API to create a device path node for NVMe devices. It adds the necessary device path struct, uses the nvme namespace accessor to retrieve the id and eui64, and also provides support for the device path text protocol. Signed-off-by: Patrick Wildt <patrick@blueri.se> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
committed by
Heinrich Schuchardt
parent
c50b2883df
commit
f2d247df50
@@ -148,6 +148,21 @@ static char *dp_msging(char *s, struct efi_device_path *dp)
|
||||
|
||||
break;
|
||||
}
|
||||
case DEVICE_PATH_SUB_TYPE_MSG_NVME: {
|
||||
struct efi_device_path_nvme *ndp =
|
||||
(struct efi_device_path_nvme *)dp;
|
||||
u32 ns_id;
|
||||
int i;
|
||||
|
||||
memcpy(&ns_id, &ndp->ns_id, sizeof(ns_id));
|
||||
s += sprintf(s, "NVMe(0x%x,", ns_id);
|
||||
for (i = 0; i < sizeof(ndp->eui64); ++i)
|
||||
s += sprintf(s, "%s%02x", i ? "-" : "",
|
||||
ndp->eui64[i]);
|
||||
s += sprintf(s, ")");
|
||||
|
||||
break;
|
||||
}
|
||||
case DEVICE_PATH_SUB_TYPE_MSG_SD:
|
||||
case DEVICE_PATH_SUB_TYPE_MSG_MMC: {
|
||||
const char *typename =
|
||||
|
Reference in New Issue
Block a user