summaryrefslogtreecommitdiffstats
path: root/src/interface
diff options
context:
space:
mode:
authorMichael Brown2015-08-27 11:08:00 +0200
committerMichael Brown2015-08-27 16:40:44 +0200
commit9501eaf68d79a7baa2d71567481ccb0f43e56253 (patch)
tree5cf2705ee089b65dfc93b9a4f5f5c3bf3a10cf65 /src/interface
parent[efi] Mark EFI debug transcription functions as __attribute__ (( pure )) (diff)
downloadipxe-9501eaf68d79a7baa2d71567481ccb0f43e56253.tar.gz
ipxe-9501eaf68d79a7baa2d71567481ccb0f43e56253.tar.xz
ipxe-9501eaf68d79a7baa2d71567481ccb0f43e56253.zip
[efi] Remove raw EFI_HANDLE values from debug messages
The raw EFI_HANDLE value is almost never useful to know, and simply adds noise to the already verbose debug messages. Improve the legibility of debug messages by using only the name generated by efi_handle_name(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface')
-rw-r--r--src/interface/efi/efi_bofm.c67
-rw-r--r--src/interface/efi/efi_debug.c34
-rw-r--r--src/interface/efi/efi_driver.c80
-rw-r--r--src/interface/efi/efi_pci.c41
-rw-r--r--src/interface/efi/efi_snp.c21
-rw-r--r--src/interface/efi/efi_utils.c38
-rw-r--r--src/interface/efi/efi_wrap.c49
7 files changed, 159 insertions, 171 deletions
diff --git a/src/interface/efi/efi_bofm.c b/src/interface/efi/efi_bofm.c
index ea0e15f7..00f6a1d5 100644
--- a/src/interface/efi/efi_bofm.c
+++ b/src/interface/efi/efi_bofm.c
@@ -178,8 +178,8 @@ static int efi_bofm_supported ( EFI_HANDLE device ) {
/* Look for a BOFM driver */
if ( ( rc = bofm_find_driver ( &pci ) ) != 0 ) {
- DBGCP ( device, "EFIBOFM %p %s has no driver\n",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "EFIBOFM %s has no driver\n",
+ efi_handle_name ( device ) );
return rc;
}
@@ -187,8 +187,8 @@ static int efi_bofm_supported ( EFI_HANDLE device ) {
if ( ( efirc = bs->LocateProtocol ( &bofm1_protocol_guid, NULL,
&bofm1.interface ) ) != 0 ) {
rc = -EEFI ( efirc );
- DBGC ( device, "EFIBOFM %p %s cannot find BOFM protocol\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIBOFM %s cannot find BOFM protocol\n",
+ efi_handle_name ( device ) );
return rc;
}
@@ -198,13 +198,13 @@ static int efi_bofm_supported ( EFI_HANDLE device ) {
0x00 /* No iSCSI */,
0x02 /* Version */ ))!=0){
rc = -EEFI ( efirc );
- DBGC ( device, "EFIBOFM %p %s could not register support: %s\n",
- device, efi_handle_name ( device ), strerror ( rc ) );
+ DBGC ( device, "EFIBOFM %s could not register support: %s\n",
+ efi_handle_name ( device ), strerror ( rc ) );
return rc;
}
- DBGC ( device, "EFIBOFM %p %s has driver \"%s\"\n",
- device, efi_handle_name ( device ), pci.id->name );
+ DBGC ( device, "EFIBOFM %s has driver \"%s\"\n",
+ efi_handle_name ( device ), pci.id->name );
return 0;
}
@@ -241,49 +241,48 @@ static int efi_bofm_start ( struct efi_device *efidev ) {
if ( ( efirc = bs->LocateProtocol ( &bofm1_protocol_guid, NULL,
&bofm1.interface ) ) != 0 ) {
rc = -EEFI ( efirc );
- DBGC ( device, "EFIBOFM %p %s cannot find BOFM protocol\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIBOFM %s cannot find BOFM protocol\n",
+ efi_handle_name ( device ) );
goto err_locate_bofm;
}
bofmtab = &bofm1.bofm1->BofmTable;
- DBGC ( device, "EFIBOFM %p %s found version 1 BOFM table at %p+%04x\n",
- device, efi_handle_name ( device ), bofmtab,
- bofmtab->Parameters.Length );
+ DBGC ( device, "EFIBOFM %s found version 1 BOFM table at %p+%04x\n",
+ efi_handle_name ( device ), bofmtab, bofmtab->Parameters.Length);
/* Locate BOFM2 protocol, if available */
if ( ( efirc = bs->LocateProtocol ( &bofm2_protocol_guid, NULL,
&bofm2.interface ) ) == 0 ) {
bofmtab2 = &bofm2.bofm2->BofmTable;
- DBGC ( device, "EFIBOFM %p %s found version 2 BOFM table at "
- "%p+%04x\n", device, efi_handle_name ( device ),
- bofmtab2, bofmtab2->Parameters.Length );
+ DBGC ( device, "EFIBOFM %s found version 2 BOFM table at "
+ "%p+%04x\n", efi_handle_name ( device ), bofmtab2,
+ bofmtab2->Parameters.Length );
assert ( bofm2.bofm2->RegisterSupport ==
bofm1.bofm1->RegisterSupport );
} else {
- DBGC ( device, "EFIBOFM %p %s cannot find BOFM2 protocol\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIBOFM %s cannot find BOFM2 protocol\n",
+ efi_handle_name ( device ) );
/* Not a fatal error; may be a BOFM1-only system */
bofmtab2 = NULL;
}
/* Process BOFM table */
- DBGC2 ( device, "EFIBOFM %p %s version 1 before processing:\n",
- device, efi_handle_name ( device ) );
+ DBGC2 ( device, "EFIBOFM %s version 1 before processing:\n",
+ efi_handle_name ( device ) );
DBGC2_HD ( device, bofmtab, bofmtab->Parameters.Length );
if ( bofmtab2 ) {
- DBGC2 ( device, "EFIBOFM %p %s version 2 before processing:\n",
- device, efi_handle_name ( device ) );
+ DBGC2 ( device, "EFIBOFM %s version 2 before processing:\n",
+ efi_handle_name ( device ) );
DBGC2_HD ( device, bofmtab2, bofmtab2->Parameters.Length );
}
bofmrc = bofm ( virt_to_user ( bofmtab2 ? bofmtab2 : bofmtab ), &pci );
- DBGC ( device, "EFIBOFM %p %s status %08x\n",
- device, efi_handle_name ( device ), bofmrc );
- DBGC2 ( device, "EFIBOFM %p %s version 1 after processing:\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIBOFM %s status %08x\n",
+ efi_handle_name ( device ), bofmrc );
+ DBGC2 ( device, "EFIBOFM %s version 1 after processing:\n",
+ efi_handle_name ( device ) );
DBGC2_HD ( device, bofmtab, bofmtab->Parameters.Length );
if ( bofmtab2 ) {
- DBGC2 ( device, "EFIBOFM %p %s version 2 after processing:\n",
- device, efi_handle_name ( device ) );
+ DBGC2 ( device, "EFIBOFM %s version 2 after processing:\n",
+ efi_handle_name ( device ) );
DBGC2_HD ( device, bofmtab2, bofmtab2->Parameters.Length );
}
@@ -292,18 +291,18 @@ static int efi_bofm_start ( struct efi_device *efidev ) {
if ( ( efirc = bofm2.bofm2->SetStatus ( bofm2.bofm2, device,
FALSE, bofmrc ) ) != 0){
rc = -EEFI ( efirc );
- DBGC ( device, "EFIBOFM %p %s could not set BOFM2 "
- "status: %s\n", device,
- efi_handle_name ( device ), strerror ( rc ) );
+ DBGC ( device, "EFIBOFM %s could not set BOFM2 "
+ "status: %s\n", efi_handle_name ( device ),
+ strerror ( rc ) );
goto err_set_status;
}
} else {
if ( ( efirc = bofm1.bofm1->SetStatus ( bofm1.bofm1, device,
FALSE, bofmrc ) ) != 0){
rc = -EEFI ( efirc );
- DBGC ( device, "EFIBOFM %p %s could not set BOFM "
- "status: %s\n", device,
- efi_handle_name ( device ), strerror ( rc ) );
+ DBGC ( device, "EFIBOFM %s could not set BOFM "
+ "status: %s\n", efi_handle_name ( device ),
+ strerror ( rc ) );
goto err_set_status;
}
}
diff --git a/src/interface/efi/efi_debug.c b/src/interface/efi/efi_debug.c
index 607e628f..b48a2c6f 100644
--- a/src/interface/efi/efi_debug.c
+++ b/src/interface/efi/efi_debug.c
@@ -231,8 +231,9 @@ void dbg_efi_openers ( EFI_HANDLE handle, EFI_GUID *protocol ) {
/* Sanity check */
if ( ( ! handle ) || ( ! protocol ) ) {
- printf ( "EFI could not retrieve openers for %s on %p\n",
- efi_guid_ntoa ( protocol ), handle );
+ printf ( "HANDLE %s could not retrieve openers for %s\n",
+ efi_handle_name ( handle ),
+ efi_guid_ntoa ( protocol ) );
return;
}
@@ -240,24 +241,24 @@ void dbg_efi_openers ( EFI_HANDLE handle, EFI_GUID *protocol ) {
if ( ( efirc = bs->OpenProtocolInformation ( handle, protocol, &openers,
&count ) ) != 0 ) {
rc = -EEFI ( efirc );
- printf ( "EFI could not retrieve openers for %s on %p: %s\n",
- efi_guid_ntoa ( protocol ), handle, strerror ( rc ) );
+ printf ( "HANDLE %s could not retrieve openers for %s: %s\n",
+ efi_handle_name ( handle ),
+ efi_guid_ntoa ( protocol ), strerror ( rc ) );
return;
}
/* Dump list of openers */
for ( i = 0 ; i < count ; i++ ) {
opener = &openers[i];
- printf ( "HANDLE %p %s %s opened %dx (%s)",
- handle, efi_handle_name ( handle ),
+ printf ( "HANDLE %s %s opened %dx (%s)",
+ efi_handle_name ( handle ),
efi_guid_ntoa ( protocol ), opener->OpenCount,
efi_open_attributes_name ( opener->Attributes ) );
- printf ( " by %p %s", opener->AgentHandle,
- efi_handle_name ( opener->AgentHandle ) );
+ printf ( " by %s", efi_handle_name ( opener->AgentHandle ) );
if ( opener->ControllerHandle == handle ) {
printf ( "\n" );
} else {
- printf ( " for %p %s\n", opener->ControllerHandle,
+ printf ( " for %s\n",
efi_handle_name ( opener->ControllerHandle ) );
}
}
@@ -282,7 +283,8 @@ void dbg_efi_protocols ( EFI_HANDLE handle ) {
/* Sanity check */
if ( ! handle ) {
- printf ( "EFI could not retrieve protocols for %p\n", handle );
+ printf ( "HANDLE %s could not retrieve protocols\n",
+ efi_handle_name ( handle ) );
return;
}
@@ -290,16 +292,15 @@ void dbg_efi_protocols ( EFI_HANDLE handle ) {
if ( ( efirc = bs->ProtocolsPerHandle ( handle, &protocols,
&count ) ) != 0 ) {
rc = -EEFI ( efirc );
- printf ( "EFI could not retrieve protocols for %p: %s\n",
- handle, strerror ( rc ) );
+ printf ( "HANDLE %s could not retrieve protocols: %s\n",
+ efi_handle_name ( handle ), strerror ( rc ) );
return;
}
/* Dump list of protocols */
for ( i = 0 ; i < count ; i++ ) {
protocol = protocols[i];
- printf ( "HANDLE %p %s %s supported\n",
- handle, efi_handle_name ( handle ),
+ printf ( "HANDLE %s %s supported\n", efi_handle_name ( handle ),
efi_guid_ntoa ( protocol ) );
dbg_efi_openers ( handle, protocol );
}
@@ -631,6 +632,7 @@ static struct efi_handle_name_type efi_handle_name_types[] = {
const __attribute__ (( pure )) char * efi_handle_name ( EFI_HANDLE handle ) {
EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
struct efi_handle_name_type *type;
+ static char buf[32];
unsigned int i;
void *interface;
const char *name;
@@ -670,5 +672,7 @@ const __attribute__ (( pure )) char * efi_handle_name ( EFI_HANDLE handle ) {
return name;
}
- return "UNKNOWN";
+ /* Use raw handle value if no name found */
+ snprintf ( buf, sizeof ( buf ), "UNKNOWN<%p>", handle );
+ return buf;
}
diff --git a/src/interface/efi/efi_driver.c b/src/interface/efi/efi_driver.c
index ba7784cd..2a59257b 100644
--- a/src/interface/efi/efi_driver.c
+++ b/src/interface/efi/efi_driver.c
@@ -96,30 +96,29 @@ efi_driver_supported ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
struct efi_driver *efidrv;
int rc;
- DBGCP ( device, "EFIDRV %p %s DRIVER_SUPPORTED",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "EFIDRV %s DRIVER_SUPPORTED",
+ efi_handle_name ( device ) );
if ( child )
DBGCP ( device, " (child %s)", efi_devpath_text ( child ) );
DBGCP ( device, "\n" );
/* Do nothing if we are already driving this device */
if ( efidev_find ( device ) != NULL ) {
- DBGCP ( device, "EFIDRV %p %s is already started\n",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "EFIDRV %s is already started\n",
+ efi_handle_name ( device ) );
return EFI_ALREADY_STARTED;
}
/* Look for a driver claiming to support this device */
for_each_table_entry ( efidrv, EFI_DRIVERS ) {
if ( ( rc = efidrv->supported ( device ) ) == 0 ) {
- DBGC ( device, "EFIDRV %p %s has driver \"%s\"\n",
- device, efi_handle_name ( device ),
- efidrv->name );
+ DBGC ( device, "EFIDRV %s has driver \"%s\"\n",
+ efi_handle_name ( device ), efidrv->name );
return 0;
}
}
- DBGCP ( device, "EFIDRV %p %s has no driver\n",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "EFIDRV %s has no driver\n",
+ efi_handle_name ( device ) );
return EFI_UNSUPPORTED;
}
@@ -140,8 +139,7 @@ efi_driver_start ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
EFI_STATUS efirc;
int rc;
- DBGC ( device, "EFIDRV %p %s DRIVER_START",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIDRV %s DRIVER_START", efi_handle_name ( device ) );
if ( child )
DBGC ( device, " (child %s)", efi_devpath_text ( child ) );
DBGC ( device, "\n" );
@@ -149,8 +147,8 @@ efi_driver_start ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
/* Do nothing if we are already driving this device */
efidev = efidev_find ( device );
if ( efidev ) {
- DBGCP ( device, "EFIDRV %p %s is already started\n",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "EFIDRV %s is already started\n",
+ efi_handle_name ( device ) );
efirc = EFI_ALREADY_STARTED;
goto err_already_started;
}
@@ -169,22 +167,22 @@ efi_driver_start ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
/* Try to start this device */
for_each_table_entry ( efidrv, EFI_DRIVERS ) {
if ( ( rc = efidrv->supported ( device ) ) != 0 ) {
- DBGC ( device, "EFIDRV %p %s is not supported by "
- "driver \"%s\": %s\n", device,
- efi_handle_name ( device ), efidrv->name,
+ DBGC ( device, "EFIDRV %s is not supported by driver "
+ "\"%s\": %s\n", efi_handle_name ( device ),
+ efidrv->name,
strerror ( rc ) );
continue;
}
if ( ( rc = efidrv->start ( efidev ) ) == 0 ) {
efidev->driver = efidrv;
- DBGC ( device, "EFIDRV %p %s using driver \"%s\"\n",
- device, efi_handle_name ( device ),
+ DBGC ( device, "EFIDRV %s using driver \"%s\"\n",
+ efi_handle_name ( device ),
efidev->driver->name );
return 0;
}
- DBGC ( device, "EFIDRV %p %s could not start driver \"%s\": "
- "%s\n", device, efi_handle_name ( device ),
- efidrv->name, strerror ( rc ) );
+ DBGC ( device, "EFIDRV %s could not start driver \"%s\": %s\n",
+ efi_handle_name ( device ), efidrv->name,
+ strerror ( rc ) );
}
efirc = EFI_UNSUPPORTED;
@@ -213,19 +211,18 @@ efi_driver_stop ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
struct efi_device *efidev;
UINTN i;
- DBGC ( device, "EFIDRV %p %s DRIVER_STOP",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIDRV %s DRIVER_STOP", efi_handle_name ( device ) );
for ( i = 0 ; i < num_children ; i++ ) {
- DBGC ( device, "%s%p %s", ( i ? ", " : " child " ),
- children[i], efi_handle_name ( children[i] ) );
+ DBGC ( device, "%s%s", ( i ? ", " : " child " ),
+ efi_handle_name ( children[i] ) );
}
DBGC ( device, "\n" );
/* Do nothing unless we are driving this device */
efidev = efidev_find ( device );
if ( ! efidev ) {
- DBGCP ( device, "EFIDRV %p %s is not started\n",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "EFIDRV %s is not started\n",
+ efi_handle_name ( device ) );
return 0;
}
@@ -378,36 +375,35 @@ static int efi_driver_connect ( EFI_HANDLE device ) {
}
/* Disconnect any existing drivers */
- DBGC2 ( device, "EFIDRV %p %s before disconnecting:\n",
- device, efi_handle_name ( device ) );
+ DBGC2 ( device, "EFIDRV %s before disconnecting:\n",
+ efi_handle_name ( device ) );
DBGC2_EFI_PROTOCOLS ( device, device );
- DBGC ( device, "EFIDRV %p %s disconnecting existing drivers\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIDRV %s disconnecting existing drivers\n",
+ efi_handle_name ( device ) );
if ( ( efirc = bs->DisconnectController ( device, NULL,
NULL ) ) != 0 ) {
rc = -EEFI ( efirc );
- DBGC ( device, "EFIDRV %p %s could not disconnect existing "
- "drivers: %s\n", device, efi_handle_name ( device ),
+ DBGC ( device, "EFIDRV %s could not disconnect existing "
+ "drivers: %s\n", efi_handle_name ( device ),
strerror ( rc ) );
/* Ignore the error and attempt to connect our drivers */
}
- DBGC2 ( device, "EFIDRV %p %s after disconnecting:\n",
- device, efi_handle_name ( device ) );
+ DBGC2 ( device, "EFIDRV %s after disconnecting:\n",
+ efi_handle_name ( device ) );
DBGC2_EFI_PROTOCOLS ( device, device );
/* Connect our driver */
- DBGC ( device, "EFIDRV %p %s connecting new drivers\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIDRV %s connecting new drivers\n",
+ efi_handle_name ( device ) );
if ( ( efirc = bs->ConnectController ( device, drivers, NULL,
FALSE ) ) != 0 ) {
rc = -EEFI ( efirc );
- DBGC ( device, "EFIDRV %p %s could not connect new drivers: "
- "%s\n", device, efi_handle_name ( device ),
- strerror ( rc ) );
+ DBGC ( device, "EFIDRV %s could not connect new drivers: "
+ "%s\n", efi_handle_name ( device ), strerror ( rc ) );
return rc;
}
- DBGC2 ( device, "EFIDRV %p %s after connecting:\n",
- device, efi_handle_name ( device ) );
+ DBGC2 ( device, "EFIDRV %s after connecting:\n",
+ efi_handle_name ( device ) );
DBGC2_EFI_PROTOCOLS ( device, device );
return 0;
diff --git a/src/interface/efi/efi_pci.c b/src/interface/efi/efi_pci.c
index 97ea72bb..be305ba6 100644
--- a/src/interface/efi/efi_pci.c
+++ b/src/interface/efi/efi_pci.c
@@ -154,8 +154,8 @@ int efipci_open ( EFI_HANDLE device, UINT32 attributes,
&pci_io.interface, efi_image_handle,
device, attributes ) ) != 0 ) {
rc = -EEFI_PCI ( efirc );
- DBGCP ( device, "EFIPCI %p %s cannot open PCI protocols: %s\n",
- device, efi_handle_name ( device ), strerror ( rc ) );
+ DBGCP ( device, "EFIPCI %s cannot open PCI protocols: %s\n",
+ efi_handle_name ( device ), strerror ( rc ) );
goto err_open_protocol;
}
@@ -164,11 +164,11 @@ int efipci_open ( EFI_HANDLE device, UINT32 attributes,
&pci_bus, &pci_dev,
&pci_fn ) ) != 0 ) {
rc = -EEFI ( efirc );
- DBGC ( device, "EFIPCI %p %s could not get PCI location: %s\n",
- device, efi_handle_name ( device ), strerror ( rc ) );
+ DBGC ( device, "EFIPCI %s could not get PCI location: %s\n",
+ efi_handle_name ( device ), strerror ( rc ) );
goto err_get_location;
}
- DBGC2 ( device, "EFIPCI %p %s is PCI %04lx:%02lx:%02lx.%lx\n", device,
+ DBGC2 ( device, "EFIPCI %s is PCI %04lx:%02lx:%02lx.%lx\n",
efi_handle_name ( device ), ( ( unsigned long ) pci_segment ),
( ( unsigned long ) pci_bus ), ( ( unsigned long ) pci_dev ),
( ( unsigned long ) pci_fn ) );
@@ -192,9 +192,8 @@ int efipci_open ( EFI_HANDLE device, UINT32 attributes,
/* Populate PCI device */
pci_init ( pci, PCI_BUSDEVFN ( pci_bus, pci_dev, pci_fn ) );
if ( ( rc = pci_read_config ( pci ) ) != 0 ) {
- DBGC ( device, "EFIPCI %p %s cannot read PCI configuration: "
- "%s\n", device, efi_handle_name ( device ),
- strerror ( rc ) );
+ DBGC ( device, "EFIPCI %s cannot read PCI configuration: %s\n",
+ efi_handle_name ( device ), strerror ( rc ) );
goto err_pci_read_config;
}
@@ -264,12 +263,12 @@ static int efipci_supported ( EFI_HANDLE device ) {
/* Look for a driver */
if ( ( rc = pci_find_driver ( &pci ) ) != 0 ) {
- DBGCP ( device, "EFIPCI %p %s has no driver\n",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "EFIPCI %s has no driver\n",
+ efi_handle_name ( device ) );
return rc;
}
- DBGC ( device, "EFIPCI %p %s has driver \"%s\"\n",
- device, efi_handle_name ( device ), pci.id->name );
+ DBGC ( device, "EFIPCI %s has driver \"%s\"\n",
+ efi_handle_name ( device ), pci.id->name );
return 0;
}
@@ -296,16 +295,16 @@ static int efipci_start ( struct efi_device *efidev ) {
if ( ( rc = efipci_open ( device, ( EFI_OPEN_PROTOCOL_BY_DRIVER |
EFI_OPEN_PROTOCOL_EXCLUSIVE ),
pci ) ) != 0 ) {
- DBGC ( device, "EFIPCI %p %s could not open PCI device: %s\n",
- device, efi_handle_name ( device ), strerror ( rc ) );
+ DBGC ( device, "EFIPCI %s could not open PCI device: %s\n",
+ efi_handle_name ( device ), strerror ( rc ) );
DBGC_EFI_OPENERS ( device, device, &efi_pci_io_protocol_guid );
goto err_open;
}
/* Find driver */
if ( ( rc = pci_find_driver ( pci ) ) != 0 ) {
- DBGC ( device, "EFIPCI %p %s has no driver\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIPCI %s has no driver\n",
+ efi_handle_name ( device ) );
goto err_find_driver;
}
@@ -315,13 +314,13 @@ static int efipci_start ( struct efi_device *efidev ) {
/* Probe driver */
if ( ( rc = pci_probe ( pci ) ) != 0 ) {
- DBGC ( device, "EFIPCI %p %s could not probe driver \"%s\": "
- "%s\n", device, efi_handle_name ( device ),
- pci->id->name, strerror ( rc ) );
+ DBGC ( device, "EFIPCI %s could not probe driver \"%s\": %s\n",
+ efi_handle_name ( device ), pci->id->name,
+ strerror ( rc ) );
goto err_probe;
}
- DBGC ( device, "EFIPCI %p %s using driver \"%s\"\n",
- device, efi_handle_name ( device ), pci->id->name );
+ DBGC ( device, "EFIPCI %s using driver \"%s\"\n",
+ efi_handle_name ( device ), pci->id->name );
efidev_set_drvdata ( efidev, pci );
return 0;
diff --git a/src/interface/efi/efi_snp.c b/src/interface/efi/efi_snp.c
index 3dfcc5e1..c2604580 100644
--- a/src/interface/efi/efi_snp.c
+++ b/src/interface/efi/efi_snp.c
@@ -1024,9 +1024,9 @@ static int efi_snp_probe ( struct net_device *netdev ) {
efidev->device,
EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){
rc = -EEFI ( efirc );
- DBGC ( snpdev, "SNPDEV %p cannot get %p %s device path: %s\n",
- snpdev, efidev->device,
- efi_handle_name ( efidev->device ), strerror ( rc ) );
+ DBGC ( snpdev, "SNPDEV %p cannot get %s device path: %s\n",
+ snpdev, efi_handle_name ( efidev->device ),
+ strerror ( rc ) );
goto err_open_device_path;
}
@@ -1067,16 +1067,16 @@ static int efi_snp_probe ( struct net_device *netdev ) {
&efi_load_file_protocol_guid, &snpdev->load_file,
NULL ) ) != 0 ) {
rc = -EEFI ( efirc );
- DBGC ( snpdev, "SNPDEV %p could not install protocols: "
- "%s\n", snpdev, strerror ( rc ) );
+ DBGC ( snpdev, "SNPDEV %p could not install protocols: %s\n",
+ snpdev, strerror ( rc ) );
goto err_install_protocol_interface;
}
/* Add as child of EFI parent device */
if ( ( rc = efi_child_add ( efidev->device, snpdev->handle ) ) != 0 ) {
- DBGC ( snpdev, "SNPDEV %p could not become child of %p %s: "
- "%s\n", snpdev, efidev->device,
- efi_handle_name ( efidev->device ), strerror ( rc ) );
+ DBGC ( snpdev, "SNPDEV %p could not become child of %s: %s\n",
+ snpdev, efi_handle_name ( efidev->device ),
+ strerror ( rc ) );
goto err_efi_child_add;
}
@@ -1097,9 +1097,8 @@ static int efi_snp_probe ( struct net_device *netdev ) {
bs->CloseProtocol ( efidev->device, &efi_device_path_protocol_guid,
efi_image_handle, efidev->device );
- DBGC ( snpdev, "SNPDEV %p installed for %s as device %p %s\n",
- snpdev, netdev->name, snpdev->handle,
- efi_handle_name ( snpdev->handle ) );
+ DBGC ( snpdev, "SNPDEV %p installed for %s as device %s\n",
+ snpdev, netdev->name, efi_handle_name ( snpdev->handle ) );
return 0;
if ( snpdev->package_list )
diff --git a/src/interface/efi/efi_utils.c b/src/interface/efi/efi_utils.c
index 936ad48e..1bebaa56 100644
--- a/src/interface/efi/efi_utils.c
+++ b/src/interface/efi/efi_utils.c
@@ -76,8 +76,8 @@ int efi_locate_device ( EFI_HANDLE device, EFI_GUID *protocol,
efi_image_handle, device,
EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){
rc = -EEFI ( efirc );
- DBGC ( device, "EFIDEV %p %s cannot open device path: %s\n",
- device, efi_handle_name ( device ), strerror ( rc ) );
+ DBGC ( device, "EFIDEV %s cannot open device path: %s\n",
+ efi_handle_name ( device ), strerror ( rc ) );
goto err_open_device_path;
}
devpath = path.path;
@@ -86,8 +86,8 @@ int efi_locate_device ( EFI_HANDLE device, EFI_GUID *protocol,
if ( ( efirc = bs->LocateDevicePath ( protocol, &devpath,
parent ) ) != 0 ) {
rc = -EEFI ( efirc );
- DBGC ( device, "EFIDEV %p %s has no parent supporting %s: %s\n",
- device, efi_handle_name ( device ),
+ DBGC ( device, "EFIDEV %s has no parent supporting %s: %s\n",
+ efi_handle_name ( device ),
efi_guid_ntoa ( protocol ), strerror ( rc ) );
goto err_locate_protocol;
}
@@ -123,18 +123,17 @@ int efi_child_add ( EFI_HANDLE parent, EFI_HANDLE child ) {
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
) ) != 0 ) {
rc = -EEFI ( efirc );
- DBGC ( parent, "EFIDEV %p %s could not add child",
- parent, efi_handle_name ( parent ) );
- DBGC ( parent, " %p %s: %s\n", child,
+ DBGC ( parent, "EFIDEV %s could not add child",
+ efi_handle_name ( parent ) );
+ DBGC ( parent, " %s: %s\n",
efi_handle_name ( child ), strerror ( rc ) );
DBGC_EFI_OPENERS ( parent, parent,
&efi_device_path_protocol_guid );
return rc;
}
- DBGC2 ( parent, "EFIDEV %p %s added child",
- parent, efi_handle_name ( parent ) );
- DBGC2 ( parent, " %p %s\n", child, efi_handle_name ( child ) );
+ DBGC2 ( parent, "EFIDEV %s added child", efi_handle_name ( parent ) );
+ DBGC2 ( parent, " %s\n", efi_handle_name ( child ) );
return 0;
}
@@ -149,10 +148,8 @@ void efi_child_del ( EFI_HANDLE parent, EFI_HANDLE child ) {
bs->CloseProtocol ( parent, &efi_device_path_protocol_guid,
efi_image_handle, child );
- DBGC2 ( parent, "EFIDEV %p %s removed child",
- parent, efi_handle_name ( parent ) );
- DBGC2 ( parent, " %p %s\n",
- child, efi_handle_name ( child ) );
+ DBGC2 ( parent, "EFIDEV %s removed child", efi_handle_name ( parent ) );
+ DBGC2 ( parent, " %s\n", efi_handle_name ( child ) );
}
/**
@@ -172,16 +169,15 @@ static int efi_pci_info ( EFI_HANDLE device, const char *prefix,
/* Find parent PCI device */
if ( ( rc = efi_locate_device ( device, &efi_pci_io_protocol_guid,
&pci_device ) ) != 0 ) {
- DBGC ( device, "EFIDEV %p %s is not a PCI device: %s\n",
- device, efi_handle_name ( device ), strerror ( rc ) );
+ DBGC ( device, "EFIDEV %s is not a PCI device: %s\n",
+ efi_handle_name ( device ), strerror ( rc ) );
return rc;
}
/* Get PCI device information */
if ( ( rc = efipci_info ( pci_device, &pci ) ) != 0 ) {
- DBGC ( device, "EFIDEV %p %s could not get PCI information: "
- "%s\n", device, efi_handle_name ( device ),
- strerror ( rc ) );
+ DBGC ( device, "EFIDEV %s could not get PCI information: %s\n",
+ efi_handle_name ( device ), strerror ( rc ) );
return rc;
}
@@ -211,8 +207,8 @@ void efi_device_info ( EFI_HANDLE device, const char *prefix,
/* If we cannot get any underlying device information, fall
* back to providing information about the EFI handle.
*/
- DBGC ( device, "EFIDEV %p %s could not get underlying device "
- "information\n", device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIDEV %s could not get underlying device "
+ "information\n", efi_handle_name ( device ) );
dev->desc.bus_type = BUS_TYPE_EFI;
snprintf ( dev->name, sizeof ( dev->name ), "%s-%p", prefix, device );
}
diff --git a/src/interface/efi/efi_wrap.c b/src/interface/efi/efi_wrap.c
index 2ea184e9..e94e8d9f 100644
--- a/src/interface/efi/efi_wrap.c
+++ b/src/interface/efi/efi_wrap.c
@@ -111,7 +111,7 @@ efi_handle_protocol_wrapper ( EFI_HANDLE handle, EFI_GUID *protocol,
void *retaddr = __builtin_return_address ( 0 );
EFI_STATUS efirc;
- DBGC ( colour, "HandleProtocol ( %p %s, %s, ... ) ", handle,
+ DBGC ( colour, "HandleProtocol ( %s, %s, ... ) ",
efi_handle_name ( handle ), efi_guid_ntoa ( protocol ) );
efirc = bs->HandleProtocol ( handle, protocol, interface );
DBGC ( colour, "= %s ( %p ) -> %p\n",
@@ -155,10 +155,9 @@ efi_locate_device_path_wrapper ( EFI_GUID *protocol,
DBGC ( colour, "LocateDevicePath ( %s, %s, ... ) ",
efi_guid_ntoa ( protocol ), efi_devpath_text ( *device_path ) );
efirc = bs->LocateDevicePath ( protocol, device_path, device );
- DBGC ( colour, "= %s ( %p, ",
+ DBGC ( colour, "= %s ( %s, ",
efi_status ( efirc ), efi_devpath_text ( *device_path ) );
- DBGC ( colour, "%p %s ) -> %p\n",
- *device, efi_handle_name ( *device ), retaddr );
+ DBGC ( colour, "%s ) -> %p\n", efi_handle_name ( *device ), retaddr );
return efirc;
}
@@ -175,18 +174,16 @@ efi_load_image_wrapper ( BOOLEAN boot_policy, EFI_HANDLE parent_image_handle,
void *retaddr = __builtin_return_address ( 0 );
EFI_STATUS efirc;
- DBGC ( colour, "LoadImage ( %d, %p %s, ", boot_policy,
- parent_image_handle, efi_handle_name ( parent_image_handle ) );
+ DBGC ( colour, "LoadImage ( %d, %s, ", boot_policy,
+ efi_handle_name ( parent_image_handle ) );
DBGC ( colour, "%s, %p, %#llx, ... ) ",
efi_devpath_text ( device_path ), source_buffer,
( ( unsigned long long ) source_size ) );
efirc = bs->LoadImage ( boot_policy, parent_image_handle, device_path,
source_buffer, source_size, image_handle );
DBGC ( colour, "= %s ( ", efi_status ( efirc ) );
- if ( efirc == 0 ) {
- DBGC ( colour, "%p %s ", *image_handle,
- efi_handle_name ( *image_handle ) );
- }
+ if ( efirc == 0 )
+ DBGC ( colour, "%s ", efi_handle_name ( *image_handle ) );
DBGC ( colour, ") -> %p\n", retaddr );
/* Wrap the new image */
@@ -206,8 +203,8 @@ efi_exit_boot_services_wrapper ( EFI_HANDLE image_handle, UINTN map_key ) {
void *retaddr = __builtin_return_address ( 0 );
EFI_STATUS efirc;
- DBGC ( colour, "ExitBootServices ( %p %s, %#llx ) ",
- image_handle, efi_handle_name ( image_handle ),
+ DBGC ( colour, "ExitBootServices ( %s, %#llx ) ",
+ efi_handle_name ( image_handle ),
( ( unsigned long long ) map_key ) );
efirc = bs->ExitBootServices ( image_handle, map_key );
DBGC ( colour, "= %s -> %p\n", efi_status ( efirc ), retaddr );
@@ -226,11 +223,10 @@ efi_open_protocol_wrapper ( EFI_HANDLE handle, EFI_GUID *protocol,
void *retaddr = __builtin_return_address ( 0 );
EFI_STATUS efirc;
- DBGC ( colour, "OpenProtocol ( %p %s, %s, ..., ", handle,
+ DBGC ( colour, "OpenProtocol ( %s, %s, ..., ",
efi_handle_name ( handle ), efi_guid_ntoa ( protocol ) );
- DBGC ( colour, "%p %s, ", agent_handle,
- efi_handle_name ( agent_handle ) );
- DBGC ( colour, "%p %s, %#x ) ", controller_handle,
+ DBGC ( colour, "%s, ", efi_handle_name ( agent_handle ) );
+ DBGC ( colour, "%s, %#x ) ",
efi_handle_name ( controller_handle ), attributes );
efirc = bs->OpenProtocol ( handle, protocol, interface, agent_handle,
controller_handle, attributes );
@@ -295,23 +291,22 @@ efi_locate_protocol_wrapper ( EFI_GUID *protocol, VOID *registration,
&loaded.intf, efi_image_handle, NULL,
EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){
rc = -EEFI ( efirc );
- DBGC ( colour, "Could not get loaded image protocol for %p %s: "
- "%s\n", handle, efi_handle_name ( handle ),
- strerror ( rc ) );
+ DBGC ( colour, "WRAP %s could not get loaded image protocol: "
+ "%s\n", efi_handle_name ( handle ), strerror ( rc ) );
return;
}
/* Provide system table wrapper to image */
loaded.image->SystemTable = &efi_systab_wrapper;
- DBGC ( colour, "Wrapped image %p %s at base %p has protocols:\n",
- handle, efi_handle_name ( handle ), loaded.image->ImageBase );
+ DBGC ( colour, "WRAP %s at base %p has protocols:\n",
+ efi_handle_name ( handle ), loaded.image->ImageBase );
DBGC_EFI_PROTOCOLS ( colour, handle );
- DBGC ( colour, "Parent image %p %s\n", loaded.image->ParentHandle,
- efi_handle_name ( loaded.image->ParentHandle ) );
- DBGC ( colour, "Device %p %s ", loaded.image->DeviceHandle,
- efi_handle_name ( loaded.image->DeviceHandle ) );
- DBGC ( colour, "file %p %s\n", loaded.image->FilePath,
- efi_devpath_text ( loaded.image->FilePath ) );
+ DBGC ( colour, "WRAP %s parent", efi_handle_name ( handle ) );
+ DBGC ( colour, " %s\n", efi_handle_name ( loaded.image->ParentHandle ));
+ DBGC ( colour, "WRAP %s device", efi_handle_name ( handle ) );
+ DBGC ( colour, " %s\n", efi_handle_name ( loaded.image->DeviceHandle ));
+ DBGC ( colour, "WRAP %s file", efi_handle_name ( handle ) );
+ DBGC ( colour, " %s\n", efi_devpath_text ( loaded.image->FilePath ) );
/* Close loaded image protocol */
bs->CloseProtocol ( handle, &efi_loaded_image_protocol_guid,