efi_loader: fix display of NVMe EUI-64
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 23 Feb 2022 08:06:24 +0000 (09:06 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 3 Sep 2022 08:49:17 +0000 (10:49 +0200)
commitfbc04c0dab139c12ed61500fac3cc204009e8c54
tree959b6b5ea052096dd40a8e09e3c74c5c7fb8fde8
parent648a8dcb39306ebd32353d6c503ac3b69e064190
efi_loader: fix display of NVMe EUI-64

UEFI specification 2.9A requires to display the EUI-64 "in hexadecimal
format with byte 7 first (i.e., on the left) and byte 0 last".

This is in contrast to what the NVMe specification wants.
But it is what EDK II has been implementing.

Here is an example with the patch applied:

    qemu-system-aarch64 -machine virt -cpu cortex-a72 -nographic \
    -bios denx/u-boot.bin \
    -device nvme,id=nvme1,serial=9ff81223 \
    -device nvme-ns,bus=nvme1,drive=nvme1n0,eui64=0x123456789ABCDEF0 \
    -drive file=arm64.img,if=none,format=raw,id=nvme1n0

    => nvme scan
    => efidebug devices
    Device Path
    ====================
    /VenHw(…)/NVMe(0x1,f0-de-bc-9a-78-56-34-12)

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
lib/efi_loader/efi_device_path_to_text.c