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_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_iscsi4_dxe_guid
 Iscsi4Dxe 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 680 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 192 of file efi_debug.c.

192  {
193  union {
194  union uuid uuid;
195  EFI_GUID guid;
196  } u;
197  unsigned int i;
198 
199  /* Sanity check */
200  if ( ! guid )
201  return NULL;
202 
203  /* Check for a match against well-known GUIDs */
204  for ( i = 0 ; i < ( sizeof ( efi_well_known_guids ) /
205  sizeof ( efi_well_known_guids[0] ) ) ; i++ ) {
207  sizeof ( *guid ) ) == 0 ) {
208  return efi_well_known_guids[i].name;
209  }
210  }
211 
212  /* Convert GUID to standard endianness */
213  memcpy ( &u.guid, guid, sizeof ( u.guid ) );
214  uuid_mangle ( &u.uuid );
215  return uuid_ntoa ( &u.uuid );
216 }
const char * name
Name.
Definition: efi_debug.c:67
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:71
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:43
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_protocols(), 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_uninstall_multiple_protocol_interfaces_wrapper(), efi_uninstall_protocol_interface_wrapper(), efi_veto_close_protocol(), and snp_nii_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 225 of file efi_debug.c.

225  {
226  static char buf[16];
227 
228  switch ( search_type ) {
229  case AllHandles : return "AllHandles";
230  case ByRegisterNotify: return "ByRegisterNotify";
231  case ByProtocol: return "ByProtocol";
232  default:
233  snprintf ( buf, sizeof ( buf ), "UNKNOWN<%d>", search_type );
234  return buf;
235  }
236 }
Retrieve all the handles in the handle database.
Definition: UefiSpec.h:1466
Retrieve the next handle fron a RegisterProtocolNotify() event.
Definition: UefiSpec.h:1470
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:1475

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 250 of file efi_debug.c.

250  {
251  static char attribute_chars[] = "HGTCDX";
252  static char name[ sizeof ( attribute_chars ) ];
253  char *tmp = name;
254  unsigned int i;
255 
256  for ( i = 0 ; i < ( sizeof ( attribute_chars ) - 1 ) ; i++ ) {
257  if ( attributes & ( 1 << i ) )
258  *(tmp++) = attribute_chars[i];
259  }
260  *tmp = '\0';
261 
262  return name;
263 }
const char * name
Definition: ath9k_hw.c:1984
unsigned long tmp
Definition: linux_pci.h:53

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 272 of file efi_debug.c.

273  {
274 
275  printf ( "HANDLE %s %s opened %dx (%s)", efi_handle_name ( handle ),
276  efi_guid_ntoa ( protocol ), opener->OpenCount,
277  efi_open_attributes_name ( opener->Attributes ) );
278  printf ( " by %s", efi_handle_name ( opener->AgentHandle ) );
279  if ( opener->ControllerHandle == handle ) {
280  printf ( "\n" );
281  } else {
282  printf ( " for %s\n",
283  efi_handle_name ( opener->ControllerHandle ) );
284  }
285 }
int printf(const char *fmt,...)
Write a formatted string to the console.
Definition: vsprintf.c:464
EFI_HANDLE ControllerHandle
Definition: UefiSpec.h:1378
EFI_HANDLE AgentHandle
Definition: UefiSpec.h:1377
UINT32 OpenCount
Definition: UefiSpec.h:1380
UINT32 Attributes
Definition: UefiSpec.h:1379
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:722
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
Definition: efi_debug.c:192
const char * efi_open_attributes_name(unsigned int attributes)
Name protocol open attributes.
Definition: efi_debug.c:250
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 293 of file efi_debug.c.

293  {
296  UINTN count;
297  unsigned int i;
298  EFI_STATUS efirc;
299  int rc;
300 
301  /* Sanity check */
302  if ( ( ! handle ) || ( ! protocol ) ) {
303  printf ( "HANDLE %s could not retrieve openers for %s\n",
305  efi_guid_ntoa ( protocol ) );
306  return;
307  }
308 
309  /* Retrieve list of openers */
310  if ( ( efirc = bs->OpenProtocolInformation ( handle, protocol, &openers,
311  &count ) ) != 0 ) {
312  rc = -EEFI ( efirc );
313  printf ( "HANDLE %s could not retrieve openers for %s: %s\n",
315  efi_guid_ntoa ( protocol ), strerror ( rc ) );
316  return;
317  }
318 
319  /* Dump list of openers */
320  for ( i = 0 ; i < count ; i++ )
321  dbg_efi_opener ( handle, protocol, &openers[i] );
322 
323  /* Free list */
324  bs->FreePool ( openers );
325 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2030
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
EFI Oprn Protocol Information Entry.
Definition: UefiSpec.h:1376
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
Definition: efi.h:162
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:272
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:722
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
Definition: efi_debug.c:192
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
EFI Boot Services Table.
Definition: UefiSpec.h:1866
UINT64 UINTN
Unsigned value of native width.
EFI_FREE_POOL FreePool
Definition: UefiSpec.h:1885
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation
Definition: UefiSpec.h:1937
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
uint16_t count
Number of entries.
Definition: ena.h:22
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_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 332 of file efi_debug.c.

332  {
334  EFI_GUID **protocols;
336  UINTN count;
337  unsigned int i;
338  EFI_STATUS efirc;
339  int rc;
340 
341  /* Sanity check */
342  if ( ! handle ) {
343  printf ( "HANDLE %p could not retrieve protocols\n", handle );
344  return;
345  }
346 
347  /* Retrieve list of protocols */
348  if ( ( efirc = bs->ProtocolsPerHandle ( handle, &protocols,
349  &count ) ) != 0 ) {
350  rc = -EEFI ( efirc );
351  printf ( "HANDLE %s could not retrieve protocols: %s\n",
352  efi_handle_name ( handle ), strerror ( rc ) );
353  return;
354  }
355 
356  /* Dump list of protocols */
357  for ( i = 0 ; i < count ; i++ ) {
358  protocol = protocols[i];
359  printf ( "HANDLE %s %s supported\n", efi_handle_name ( handle ),
360  efi_guid_ntoa ( protocol ) );
362  }
363 
364  /* Free list */
365  bs->FreePool ( protocols );
366 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2030
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:162
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:293
128 bit buffer containing a unique identifier value.
Definition: Base.h:215
const char * efi_handle_name(EFI_HANDLE handle)
Get name of an EFI handle.
Definition: efi_debug.c:722
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
Definition: efi_debug.c:192
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
EFI Boot Services Table.
Definition: UefiSpec.h:1866
UINT64 UINTN
Unsigned value of native width.
EFI_FREE_POOL FreePool
Definition: UefiSpec.h:1885
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle
Definition: UefiSpec.h:1942
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
uint16_t count
Number of entries.
Definition: ena.h:22
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_openers(), EEFI, efi_guid_ntoa(), efi_handle_name(), efi_systab, EFI_BOOT_SERVICES::FreePool, handle, printf(), protocol, 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 375 of file efi_debug.c.

375  {
377  static char text[512];
378  size_t len;
379  CHAR16 *wtext;
380 
381  /* Sanity checks */
382  if ( ! path ) {
383  DBG ( "[NULL DevicePath]" );
384  return NULL;
385  }
386 
387  /* If we have no DevicePathToText protocol then use a raw hex string */
388  if ( ! efidpt ) {
389  DBG ( "[No DevicePathToText]" );
390  len = efi_path_len ( path );
391  base16_encode ( path, len, text, sizeof ( text ) );
392  return text;
393  }
394 
395  /* Convert path to a textual representation */
396  wtext = efidpt->ConvertDevicePathToText ( path, TRUE, FALSE );
397  if ( ! wtext )
398  return NULL;
399 
400  /* Store path in buffer */
401  snprintf ( text, sizeof ( text ), "%ls", wtext );
402 
403  /* Free path */
404  bs->FreePool ( wtext );
405 
406  return text;
407 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2030
size_t efi_path_len(EFI_DEVICE_PATH_PROTOCOL *path)
Find length of device path (excluding terminator)
Definition: efi_path.c:106
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:1866
EFI_FREE_POOL FreePool
Definition: UefiSpec.h:1885
#define TRUE
Definition: tlan.h:46
uint32_t len
Length.
Definition: ena.h:14
#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
#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, snprintf(), and TRUE.

Referenced by efi_autoexec_filesystem(), efi_block_boot_image(), efi_block_hook(), 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(), 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 415 of file efi_debug.c.

415  {
416  static char name[64];
417  CHAR16 *driver_name;
418  EFI_STATUS efirc;
419 
420  /* Sanity check */
421  if ( ! wtf ) {
422  DBG ( "[NULL ComponentName]" );
423  return NULL;
424  }
425 
426  /* Try "eng" first; if that fails then try the first language */
427  if ( ( ( efirc = wtf->GetDriverName ( wtf, "eng",
428  &driver_name ) ) != 0 ) &&
429  ( ( efirc = wtf->GetDriverName ( wtf, wtf->SupportedLanguages,
430  &driver_name ) ) != 0 ) ) {
431  return NULL;
432  }
433 
434  /* Convert name from CHAR16 to char */
435  snprintf ( name, sizeof ( name ), "%ls", driver_name );
436  return name;
437 }
const char * name
Definition: ath9k_hw.c:1984
EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName
unsigned short CHAR16
CHAR8 * SupportedLanguages
A Null-terminated ASCII string that contains one or more ISO 639-2 language codes.
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, _EFI_COMPONENT_NAME_PROTOCOL::GetDriverName, name, NULL, snprintf(), and _EFI_COMPONENT_NAME_PROTOCOL::SupportedLanguages.

◆ 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 445 of file efi_debug.c.

445  {
446  static char name[64];
447  CHAR16 *driver_name;
448  EFI_STATUS efirc;
449 
450  /* Sanity check */
451  if ( ! wtf ) {
452  DBG ( "[NULL ComponentName2]" );
453  return NULL;
454  }
455 
456  /* Try "en" first; if that fails then try the first language */
457  if ( ( ( efirc = wtf->GetDriverName ( wtf, "en",
458  &driver_name ) ) != 0 ) &&
459  ( ( efirc = wtf->GetDriverName ( wtf, wtf->SupportedLanguages,
460  &driver_name ) ) != 0 ) ) {
461  return NULL;
462  }
463 
464  /* Convert name from CHAR16 to char */
465  snprintf ( name, sizeof ( name ), "%ls", driver_name );
466  return name;
467 }
const char * name
Definition: ath9k_hw.c:1984
unsigned short CHAR16
EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName
CHAR8 * SupportedLanguages
A Null-terminated ASCII string array that contains one or more supported language codes.
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, _EFI_COMPONENT_NAME2_PROTOCOL::GetDriverName, name, NULL, snprintf(), and _EFI_COMPONENT_NAME2_PROTOCOL::SupportedLanguages.

◆ 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 476 of file efi_debug.c.

476  {
477  static char buf[32];
482  EFI_IMAGE_DATA_DIRECTORY *datadir;
487  uint16_t dos_magic;
488  uint32_t pe_magic;
489  uint16_t opt_magic;
490  uint32_t codeview_magic;
491  size_t max_len;
492  char *name;
493  char *tmp;
494 
495  /* Sanity check */
496  if ( ! loaded ) {
497  DBG ( "[NULL LoadedImage]" );
498  return NULL;
499  }
500 
501  /* Parse DOS header */
502  dos = loaded->ImageBase;
503  if ( ! dos ) {
504  DBG ( "[Missing DOS header]" );
505  return NULL;
506  }
507  dos_magic = dos->e_magic;
508  if ( dos_magic != EFI_IMAGE_DOS_SIGNATURE ) {
509  DBG ( "[Bad DOS signature %#04x]", dos_magic );
510  return NULL;
511  }
512  pe = ( loaded->ImageBase + dos->e_lfanew );
513 
514  /* Parse PE header */
515  pe_magic = pe->Pe32.Signature;
516  if ( pe_magic != EFI_IMAGE_NT_SIGNATURE ) {
517  DBG ( "[Bad PE signature %#08x]", pe_magic );
518  return NULL;
519  }
520  opt32 = &pe->Pe32.OptionalHeader;
521  opt64 = &pe->Pe32Plus.OptionalHeader;
522  opt_magic = opt32->Magic;
523  if ( opt_magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC ) {
524  datadir = opt32->DataDirectory;
525  } else if ( opt_magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC ) {
526  datadir = opt64->DataDirectory;
527  } else {
528  DBG ( "[Bad optional header signature %#04x]", opt_magic );
529  return NULL;
530  }
531 
532  /* Parse data directory entry */
533  if ( ! datadir[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress ) {
534  DBG ( "[Empty debug directory entry]" );
535  return NULL;
536  }
537  debug = ( loaded->ImageBase +
539 
540  /* Parse debug directory entry */
541  if ( debug->Type != EFI_IMAGE_DEBUG_TYPE_CODEVIEW ) {
542  DBG ( "[Not a CodeView debug directory entry (type %d)]",
543  debug->Type );
544  return NULL;
545  }
546  codeview_nb10 = ( loaded->ImageBase + debug->RVA );
547  codeview_rsds = ( loaded->ImageBase + debug->RVA );
548  codeview_mtoc = ( loaded->ImageBase + debug->RVA );
549  codeview_magic = codeview_nb10->Signature;
550 
551  /* Parse CodeView entry */
552  if ( codeview_magic == CODEVIEW_SIGNATURE_NB10 ) {
553  name = ( ( void * ) ( codeview_nb10 + 1 ) );
554  } else if ( codeview_magic == CODEVIEW_SIGNATURE_RSDS ) {
555  name = ( ( void * ) ( codeview_rsds + 1 ) );
556  } else if ( codeview_magic == CODEVIEW_SIGNATURE_MTOC ) {
557  name = ( ( void * ) ( codeview_mtoc + 1 ) );
558  } else {
559  DBG ( "[Bad CodeView signature %#08x]", codeview_magic );
560  return NULL;
561  }
562 
563  /* Sanity check - avoid scanning endlessly through memory */
564  max_len = EFI_PAGE_SIZE; /* Reasonably sane */
565  if ( strnlen ( name, max_len ) == max_len ) {
566  DBG ( "[Excessively long or invalid CodeView name]" );
567  return NULL;
568  }
569 
570  /* Skip any directory components. We cannot modify this data
571  * or create a temporary buffer, so do not use basename().
572  */
573  while ( ( ( tmp = strchr ( name, '/' ) ) != NULL ) ||
574  ( ( tmp = strchr ( name, '\\' ) ) != NULL ) ) {
575  name = ( tmp + 1 );
576  }
577 
578  /* Copy base name to buffer */
579  snprintf ( buf, sizeof ( buf ), "%s", name );
580 
581  /* Strip file suffix, if present */
582  if ( ( tmp = strrchr ( name, '.' ) ) != NULL )
583  *tmp = '\0';
584 
585  return name;
586 }
#define EFI_PAGE_SIZE
Definition: UefiBaseType.h:185
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
uint16_t max_len
Maximum length (in bytes)
Definition: ntlm.h:18
Union of PE32, PE32+, and TE headers.
Definition: PeImage.h:753
Definition: PeImage.h:636
#define EFI_IMAGE_DOS_SIGNATURE
Definition: PeImage.h:50
Optional Header Standard Fields for PE32+.
Definition: PeImage.h:200
Optional Header Standard Fields for PE32.
Definition: PeImage.h:149
VOID * ImageBase
The base address at which the image was loaded.
Definition: LoadedImage.h:69
EFI_IMAGE_NT_HEADERS32 Pe32
Definition: PeImage.h:754
unsigned long tmp
Definition: linux_pci.h:53
#define EFI_IMAGE_NT_SIGNATURE
Definition: PeImage.h:53
Definition: PeImage.h:666
#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG
Definition: PeImage.h:130
#define CODEVIEW_SIGNATURE_RSDS
Debug Data Structure defined in Microsoft C++.
Definition: PeImage.h:649
uint64_t debug
Debug area base address.
Definition: ena.h:14
UINT16 Magic
Standard fields.
Definition: PeImage.h:153
char * strchr(const char *src, int character)
Find character within a string.
Definition: string.c:271
UINT32 Signature
"NB10"
Definition: PeImage.h:637
#define CODEVIEW_SIGNATURE_MTOC
Debug Data Structure defined by Apple Mach-O to Coff utility.
Definition: PeImage.h:665
Header Data Directories.
Definition: PeImage.h:116
EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES]
Definition: PeImage.h:236
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:258
Definition: PeImage.h:650
unsigned int uint32_t
Definition: stdint.h:12
Debug Directory Format.
Definition: PeImage.h:619
#define CODEVIEW_SIGNATURE_NB10
Debug Data Structure defined in Microsoft C++.
Definition: PeImage.h:635
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:186
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:755
#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC
Definition: PeImage.h:144
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC
Definition: PeImage.h:195
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321
#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW
The Visual C++ debug information.
Definition: PeImage.h:630
EFI_IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: PeImage.h:246

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, max_len, 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 595 of file efi_debug.c.

595  {
596 
597  /* Sanity check */
598  if ( ! loaded ) {
599  DBG ( "[NULL LoadedImage]" );
600  return NULL;
601  }
602 
603  return ( ( loaded->ParentHandle == NULL ) ? "DxeCore(?)" : NULL );
604 }
#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 613 of file efi_debug.c.

613  {
614 
615  /* Sanity check */
616  if ( ! loaded ) {
617  DBG ( "[NULL LoadedImage]" );
618  return NULL;
619  }
620 
621  return efi_devpath_text ( loaded->FilePath );
622 }
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:375
#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 631 of file efi_debug.c.

631  {
632 
633  /* Check for match against ConIn */
634  if ( input == efi_systab->ConIn )
635  return "ConIn";
636 
637  return NULL;
638 }
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:2003
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 647 of file efi_debug.c.

647  {
648 
649  /* Check for match against ConOut */
650  if ( output == efi_systab->ConOut )
651  return "ConOut";
652 
653  /* Check for match against StdErr (if different from ConOut) */
654  if ( output == efi_systab->StdErr )
655  return "StdErr";
656 
657  return NULL;
658 }
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * ConOut
A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface that is associated with ConsoleOutHandle.
Definition: UefiSpec.h:2012
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:2022

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 722 of file efi_debug.c.

722  {
724  struct efi_handle_name_type *type;
725  static char buf[256];
726  size_t used = 0;
727  EFI_GUID **protocols;
728  UINTN count;
729  unsigned int i;
730  void *interface;
731  const char *name;
732  EFI_STATUS efirc;
733 
734  /* Fail immediately for NULL handles */
735  if ( ! handle )
736  return NULL;
737 
738  /* Try each name type in turn */
739  for ( i = 0 ; i < ( sizeof ( efi_handle_name_types ) /
740  sizeof ( efi_handle_name_types[0] ) ) ; i++ ) {
742  DBG2 ( "<%d", i );
743 
744  /* Try to open the applicable protocol */
745  efirc = bs->OpenProtocol ( handle, type->protocol, &interface,
748  if ( efirc != 0 ) {
749  DBG2 ( ">" );
750  continue;
751  }
752 
753  /* Try to get name from this protocol */
754  DBG2 ( "-" );
755  name = type->name ( interface );
756  DBG2 ( "%c", ( name ? ( name[0] ? 'Y' : 'E' ) : 'N' ) );
757 
758  /* Close protocol */
759  bs->CloseProtocol ( handle, type->protocol,
761  DBG2 ( ">" );
762 
763  /* Use this name, if possible */
764  if ( name && name[0] )
765  return name;
766  }
767 
768  /* If no name is found, then use the raw handle value and a
769  * list of installed protocols.
770  */
771  used = ssnprintf ( buf, sizeof ( buf ), "UNKNOWN<%p", handle );
772  if ( ( efirc = bs->ProtocolsPerHandle ( handle, &protocols,
773  &count ) ) == 0 ) {
774  for ( i = 0 ; i < count ; i++ ) {
775  used += ssnprintf ( ( buf + used ),
776  ( sizeof ( buf ) - used ), ",%s",
777  efi_guid_ntoa ( protocols[i] ) );
778  }
779  bs->FreePool ( protocols );
780  }
781  used += ssnprintf ( ( buf + used ), ( sizeof ( buf ) - used ), ">" );
782  return buf;
783 }
EFI_BOOT_SERVICES * BootServices
A pointer to the EFI Boot Services Table.
Definition: UefiSpec.h:2030
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:1936
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
#define EFI_OPEN_PROTOCOL_GET_PROTOCOL
Definition: UefiSpec.h:1299
static struct efi_handle_name_type efi_handle_name_types[]
EFI handle name types.
Definition: efi_debug.c:686
const char * efi_guid_ntoa(CONST EFI_GUID *guid)
Convert GUID to a printable string.
Definition: efi_debug.c:192
EFI Boot Services Table.
Definition: UefiSpec.h:1866
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:1885
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle
Definition: UefiSpec.h:1942
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:31
uint16_t count
Number of entries.
Definition: ena.h:22
An EFI handle name type.
Definition: efi_debug.c:661
EFI_SYSTEM_TABLE * efi_systab
EFI_OPEN_PROTOCOL OpenProtocol
Definition: UefiSpec.h:1935
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_protocols(), efi_autoexec_filesystem(), efi_autoexec_startup(), efi_autoexec_tftp(), 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_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(), efipci_open(), efipci_root_match(), efipci_root_open(), efipci_start(), nii_start(), snp_nii_supported(), snpnet_start(), snpnet_stop(), 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_iscsi4_dxe_guid

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

Iscsi4Dxe module GUID.

Definition at line 51 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 57 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 71 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:613
static const char * efi_conin_name(EFI_SIMPLE_TEXT_INPUT_PROTOCOL *input)
Get console input handle name.
Definition: efi_debug.c:631
static const char * efi_driver_name(EFI_COMPONENT_NAME_PROTOCOL *wtf)
Get driver name.
Definition: efi_debug.c:415
EFI_GUID efi_loaded_image_device_path_protocol_guid
Loaded image device path protocol GUID.
Definition: efi_guid.c:188
EFI_GUID efi_loaded_image_protocol_guid
Loaded image protocol GUID.
Definition: efi_guid.c:184
#define EFI_HANDLE_NAME_TYPE(protocol, name)
Define an EFI handle name type.
Definition: efi_debug.c:680
static const char * efi_driver_name2(EFI_COMPONENT_NAME2_PROTOCOL *wtf)
Get driver name.
Definition: efi_debug.c:445
EFI_GUID efi_simple_text_output_protocol_guid
Simple text output protocol GUID.
Definition: efi_guid.c:252
const char * efi_devpath_text(EFI_DEVICE_PATH_PROTOCOL *path)
Get textual representation of device path.
Definition: efi_debug.c:375
static const char * efi_pecoff_debug_name(EFI_LOADED_IMAGE_PROTOCOL *loaded)
Get PE/COFF debug filename.
Definition: efi_debug.c:476
EFI_GUID efi_device_path_protocol_guid
Device path protocol GUID.
Definition: efi_guid.c:132
EFI_GUID efi_component_name2_protocol_guid
Component name 2 protocol GUID.
Definition: efi_guid.c:124
EFI_GUID efi_simple_text_input_protocol_guid
Simple text input protocol GUID.
Definition: efi_guid.c:244
static const char * efi_conout_name(EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *output)
Get console output handle name.
Definition: efi_debug.c:647
static const char * efi_first_loaded_image_name(EFI_LOADED_IMAGE_PROTOCOL *loaded)
Get initial loaded image name.
Definition: efi_debug.c:595
EFI_GUID efi_component_name_protocol_guid
Component name protocol GUID.
Definition: efi_guid.c:120

EFI handle name types.

Definition at line 686 of file efi_debug.c.

Referenced by efi_handle_name().