iPXE
Data Structures | Macros | Functions | Variables
efi_debug.c File Reference

EFI debugging utilities. More...

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <ipxe/uuid.h>
#include <ipxe/base16.h>
#include <ipxe/vsprintf.h>
#include <ipxe/efi/efi.h>
#include <ipxe/efi/efi_path.h>
#include <ipxe/efi/Protocol/ComponentName.h>
#include <ipxe/efi/Protocol/ComponentName2.h>
#include <ipxe/efi/Protocol/DevicePathToText.h>
#include <ipxe/efi/IndustryStandard/PeImage.h>

Go to the source code of this file.

Data Structures

struct  efi_well_known_guid
 A well-known GUID. More...
 
struct  efi_handle_name_type
 An EFI handle name type. More...
 

Macros

#define EFI_HANDLE_NAME_TYPE(protocol, name)
 Define an EFI handle name type. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
 EFI_REQUEST_PROTOCOL (EFI_DEVICE_PATH_TO_TEXT_PROTOCOL, &efidpt)
 
const char * efi_guid_ntoa (CONST EFI_GUID *guid)
 Convert GUID to a printable string. More...
 
const char * efi_locate_search_type_name (EFI_LOCATE_SEARCH_TYPE search_type)
 Name locate search type. More...
 
const char * efi_open_attributes_name (unsigned int attributes)
 Name protocol open attributes. More...
 
void dbg_efi_opener (EFI_HANDLE handle, EFI_GUID *protocol, EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *opener)
 Print opened protocol information. More...
 
void dbg_efi_openers (EFI_HANDLE handle, EFI_GUID *protocol)
 Print list of openers of a given protocol on a given handle. More...
 
void dbg_efi_protocol (EFI_HANDLE handle, EFI_GUID *protocol)
 Print protocol information on a given handle. More...
 
void dbg_efi_protocols (EFI_HANDLE handle)
 Print list of protocol handlers attached to a handle. More...
 
const char * efi_devpath_text (EFI_DEVICE_PATH_PROTOCOL *path)
 Get textual representation of device path. More...
 
static const char * efi_driver_name (EFI_COMPONENT_NAME_PROTOCOL *wtf)
 Get driver name. More...
 
static const char * efi_driver_name2 (EFI_COMPONENT_NAME2_PROTOCOL *wtf)
 Get driver name. More...
 
static const char * efi_pecoff_debug_name (EFI_LOADED_IMAGE_PROTOCOL *loaded)
 Get PE/COFF debug filename. More...
 
static const char * efi_first_loaded_image_name (EFI_LOADED_IMAGE_PROTOCOL *loaded)
 Get initial loaded image name. More...
 
static const char * efi_loaded_image_filepath_name (EFI_LOADED_IMAGE_PROTOCOL *loaded)
 Get loaded image name from file path. More...
 
static const char * efi_conin_name (EFI_SIMPLE_TEXT_INPUT_PROTOCOL *input)
 Get console input handle name. More...
 
static const char * efi_conout_name (EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *output)
 Get console output handle name. More...
 
const char * efi_handle_name (EFI_HANDLE handle)
 Get name of an EFI handle. More...
 

Variables

static EFI_DEVICE_PATH_TO_TEXT_PROTOCOLefidpt
 Device path to text protocol. More...
 
static EFI_GUID efi_http_boot_dxe_guid
 HttpBootDxe module GUID. More...
 
static EFI_GUID efi_iscsi_dxe_guid
 IScsiDxe module GUID. More...
 
static EFI_GUID efi_iscsi4_dxe_guid
 Old IScsi4Dxe module GUID. More...
 
static EFI_GUID efi_uefi_pxe_bc_dxe_guid
 UefiPxeBcDxe module GUID. More...
 
static EFI_GUID efi_vlan_config_dxe_guid
 VlanConfigDxe module GUID. More...
 
static struct efi_well_known_guid efi_well_known_guids []
 Well-known GUIDs. More...
 
static struct efi_handle_name_type efi_handle_name_types []
 EFI handle name types. More...
 

Detailed Description

EFI debugging utilities.

Definition in file efi_debug.c.

Macro Definition Documentation

◆ EFI_HANDLE_NAME_TYPE

#define EFI_HANDLE_NAME_TYPE (   protocol,
  name 
)
Value:
{ \
(protocol), \
( const char * ( * ) ( void * ) ) (name), \
}
const char * name
Definition: ath9k_hw.c:1984
uint16_t protocol
Protocol ID.
Definition: stp.h:18

Define an EFI handle name type.

Parameters
protocolProtocol interface
nameMethod to get name
Return values
typeEFI handle name type

Definition at line 768 of file efi_debug.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ EFI_REQUEST_PROTOCOL()

EFI_REQUEST_PROTOCOL ( EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  ,
efidpt 
)

◆ efi_guid_ntoa()

const char* efi_guid_ntoa ( CONST EFI_GUID guid)

Convert GUID to a printable string.

Parameters
guidGUID
Return values
stringPrintable string

Definition at line 256 of file efi_debug.c.

256  {
257  union {
258  union uuid uuid;
259  EFI_GUID guid;
260  } u;
261  unsigned int i;
262 
263  /* Sanity check */
264  if ( ! guid )
265  return NULL;
266 
267  /* Check for a match against well-known GUIDs */
268  for ( i = 0 ; i < ( sizeof ( efi_well_known_guids ) /
269  sizeof ( efi_well_known_guids[0] ) ) ; i++ ) {
271  sizeof ( *guid ) ) == 0 ) {
272  return efi_well_known_guids[i].name;
273  }
274  }
275 
276  /* Convert GUID to standard endianness */
277  memcpy ( &u.guid, guid, sizeof ( u.guid ) );
278  uuid_mangle ( &u.uuid );
279  return uuid_ntoa ( &u.uuid );
280 }
const char * name
Name.
Definition: efi_debug.c:85
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
A universally unique ID.
Definition: uuid.h:15
static struct efi_well_known_guid efi_well_known_guids[]
Well-known GUIDs.
Definition: efi_debug.c:89
static void uuid_mangle(union uuid *uuid)
Change UUID endianness.
Definition: uuid.h:43
void * memcpy(void *dest, const void *src, size_t len) __nonnull
const char * uuid_ntoa(const union uuid *uuid)
Convert UUID to printable string.
Definition: uuid.c:45
uint64_t guid
GUID.
Definition: edd.h:30
union @17 u
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
Definition: string.c:114
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

References efi_well_known_guids, guid, efi_well_known_guid::guid, memcmp(), memcpy(), efi_well_known_guid::name, NULL, u, uuid_mangle(), and uuid_ntoa().

Referenced by chained_locate(), chained_supported(), dbg_efi_opener(), dbg_efi_openers(), dbg_efi_protocol(), efi_autoexec_load(), efi_close_protocol_wrapper(), efi_create_event_ex_wrapper(), efi_file_get_info(), efi_file_path_uninstall(), efi_file_set_info(), efi_handle_name(), efi_handle_protocol_wrapper(), efi_init(), efi_install_configuration_table_wrapper(), efi_install_multiple_protocol_interfaces_wrapper(), efi_install_protocol_interface_wrapper(), efi_locate_device(), efi_locate_device_path_wrapper(), efi_locate_handle_buffer_wrapper(), efi_locate_handle_wrapper(), efi_locate_protocol_wrapper(), efi_open_protocol_information_wrapper(), efi_open_protocol_wrapper(), efi_protocols_per_handle_wrapper(), efi_register_protocol_notify_wrapper(), efi_reinstall_protocol_interface_wrapper(), efi_service_add(), efi_service_del(), efi_uninstall_multiple_protocol_interfaces_wrapper(), efi_uninstall_protocol_interface_wrapper(), efi_veto_close_protocol(), efivars_fetch(), efivars_find(), and snpnet_supported().

◆ efi_locate_search_type_name()

const char* efi_locate_search_type_name ( EFI_LOCATE_SEARCH_TYPE  search_type)

Name locate search type.

Parameters
search_typeLocate search type
Return values
nameLocate search type name

Definition at line 289 of file efi_debug.c.

289  {
290  static char buf[16];
291 
292  switch ( search_type ) {
293  case AllHandles : return "AllHandles";
294  case ByRegisterNotify: return "ByRegisterNotify";
295  case ByProtocol: return "ByProtocol";
296  default:
297  snprintf ( buf, sizeof ( buf ), "UNKNOWN<%d>", search_type );
298  return buf;
299  }
300 }
Retrieve all the handles in the handle database.
Definition: UefiSpec.h:1521
Retrieve the next handle fron a RegisterProtocolNotify() event.
Definition: UefiSpec.h:1525
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
Definition: vsprintf.c:382
Retrieve the set of handles from the handle database that support a specified protocol.
Definition: UefiSpec.h:1530

References AllHandles, ByProtocol, ByRegisterNotify, and snprintf().

Referenced by efi_locate_handle_buffer_wrapper(), and efi_locate_handle_wrapper().

◆ efi_open_attributes_name()

const char* efi_open_attributes_name ( unsigned int  attributes)

Name protocol open attributes.

Parameters
attributesProtocol open attributes
Return values
nameProtocol open attributes name

Returns a (static) string with characters for each set bit corresponding to BY_(H)ANDLE_PROTOCOL, (G)ET_PROTOCOL, (T)EST_PROTOCOL, BY_(C)HILD_CONTROLLER, BY_(D)RIVER, and E(X)CLUSIVE.

Definition at line 314 of file efi_debug.c.

314  {
315  static char attribute_chars[] = "HGTCDX";
316  static char name[ sizeof ( attribute_chars ) ];
317  char *tmp = name;
318  unsigned int i;
319 
320  for ( i = 0 ; i < ( sizeof ( attribute_chars ) - 1 ) ; i++ ) {
321  if ( attributes & ( 1 << i ) )
322  *(tmp++) = attribute_chars[i];
323  }
324  *tmp = '\0';
325 
326  return name;
327 }
const char * name
Definition: ath9k_hw.c:1984
unsigned long tmp
Definition: linux_pci.h:63

References name, and tmp.

Referenced by dbg_efi_opener(), and efi_open_protocol_wrapper().

◆ dbg_efi_opener()

void dbg_efi_opener ( EFI_HANDLE  handle,
EFI_GUID protocol,
EFI_OPEN_PROTOCOL_INFORMATION_ENTRY opener 
)

Print opened protocol information.

Parameters
handleEFI handle @V protocol Protocol GUID
openerOpened protocol information

Definition at line 336 of file efi_debug.c.

337  {
338 
339  printf ( "HANDLE %s %s opened %dx (%s)", efi_handle_name ( handle ),
340  efi_guid_ntoa ( protocol ), opener->OpenCount,
341  efi_open_attributes_name ( opener->Attributes ) );
342  printf ( " by %s", efi_handle_name ( opener->AgentHandle ) );
343  if ( opener->ControllerHandle == handle ) {
344  printf ( "\n" );
345  } else {
346  printf ( " for %s\n",
347  efi_handle_name ( opener->ControllerHandle ) );
348  }
349 }
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
EFI_HANDLE ControllerHandle
Definition: UefiSpec.h:1433
EFI_HANDLE AgentHandle
Definition: UefiSpec.h:1432
UINT32 OpenCount
Definition: UefiSpec.h:1435
UINT32 Attributes
Definition: UefiSpec.h:1434
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:810
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
Definition: efi_debug.c:256
const char * efi_open_attributes_name(unsigned int attributes)
Name protocol open attributes.
Definition: efi_debug.c:314
uint16_t protocol
Protocol ID.
Definition: stp.h:18
uint16_t handle
Handle.
Definition: smbios.h:16

References EFI_OPEN_PROTOCOL_INFORMATION_ENTRY::AgentHandle, EFI_OPEN_PROTOCOL_INFORMATION_ENTRY::Attributes, EFI_OPEN_PROTOCOL_INFORMATION_ENTRY::ControllerHandle, efi_guid_ntoa(), efi_handle_name(), efi_open_attributes_name(), handle, EFI_OPEN_PROTOCOL_INFORMATION_ENTRY::OpenCount, printf(), and protocol.

Referenced by dbg_efi_openers().

◆ dbg_efi_openers()

void dbg_efi_openers ( EFI_HANDLE  handle,
EFI_GUID protocol 
)

Print list of openers of a given protocol on a given handle.

Parameters
handleEFI handle
protocolProtocol GUID

Definition at line 357 of file efi_debug.c.

357  {
360  UINTN count;
361  unsigned int i;
362  EFI_STATUS efirc;
363  int rc;
364 
365  /* Sanity check */
366  if ( ( ! handle ) || ( ! protocol ) ) {
367  printf ( "HANDLE %s could not retrieve openers for %s\n",
369  efi_guid_ntoa ( protocol ) );
370  return;
371  }
372 
373  /* Retrieve list of openers */
374  if ( ( efirc = bs->OpenProtocolInformation ( handle, protocol, &openers,
375  &count ) ) != 0 ) {
376  rc = -EEFI ( efirc );
377  printf ( "HANDLE %s could not retrieve openers for %s: %s\n",
379  efi_guid_ntoa ( protocol ), strerror ( rc ) );
380  return;
381  }
382 
383  /* Dump list of openers */
384  for ( i = 0 ; i < count ; i++ )
385  dbg_efi_opener ( handle, protocol, &openers[i] );
386 
387  /* Free list */
388  bs->FreePool ( openers );
389 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2098
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
EFI Oprn Protocol Information Entry.
Definition: UefiSpec.h:1431
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
Definition: efi.h:171
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
void dbg_efi_opener(EFI_HANDLE handle, EFI_GUID *protocol, EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *opener)
Print opened protocol information.
Definition: efi_debug.c:336
uint16_t count
Number of entries.
Definition: ena.h:22
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:810
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
Definition: efi_debug.c:256
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
EFI Boot Services Table.
Definition: UefiSpec.h:1930
UINT64 UINTN
Unsigned value of native width.
EFI_FREE_POOL FreePool
Definition: UefiSpec.h:1949
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation
Definition: UefiSpec.h:2001
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
EFI_SYSTEM_TABLE * efi_systab
uint16_t protocol
Protocol ID.
Definition: stp.h:18
uint16_t handle
Handle.
Definition: smbios.h:16

References EFI_SYSTEM_TABLE::BootServices, count, dbg_efi_opener(), EEFI, efi_guid_ntoa(), efi_handle_name(), efi_systab, EFI_BOOT_SERVICES::FreePool, handle, EFI_BOOT_SERVICES::OpenProtocolInformation, printf(), protocol, rc, and strerror().

Referenced by dbg_efi_protocol().

◆ dbg_efi_protocol()

void dbg_efi_protocol ( EFI_HANDLE  handle,
EFI_GUID protocol 
)

Print protocol information on a given handle.

Parameters
handleEFI handle
protocolProtocol GUID

Definition at line 397 of file efi_debug.c.

397  {
399  VOID *interface;
400  EFI_STATUS efirc;
401  int rc;
402 
403  /* Get protocol instance */
404  if ( ( efirc = bs->HandleProtocol ( handle, protocol,
405  &interface ) ) != 0 ) {
406  rc = -EEFI ( efirc );
407  printf ( "HANDLE %s could not identify %s: %s\n",
409  efi_guid_ntoa ( protocol ), strerror ( rc ) );
410  return;
411  }
412  printf ( "HANDLE %s %s at %p\n", efi_handle_name ( handle ),
414 
415  /* Dump list of openers */
417 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2098
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
Definition: efi.h:171
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
void dbg_efi_openers(EFI_HANDLE handle, EFI_GUID *protocol)
Print list of openers of a given protocol on a given handle.
Definition: efi_debug.c:357
An object interface.
Definition: interface.h:124
EFI_HANDLE_PROTOCOL HandleProtocol
Definition: UefiSpec.h:1967
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:810
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
Definition: efi_debug.c:256
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
EFI Boot Services Table.
Definition: UefiSpec.h:1930
#define VOID
Undeclared type.
Definition: Base.h:271
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
EFI_SYSTEM_TABLE * efi_systab
uint16_t protocol
Protocol ID.
Definition: stp.h:18
uint16_t handle
Handle.
Definition: smbios.h:16

References EFI_SYSTEM_TABLE::BootServices, dbg_efi_openers(), EEFI, efi_guid_ntoa(), efi_handle_name(), efi_systab, handle, EFI_BOOT_SERVICES::HandleProtocol, printf(), protocol, rc, strerror(), and VOID.

Referenced by dbg_efi_protocols().

◆ dbg_efi_protocols()

void dbg_efi_protocols ( EFI_HANDLE  handle)

Print list of protocol handlers attached to a handle.

Parameters
handleEFI handle

Definition at line 424 of file efi_debug.c.

424  {
426  EFI_GUID **protocols;
427  UINTN count;
428  unsigned int i;
429  EFI_STATUS efirc;
430  int rc;
431 
432  /* Sanity check */
433  if ( ! handle ) {
434  printf ( "HANDLE %p could not retrieve protocols\n", handle );
435  return;
436  }
437 
438  /* Retrieve list of protocols */
439  if ( ( efirc = bs->ProtocolsPerHandle ( handle, &protocols,
440  &count ) ) != 0 ) {
441  rc = -EEFI ( efirc );
442  printf ( "HANDLE %s could not retrieve protocols: %s\n",
443  efi_handle_name ( handle ), strerror ( rc ) );
444  return;
445  }
446 
447  /* Dump list of protocols */
448  for ( i = 0 ; i < count ; i++ ) {
449  dbg_efi_protocol ( handle, protocols[i] );
450  }
451 
452  /* Free list */
453  bs->FreePool ( protocols );
454 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2098
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
Definition: efi.h:171
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
void dbg_efi_protocol(EFI_HANDLE handle, EFI_GUID *protocol)
Print protocol information on a given handle.
Definition: efi_debug.c:397
uint16_t count
Number of entries.
Definition: ena.h:22
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:810
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
EFI Boot Services Table.
Definition: UefiSpec.h:1930
UINT64 UINTN
Unsigned value of native width.
EFI_FREE_POOL FreePool
Definition: UefiSpec.h:1949
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle
Definition: UefiSpec.h:2006
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
EFI_SYSTEM_TABLE * efi_systab
uint16_t handle
Handle.
Definition: smbios.h:16

References EFI_SYSTEM_TABLE::BootServices, count, dbg_efi_protocol(), EEFI, efi_handle_name(), efi_systab, EFI_BOOT_SERVICES::FreePool, handle, printf(), EFI_BOOT_SERVICES::ProtocolsPerHandle, rc, and strerror().

◆ efi_devpath_text()

const char* efi_devpath_text ( EFI_DEVICE_PATH_PROTOCOL path)

Get textual representation of device path.

Parameters
pathDevice path
Return values
textTextual representation of device path, or NULL

Definition at line 463 of file efi_debug.c.

463  {
465  static char text[512];
466  size_t len;
467  CHAR16 *wtext;
468 
469  /* Sanity checks */
470  if ( ! path ) {
471  DBG ( "[NULL DevicePath]" );
472  return NULL;
473  }
474 
475  /* If we have no DevicePathToText protocol then use a raw hex string */
476  if ( ! efidpt ) {
477  DBG ( "[No DevicePathToText]" );
478  len = efi_path_len ( path );
479  base16_encode ( path, len, text, sizeof ( text ) );
480  return text;
481  }
482 
483  /* Convert path to a textual representation */
484  wtext = efidpt->ConvertDevicePathToText ( path, FALSE, FALSE );
485  if ( ! wtext )
486  return NULL;
487 
488  /* Store path in buffer */
489  snprintf ( text, sizeof ( text ), "%ls", wtext );
490 
491  /* Free path */
492  bs->FreePool ( wtext );
493 
494  return text;
495 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2098
size_t efi_path_len(EFI_DEVICE_PATH_PROTOCOL *path)
Find length of device path (excluding terminator)
Definition: efi_path.c:144
unsigned short CHAR16
static EFI_DEVICE_PATH_TO_TEXT_PROTOCOL * efidpt
Device path to text protocol.
Definition: efi_debug.c:47
EFI Boot Services Table.
Definition: UefiSpec.h:1930
EFI_FREE_POOL FreePool
Definition: UefiSpec.h:1949
#define FALSE
Definition: tlan.h:45
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
Definition: vsprintf.c:382
EFI_SYSTEM_TABLE * efi_systab
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText
uint32_t len
Length.
Definition: ena.h:14
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

References EFI_SYSTEM_TABLE::BootServices, EFI_DEVICE_PATH_TO_TEXT_PROTOCOL::ConvertDevicePathToText, DBG, efi_path_len(), efi_systab, efidpt, FALSE, EFI_BOOT_SERVICES::FreePool, len, NULL, and snprintf().

Referenced by efi_block_exec(), efi_block_hook(), efi_block_match(), efi_connect_controller_wrapper(), efi_driver_start(), efi_driver_supported(), efi_dump_image(), efi_file_path_claim(), efi_file_path_install(), efi_file_path_uninstall(), efi_init(), efi_load_image_wrapper(), efi_loaded_image_filepath_name(), efi_local_open_volume(), efi_locate_device(), efi_locate_device_path_wrapper(), efi_path_net_probe(), usbio_open(), and usbio_path().

◆ efi_driver_name()

static const char* efi_driver_name ( EFI_COMPONENT_NAME_PROTOCOL wtf)
static

Get driver name.

Parameters
wtfComponent name protocol
Return values
nameDriver name, or NULL

Definition at line 503 of file efi_debug.c.

503  {
504  static char name[64];
505  CHAR16 *driver_name;
506  EFI_STATUS efirc;
507 
508  /* Sanity check */
509  if ( ! wtf ) {
510  DBG ( "[NULL ComponentName]" );
511  return NULL;
512  }
513 
514  /* Try "eng" first; if that fails then try the first language */
515  if ( ( ( efirc = wtf->GetDriverName ( wtf, "eng",
516  &driver_name ) ) != 0 ) &&
517  ( ( efirc = wtf->GetDriverName ( wtf, wtf->SupportedLanguages,
518  &driver_name ) ) != 0 ) ) {
519  return NULL;
520  }
521 
522  /* Convert name from CHAR16 to char */
523  snprintf ( name, sizeof ( name ), "%ls", driver_name );
524  return name;
525 }
const char * name
Definition: ath9k_hw.c:1984
unsigned short CHAR16
char wtf[42]
Authenticator response string.
Definition: mschapv2.h:18
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
Definition: vsprintf.c:382
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

References DBG, name, NULL, snprintf(), and wtf.

◆ efi_driver_name2()

static const char* efi_driver_name2 ( EFI_COMPONENT_NAME2_PROTOCOL wtf)
static

Get driver name.

Parameters
wtfComponent name protocol
Return values
nameDriver name, or NULL

Definition at line 533 of file efi_debug.c.

533  {
534  static char name[64];
535  CHAR16 *driver_name;
536  EFI_STATUS efirc;
537 
538  /* Sanity check */
539  if ( ! wtf ) {
540  DBG ( "[NULL ComponentName2]" );
541  return NULL;
542  }
543 
544  /* Try "en" first; if that fails then try the first language */
545  if ( ( ( efirc = wtf->GetDriverName ( wtf, "en",
546  &driver_name ) ) != 0 ) &&
547  ( ( efirc = wtf->GetDriverName ( wtf, wtf->SupportedLanguages,
548  &driver_name ) ) != 0 ) ) {
549  return NULL;
550  }
551 
552  /* Convert name from CHAR16 to char */
553  snprintf ( name, sizeof ( name ), "%ls", driver_name );
554  return name;
555 }
const char * name
Definition: ath9k_hw.c:1984
unsigned short CHAR16
char wtf[42]
Authenticator response string.
Definition: mschapv2.h:18
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
Definition: vsprintf.c:382
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

References DBG, name, NULL, snprintf(), and wtf.

◆ efi_pecoff_debug_name()

static const char* efi_pecoff_debug_name ( EFI_LOADED_IMAGE_PROTOCOL loaded)
static

Get PE/COFF debug filename.

Parameters
loadedLoaded image
Return values
namePE/COFF debug filename, or NULL

Definition at line 564 of file efi_debug.c.

564  {
565  static char buf[32];
570  EFI_IMAGE_DATA_DIRECTORY *datadir;
575  uint16_t dos_magic;
576  uint32_t pe_magic;
577  uint16_t opt_magic;
578  uint32_t codeview_magic;
579  size_t max_len;
580  char *name;
581  char *tmp;
582 
583  /* Sanity check */
584  if ( ! loaded ) {
585  DBG ( "[NULL LoadedImage]" );
586  return NULL;
587  }
588 
589  /* Parse DOS header */
590  dos = loaded->ImageBase;
591  if ( ! dos ) {
592  DBG ( "[Missing DOS header]" );
593  return NULL;
594  }
595  dos_magic = dos->e_magic;
596  if ( dos_magic != EFI_IMAGE_DOS_SIGNATURE ) {
597  DBG ( "[Bad DOS signature %#04x]", dos_magic );
598  return NULL;
599  }
600  pe = ( loaded->ImageBase + dos->e_lfanew );
601 
602  /* Parse PE header */
603  pe_magic = pe->Pe32.Signature;
604  if ( pe_magic != EFI_IMAGE_NT_SIGNATURE ) {
605  DBG ( "[Bad PE signature %#08x]", pe_magic );
606  return NULL;
607  }
608  opt32 = &pe->Pe32.OptionalHeader;
609  opt64 = &pe->Pe32Plus.OptionalHeader;
610  opt_magic = opt32->Magic;
611  if ( opt_magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC ) {
612  datadir = opt32->DataDirectory;
613  } else if ( opt_magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC ) {
614  datadir = opt64->DataDirectory;
615  } else {
616  DBG ( "[Bad optional header signature %#04x]", opt_magic );
617  return NULL;
618  }
619 
620  /* Parse data directory entry */
621  if ( ! datadir[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress ) {
622  DBG ( "[Empty debug directory entry]" );
623  return NULL;
624  }
625  debug = ( loaded->ImageBase +
627 
628  /* Parse debug directory entry */
629  if ( debug->Type != EFI_IMAGE_DEBUG_TYPE_CODEVIEW ) {
630  DBG ( "[Not a CodeView debug directory entry (type %d)]",
631  debug->Type );
632  return NULL;
633  }
634  codeview_nb10 = ( loaded->ImageBase + debug->RVA );
635  codeview_rsds = ( loaded->ImageBase + debug->RVA );
636  codeview_mtoc = ( loaded->ImageBase + debug->RVA );
637  codeview_magic = codeview_nb10->Signature;
638 
639  /* Parse CodeView entry */
640  if ( codeview_magic == CODEVIEW_SIGNATURE_NB10 ) {
641  name = ( ( void * ) ( codeview_nb10 + 1 ) );
642  } else if ( codeview_magic == CODEVIEW_SIGNATURE_RSDS ) {
643  name = ( ( void * ) ( codeview_rsds + 1 ) );
644  } else if ( codeview_magic == CODEVIEW_SIGNATURE_MTOC ) {
645  name = ( ( void * ) ( codeview_mtoc + 1 ) );
646  } else {
647  DBG ( "[Bad CodeView signature %#08x]", codeview_magic );
648  return NULL;
649  }
650 
651  /* Sanity check - avoid scanning endlessly through memory */
652  max_len = EFI_PAGE_SIZE; /* Reasonably sane */
653  if ( strnlen ( name, max_len ) == max_len ) {
654  DBG ( "[Excessively long or invalid CodeView name]" );
655  return NULL;
656  }
657 
658  /* Skip any directory components. We cannot modify this data
659  * or create a temporary buffer, so do not use basename().
660  */
661  while ( ( ( tmp = strchr ( name, '/' ) ) != NULL ) ||
662  ( ( tmp = strchr ( name, '\\' ) ) != NULL ) ) {
663  name = ( tmp + 1 );
664  }
665 
666  /* Copy base name to buffer */
667  snprintf ( buf, sizeof ( buf ), "%s", name );
668 
669  /* Strip file suffix, if present */
670  if ( ( tmp = strrchr ( buf, '.' ) ) != NULL )
671  *tmp = '\0';
672 
673  return buf;
674 }
#define EFI_PAGE_SIZE
Definition: UefiBaseType.h:187
const char * name
Definition: ath9k_hw.c:1984
unsigned short uint16_t
Definition: stdint.h:11
char * strrchr(const char *src, int character)
Find rightmost character within a string.
Definition: string.c:289
Union of PE32, PE32+, and TE headers.
Definition: PeImage.h:805
Definition: PeImage.h:660
#define EFI_IMAGE_DOS_SIGNATURE
Definition: PeImage.h:50
Optional Header Standard Fields for PE32+.
Definition: PeImage.h:201
Optional Header Standard Fields for PE32.
Definition: PeImage.h:150
VOID * ImageBase
The base address at which the image was loaded.
Definition: LoadedImage.h:69
EFI_IMAGE_NT_HEADERS32 Pe32
Definition: PeImage.h:806
unsigned long tmp
Definition: linux_pci.h:63
#define EFI_IMAGE_NT_SIGNATURE
Definition: PeImage.h:53
Definition: PeImage.h:690
#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG
Definition: PeImage.h:131
#define CODEVIEW_SIGNATURE_RSDS
Debug Data Structure defined in Microsoft C++.
Definition: PeImage.h:673
uint64_t debug
Debug area base address.
Definition: ena.h:14
UINT16 Magic
Standard fields.
Definition: PeImage.h:154
char * strchr(const char *src, int character)
Find character within a string.
Definition: string.c:271
UINT32 Signature
"NB10"
Definition: PeImage.h:661
#define CODEVIEW_SIGNATURE_MTOC
Debug Data Structure defined by Apple Mach-O to Coff utility.
Definition: PeImage.h:689
Header Data Directories.
Definition: PeImage.h:117
EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES]
Definition: PeImage.h:237
size_t strnlen(const char *src, size_t max)
Get length of string.
Definition: string.c:255
EFI_IMAGE_OPTIONAL_HEADER64 OptionalHeader
Definition: PeImage.h:259
Definition: PeImage.h:674
unsigned int uint32_t
Definition: stdint.h:12
Debug Directory Format.
Definition: PeImage.h:642
#define CODEVIEW_SIGNATURE_NB10
Debug Data Structure defined in Microsoft C++.
Definition: PeImage.h:659
UINT32 e_lfanew
File address of new exe header.
Definition: PeImage.h:78
UINT16 e_magic
Magic number.
Definition: PeImage.h:60
EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES]
Definition: PeImage.h:187
PE images can start with an optional DOS header, so if an image is run under DOS it can print an erro...
Definition: PeImage.h:59
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
Definition: vsprintf.c:382
EFI_IMAGE_NT_HEADERS64 Pe32Plus
Definition: PeImage.h:807
#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC
Definition: PeImage.h:145
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC
Definition: PeImage.h:196
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321
#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW
The Visual C++ debug information.
Definition: PeImage.h:653
EFI_IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: PeImage.h:247

References CODEVIEW_SIGNATURE_MTOC, CODEVIEW_SIGNATURE_NB10, CODEVIEW_SIGNATURE_RSDS, EFI_IMAGE_OPTIONAL_HEADER32::DataDirectory, EFI_IMAGE_OPTIONAL_HEADER64::DataDirectory, DBG, debug, EFI_IMAGE_DOS_HEADER::e_lfanew, EFI_IMAGE_DOS_HEADER::e_magic, EFI_IMAGE_DEBUG_TYPE_CODEVIEW, EFI_IMAGE_DIRECTORY_ENTRY_DEBUG, EFI_IMAGE_DOS_SIGNATURE, EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC, EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC, EFI_IMAGE_NT_SIGNATURE, EFI_PAGE_SIZE, EFI_LOADED_IMAGE_PROTOCOL::ImageBase, EFI_IMAGE_OPTIONAL_HEADER32::Magic, name, NULL, EFI_IMAGE_NT_HEADERS32::OptionalHeader, EFI_IMAGE_NT_HEADERS64::OptionalHeader, EFI_IMAGE_OPTIONAL_HEADER_UNION::Pe32, EFI_IMAGE_OPTIONAL_HEADER_UNION::Pe32Plus, EFI_IMAGE_NT_HEADERS32::Signature, EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY::Signature, snprintf(), strchr(), strnlen(), strrchr(), tmp, and EFI_IMAGE_DATA_DIRECTORY::VirtualAddress.

◆ efi_first_loaded_image_name()

static const char* efi_first_loaded_image_name ( EFI_LOADED_IMAGE_PROTOCOL loaded)
static

Get initial loaded image name.

Parameters
loadedLoaded image
Return values
nameInitial loaded image name, or NULL

Definition at line 683 of file efi_debug.c.

683  {
684 
685  /* Sanity check */
686  if ( ! loaded ) {
687  DBG ( "[NULL LoadedImage]" );
688  return NULL;
689  }
690 
691  return ( ( loaded->ParentHandle == NULL ) ? "DxeCore(?)" : NULL );
692 }
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321
EFI_HANDLE ParentHandle
Parent image's image handle.
Definition: LoadedImage.h:48

References DBG, NULL, and EFI_LOADED_IMAGE_PROTOCOL::ParentHandle.

◆ efi_loaded_image_filepath_name()

static const char* efi_loaded_image_filepath_name ( EFI_LOADED_IMAGE_PROTOCOL loaded)
static

Get loaded image name from file path.

Parameters
loadedLoaded image
Return values
nameLoaded image name, or NULL

Definition at line 701 of file efi_debug.c.

701  {
702 
703  /* Sanity check */
704  if ( ! loaded ) {
705  DBG ( "[NULL LoadedImage]" );
706  return NULL;
707  }
708 
709  return efi_devpath_text ( loaded->FilePath );
710 }
EFI_DEVICE_PATH_PROTOCOL * FilePath
A pointer to the file path portion specific to DeviceHandle that the EFI Image was loaded from.
Definition: LoadedImage.h:56
const char * efi_devpath_text(EFI_DEVICE_PATH_PROTOCOL *path)
Get textual representation of device path.
Definition: efi_debug.c:463
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

References DBG, efi_devpath_text(), EFI_LOADED_IMAGE_PROTOCOL::FilePath, and NULL.

◆ efi_conin_name()

static const char* efi_conin_name ( EFI_SIMPLE_TEXT_INPUT_PROTOCOL input)
static

Get console input handle name.

Parameters
inputSimple text input protocol
Return values
nameConsole input handle name, or NULL

Definition at line 719 of file efi_debug.c.

719  {
720 
721  /* Check for match against ConIn */
722  if ( input == efi_systab->ConIn )
723  return "ConIn";
724 
725  return NULL;
726 }
Definition: bnxt_hsi.h:68
EFI_SIMPLE_TEXT_INPUT_PROTOCOL * ConIn
A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL interface that is associated with ConsoleInHandle.
Definition: UefiSpec.h:2068
EFI_SYSTEM_TABLE * efi_systab
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321

References EFI_SYSTEM_TABLE::ConIn, efi_systab, and NULL.

◆ efi_conout_name()

static const char* efi_conout_name ( EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL output)
static

Get console output handle name.

Parameters
outputSimple text output protocol
Return values
nameConsole output handle name, or NULL

Definition at line 735 of file efi_debug.c.

735  {
736 
737  /* Check for match against ConOut */
738  if ( output == efi_systab->ConOut )
739  return "ConOut";
740 
741  /* Check for match against StdErr (if different from ConOut) */
742  if ( output == efi_systab->StdErr )
743  return "StdErr";
744 
745  return NULL;
746 }
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * ConOut
A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface that is associated with ConsoleOutHandle.
Definition: UefiSpec.h:2079
EFI_SYSTEM_TABLE * efi_systab
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * StdErr
A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface that is associated with StandardErrorHandl...
Definition: UefiSpec.h:2090

References EFI_SYSTEM_TABLE::ConOut, efi_systab, NULL, and EFI_SYSTEM_TABLE::StdErr.

◆ efi_handle_name()

const char* efi_handle_name ( EFI_HANDLE  handle)

Get name of an EFI handle.

Parameters
handleEFI handle
Return values
textName of handle, or NULL

Definition at line 810 of file efi_debug.c.

810  {
812  struct efi_handle_name_type *type;
813  static char buf[256];
814  size_t used = 0;
815  EFI_GUID **protocols;
816  UINTN count;
817  unsigned int i;
818  void *interface;
819  const char *name;
820  EFI_STATUS efirc;
821 
822  /* Fail immediately for NULL handles */
823  if ( ! handle )
824  return NULL;
825 
826  /* Try each name type in turn */
827  for ( i = 0 ; i < ( sizeof ( efi_handle_name_types ) /
828  sizeof ( efi_handle_name_types[0] ) ) ; i++ ) {
830  DBG2 ( "<%d", i );
831 
832  /* Try to open the applicable protocol */
833  efirc = bs->OpenProtocol ( handle, type->protocol, &interface,
836  if ( efirc != 0 ) {
837  DBG2 ( ">" );
838  continue;
839  }
840 
841  /* Try to get name from this protocol */
842  DBG2 ( "-" );
843  name = type->name ( interface );
844  DBG2 ( "%c", ( name ? ( name[0] ? 'Y' : 'E' ) : 'N' ) );
845 
846  /* Close protocol */
847  bs->CloseProtocol ( handle, type->protocol,
849  DBG2 ( ">" );
850 
851  /* Use this name, if possible */
852  if ( name && name[0] )
853  return name;
854  }
855 
856  /* If no name is found, then use the raw handle value and a
857  * list of installed protocols.
858  */
859  used = ssnprintf ( buf, sizeof ( buf ), "UNKNOWN<%p", handle );
860  if ( ( efirc = bs->ProtocolsPerHandle ( handle, &protocols,
861  &count ) ) == 0 ) {
862  for ( i = 0 ; i < count ; i++ ) {
863  used += ssnprintf ( ( buf + used ),
864  ( sizeof ( buf ) - used ), ",%s",
865  efi_guid_ntoa ( protocols[i] ) );
866  }
867  bs->FreePool ( protocols );
868  }
869  used += ssnprintf ( ( buf + used ), ( sizeof ( buf ) - used ), ">" );
870  return buf;
871 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2098
const char * name
Definition: ath9k_hw.c:1984
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
uint32_t type
Operating system type.
Definition: ena.h:12
EFI_CLOSE_PROTOCOL CloseProtocol
Definition: UefiSpec.h:2000
int ssnprintf(char *buf, ssize_t ssize, const char *fmt,...)
Version of vsnprintf() that accepts a signed buffer size.
Definition: vsprintf.c:420
An object interface.
Definition: interface.h:124
uint16_t count
Number of entries.
Definition: ena.h:22
#define EFI_OPEN_PROTOCOL_GET_PROTOCOL
Definition: UefiSpec.h:1354
static struct efi_handle_name_type efi_handle_name_types[]
EFI handle name types.
Definition: efi_debug.c:774
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
Definition: efi_debug.c:256
EFI Boot Services Table.
Definition: UefiSpec.h:1930
EFI_HANDLE efi_image_handle
Image handle passed to entry point.
Definition: efi_init.c:34
UINT64 UINTN
Unsigned value of native width.
EFI_FREE_POOL FreePool
Definition: UefiSpec.h:1949
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle
Definition: UefiSpec.h:2006
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
An EFI handle name type.
Definition: efi_debug.c:749
EFI_SYSTEM_TABLE * efi_systab
EFI_OPEN_PROTOCOL OpenProtocol
Definition: UefiSpec.h:1999
uint16_t handle
Handle.
Definition: smbios.h:16
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321
#define DBG2(...)
Definition: compiler.h:515

References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseProtocol, count, DBG2, efi_guid_ntoa(), efi_handle_name_types, efi_image_handle, EFI_OPEN_PROTOCOL_GET_PROTOCOL, efi_systab, EFI_BOOT_SERVICES::FreePool, handle, name, NULL, EFI_BOOT_SERVICES::OpenProtocol, EFI_BOOT_SERVICES::ProtocolsPerHandle, ssnprintf(), and type.

Referenced by chained_locate(), chained_supported(), dbg_efi_opener(), dbg_efi_openers(), dbg_efi_protocol(), dbg_efi_protocols(), efi_autoexec_filesystem(), efi_autoexec_load(), efi_autoexec_network(), efi_block_boot(), efi_block_filename(), efi_block_hook(), efi_block_local(), efi_block_match(), efi_block_root(), efi_bofm_start(), efi_bofm_supported(), efi_cachedhcp_record(), efi_child_add(), efi_child_del(), efi_close_protocol_wrapper(), efi_connect_controller_wrapper(), efi_device_info(), efi_disconnect_controller_wrapper(), efi_driver_connect(), efi_driver_start(), efi_driver_stop(), efi_driver_supported(), efi_dump_image(), efi_exit_boot_services_wrapper(), efi_exit_wrapper(), efi_file_path_claim(), efi_handle_protocol_wrapper(), efi_install_multiple_protocol_interfaces_wrapper(), efi_install_protocol_interface_wrapper(), efi_load_image_wrapper(), efi_local_check_volume_name(), efi_local_open_root(), efi_local_open_volume(), efi_locate_device(), efi_locate_device_path_wrapper(), efi_locate_handle_buffer_wrapper(), efi_locate_handle_wrapper(), efi_open_protocol_information_wrapper(), efi_open_protocol_wrapper(), efi_pci_info(), efi_protocols_per_handle_wrapper(), efi_pxe_install(), efi_pxe_uninstall(), efi_reinstall_protocol_interface_wrapper(), efi_service_add(), efi_service_del(), efi_set_autoboot_ll_addr(), efi_snp_probe(), efi_start_image_wrapper(), efi_uninstall_multiple_protocol_interfaces_wrapper(), efi_uninstall_protocol_interface_wrapper(), efi_unload_image_wrapper(), efi_usb_install(), efi_usb_uninstall(), efi_veto(), efi_veto_close(), efi_veto_close_handle(), efi_veto_close_protocol(), efi_veto_destroy(), efi_veto_disconnect(), efi_veto_find(), efi_veto_uninstall(), efi_veto_unload(), efidev_alloc(), efipci_discover_one(), efipci_open(), efipci_root_open(), efipci_start(), mnpnet_start(), mnptemp_create(), nii_start(), snpnet_start(), snpnet_stop(), snpnet_supported(), usbio_bulk_in_poll(), usbio_bulk_out_poll(), usbio_config(), usbio_control_poll(), usbio_endpoint_open(), usbio_interface(), usbio_interfaces(), usbio_interrupt_callback(), usbio_interrupt_open(), usbio_open(), usbio_path(), usbio_start(), and usbio_supported().

Variable Documentation

◆ efidpt

Device path to text protocol.

Definition at line 47 of file efi_debug.c.

Referenced by efi_devpath_text().

◆ efi_http_boot_dxe_guid

EFI_GUID efi_http_boot_dxe_guid
static
Initial value:
= {
0xecebcb00, 0xd9c8, 0x11e4,
{ 0xaf, 0x3d, 0x8c, 0xdc, 0xd4, 0x26, 0xc9, 0x73 }
}

HttpBootDxe module GUID.

Definition at line 51 of file efi_debug.c.

◆ efi_iscsi_dxe_guid

EFI_GUID efi_iscsi_dxe_guid
static
Initial value:
= {
0x86cddf93, 0x4872, 0x4597,
{ 0x8a, 0xf9, 0xa3, 0x5a, 0xe4, 0xd3, 0x72, 0x5f }
}

IScsiDxe module GUID.

Definition at line 57 of file efi_debug.c.

◆ efi_iscsi4_dxe_guid

EFI_GUID efi_iscsi4_dxe_guid
static
Initial value:
= {
0x4579b72d, 0x7ec4, 0x4dd4,
{ 0x84, 0x86, 0x08, 0x3c, 0x86, 0xb1, 0x82, 0xa7 }
}

Old IScsi4Dxe module GUID.

Definition at line 63 of file efi_debug.c.

◆ efi_uefi_pxe_bc_dxe_guid

EFI_GUID efi_uefi_pxe_bc_dxe_guid
static
Initial value:
= {
0xb95e9fda, 0x26de, 0x48d2,
{ 0x88, 0x07, 0x1f, 0x91, 0x07, 0xac, 0x5e, 0x3a }
}

UefiPxeBcDxe module GUID.

Definition at line 69 of file efi_debug.c.

◆ efi_vlan_config_dxe_guid

EFI_GUID efi_vlan_config_dxe_guid
static
Initial value:
= {
0xe4f61863, 0xfe2c, 0x4b56,
{ 0xa8, 0xf4, 0x08, 0x51, 0x9b, 0xc4, 0x39, 0xdf }
}

VlanConfigDxe module GUID.

Definition at line 75 of file efi_debug.c.

◆ efi_well_known_guids

struct efi_well_known_guid efi_well_known_guids[]
static

Well-known GUIDs.

Definition at line 89 of file efi_debug.c.

Referenced by efi_guid_ntoa().

◆ efi_handle_name_types

struct efi_handle_name_type efi_handle_name_types[]
static
Initial value:
= {
}
static const char * efi_loaded_image_filepath_name(EFI_LOADED_IMAGE_PROTOCOL *loaded)
Get loaded image name from file path.
Definition: efi_debug.c:701
static const char * efi_conin_name(EFI_SIMPLE_TEXT_INPUT_PROTOCOL *input)
Get console input handle name.
Definition: efi_debug.c:719
static const char * efi_driver_name(EFI_COMPONENT_NAME_PROTOCOL *wtf)
Get driver name.
Definition: efi_debug.c:503
EFI_GUID efi_loaded_image_device_path_protocol_guid
Loaded image device path protocol GUID.
Definition: efi_guid.c:248
EFI_GUID efi_loaded_image_protocol_guid
Loaded image protocol GUID.
Definition: efi_guid.c:244
#define EFI_HANDLE_NAME_TYPE(protocol, name)
Define an EFI handle name type.
Definition: efi_debug.c:768
static const char * efi_driver_name2(EFI_COMPONENT_NAME2_PROTOCOL *wtf)
Get driver name.
Definition: efi_debug.c:533
EFI_GUID efi_simple_text_output_protocol_guid
Simple text output protocol GUID.
Definition: efi_guid.c:324
const char * efi_devpath_text(EFI_DEVICE_PATH_PROTOCOL *path)
Get textual representation of device path.
Definition: efi_debug.c:463
static const char * efi_pecoff_debug_name(EFI_LOADED_IMAGE_PROTOCOL *loaded)
Get PE/COFF debug filename.
Definition: efi_debug.c:564
EFI_GUID efi_device_path_protocol_guid
Device path protocol GUID.
Definition: efi_guid.c:144
EFI_GUID efi_component_name2_protocol_guid
Component name 2 protocol GUID.
Definition: efi_guid.c:136
EFI_GUID efi_simple_text_input_protocol_guid
Simple text input protocol GUID.
Definition: efi_guid.c:316
static const char * efi_conout_name(EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *output)
Get console output handle name.
Definition: efi_debug.c:735
static const char * efi_first_loaded_image_name(EFI_LOADED_IMAGE_PROTOCOL *loaded)
Get initial loaded image name.
Definition: efi_debug.c:683
EFI_GUID efi_component_name_protocol_guid
Component name protocol GUID.
Definition: efi_guid.c:132

EFI handle name types.

Definition at line 774 of file efi_debug.c.

Referenced by efi_handle_name().