/* Register network device */
if ( ( rc = register_netdev ( netdev ) ) != 0 )
goto err_register_netdev;
- DBGC ( nii, "NII %s registered as %s for %p %s\n", nii->dev.name,
- netdev->name, device, efi_handle_name ( device ) );
+ DBGC ( nii, "NII %s registered as %s for %s\n", nii->dev.name,
+ netdev->name, efi_handle_name ( device ) );
/* Set initial link state (if media detection is not supported) */
if ( ! nii->media )
/* Check that this is not a device we are providing ourselves */
if ( find_snpdev ( device ) != NULL ) {
- DBGCP ( device, "SNP %p %s is provided by this binary\n",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "SNP %s is provided by this binary\n",
+ efi_handle_name ( device ) );
return -ENOTTY;
}
&efi_simple_network_protocol_guid,
NULL, efi_image_handle, device,
EFI_OPEN_PROTOCOL_TEST_PROTOCOL))!=0){
- DBGCP ( device, "SNP %p %s is not an SNP device\n",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "SNP %s is not an SNP device\n",
+ efi_handle_name ( device ) );
return -EEFI ( efirc );
}
- DBGC ( device, "SNP %p %s is an SNP device\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "SNP %s is an SNP device\n",
+ efi_handle_name ( device ) );
return 0;
}
/* Check that this is not a device we are providing ourselves */
if ( find_snpdev ( device ) != NULL ) {
- DBGCP ( device, "NII %p %s is provided by this binary\n",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "NII %s is provided by this binary\n",
+ efi_handle_name ( device ) );
return -ENOTTY;
}
&efi_nii31_protocol_guid,
NULL, efi_image_handle, device,
EFI_OPEN_PROTOCOL_TEST_PROTOCOL))!=0){
- DBGCP ( device, "NII %p %s is not an NII device\n",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "NII %s is not an NII device\n",
+ efi_handle_name ( device ) );
return -EEFI ( efirc );
}
- DBGC ( device, "NII %p %s is an NII device\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "NII %s is an NII device\n",
+ efi_handle_name ( device ) );
return 0;
}
( EFI_OPEN_PROTOCOL_BY_DRIVER |
EFI_OPEN_PROTOCOL_EXCLUSIVE )))!=0){
rc = -EEFI ( efirc );
- DBGC ( device, "SNP %p %s cannot open SNP protocol: %s\n",
- device, efi_handle_name ( device ), strerror ( rc ) );
+ DBGC ( device, "SNP %s cannot open SNP protocol: %s\n",
+ efi_handle_name ( device ), strerror ( rc ) );
DBGC_EFI_OPENERS ( device, device,
&efi_simple_network_protocol_guid );
goto err_open_protocol;
if ( ( mode->State == EfiSimpleNetworkStopped ) &&
( ( efirc = snp->snp->Start ( snp->snp ) ) != 0 ) ) {
rc = -EEFI ( efirc );
- DBGC ( device, "SNP %p %s could not start: %s\n", device,
+ DBGC ( device, "SNP %s could not start: %s\n",
efi_handle_name ( device ), strerror ( rc ) );
goto err_start;
}
if ( ( mode->State == EfiSimpleNetworkInitialized ) &&
( ( efirc = snp->snp->Shutdown ( snp->snp ) ) != 0 ) ) {
rc = -EEFI ( efirc );
- DBGC ( device, "SNP %p %s could not shut down: %s\n", device,
+ DBGC ( device, "SNP %s could not shut down: %s\n",
efi_handle_name ( device ), strerror ( rc ) );
goto err_shutdown;
}
/* Populate network device parameters */
if ( mode->HwAddressSize != netdev->ll_protocol->hw_addr_len ) {
- DBGC ( device, "SNP %p %s has invalid hardware address "
- "length %d\n", device, efi_handle_name ( device ),
- mode->HwAddressSize );
+ DBGC ( device, "SNP %s has invalid hardware address length "
+ "%d\n", efi_handle_name ( device ), mode->HwAddressSize);
rc = -ENOTSUP;
goto err_hw_addr_len;
}
memcpy ( netdev->hw_addr, &mode->PermanentAddress,
netdev->ll_protocol->hw_addr_len );
if ( mode->HwAddressSize != netdev->ll_protocol->ll_addr_len ) {
- DBGC ( device, "SNP %p %s has invalid link-layer address "
- "length %d\n", device, efi_handle_name ( device ),
- mode->HwAddressSize );
+ DBGC ( device, "SNP %s has invalid link-layer address length "
+ "%d\n", efi_handle_name ( device ), mode->HwAddressSize);
rc = -ENOTSUP;
goto err_ll_addr_len;
}
/* Register network device */
if ( ( rc = register_netdev ( netdev ) ) != 0 )
goto err_register_netdev;
- DBGC ( device, "SNP %p %s registered as %s\n",
- device, efi_handle_name ( device ), netdev->name );
+ DBGC ( device, "SNP %s registered as %s\n",
+ efi_handle_name ( device ), netdev->name );
/* Set initial link state */
if ( snp->snp->Mode->MediaPresentSupported ) {
/* Stop SNP protocol */
if ( ( efirc = snp->snp->Stop ( snp->snp ) ) != 0 ) {
rc = -EEFI ( efirc );
- DBGC ( device, "SNP %p %s could not stop: %s\n", device,
+ DBGC ( device, "SNP %s could not stop: %s\n",
efi_handle_name ( device ), strerror ( rc ) );
/* Nothing we can do about this */
}
/* Locate handle supporting this protocol */
if ( ( rc = efi_locate_device ( device, chained->protocol,
&parent ) ) != 0 ) {
- DBGC ( device, "CHAINED %p %s does not support %s: %s\n",
- device, efi_handle_name ( device ),
+ DBGC ( device, "CHAINED %s does not support %s: %s\n",
+ efi_handle_name ( device ),
efi_guid_ntoa ( chained->protocol ), strerror ( rc ) );
goto err_locate_device;
}
- DBGC ( device, "CHAINED %p %s found %s on ", device,
- efi_handle_name ( device ), efi_guid_ntoa ( chained->protocol ));
- DBGC ( device, "%p %s\n", parent, efi_handle_name ( parent ) );
+ DBGC ( device, "CHAINED %s found %s on ", efi_handle_name ( device ),
+ efi_guid_ntoa ( chained->protocol ) );
+ DBGC ( device, "%s\n", efi_handle_name ( parent ) );
/* Get protocol instance */
if ( ( efirc = bs->OpenProtocol ( parent, chained->protocol,
device,
EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){
rc = -EEFI ( efirc );
- DBGC ( device, "CHAINED %p %s could not open %s on ",
- device, efi_handle_name ( device ),
+ DBGC ( device, "CHAINED %s could not open %s on ",
+ efi_handle_name ( device ),
efi_guid_ntoa ( chained->protocol ) );
- DBGC ( device, "%p %s: %s\n",
- parent, efi_handle_name ( parent ), strerror ( rc ) );
+ DBGC ( device, "%s: %s\n",
+ efi_handle_name ( parent ), strerror ( rc ) );
goto err_open_protocol;
}
efi_image_handle, device,
EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){
rc = -EEFI ( efirc );
- DBGCP ( device, "CHAINED %p %s is not a %s device\n",
- device, efi_handle_name ( device ),
+ DBGCP ( device, "CHAINED %s is not a %s device\n",
+ efi_handle_name ( device ),
efi_guid_ntoa ( chained->protocol ) );
goto err_open_protocol;
}
/* Test for a match against the chainloading device */
if ( interface != chained->interface ) {
- DBGC ( device, "CHAINED %p %s %p is not the chainloaded "
- "%s\n", device, efi_handle_name ( device ),
- interface, efi_guid_ntoa ( chained->protocol ) );
+ DBGC ( device, "CHAINED %s %p is not the chainloaded %s\n",
+ efi_handle_name ( device ), interface,
+ efi_guid_ntoa ( chained->protocol ) );
rc = -ENOTTY;
goto err_no_match;
}
/* Success */
rc = 0;
- DBGC ( device, "CHAINED %p %s %p is the chainloaded %s\n",
- device, efi_handle_name ( device ), interface,
+ DBGC ( device, "CHAINED %s %p is the chainloaded %s\n",
+ efi_handle_name ( device ), interface,
efi_guid_ntoa ( chained->protocol ) );
err_no_match:
/* 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;
}
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;
}
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;
}
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 );
}
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;
}
}
/* 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;
}
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 ) );
}
}
/* 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;
}
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 );
}
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;
return name;
}
- return "UNKNOWN";
+ /* Use raw handle value if no name found */
+ snprintf ( buf, sizeof ( buf ), "UNKNOWN<%p>", handle );
+ return buf;
}
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;
}
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" );
/* 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;
}
/* 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;
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;
}
}
/* 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;
&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;
}
&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 ) );
/* 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;
}
/* 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;
}
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;
}
/* 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;
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;
}
&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;
}
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 )
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;
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;
}
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;
}
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 ) );
}
/**
/* 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;
}
/* 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 );
}
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",
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;
}
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 */
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 );
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 );
&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,