diff options
author | Michael Brown <mcb30@ipxe.org> | 2014-07-31 00:09:58 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2014-07-31 01:50:05 +0100 |
commit | 736fcf60d1db389941b4f15f94c31fe0403552a8 (patch) | |
tree | 248399626c3d9346d9384d010b8edc2b965a8a2a /src/include/ipxe/efi | |
parent | 550f212d157f9f3ae025bbdb654c4184467ad826 (diff) | |
download | ipxe-736fcf60d1db389941b4f15f94c31fe0403552a8.zip ipxe-736fcf60d1db389941b4f15f94c31fe0403552a8.tar.gz ipxe-736fcf60d1db389941b4f15f94c31fe0403552a8.tar.bz2 |
[efi] Add ability to dump all openers of a given protocol on a handle
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/efi')
-rw-r--r-- | src/include/ipxe/efi/efi.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/include/ipxe/efi/efi.h b/src/include/ipxe/efi/efi.h index b5537dd..51b501c 100644 --- a/src/include/ipxe/efi/efi.h +++ b/src/include/ipxe/efi/efi.h @@ -153,22 +153,47 @@ extern const char * efi_devpath_text ( EFI_DEVICE_PATH_PROTOCOL *path ); extern const char * efi_handle_devpath_text ( EFI_HANDLE handle ); extern const char * efi_handle_name ( EFI_HANDLE handle ); +extern void dbg_efi_openers ( EFI_HANDLE handle, EFI_GUID *protocol ); extern void dbg_efi_protocols ( EFI_HANDLE handle ); +#define DBG_EFI_OPENERS_IF( level, handle, protocol ) do { \ + if ( DBG_ ## level ) { \ + dbg_efi_openers ( handle, protocol ); \ + } \ + } while ( 0 ) + #define DBG_EFI_PROTOCOLS_IF( level, handle ) do { \ if ( DBG_ ## level ) { \ dbg_efi_protocols ( handle ); \ } \ } while ( 0 ) +#define DBGC_EFI_OPENERS_IF( level, id, ... ) do { \ + DBG_AC_IF ( level, id ); \ + DBG_EFI_OPENERS_IF ( level, __VA_ARGS__ ); \ + DBG_DC_IF ( level ); \ + } while ( 0 ) + #define DBGC_EFI_PROTOCOLS_IF( level, id, ... ) do { \ DBG_AC_IF ( level, id ); \ DBG_EFI_PROTOCOLS_IF ( level, __VA_ARGS__ ); \ DBG_DC_IF ( level ); \ } while ( 0 ) +#define DBGC_EFI_OPENERS( ... ) \ + DBGC_EFI_OPENERS_IF ( LOG, ##__VA_ARGS__ ) #define DBGC_EFI_PROTOCOLS( ... ) \ - DBGC_EFI_PROTOCOLS_IF( LOG, ##__VA_ARGS__ ) + DBGC_EFI_PROTOCOLS_IF ( LOG, ##__VA_ARGS__ ) + +#define DBGC2_EFI_OPENERS( ... ) \ + DBGC_EFI_OPENERS_IF ( EXTRA, ##__VA_ARGS__ ) +#define DBGC2_EFI_PROTOCOLS( ... ) \ + DBGC_EFI_PROTOCOLS_IF ( EXTRA, ##__VA_ARGS__ ) + +#define DBGCP_EFI_OPENERS( ... ) \ + DBGC_EFI_OPENERS_IF ( PROFILE, ##__VA_ARGS__ ) +#define DBGCP_EFI_PROTOCOLS( ... ) \ + DBGC_EFI_PROTOCOLS_IF ( PROFILE, ##__VA_ARGS__ ) extern EFI_STATUS efi_init ( EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab ); |