summaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efi_pci.c
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/efi/efi_pci.c
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/efi/efi_pci.c')
-rw-r--r--src/interface/efi/efi_pci.c41
1 files changed, 20 insertions, 21 deletions
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;