]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools: Fix byte orders when handling 8-byte array
authorYonghong Zhu <yonghong.zhu@intel.com>
Fri, 2 Mar 2018 15:07:06 +0000 (23:07 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Sat, 3 Mar 2018 07:41:16 +0000 (15:41 +0800)
commit27db236ac2beefc8a2de4c0df07ab47374aacfc3
tree80e4411e93533551aa675723a645e6fb006ad277
parentc1d6749b0ed3c58b7dc771e0f857995096107f44
BaseTools: Fix byte orders when handling 8-byte array

Per UEFI spec, FibreEx.WWN, FibreEx.Lun, SasEx.Address, SasEx.Lun
and iSCSI.Lun are all 8-byte array with byte #0 in the left.
It means "0102030405060708" should be converted to:
    UINT8[8] = {01, 02, 03, 04, 05, 06, 07, 08}
or  UINT64 = {0807060504030201}

Today's implementation wrongly uses the reversed order.
The patch fixes this issue by using StrHexToBytes().
Copy this solution from MdePkg Hash version d0196be.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/DevicePath/DevicePathFromText.c