diff options
author | Rob Clark <robdclark@gmail.com> | 2017-07-27 08:04:19 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2017-07-29 00:18:46 +0200 |
commit | af65db85b82b161f037e0889ae58bf461217b3f1 (patch) | |
tree | 38125833e0dff4160adc88ac9627f66badd9da8a /include/efi_loader.h | |
parent | c160d2f5ec9298d545a6e0fab0a68cc1a3e93759 (diff) | |
download | u-boot-af65db85b82b161f037e0889ae58bf461217b3f1.tar.gz |
efi_loader: indent entry/exit prints to show nesting level
This should make it easier to see when a callback back to UEFI world
calls back in to the u-boot world, and generally match up EFI_ENTRY()
and EFI_EXIT() calls.
Signed-off-by: Rob Clark <robdclark@gmail.com>
[agraf: remove static from const var]
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/efi_loader.h')
-rw-r--r-- | include/efi_loader.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h index 4262d0ac6b..037cc7c543 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -17,13 +17,16 @@ int __efi_entry_check(void); int __efi_exit_check(void); +const char *__efi_nesting_inc(void); +const char *__efi_nesting_dec(void); /* * Enter the u-boot world from UEFI: */ #define EFI_ENTRY(format, ...) do { \ assert(__efi_entry_check()); \ - debug("EFI: Entry %s(" format ")\n", __func__, ##__VA_ARGS__); \ + debug("%sEFI: Entry %s(" format ")\n", __efi_nesting_inc(), \ + __func__, ##__VA_ARGS__); \ } while(0) /* @@ -31,7 +34,8 @@ int __efi_exit_check(void); */ #define EFI_EXIT(ret) ({ \ efi_status_t _r = ret; \ - debug("EFI: Exit: %s: %u\n", __func__, (u32)(_r & ~EFI_ERROR_MASK)); \ + debug("%sEFI: Exit: %s: %u\n", __efi_nesting_dec(), \ + __func__, (u32)(_r & ~EFI_ERROR_MASK)); \ assert(__efi_exit_check()); \ _r; \ }) @@ -40,11 +44,11 @@ int __efi_exit_check(void); * Callback into UEFI world from u-boot: */ #define EFI_CALL(exp) do { \ - debug("EFI: Call: %s\n", #exp); \ + debug("%sEFI: Call: %s\n", __efi_nesting_inc(), #exp); \ assert(__efi_exit_check()); \ exp; \ assert(__efi_entry_check()); \ - debug("EFI: Return From: %s\n", #exp); \ + debug("%sEFI: Return From: %s\n", __efi_nesting_dec(), #exp); \ } while(0) extern struct efi_runtime_services efi_runtime_services; |