|
@@ -477,6 +477,7 @@ static EFI_STATUS EFIAPI
|
477
|
477
|
efi_file_open_volume ( EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *filesystem __unused,
|
478
|
478
|
EFI_FILE_PROTOCOL **file ) {
|
479
|
479
|
|
|
480
|
+ DBGC ( &efi_file_root, "EFIFILE open volume\n" );
|
480
|
481
|
*file = &efi_file_root.file;
|
481
|
482
|
return 0;
|
482
|
483
|
}
|
|
@@ -489,38 +490,49 @@ static EFI_SIMPLE_FILE_SYSTEM_PROTOCOL efi_simple_file_system_protocol = {
|
489
|
490
|
|
490
|
491
|
/** Dummy block I/O reset */
|
491
|
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
|
497
|
return 0;
|
495
|
498
|
}
|
496
|
499
|
|
497
|
500
|
/** Dummy block I/O read */
|
498
|
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
|
508
|
return EFI_NO_MEDIA;
|
503
|
509
|
}
|
504
|
510
|
|
505
|
511
|
/** Dummy block I/O write */
|
506
|
512
|
static EFI_STATUS EFIAPI
|
507
|
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
|
520
|
return EFI_NO_MEDIA;
|
511
|
521
|
}
|
512
|
522
|
|
513
|
523
|
/** Dummy block I/O flush */
|
514
|
524
|
static EFI_STATUS EFIAPI
|
515
|
525
|
efi_block_io_flush_blocks ( EFI_BLOCK_IO_PROTOCOL *this __unused ) {
|
|
526
|
+
|
|
527
|
+ DBGC ( &efi_file_root, "EFIFILE block flush\n" );
|
516
|
528
|
return 0;
|
517
|
529
|
}
|
518
|
530
|
|
519
|
531
|
/** Dummy block I/O media */
|
520
|
532
|
static EFI_BLOCK_IO_MEDIA efi_block_io_media = {
|
521
|
533
|
.MediaId = EFI_MEDIA_ID_MAGIC,
|
522
|
|
- .MediaPresent = 1,
|
523
|
|
- .ReadOnly = 1,
|
|
534
|
+ .MediaPresent = TRUE,
|
|
535
|
+ .ReadOnly = TRUE,
|
524
|
536
|
.BlockSize = 1,
|
525
|
537
|
};
|
526
|
538
|
|
|
@@ -536,17 +548,23 @@ static EFI_BLOCK_IO_PROTOCOL efi_block_io_protocol = {
|
536
|
548
|
|
537
|
549
|
/** Dummy disk I/O read */
|
538
|
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
|
557
|
return EFI_NO_MEDIA;
|
543
|
558
|
}
|
544
|
559
|
|
545
|
560
|
/** Dummy disk I/O write */
|
546
|
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
|
568
|
return EFI_NO_MEDIA;
|
551
|
569
|
}
|
552
|
570
|
|