efi_common.c 577 B

1234567891011121314151617181920212223242526
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Common code for EFI commands
  4. *
  5. * Copyright 2023 Google LLC
  6. * Written by Simon Glass <sjg@chromium.org>
  7. */
  8. #include <common.h>
  9. #include <efi.h>
  10. #include <efi_api.h>
  11. #include <uuid.h>
  12. void efi_show_tables(struct efi_system_table *systab)
  13. {
  14. int i;
  15. for (i = 0; i < systab->nr_tables; i++) {
  16. struct efi_configuration_table *tab = &systab->tables[i];
  17. char guid_str[37];
  18. uuid_bin_to_str(tab->guid.b, guid_str, 1);
  19. printf("%p %pUl %s\n", tab->table, guid_str,
  20. uuid_guid_get_str(tab->guid.b) ?: "(unknown)");
  21. }
  22. }