Browse Source

[efi] Dump details of any calls to our dummy block and disk I/O protocols

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 years ago
parent
commit
ec7c331ca3
1 changed files with 33 additions and 15 deletions
  1. 33
    15
      src/interface/efi/efi_file.c

+ 33
- 15
src/interface/efi/efi_file.c View File

477
 efi_file_open_volume ( EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *filesystem __unused,
477
 efi_file_open_volume ( EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *filesystem __unused,
478
 		       EFI_FILE_PROTOCOL **file ) {
478
 		       EFI_FILE_PROTOCOL **file ) {
479
 
479
 
480
+	DBGC ( &efi_file_root, "EFIFILE open volume\n" );
480
 	*file = &efi_file_root.file;
481
 	*file = &efi_file_root.file;
481
 	return 0;
482
 	return 0;
482
 }
483
 }
489
 
490
 
490
 /** Dummy block I/O reset */
491
 /** Dummy block I/O reset */
491
 static EFI_STATUS EFIAPI
492
 static EFI_STATUS EFIAPI
492
-efi_block_io_reset ( EFI_BLOCK_IO_PROTOCOL *this __unused,
493
-		     BOOLEAN extended __unused ) {
493
+efi_block_io_reset ( EFI_BLOCK_IO_PROTOCOL *this __unused, BOOLEAN extended ) {
494
+
495
+	DBGC ( &efi_file_root, "EFIFILE block %sreset\n",
496
+	       ( extended ? "extended " : "" ) );
494
 	return 0;
497
 	return 0;
495
 }
498
 }
496
 
499
 
497
 /** Dummy block I/O read */
500
 /** Dummy block I/O read */
498
 static EFI_STATUS EFIAPI
501
 static EFI_STATUS EFIAPI
499
-efi_block_io_read_blocks ( EFI_BLOCK_IO_PROTOCOL *this __unused,
500
-			   UINT32 MediaId __unused, EFI_LBA lba __unused,
501
-			   UINTN len __unused, VOID *data __unused ) {
502
+efi_block_io_read_blocks ( EFI_BLOCK_IO_PROTOCOL *this __unused, UINT32 MediaId,
503
+			   EFI_LBA lba, UINTN len, VOID *data ) {
504
+
505
+	DBGC ( &efi_file_root, "EFIFILE block read ID %#08x LBA %#08llx -> "
506
+	       "%p+%zx\n", MediaId, ( ( unsigned long long ) lba ),
507
+	       data, ( ( size_t ) len ) );
502
 	return EFI_NO_MEDIA;
508
 	return EFI_NO_MEDIA;
503
 }
509
 }
504
 
510
 
505
 /** Dummy block I/O write */
511
 /** Dummy block I/O write */
506
 static EFI_STATUS EFIAPI
512
 static EFI_STATUS EFIAPI
507
 efi_block_io_write_blocks ( EFI_BLOCK_IO_PROTOCOL *this __unused,
513
 efi_block_io_write_blocks ( EFI_BLOCK_IO_PROTOCOL *this __unused,
508
-			    UINT32 MediaId __unused, EFI_LBA lba __unused,
509
-			    UINTN len __unused, VOID *data __unused ) {
514
+			    UINT32 MediaId, EFI_LBA lba, UINTN len,
515
+			    VOID *data ) {
516
+
517
+	DBGC ( &efi_file_root, "EFIFILE block write ID %#08x LBA %#08llx <- "
518
+	       "%p+%zx\n", MediaId, ( ( unsigned long long ) lba ),
519
+	       data, ( ( size_t ) len ) );
510
 	return EFI_NO_MEDIA;
520
 	return EFI_NO_MEDIA;
511
 }
521
 }
512
 
522
 
513
 /** Dummy block I/O flush */
523
 /** Dummy block I/O flush */
514
 static EFI_STATUS EFIAPI
524
 static EFI_STATUS EFIAPI
515
 efi_block_io_flush_blocks ( EFI_BLOCK_IO_PROTOCOL *this __unused ) {
525
 efi_block_io_flush_blocks ( EFI_BLOCK_IO_PROTOCOL *this __unused ) {
526
+
527
+	DBGC ( &efi_file_root, "EFIFILE block flush\n" );
516
 	return 0;
528
 	return 0;
517
 }
529
 }
518
 
530
 
519
 /** Dummy block I/O media */
531
 /** Dummy block I/O media */
520
 static EFI_BLOCK_IO_MEDIA efi_block_io_media = {
532
 static EFI_BLOCK_IO_MEDIA efi_block_io_media = {
521
 	.MediaId = EFI_MEDIA_ID_MAGIC,
533
 	.MediaId = EFI_MEDIA_ID_MAGIC,
522
-	.MediaPresent = 1,
523
-	.ReadOnly = 1,
534
+	.MediaPresent = TRUE,
535
+	.ReadOnly = TRUE,
524
 	.BlockSize = 1,
536
 	.BlockSize = 1,
525
 };
537
 };
526
 
538
 
536
 
548
 
537
 /** Dummy disk I/O read */
549
 /** Dummy disk I/O read */
538
 static EFI_STATUS EFIAPI
550
 static EFI_STATUS EFIAPI
539
-efi_disk_io_read_disk ( EFI_DISK_IO_PROTOCOL *this __unused,
540
-			UINT32 MediaId __unused, UINT64 offset __unused,
541
-			UINTN len __unused, VOID *data __unused ) {
551
+efi_disk_io_read_disk ( EFI_DISK_IO_PROTOCOL *this __unused, UINT32 MediaId,
552
+			UINT64 offset, UINTN len, VOID *data ) {
553
+
554
+	DBGC ( &efi_file_root, "EFIFILE disk read ID %#08x offset %#08llx -> "
555
+	       "%p+%zx\n", MediaId, ( ( unsigned long long ) offset ),
556
+	       data, ( ( size_t ) len ) );
542
 	return EFI_NO_MEDIA;
557
 	return EFI_NO_MEDIA;
543
 }
558
 }
544
 
559
 
545
 /** Dummy disk I/O write */
560
 /** Dummy disk I/O write */
546
 static EFI_STATUS EFIAPI
561
 static EFI_STATUS EFIAPI
547
-efi_disk_io_write_disk ( EFI_DISK_IO_PROTOCOL *this __unused,
548
-			 UINT32 MediaId __unused, UINT64 offset __unused,
549
-			 UINTN len __unused, VOID *data __unused ) {
562
+efi_disk_io_write_disk ( EFI_DISK_IO_PROTOCOL *this __unused, UINT32 MediaId,
563
+			 UINT64 offset, UINTN len, VOID *data ) {
564
+
565
+	DBGC ( &efi_file_root, "EFIFILE disk write ID %#08x offset %#08llx <- "
566
+	       "%p+%zx\n", MediaId, ( ( unsigned long long ) offset ),
567
+	       data, ( ( size_t ) len ) );
550
 	return EFI_NO_MEDIA;
568
 	return EFI_NO_MEDIA;
551
 }
569
 }
552
 
570
 

Loading…
Cancel
Save