Переглянути джерело

[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>
tags/v1.20.1
Michael Brown 9 роки тому
джерело
коміт
9501eaf68d

+ 2
- 2
src/drivers/net/efi/nii.c Переглянути файл

@@ -1125,8 +1125,8 @@ int nii_start ( struct efi_device *efidev ) {
1125 1125
 	/* Register network device */
1126 1126
 	if ( ( rc = register_netdev ( netdev ) ) != 0 )
1127 1127
 		goto err_register_netdev;
1128
-	DBGC ( nii, "NII %s registered as %s for %p %s\n", nii->dev.name,
1129
-	       netdev->name, device, efi_handle_name ( device ) );
1128
+	DBGC ( nii, "NII %s registered as %s for %s\n", nii->dev.name,
1129
+	       netdev->name, efi_handle_name ( device ) );
1130 1130
 
1131 1131
 	/* Set initial link state (if media detection is not supported) */
1132 1132
 	if ( ! nii->media )

+ 12
- 12
src/drivers/net/efi/snp.c Переглянути файл

@@ -48,8 +48,8 @@ static int snp_supported ( EFI_HANDLE device ) {
48 48
 
49 49
 	/* Check that this is not a device we are providing ourselves */
50 50
 	if ( find_snpdev ( device ) != NULL ) {
51
-		DBGCP ( device, "SNP %p %s is provided by this binary\n",
52
-			device, efi_handle_name ( device ) );
51
+		DBGCP ( device, "SNP %s is provided by this binary\n",
52
+			efi_handle_name ( device ) );
53 53
 		return -ENOTTY;
54 54
 	}
55 55
 
@@ -58,12 +58,12 @@ static int snp_supported ( EFI_HANDLE device ) {
58 58
 					  &efi_simple_network_protocol_guid,
59 59
 					  NULL, efi_image_handle, device,
60 60
 					  EFI_OPEN_PROTOCOL_TEST_PROTOCOL))!=0){
61
-		DBGCP ( device, "SNP %p %s is not an SNP device\n",
62
-			device, efi_handle_name ( device ) );
61
+		DBGCP ( device, "SNP %s is not an SNP device\n",
62
+			efi_handle_name ( device ) );
63 63
 		return -EEFI ( efirc );
64 64
 	}
65
-	DBGC ( device, "SNP %p %s is an SNP device\n",
66
-	       device, efi_handle_name ( device ) );
65
+	DBGC ( device, "SNP %s is an SNP device\n",
66
+	       efi_handle_name ( device ) );
67 67
 
68 68
 	return 0;
69 69
 }
@@ -80,8 +80,8 @@ static int nii_supported ( EFI_HANDLE device ) {
80 80
 
81 81
 	/* Check that this is not a device we are providing ourselves */
82 82
 	if ( find_snpdev ( device ) != NULL ) {
83
-		DBGCP ( device, "NII %p %s is provided by this binary\n",
84
-			device, efi_handle_name ( device ) );
83
+		DBGCP ( device, "NII %s is provided by this binary\n",
84
+			efi_handle_name ( device ) );
85 85
 		return -ENOTTY;
86 86
 	}
87 87
 
@@ -90,12 +90,12 @@ static int nii_supported ( EFI_HANDLE device ) {
90 90
 					  &efi_nii31_protocol_guid,
91 91
 					  NULL, efi_image_handle, device,
92 92
 					  EFI_OPEN_PROTOCOL_TEST_PROTOCOL))!=0){
93
-		DBGCP ( device, "NII %p %s is not an NII device\n",
94
-			device, efi_handle_name ( device ) );
93
+		DBGCP ( device, "NII %s is not an NII device\n",
94
+			efi_handle_name ( device ) );
95 95
 		return -EEFI ( efirc );
96 96
 	}
97
-	DBGC ( device, "NII %p %s is an NII device\n",
98
-	       device, efi_handle_name ( device ) );
97
+	DBGC ( device, "NII %s is an NII device\n",
98
+	       efi_handle_name ( device ) );
99 99
 
100 100
 	return 0;
101 101
 }

+ 11
- 13
src/drivers/net/efi/snpnet.c Переглянути файл

@@ -431,8 +431,8 @@ int snpnet_start ( struct efi_device *efidev ) {
431 431
 					  ( EFI_OPEN_PROTOCOL_BY_DRIVER |
432 432
 					    EFI_OPEN_PROTOCOL_EXCLUSIVE )))!=0){
433 433
 		rc = -EEFI ( efirc );
434
-		DBGC ( device, "SNP %p %s cannot open SNP protocol: %s\n",
435
-		       device, efi_handle_name ( device ), strerror ( rc ) );
434
+		DBGC ( device, "SNP %s cannot open SNP protocol: %s\n",
435
+		       efi_handle_name ( device ), strerror ( rc ) );
436 436
 		DBGC_EFI_OPENERS ( device, device,
437 437
 				   &efi_simple_network_protocol_guid );
438 438
 		goto err_open_protocol;
@@ -463,32 +463,30 @@ int snpnet_start ( struct efi_device *efidev ) {
463 463
 	if ( ( mode->State == EfiSimpleNetworkStopped ) &&
464 464
 	     ( ( efirc = snp->snp->Start ( snp->snp ) ) != 0 ) ) {
465 465
 		rc = -EEFI ( efirc );
466
-		DBGC ( device, "SNP %p %s could not start: %s\n", device,
466
+		DBGC ( device, "SNP %s could not start: %s\n",
467 467
 		       efi_handle_name ( device ), strerror ( rc ) );
468 468
 		goto err_start;
469 469
 	}
470 470
 	if ( ( mode->State == EfiSimpleNetworkInitialized ) &&
471 471
 	     ( ( efirc = snp->snp->Shutdown ( snp->snp ) ) != 0 ) ) {
472 472
 		rc = -EEFI ( efirc );
473
-		DBGC ( device, "SNP %p %s could not shut down: %s\n", device,
473
+		DBGC ( device, "SNP %s could not shut down: %s\n",
474 474
 		       efi_handle_name ( device ), strerror ( rc ) );
475 475
 		goto err_shutdown;
476 476
 	}
477 477
 
478 478
 	/* Populate network device parameters */
479 479
 	if ( mode->HwAddressSize != netdev->ll_protocol->hw_addr_len ) {
480
-		DBGC ( device, "SNP %p %s has invalid hardware address "
481
-		       "length %d\n", device, efi_handle_name ( device ),
482
-		       mode->HwAddressSize );
480
+		DBGC ( device, "SNP %s has invalid hardware address length "
481
+		       "%d\n", efi_handle_name ( device ), mode->HwAddressSize);
483 482
 		rc = -ENOTSUP;
484 483
 		goto err_hw_addr_len;
485 484
 	}
486 485
 	memcpy ( netdev->hw_addr, &mode->PermanentAddress,
487 486
 		 netdev->ll_protocol->hw_addr_len );
488 487
 	if ( mode->HwAddressSize != netdev->ll_protocol->ll_addr_len ) {
489
-		DBGC ( device, "SNP %p %s has invalid link-layer address "
490
-		       "length %d\n", device, efi_handle_name ( device ),
491
-		       mode->HwAddressSize );
488
+		DBGC ( device, "SNP %s has invalid link-layer address length "
489
+		       "%d\n", efi_handle_name ( device ), mode->HwAddressSize);
492 490
 		rc = -ENOTSUP;
493 491
 		goto err_ll_addr_len;
494 492
 	}
@@ -500,8 +498,8 @@ int snpnet_start ( struct efi_device *efidev ) {
500 498
 	/* Register network device */
501 499
 	if ( ( rc = register_netdev ( netdev ) ) != 0 )
502 500
 		goto err_register_netdev;
503
-	DBGC ( device, "SNP %p %s registered as %s\n",
504
-	       device, efi_handle_name ( device ), netdev->name );
501
+	DBGC ( device, "SNP %s registered as %s\n",
502
+	       efi_handle_name ( device ), netdev->name );
505 503
 
506 504
 	/* Set initial link state */
507 505
 	if ( snp->snp->Mode->MediaPresentSupported ) {
@@ -547,7 +545,7 @@ void snpnet_stop ( struct efi_device *efidev ) {
547 545
 	/* Stop SNP protocol */
548 546
 	if ( ( efirc = snp->snp->Stop ( snp->snp ) ) != 0 ) {
549 547
 		rc = -EEFI ( efirc );
550
-		DBGC ( device, "SNP %p %s could not stop: %s\n", device,
548
+		DBGC ( device, "SNP %s could not stop: %s\n",
551 549
 		       efi_handle_name ( device ), strerror ( rc ) );
552 550
 		/* Nothing we can do about this */
553 551
 	}

+ 16
- 16
src/drivers/net/efi/snponly.c Переглянути файл

@@ -81,14 +81,14 @@ static int chained_locate ( struct chained_protocol *chained ) {
81 81
 	/* Locate handle supporting this protocol */
82 82
 	if ( ( rc = efi_locate_device ( device, chained->protocol,
83 83
 					&parent ) ) != 0 ) {
84
-		DBGC ( device, "CHAINED %p %s does not support %s: %s\n",
85
-		       device, efi_handle_name ( device ),
84
+		DBGC ( device, "CHAINED %s does not support %s: %s\n",
85
+		       efi_handle_name ( device ),
86 86
 		       efi_guid_ntoa ( chained->protocol ), strerror ( rc ) );
87 87
 		goto err_locate_device;
88 88
 	}
89
-	DBGC ( device, "CHAINED %p %s found %s on ", device,
90
-	       efi_handle_name ( device ), efi_guid_ntoa ( chained->protocol ));
91
-	DBGC ( device, "%p %s\n", parent, efi_handle_name ( parent ) );
89
+	DBGC ( device, "CHAINED %s found %s on ", efi_handle_name ( device ),
90
+	       efi_guid_ntoa ( chained->protocol ) );
91
+	DBGC ( device, "%s\n", efi_handle_name ( parent ) );
92 92
 
93 93
 	/* Get protocol instance */
94 94
 	if ( ( efirc = bs->OpenProtocol ( parent, chained->protocol,
@@ -96,11 +96,11 @@ static int chained_locate ( struct chained_protocol *chained ) {
96 96
 					  device,
97 97
 					  EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){
98 98
 		rc = -EEFI ( efirc );
99
-		DBGC ( device, "CHAINED %p %s could not open %s on ",
100
-		       device, efi_handle_name ( device ),
99
+		DBGC ( device, "CHAINED %s could not open %s on ",
100
+		       efi_handle_name ( device ),
101 101
 		       efi_guid_ntoa ( chained->protocol ) );
102
-		DBGC ( device, "%p %s: %s\n",
103
-		       parent, efi_handle_name ( parent ), strerror ( rc ) );
102
+		DBGC ( device, "%s: %s\n",
103
+		       efi_handle_name ( parent ), strerror ( rc ) );
104 104
 		goto err_open_protocol;
105 105
 	}
106 106
 
@@ -130,25 +130,25 @@ static int chained_supported ( EFI_HANDLE device,
130 130
 					  efi_image_handle, device,
131 131
 					  EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){
132 132
 		rc = -EEFI ( efirc );
133
-		DBGCP ( device, "CHAINED %p %s is not a %s device\n",
134
-			device, efi_handle_name ( device ),
133
+		DBGCP ( device, "CHAINED %s is not a %s device\n",
134
+			efi_handle_name ( device ),
135 135
 			efi_guid_ntoa ( chained->protocol ) );
136 136
 		goto err_open_protocol;
137 137
 	}
138 138
 
139 139
 	/* Test for a match against the chainloading device */
140 140
 	if ( interface != chained->interface ) {
141
-		DBGC ( device, "CHAINED %p %s %p is not the chainloaded "
142
-		       "%s\n", device, efi_handle_name ( device ),
143
-		       interface, efi_guid_ntoa ( chained->protocol ) );
141
+		DBGC ( device, "CHAINED %s %p is not the chainloaded %s\n",
142
+		       efi_handle_name ( device ), interface,
143
+		       efi_guid_ntoa ( chained->protocol ) );
144 144
 		rc = -ENOTTY;
145 145
 		goto err_no_match;
146 146
 	}
147 147
 
148 148
 	/* Success */
149 149
 	rc = 0;
150
-	DBGC ( device, "CHAINED %p %s %p is the chainloaded %s\n",
151
-	       device, efi_handle_name ( device ), interface,
150
+	DBGC ( device, "CHAINED %s %p is the chainloaded %s\n",
151
+	       efi_handle_name ( device ), interface,
152 152
 	       efi_guid_ntoa ( chained->protocol ) );
153 153
 
154 154
  err_no_match:

+ 33
- 34
src/interface/efi/efi_bofm.c Переглянути файл

@@ -178,8 +178,8 @@ static int efi_bofm_supported ( EFI_HANDLE device ) {
178 178
 
179 179
 	/* Look for a BOFM driver */
180 180
 	if ( ( rc = bofm_find_driver ( &pci ) ) != 0 ) {
181
-		DBGCP ( device, "EFIBOFM %p %s has no driver\n",
182
-			device, efi_handle_name ( device ) );
181
+		DBGCP ( device, "EFIBOFM %s has no driver\n",
182
+			efi_handle_name ( device ) );
183 183
 		return rc;
184 184
 	}
185 185
 
@@ -187,8 +187,8 @@ static int efi_bofm_supported ( EFI_HANDLE device ) {
187 187
 	if ( ( efirc = bs->LocateProtocol ( &bofm1_protocol_guid, NULL,
188 188
 					    &bofm1.interface ) ) != 0 ) {
189 189
 		rc = -EEFI ( efirc );
190
-		DBGC ( device, "EFIBOFM %p %s cannot find BOFM protocol\n",
191
-		       device, efi_handle_name ( device ) );
190
+		DBGC ( device, "EFIBOFM %s cannot find BOFM protocol\n",
191
+		       efi_handle_name ( device ) );
192 192
 		return rc;
193 193
 	}
194 194
 
@@ -198,13 +198,13 @@ static int efi_bofm_supported ( EFI_HANDLE device ) {
198 198
 						      0x00 /* No iSCSI */,
199 199
 						      0x02 /* Version */ ))!=0){
200 200
 		rc = -EEFI ( efirc );
201
-		DBGC ( device, "EFIBOFM %p %s could not register support: %s\n",
202
-		       device, efi_handle_name ( device ), strerror ( rc ) );
201
+		DBGC ( device, "EFIBOFM %s could not register support: %s\n",
202
+		       efi_handle_name ( device ), strerror ( rc ) );
203 203
 		return rc;
204 204
 	}
205 205
 
206
-	DBGC ( device, "EFIBOFM %p %s has driver \"%s\"\n",
207
-	       device, efi_handle_name ( device ), pci.id->name );
206
+	DBGC ( device, "EFIBOFM %s has driver \"%s\"\n",
207
+	       efi_handle_name ( device ), pci.id->name );
208 208
 	return 0;
209 209
 }
210 210
 
@@ -241,49 +241,48 @@ static int efi_bofm_start ( struct efi_device *efidev ) {
241 241
 	if ( ( efirc = bs->LocateProtocol ( &bofm1_protocol_guid, NULL,
242 242
 					    &bofm1.interface ) ) != 0 ) {
243 243
 		rc = -EEFI ( efirc );
244
-		DBGC ( device, "EFIBOFM %p %s cannot find BOFM protocol\n",
245
-		       device, efi_handle_name ( device ) );
244
+		DBGC ( device, "EFIBOFM %s cannot find BOFM protocol\n",
245
+		       efi_handle_name ( device ) );
246 246
 		goto err_locate_bofm;
247 247
 	}
248 248
 	bofmtab = &bofm1.bofm1->BofmTable;
249
-	DBGC ( device, "EFIBOFM %p %s found version 1 BOFM table at %p+%04x\n",
250
-	       device, efi_handle_name ( device ), bofmtab,
251
-	       bofmtab->Parameters.Length );
249
+	DBGC ( device, "EFIBOFM %s found version 1 BOFM table at %p+%04x\n",
250
+	       efi_handle_name ( device ), bofmtab, bofmtab->Parameters.Length);
252 251
 
253 252
 	/* Locate BOFM2 protocol, if available */
254 253
 	if ( ( efirc = bs->LocateProtocol ( &bofm2_protocol_guid, NULL,
255 254
 					    &bofm2.interface ) ) == 0 ) {
256 255
 		bofmtab2 = &bofm2.bofm2->BofmTable;
257
-		DBGC ( device, "EFIBOFM %p %s found version 2 BOFM table at "
258
-		       "%p+%04x\n", device, efi_handle_name ( device ),
259
-		       bofmtab2, bofmtab2->Parameters.Length );
256
+		DBGC ( device, "EFIBOFM %s found version 2 BOFM table at "
257
+		       "%p+%04x\n", efi_handle_name ( device ), bofmtab2,
258
+		       bofmtab2->Parameters.Length );
260 259
 		assert ( bofm2.bofm2->RegisterSupport ==
261 260
 			 bofm1.bofm1->RegisterSupport );
262 261
 	} else {
263
-		DBGC ( device, "EFIBOFM %p %s cannot find BOFM2 protocol\n",
264
-		       device, efi_handle_name ( device ) );
262
+		DBGC ( device, "EFIBOFM %s cannot find BOFM2 protocol\n",
263
+		       efi_handle_name ( device ) );
265 264
 		/* Not a fatal error; may be a BOFM1-only system */
266 265
 		bofmtab2 = NULL;
267 266
 	}
268 267
 
269 268
 	/* Process BOFM table */
270
-	DBGC2 ( device, "EFIBOFM %p %s version 1 before processing:\n",
271
-		device, efi_handle_name ( device ) );
269
+	DBGC2 ( device, "EFIBOFM %s version 1 before processing:\n",
270
+		efi_handle_name ( device ) );
272 271
 	DBGC2_HD ( device, bofmtab, bofmtab->Parameters.Length );
273 272
 	if ( bofmtab2 ) {
274
-		DBGC2 ( device, "EFIBOFM %p %s version 2 before processing:\n",
275
-			device, efi_handle_name ( device ) );
273
+		DBGC2 ( device, "EFIBOFM %s version 2 before processing:\n",
274
+			efi_handle_name ( device ) );
276 275
 		DBGC2_HD ( device, bofmtab2, bofmtab2->Parameters.Length );
277 276
 	}
278 277
 	bofmrc = bofm ( virt_to_user ( bofmtab2 ? bofmtab2 : bofmtab ), &pci );
279
-	DBGC ( device, "EFIBOFM %p %s status %08x\n",
280
-	       device, efi_handle_name ( device ), bofmrc );
281
-	DBGC2 ( device, "EFIBOFM %p %s version 1 after processing:\n",
282
-		device, efi_handle_name ( device ) );
278
+	DBGC ( device, "EFIBOFM %s status %08x\n",
279
+	       efi_handle_name ( device ), bofmrc );
280
+	DBGC2 ( device, "EFIBOFM %s version 1 after processing:\n",
281
+		efi_handle_name ( device ) );
283 282
 	DBGC2_HD ( device, bofmtab, bofmtab->Parameters.Length );
284 283
 	if ( bofmtab2 ) {
285
-		DBGC2 ( device, "EFIBOFM %p %s version 2 after processing:\n",
286
-			device, efi_handle_name ( device ) );
284
+		DBGC2 ( device, "EFIBOFM %s version 2 after processing:\n",
285
+			efi_handle_name ( device ) );
287 286
 		DBGC2_HD ( device, bofmtab2, bofmtab2->Parameters.Length );
288 287
 	}
289 288
 
@@ -292,18 +291,18 @@ static int efi_bofm_start ( struct efi_device *efidev ) {
292 291
 		if ( ( efirc = bofm2.bofm2->SetStatus ( bofm2.bofm2, device,
293 292
 							FALSE, bofmrc ) ) != 0){
294 293
 			rc = -EEFI ( efirc );
295
-			DBGC ( device, "EFIBOFM %p %s could not set BOFM2 "
296
-			       "status: %s\n", device,
297
-			       efi_handle_name ( device ), strerror ( rc ) );
294
+			DBGC ( device, "EFIBOFM %s could not set BOFM2 "
295
+			       "status: %s\n", efi_handle_name ( device ),
296
+			       strerror ( rc ) );
298 297
 			goto err_set_status;
299 298
 		}
300 299
 	} else {
301 300
 		if ( ( efirc = bofm1.bofm1->SetStatus ( bofm1.bofm1, device,
302 301
 							FALSE, bofmrc ) ) != 0){
303 302
 			rc = -EEFI ( efirc );
304
-			DBGC ( device, "EFIBOFM %p %s could not set BOFM "
305
-			       "status: %s\n", device,
306
-			       efi_handle_name ( device ), strerror ( rc ) );
303
+			DBGC ( device, "EFIBOFM %s could not set BOFM "
304
+			       "status: %s\n", efi_handle_name ( device ),
305
+			       strerror ( rc ) );
307 306
 			goto err_set_status;
308 307
 		}
309 308
 	}

+ 19
- 15
src/interface/efi/efi_debug.c Переглянути файл

@@ -231,8 +231,9 @@ void dbg_efi_openers ( EFI_HANDLE handle, EFI_GUID *protocol ) {
231 231
 
232 232
 	/* Sanity check */
233 233
 	if ( ( ! handle ) || ( ! protocol ) ) {
234
-		printf ( "EFI could not retrieve openers for %s on %p\n",
235
-			 efi_guid_ntoa ( protocol ), handle );
234
+		printf ( "HANDLE %s could not retrieve openers for %s\n",
235
+			 efi_handle_name ( handle ),
236
+			 efi_guid_ntoa ( protocol ) );
236 237
 		return;
237 238
 	}
238 239
 
@@ -240,24 +241,24 @@ void dbg_efi_openers ( EFI_HANDLE handle, EFI_GUID *protocol ) {
240 241
 	if ( ( efirc = bs->OpenProtocolInformation ( handle, protocol, &openers,
241 242
 						     &count ) ) != 0 ) {
242 243
 		rc = -EEFI ( efirc );
243
-		printf ( "EFI could not retrieve openers for %s on %p: %s\n",
244
-			 efi_guid_ntoa ( protocol ), handle, strerror ( rc ) );
244
+		printf ( "HANDLE %s could not retrieve openers for %s: %s\n",
245
+			 efi_handle_name ( handle ),
246
+			 efi_guid_ntoa ( protocol ), strerror ( rc ) );
245 247
 		return;
246 248
 	}
247 249
 
248 250
 	/* Dump list of openers */
249 251
 	for ( i = 0 ; i < count ; i++ ) {
250 252
 		opener = &openers[i];
251
-		printf ( "HANDLE %p %s %s opened %dx (%s)",
252
-			 handle, efi_handle_name ( handle ),
253
+		printf ( "HANDLE %s %s opened %dx (%s)",
254
+			 efi_handle_name ( handle ),
253 255
 			 efi_guid_ntoa ( protocol ), opener->OpenCount,
254 256
 			 efi_open_attributes_name ( opener->Attributes ) );
255
-		printf ( " by %p %s", opener->AgentHandle,
256
-			 efi_handle_name ( opener->AgentHandle ) );
257
+		printf ( " by %s", efi_handle_name ( opener->AgentHandle ) );
257 258
 		if ( opener->ControllerHandle == handle ) {
258 259
 			printf ( "\n" );
259 260
 		} else {
260
-			printf ( " for %p %s\n", opener->ControllerHandle,
261
+			printf ( " for %s\n",
261 262
 				 efi_handle_name ( opener->ControllerHandle ) );
262 263
 		}
263 264
 	}
@@ -282,7 +283,8 @@ void dbg_efi_protocols ( EFI_HANDLE handle ) {
282 283
 
283 284
 	/* Sanity check */
284 285
 	if ( ! handle ) {
285
-		printf ( "EFI could not retrieve protocols for %p\n", handle );
286
+		printf ( "HANDLE %s could not retrieve protocols\n",
287
+			 efi_handle_name ( handle ) );
286 288
 		return;
287 289
 	}
288 290
 
@@ -290,16 +292,15 @@ void dbg_efi_protocols ( EFI_HANDLE handle ) {
290 292
 	if ( ( efirc = bs->ProtocolsPerHandle ( handle, &protocols,
291 293
 						&count ) ) != 0 ) {
292 294
 		rc = -EEFI ( efirc );
293
-		printf ( "EFI could not retrieve protocols for %p: %s\n",
294
-			 handle, strerror ( rc ) );
295
+		printf ( "HANDLE %s could not retrieve protocols: %s\n",
296
+			 efi_handle_name ( handle ), strerror ( rc ) );
295 297
 		return;
296 298
 	}
297 299
 
298 300
 	/* Dump list of protocols */
299 301
 	for ( i = 0 ; i < count ; i++ ) {
300 302
 		protocol = protocols[i];
301
-		printf ( "HANDLE %p %s %s supported\n",
302
-			 handle, efi_handle_name ( handle ),
303
+		printf ( "HANDLE %s %s supported\n", efi_handle_name ( handle ),
303 304
 			 efi_guid_ntoa ( protocol ) );
304 305
 		dbg_efi_openers ( handle, protocol );
305 306
 	}
@@ -631,6 +632,7 @@ static struct efi_handle_name_type efi_handle_name_types[] = {
631 632
 const __attribute__ (( pure )) char * efi_handle_name ( EFI_HANDLE handle ) {
632 633
 	EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
633 634
 	struct efi_handle_name_type *type;
635
+	static char buf[32];
634 636
 	unsigned int i;
635 637
 	void *interface;
636 638
 	const char *name;
@@ -670,5 +672,7 @@ const __attribute__ (( pure )) char * efi_handle_name ( EFI_HANDLE handle ) {
670 672
 			return name;
671 673
 	}
672 674
 
673
-	return "UNKNOWN";
675
+	/* Use raw handle value if no name found */
676
+	snprintf ( buf, sizeof ( buf ), "UNKNOWN<%p>", handle );
677
+	return buf;
674 678
 }

+ 38
- 42
src/interface/efi/efi_driver.c Переглянути файл

@@ -96,30 +96,29 @@ efi_driver_supported ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
96 96
 	struct efi_driver *efidrv;
97 97
 	int rc;
98 98
 
99
-	DBGCP ( device, "EFIDRV %p %s DRIVER_SUPPORTED",
100
-		device, efi_handle_name ( device ) );
99
+	DBGCP ( device, "EFIDRV %s DRIVER_SUPPORTED",
100
+		efi_handle_name ( device ) );
101 101
 	if ( child )
102 102
 		DBGCP ( device, " (child %s)", efi_devpath_text ( child ) );
103 103
 	DBGCP ( device, "\n" );
104 104
 
105 105
 	/* Do nothing if we are already driving this device */
106 106
 	if ( efidev_find ( device ) != NULL ) {
107
-		DBGCP ( device, "EFIDRV %p %s is already started\n",
108
-			device, efi_handle_name ( device ) );
107
+		DBGCP ( device, "EFIDRV %s is already started\n",
108
+			efi_handle_name ( device ) );
109 109
 		return EFI_ALREADY_STARTED;
110 110
 	}
111 111
 
112 112
 	/* Look for a driver claiming to support this device */
113 113
 	for_each_table_entry ( efidrv, EFI_DRIVERS ) {
114 114
 		if ( ( rc = efidrv->supported ( device ) ) == 0 ) {
115
-			DBGC ( device, "EFIDRV %p %s has driver \"%s\"\n",
116
-			       device, efi_handle_name ( device ),
117
-			       efidrv->name );
115
+			DBGC ( device, "EFIDRV %s has driver \"%s\"\n",
116
+			       efi_handle_name ( device ), efidrv->name );
118 117
 			return 0;
119 118
 		}
120 119
 	}
121
-	DBGCP ( device, "EFIDRV %p %s has no driver\n",
122
-		device, efi_handle_name ( device ) );
120
+	DBGCP ( device, "EFIDRV %s has no driver\n",
121
+		efi_handle_name ( device ) );
123 122
 
124 123
 	return EFI_UNSUPPORTED;
125 124
 }
@@ -140,8 +139,7 @@ efi_driver_start ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
140 139
 	EFI_STATUS efirc;
141 140
 	int rc;
142 141
 
143
-	DBGC ( device, "EFIDRV %p %s DRIVER_START",
144
-	       device, efi_handle_name ( device ) );
142
+	DBGC ( device, "EFIDRV %s DRIVER_START", efi_handle_name ( device ) );
145 143
 	if ( child )
146 144
 		DBGC ( device, " (child %s)", efi_devpath_text ( child ) );
147 145
 	DBGC ( device, "\n" );
@@ -149,8 +147,8 @@ efi_driver_start ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
149 147
 	/* Do nothing if we are already driving this device */
150 148
 	efidev = efidev_find ( device );
151 149
 	if ( efidev ) {
152
-		DBGCP ( device, "EFIDRV %p %s is already started\n",
153
-			device, efi_handle_name ( device ) );
150
+		DBGCP ( device, "EFIDRV %s is already started\n",
151
+			efi_handle_name ( device ) );
154 152
 		efirc = EFI_ALREADY_STARTED;
155 153
 		goto err_already_started;
156 154
 	}
@@ -169,22 +167,22 @@ efi_driver_start ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
169 167
 	/* Try to start this device */
170 168
 	for_each_table_entry ( efidrv, EFI_DRIVERS ) {
171 169
 		if ( ( rc = efidrv->supported ( device ) ) != 0 ) {
172
-			DBGC ( device, "EFIDRV %p %s is not supported by "
173
-			       "driver \"%s\": %s\n", device,
174
-			       efi_handle_name ( device ), efidrv->name,
170
+			DBGC ( device, "EFIDRV %s is not supported by driver "
171
+			       "\"%s\": %s\n", efi_handle_name ( device ),
172
+			       efidrv->name,
175 173
 			       strerror ( rc ) );
176 174
 			continue;
177 175
 		}
178 176
 		if ( ( rc = efidrv->start ( efidev ) ) == 0 ) {
179 177
 			efidev->driver = efidrv;
180
-			DBGC ( device, "EFIDRV %p %s using driver \"%s\"\n",
181
-			       device, efi_handle_name ( device ),
178
+			DBGC ( device, "EFIDRV %s using driver \"%s\"\n",
179
+			       efi_handle_name ( device ),
182 180
 			       efidev->driver->name );
183 181
 			return 0;
184 182
 		}
185
-		DBGC ( device, "EFIDRV %p %s could not start driver \"%s\": "
186
-		       "%s\n", device, efi_handle_name ( device ),
187
-		       efidrv->name, strerror ( rc ) );
183
+		DBGC ( device, "EFIDRV %s could not start driver \"%s\": %s\n",
184
+		       efi_handle_name ( device ), efidrv->name,
185
+		       strerror ( rc ) );
188 186
 	}
189 187
 	efirc = EFI_UNSUPPORTED;
190 188
 
@@ -213,19 +211,18 @@ efi_driver_stop ( EFI_DRIVER_BINDING_PROTOCOL *driver __unused,
213 211
 	struct efi_device *efidev;
214 212
 	UINTN i;
215 213
 
216
-	DBGC ( device, "EFIDRV %p %s DRIVER_STOP",
217
-	       device, efi_handle_name ( device ) );
214
+	DBGC ( device, "EFIDRV %s DRIVER_STOP", efi_handle_name ( device ) );
218 215
 	for ( i = 0 ; i < num_children ; i++ ) {
219
-		DBGC ( device, "%s%p %s", ( i ? ", " : " child " ),
220
-		       children[i], efi_handle_name ( children[i] ) );
216
+		DBGC ( device, "%s%s", ( i ? ", " : " child " ),
217
+		       efi_handle_name ( children[i] ) );
221 218
 	}
222 219
 	DBGC ( device, "\n" );
223 220
 
224 221
 	/* Do nothing unless we are driving this device */
225 222
 	efidev = efidev_find ( device );
226 223
 	if ( ! efidev ) {
227
-		DBGCP ( device, "EFIDRV %p %s is not started\n",
228
-			device, efi_handle_name ( device ) );
224
+		DBGCP ( device, "EFIDRV %s is not started\n",
225
+			efi_handle_name ( device ) );
229 226
 		return 0;
230 227
 	}
231 228
 
@@ -378,36 +375,35 @@ static int efi_driver_connect ( EFI_HANDLE device ) {
378 375
 	}
379 376
 
380 377
 	/* Disconnect any existing drivers */
381
-	DBGC2 ( device, "EFIDRV %p %s before disconnecting:\n",
382
-		device, efi_handle_name ( device ) );
378
+	DBGC2 ( device, "EFIDRV %s before disconnecting:\n",
379
+		efi_handle_name ( device ) );
383 380
 	DBGC2_EFI_PROTOCOLS ( device, device );
384
-	DBGC ( device, "EFIDRV %p %s disconnecting existing drivers\n",
385
-	       device, efi_handle_name ( device ) );
381
+	DBGC ( device, "EFIDRV %s disconnecting existing drivers\n",
382
+	       efi_handle_name ( device ) );
386 383
 	if ( ( efirc = bs->DisconnectController ( device, NULL,
387 384
 						  NULL ) ) != 0 ) {
388 385
 		rc = -EEFI ( efirc );
389
-		DBGC ( device, "EFIDRV %p %s could not disconnect existing "
390
-		       "drivers: %s\n", device, efi_handle_name ( device ),
386
+		DBGC ( device, "EFIDRV %s could not disconnect existing "
387
+		       "drivers: %s\n", efi_handle_name ( device ),
391 388
 		       strerror ( rc ) );
392 389
 		/* Ignore the error and attempt to connect our drivers */
393 390
 	}
394
-	DBGC2 ( device, "EFIDRV %p %s after disconnecting:\n",
395
-		device, efi_handle_name ( device ) );
391
+	DBGC2 ( device, "EFIDRV %s after disconnecting:\n",
392
+		efi_handle_name ( device ) );
396 393
 	DBGC2_EFI_PROTOCOLS ( device, device );
397 394
 
398 395
 	/* Connect our driver */
399
-	DBGC ( device, "EFIDRV %p %s connecting new drivers\n",
400
-	       device, efi_handle_name ( device ) );
396
+	DBGC ( device, "EFIDRV %s connecting new drivers\n",
397
+	       efi_handle_name ( device ) );
401 398
 	if ( ( efirc = bs->ConnectController ( device, drivers, NULL,
402 399
 					       FALSE ) ) != 0 ) {
403 400
 		rc = -EEFI ( efirc );
404
-		DBGC ( device, "EFIDRV %p %s could not connect new drivers: "
405
-		       "%s\n", device, efi_handle_name ( device ),
406
-		       strerror ( rc ) );
401
+		DBGC ( device, "EFIDRV %s could not connect new drivers: "
402
+		       "%s\n", efi_handle_name ( device ), strerror ( rc ) );
407 403
 		return rc;
408 404
 	}
409
-	DBGC2 ( device, "EFIDRV %p %s after connecting:\n",
410
-		device, efi_handle_name ( device ) );
405
+	DBGC2 ( device, "EFIDRV %s after connecting:\n",
406
+		efi_handle_name ( device ) );
411 407
 	DBGC2_EFI_PROTOCOLS ( device, device );
412 408
 
413 409
 	return 0;

+ 20
- 21
src/interface/efi/efi_pci.c Переглянути файл

@@ -154,8 +154,8 @@ int efipci_open ( EFI_HANDLE device, UINT32 attributes,
154 154
 					  &pci_io.interface, efi_image_handle,
155 155
 					  device, attributes ) ) != 0 ) {
156 156
 		rc = -EEFI_PCI ( efirc );
157
-		DBGCP ( device, "EFIPCI %p %s cannot open PCI protocols: %s\n",
158
-			device, efi_handle_name ( device ), strerror ( rc ) );
157
+		DBGCP ( device, "EFIPCI %s cannot open PCI protocols: %s\n",
158
+			efi_handle_name ( device ), strerror ( rc ) );
159 159
 		goto err_open_protocol;
160 160
 	}
161 161
 
@@ -164,11 +164,11 @@ int efipci_open ( EFI_HANDLE device, UINT32 attributes,
164 164
 						    &pci_bus, &pci_dev,
165 165
 						    &pci_fn ) ) != 0 ) {
166 166
 		rc = -EEFI ( efirc );
167
-		DBGC ( device, "EFIPCI %p %s could not get PCI location: %s\n",
168
-		       device, efi_handle_name ( device ), strerror ( rc ) );
167
+		DBGC ( device, "EFIPCI %s could not get PCI location: %s\n",
168
+		       efi_handle_name ( device ), strerror ( rc ) );
169 169
 		goto err_get_location;
170 170
 	}
171
-	DBGC2 ( device, "EFIPCI %p %s is PCI %04lx:%02lx:%02lx.%lx\n", device,
171
+	DBGC2 ( device, "EFIPCI %s is PCI %04lx:%02lx:%02lx.%lx\n",
172 172
 		efi_handle_name ( device ), ( ( unsigned long ) pci_segment ),
173 173
 		( ( unsigned long ) pci_bus ), ( ( unsigned long ) pci_dev ),
174 174
 		( ( unsigned long ) pci_fn ) );
@@ -192,9 +192,8 @@ int efipci_open ( EFI_HANDLE device, UINT32 attributes,
192 192
 	/* Populate PCI device */
193 193
 	pci_init ( pci, PCI_BUSDEVFN ( pci_bus, pci_dev, pci_fn ) );
194 194
 	if ( ( rc = pci_read_config ( pci ) ) != 0 ) {
195
-		DBGC ( device, "EFIPCI %p %s cannot read PCI configuration: "
196
-		       "%s\n", device, efi_handle_name ( device ),
197
-		       strerror ( rc ) );
195
+		DBGC ( device, "EFIPCI %s cannot read PCI configuration: %s\n",
196
+		       efi_handle_name ( device ), strerror ( rc ) );
198 197
 		goto err_pci_read_config;
199 198
 	}
200 199
 
@@ -264,12 +263,12 @@ static int efipci_supported ( EFI_HANDLE device ) {
264 263
 
265 264
 	/* Look for a driver */
266 265
 	if ( ( rc = pci_find_driver ( &pci ) ) != 0 ) {
267
-		DBGCP ( device, "EFIPCI %p %s has no driver\n",
268
-			device, efi_handle_name ( device ) );
266
+		DBGCP ( device, "EFIPCI %s has no driver\n",
267
+			efi_handle_name ( device ) );
269 268
 		return rc;
270 269
 	}
271
-	DBGC ( device, "EFIPCI %p %s has driver \"%s\"\n",
272
-	       device, efi_handle_name ( device ), pci.id->name );
270
+	DBGC ( device, "EFIPCI %s has driver \"%s\"\n",
271
+	       efi_handle_name ( device ), pci.id->name );
273 272
 
274 273
 	return 0;
275 274
 }
@@ -296,16 +295,16 @@ static int efipci_start ( struct efi_device *efidev ) {
296 295
 	if ( ( rc = efipci_open ( device, ( EFI_OPEN_PROTOCOL_BY_DRIVER |
297 296
 					    EFI_OPEN_PROTOCOL_EXCLUSIVE ),
298 297
 				  pci ) ) != 0 ) {
299
-		DBGC ( device, "EFIPCI %p %s could not open PCI device: %s\n",
300
-		       device, efi_handle_name ( device ), strerror ( rc ) );
298
+		DBGC ( device, "EFIPCI %s could not open PCI device: %s\n",
299
+		       efi_handle_name ( device ), strerror ( rc ) );
301 300
 		DBGC_EFI_OPENERS ( device, device, &efi_pci_io_protocol_guid );
302 301
 		goto err_open;
303 302
 	}
304 303
 
305 304
 	/* Find driver */
306 305
 	if ( ( rc = pci_find_driver ( pci ) ) != 0 ) {
307
-		DBGC ( device, "EFIPCI %p %s has no driver\n",
308
-		       device, efi_handle_name ( device ) );
306
+		DBGC ( device, "EFIPCI %s has no driver\n",
307
+		       efi_handle_name ( device ) );
309 308
 		goto err_find_driver;
310 309
 	}
311 310
 
@@ -315,13 +314,13 @@ static int efipci_start ( struct efi_device *efidev ) {
315 314
 
316 315
 	/* Probe driver */
317 316
 	if ( ( rc = pci_probe ( pci ) ) != 0 ) {
318
-		DBGC ( device, "EFIPCI %p %s could not probe driver \"%s\": "
319
-		       "%s\n", device, efi_handle_name ( device ),
320
-		       pci->id->name, strerror ( rc ) );
317
+		DBGC ( device, "EFIPCI %s could not probe driver \"%s\": %s\n",
318
+		       efi_handle_name ( device ), pci->id->name,
319
+		       strerror ( rc ) );
321 320
 		goto err_probe;
322 321
 	}
323
-	DBGC ( device, "EFIPCI %p %s using driver \"%s\"\n",
324
-	       device, efi_handle_name ( device ), pci->id->name );
322
+	DBGC ( device, "EFIPCI %s using driver \"%s\"\n",
323
+	       efi_handle_name ( device ), pci->id->name );
325 324
 
326 325
 	efidev_set_drvdata ( efidev, pci );
327 326
 	return 0;

+ 10
- 11
src/interface/efi/efi_snp.c Переглянути файл

@@ -1024,9 +1024,9 @@ static int efi_snp_probe ( struct net_device *netdev ) {
1024 1024
 					  efidev->device,
1025 1025
 					  EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){
1026 1026
 		rc = -EEFI ( efirc );
1027
-		DBGC ( snpdev, "SNPDEV %p cannot get %p %s device path: %s\n",
1028
-		       snpdev, efidev->device,
1029
-		       efi_handle_name ( efidev->device ), strerror ( rc ) );
1027
+		DBGC ( snpdev, "SNPDEV %p cannot get %s device path: %s\n",
1028
+		       snpdev, efi_handle_name ( efidev->device ),
1029
+		       strerror ( rc ) );
1030 1030
 		goto err_open_device_path;
1031 1031
 	}
1032 1032
 
@@ -1067,16 +1067,16 @@ static int efi_snp_probe ( struct net_device *netdev ) {
1067 1067
 			&efi_load_file_protocol_guid, &snpdev->load_file,
1068 1068
 			NULL ) ) != 0 ) {
1069 1069
 		rc = -EEFI ( efirc );
1070
-		DBGC ( snpdev, "SNPDEV %p could not install protocols: "
1071
-		       "%s\n", snpdev, strerror ( rc ) );
1070
+		DBGC ( snpdev, "SNPDEV %p could not install protocols: %s\n",
1071
+		       snpdev, strerror ( rc ) );
1072 1072
 		goto err_install_protocol_interface;
1073 1073
 	}
1074 1074
 
1075 1075
 	/* Add as child of EFI parent device */
1076 1076
 	if ( ( rc = efi_child_add ( efidev->device, snpdev->handle ) ) != 0 ) {
1077
-		DBGC ( snpdev, "SNPDEV %p could not become child of %p %s: "
1078
-		       "%s\n", snpdev, efidev->device,
1079
-		       efi_handle_name ( efidev->device ), strerror ( rc ) );
1077
+		DBGC ( snpdev, "SNPDEV %p could not become child of %s: %s\n",
1078
+		       snpdev, efi_handle_name ( efidev->device ),
1079
+		       strerror ( rc ) );
1080 1080
 		goto err_efi_child_add;
1081 1081
 	}
1082 1082
 
@@ -1097,9 +1097,8 @@ static int efi_snp_probe ( struct net_device *netdev ) {
1097 1097
 	bs->CloseProtocol ( efidev->device, &efi_device_path_protocol_guid,
1098 1098
 			    efi_image_handle, efidev->device );
1099 1099
 
1100
-	DBGC ( snpdev, "SNPDEV %p installed for %s as device %p %s\n",
1101
-	       snpdev, netdev->name, snpdev->handle,
1102
-	       efi_handle_name ( snpdev->handle ) );
1100
+	DBGC ( snpdev, "SNPDEV %p installed for %s as device %s\n",
1101
+	       snpdev, netdev->name, efi_handle_name ( snpdev->handle ) );
1103 1102
 	return 0;
1104 1103
 
1105 1104
 	if ( snpdev->package_list )

+ 17
- 21
src/interface/efi/efi_utils.c Переглянути файл

@@ -76,8 +76,8 @@ int efi_locate_device ( EFI_HANDLE device, EFI_GUID *protocol,
76 76
 					  efi_image_handle, device,
77 77
 					  EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){
78 78
 		rc = -EEFI ( efirc );
79
-		DBGC ( device, "EFIDEV %p %s cannot open device path: %s\n",
80
-		       device, efi_handle_name ( device ), strerror ( rc ) );
79
+		DBGC ( device, "EFIDEV %s cannot open device path: %s\n",
80
+		       efi_handle_name ( device ), strerror ( rc ) );
81 81
 		goto err_open_device_path;
82 82
 	}
83 83
 	devpath = path.path;
@@ -86,8 +86,8 @@ int efi_locate_device ( EFI_HANDLE device, EFI_GUID *protocol,
86 86
 	if ( ( efirc = bs->LocateDevicePath ( protocol, &devpath,
87 87
 					      parent ) ) != 0 ) {
88 88
 		rc = -EEFI ( efirc );
89
-		DBGC ( device, "EFIDEV %p %s has no parent supporting %s: %s\n",
90
-		       device, efi_handle_name ( device ),
89
+		DBGC ( device, "EFIDEV %s has no parent supporting %s: %s\n",
90
+		       efi_handle_name ( device ),
91 91
 		       efi_guid_ntoa ( protocol ), strerror ( rc ) );
92 92
 		goto err_locate_protocol;
93 93
 	}
@@ -123,18 +123,17 @@ int efi_child_add ( EFI_HANDLE parent, EFI_HANDLE child ) {
123 123
 					  EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
124 124
 					  ) ) != 0 ) {
125 125
 		rc = -EEFI ( efirc );
126
-		DBGC ( parent, "EFIDEV %p %s could not add child",
127
-		       parent, efi_handle_name ( parent ) );
128
-		DBGC ( parent, " %p %s: %s\n", child,
126
+		DBGC ( parent, "EFIDEV %s could not add child",
127
+		       efi_handle_name ( parent ) );
128
+		DBGC ( parent, " %s: %s\n",
129 129
 		       efi_handle_name ( child ), strerror ( rc ) );
130 130
 		DBGC_EFI_OPENERS ( parent, parent,
131 131
 				   &efi_device_path_protocol_guid );
132 132
 		return rc;
133 133
 	}
134 134
 
135
-	DBGC2 ( parent, "EFIDEV %p %s added child",
136
-		parent, efi_handle_name ( parent ) );
137
-	DBGC2 ( parent, " %p %s\n", child, efi_handle_name ( child ) );
135
+	DBGC2 ( parent, "EFIDEV %s added child", efi_handle_name ( parent ) );
136
+	DBGC2 ( parent, " %s\n", efi_handle_name ( child ) );
138 137
 	return 0;
139 138
 }
140 139
 
@@ -149,10 +148,8 @@ void efi_child_del ( EFI_HANDLE parent, EFI_HANDLE child ) {
149 148
 
150 149
 	bs->CloseProtocol ( parent, &efi_device_path_protocol_guid,
151 150
 			    efi_image_handle, child );
152
-	DBGC2 ( parent, "EFIDEV %p %s removed child",
153
-		parent, efi_handle_name ( parent ) );
154
-	DBGC2 ( parent, " %p %s\n",
155
-		child, efi_handle_name ( child ) );
151
+	DBGC2 ( parent, "EFIDEV %s removed child", efi_handle_name ( parent ) );
152
+	DBGC2 ( parent, " %s\n", efi_handle_name ( child ) );
156 153
 }
157 154
 
158 155
 /**
@@ -172,16 +169,15 @@ static int efi_pci_info ( EFI_HANDLE device, const char *prefix,
172 169
 	/* Find parent PCI device */
173 170
 	if ( ( rc = efi_locate_device ( device, &efi_pci_io_protocol_guid,
174 171
 					&pci_device ) ) != 0 ) {
175
-		DBGC ( device, "EFIDEV %p %s is not a PCI device: %s\n",
176
-		       device, efi_handle_name ( device ), strerror ( rc ) );
172
+		DBGC ( device, "EFIDEV %s is not a PCI device: %s\n",
173
+		       efi_handle_name ( device ), strerror ( rc ) );
177 174
 		return rc;
178 175
 	}
179 176
 
180 177
 	/* Get PCI device information */
181 178
 	if ( ( rc = efipci_info ( pci_device, &pci ) ) != 0 ) {
182
-		DBGC ( device, "EFIDEV %p %s could not get PCI information: "
183
-		       "%s\n", device, efi_handle_name ( device ),
184
-		       strerror ( rc ) );
179
+		DBGC ( device, "EFIDEV %s could not get PCI information: %s\n",
180
+		       efi_handle_name ( device ), strerror ( rc ) );
185 181
 		return rc;
186 182
 	}
187 183
 
@@ -211,8 +207,8 @@ void efi_device_info ( EFI_HANDLE device, const char *prefix,
211 207
 	/* If we cannot get any underlying device information, fall
212 208
 	 * back to providing information about the EFI handle.
213 209
 	 */
214
-	DBGC ( device, "EFIDEV %p %s could not get underlying device "
215
-	       "information\n", device, efi_handle_name ( device ) );
210
+	DBGC ( device, "EFIDEV %s could not get underlying device "
211
+	       "information\n", efi_handle_name ( device ) );
216 212
 	dev->desc.bus_type = BUS_TYPE_EFI;
217 213
 	snprintf ( dev->name, sizeof ( dev->name ), "%s-%p", prefix, device );
218 214
 }

+ 22
- 27
src/interface/efi/efi_wrap.c Переглянути файл

@@ -111,7 +111,7 @@ efi_handle_protocol_wrapper ( EFI_HANDLE handle, EFI_GUID *protocol,
111 111
 	void *retaddr = __builtin_return_address ( 0 );
112 112
 	EFI_STATUS efirc;
113 113
 
114
-	DBGC ( colour, "HandleProtocol ( %p %s, %s, ... ) ", handle,
114
+	DBGC ( colour, "HandleProtocol ( %s, %s, ... ) ",
115 115
 	       efi_handle_name ( handle ), efi_guid_ntoa ( protocol ) );
116 116
 	efirc = bs->HandleProtocol ( handle, protocol, interface );
117 117
 	DBGC ( colour, "= %s ( %p ) -> %p\n",
@@ -155,10 +155,9 @@ efi_locate_device_path_wrapper ( EFI_GUID *protocol,
155 155
 	DBGC ( colour, "LocateDevicePath ( %s, %s, ... ) ",
156 156
 	       efi_guid_ntoa ( protocol ), efi_devpath_text ( *device_path ) );
157 157
 	efirc = bs->LocateDevicePath ( protocol, device_path, device );
158
-	DBGC ( colour, "= %s ( %p, ",
158
+	DBGC ( colour, "= %s ( %s, ",
159 159
 	       efi_status ( efirc ), efi_devpath_text ( *device_path ) );
160
-	DBGC ( colour, "%p %s ) -> %p\n",
161
-	       *device, efi_handle_name ( *device ), retaddr );
160
+	DBGC ( colour, "%s ) -> %p\n", efi_handle_name ( *device ), retaddr );
162 161
 	return efirc;
163 162
 }
164 163
 
@@ -175,18 +174,16 @@ efi_load_image_wrapper ( BOOLEAN boot_policy, EFI_HANDLE parent_image_handle,
175 174
 	void *retaddr = __builtin_return_address ( 0 );
176 175
 	EFI_STATUS efirc;
177 176
 
178
-	DBGC ( colour, "LoadImage ( %d, %p %s, ", boot_policy,
179
-	       parent_image_handle, efi_handle_name ( parent_image_handle ) );
177
+	DBGC ( colour, "LoadImage ( %d, %s, ", boot_policy,
178
+	       efi_handle_name ( parent_image_handle ) );
180 179
 	DBGC ( colour, "%s, %p, %#llx, ... ) ",
181 180
 	       efi_devpath_text ( device_path ), source_buffer,
182 181
 	       ( ( unsigned long long ) source_size ) );
183 182
 	efirc = bs->LoadImage ( boot_policy, parent_image_handle, device_path,
184 183
 				source_buffer, source_size, image_handle );
185 184
 	DBGC ( colour, "= %s ( ", efi_status ( efirc ) );
186
-	if ( efirc == 0 ) {
187
-		DBGC ( colour, "%p %s ", *image_handle,
188
-		       efi_handle_name ( *image_handle ) );
189
-	}
185
+	if ( efirc == 0 )
186
+		DBGC ( colour, "%s ", efi_handle_name ( *image_handle ) );
190 187
 	DBGC ( colour, ") -> %p\n", retaddr );
191 188
 
192 189
 	/* Wrap the new image */
@@ -206,8 +203,8 @@ efi_exit_boot_services_wrapper ( EFI_HANDLE image_handle, UINTN map_key ) {
206 203
 	void *retaddr = __builtin_return_address ( 0 );
207 204
 	EFI_STATUS efirc;
208 205
 
209
-	DBGC ( colour, "ExitBootServices ( %p %s, %#llx ) ",
210
-	       image_handle, efi_handle_name ( image_handle ),
206
+	DBGC ( colour, "ExitBootServices ( %s, %#llx ) ",
207
+	       efi_handle_name ( image_handle ),
211 208
 	       ( ( unsigned long long ) map_key ) );
212 209
 	efirc = bs->ExitBootServices ( image_handle, map_key );
213 210
 	DBGC ( colour, "= %s -> %p\n", efi_status ( efirc ), retaddr );
@@ -226,11 +223,10 @@ efi_open_protocol_wrapper ( EFI_HANDLE handle, EFI_GUID *protocol,
226 223
 	void *retaddr = __builtin_return_address ( 0 );
227 224
 	EFI_STATUS efirc;
228 225
 
229
-	DBGC ( colour, "OpenProtocol ( %p %s, %s, ..., ", handle,
226
+	DBGC ( colour, "OpenProtocol ( %s, %s, ..., ",
230 227
 	       efi_handle_name ( handle ), efi_guid_ntoa ( protocol ) );
231
-	DBGC ( colour, "%p %s, ", agent_handle,
232
-	       efi_handle_name ( agent_handle ) );
233
-	DBGC ( colour, "%p %s, %#x ) ", controller_handle,
228
+	DBGC ( colour, "%s, ", efi_handle_name ( agent_handle ) );
229
+	DBGC ( colour, "%s, %#x ) ",
234 230
 	       efi_handle_name ( controller_handle ), attributes );
235 231
 	efirc = bs->OpenProtocol ( handle, protocol, interface, agent_handle,
236 232
 				   controller_handle, attributes );
@@ -295,23 +291,22 @@ efi_locate_protocol_wrapper ( EFI_GUID *protocol, VOID *registration,
295 291
 					  &loaded.intf, efi_image_handle, NULL,
296 292
 					  EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){
297 293
 		rc = -EEFI ( efirc );
298
-		DBGC ( colour, "Could not get loaded image protocol for %p %s: "
299
-		       "%s\n", handle, efi_handle_name ( handle ),
300
-		       strerror ( rc ) );
294
+		DBGC ( colour, "WRAP %s could not get loaded image protocol: "
295
+		       "%s\n", efi_handle_name ( handle ), strerror ( rc ) );
301 296
 		return;
302 297
 	}
303 298
 
304 299
 	/* Provide system table wrapper to image */
305 300
 	loaded.image->SystemTable = &efi_systab_wrapper;
306
-	DBGC ( colour, "Wrapped image %p %s at base %p has protocols:\n",
307
-	       handle, efi_handle_name ( handle ), loaded.image->ImageBase );
301
+	DBGC ( colour, "WRAP %s at base %p has protocols:\n",
302
+	       efi_handle_name ( handle ), loaded.image->ImageBase );
308 303
 	DBGC_EFI_PROTOCOLS ( colour, handle );
309
-	DBGC ( colour, "Parent image %p %s\n", loaded.image->ParentHandle,
310
-	       efi_handle_name ( loaded.image->ParentHandle ) );
311
-	DBGC ( colour, "Device %p %s ", loaded.image->DeviceHandle,
312
-	       efi_handle_name ( loaded.image->DeviceHandle ) );
313
-	DBGC ( colour, "file %p %s\n", loaded.image->FilePath,
314
-	       efi_devpath_text ( loaded.image->FilePath ) );
304
+	DBGC ( colour, "WRAP %s parent", efi_handle_name ( handle ) );
305
+	DBGC ( colour, " %s\n", efi_handle_name ( loaded.image->ParentHandle ));
306
+	DBGC ( colour, "WRAP %s device", efi_handle_name ( handle ) );
307
+	DBGC ( colour, " %s\n", efi_handle_name ( loaded.image->DeviceHandle ));
308
+	DBGC ( colour, "WRAP %s file", efi_handle_name ( handle ) );
309
+	DBGC ( colour, " %s\n", efi_devpath_text ( loaded.image->FilePath ) );
315 310
 
316 311
 	/* Close loaded image protocol */
317 312
 	bs->CloseProtocol ( handle, &efi_loaded_image_protocol_guid,

Завантаження…
Відмінити
Зберегти