diff options
author | Park, Aiden <aiden.park@intel.com> | 2019-08-03 08:30:20 +0000 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2019-08-09 22:24:02 +0800 |
commit | 5b931a508053b63b8596f6f65f211017b8a82394 (patch) | |
tree | 90499c1874dbd89e89c2dae530d1b77ee3af96d7 /cmd/x86 | |
parent | 544293f87850b415721690533dae2d27f77f44f3 (diff) | |
download | u-boot-5b931a508053b63b8596f6f65f211017b8a82394.tar.gz u-boot-5b931a508053b63b8596f6f65f211017b8a82394.tar.bz2 u-boot-5b931a508053b63b8596f6f65f211017b8a82394.zip |
x86: lib: fsp: Use EFI_GUID and efi_guid_t
Use existing EFI_GUID and efi_guid_t instead of struct efi_guid.
This is pre-work before making a common HOB library.
- Change 'struct efi_guid' to efi_guit_t
- Remove 'struct efi_guid'
- Define GUIDs with EFI_GUID() macro
- Use guidcmp() instead of compare_guid()
- Remove compare_guid()
Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested on MinnowMax
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'cmd/x86')
-rw-r--r-- | cmd/x86/fsp.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cmd/x86/fsp.c b/cmd/x86/fsp.c index 9f94ca9876..1b4c0207ce 100644 --- a/cmd/x86/fsp.c +++ b/cmd/x86/fsp.c @@ -78,6 +78,7 @@ static int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) uint type; char *desc; int i = 0; + char uuid[UUID_STR_LEN + 1]; hdr = gd->arch.hob_list; @@ -102,13 +103,10 @@ static int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (type == HOB_TYPE_MEM_ALLOC || type == HOB_TYPE_RES_DESC || type == HOB_TYPE_GUID_EXT) { - struct efi_guid *guid = (struct efi_guid *)(hdr + 1); - int j; + efi_guid_t *guid = (efi_guid_t *)(hdr + 1); - printf("%08x-%04x-%04x", guid->data1, - guid->data2, guid->data3); - for (j = 0; j < ARRAY_SIZE(guid->data4); j++) - printf("-%02x", guid->data4[j]); + uuid_bin_to_str(guid->b, uuid, UUID_STR_FORMAT_GUID); + printf("%s", uuid); } else { printf("%42s", "Not Available"); } |