]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.h
Update to support to produce Component Name and & Component Name 2 protocol based...
[mirror_edk2.git] / IntelFrameworkModulePkg / Bus / Isa / IsaFloppyDxe / IsaFloppy.h
1 /**@file
2 Include for ISA Floppy Driver
3 Define the data structure and so on
4
5 Copyright (c) 2006 - 2007, Intel Corporation.<BR>
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _ISA_FLOPPY_H
17 #define _ISA_FLOPPY_H
18
19 #include <PiDxe.h>
20 #include <FrameworkPei.h>
21
22 #include <Protocol/BlockIo.h>
23 #include <Protocol/IsaIo.h>
24 #include <Protocol/DevicePath.h>
25
26 #include <Library/TimerLib.h>
27 #include <Library/DebugLib.h>
28 #include <Library/UefiDriverEntryPoint.h>
29 #include <Library/BaseLib.h>
30 #include <Library/UefiLib.h>
31 #include <Library/BaseMemoryLib.h>
32 #include <Library/MemoryAllocationLib.h>
33 #include <Library/UefiBootServicesTableLib.h>
34 #include <Library/ReportStatusCodeLib.h>
35 //
36 // Driver Binding Externs
37 //
38 extern EFI_DRIVER_BINDING_PROTOCOL gFdcControllerDriver;
39 extern EFI_COMPONENT_NAME_PROTOCOL gIsaFloppyComponentName;
40 extern EFI_COMPONENT_NAME2_PROTOCOL gIsaFloppyComponentName2;
41
42 //
43 // define some value
44 //
45 #define STALL_1_SECOND 1000000
46 #define STALL_1_MSECOND 1000
47
48 #define DATA_IN 1
49 #define DATA_OUT 0
50 #define READ 0
51 #define WRITE 1
52
53 //
54 // Internal Data Structures
55 //
56 #define FDC_BLK_IO_DEV_SIGNATURE EFI_SIGNATURE_32 ('F', 'B', 'I', 'O')
57 #define FLOPPY_CONTROLLER_CONTEXT_SIGNATURE EFI_SIGNATURE_32 ('F', 'D', 'C', 'C')
58
59 typedef enum {
60 FDC_DISK0 = 0,
61 FDC_DISK1 = 1,
62 FDC_MAX_DISK= 2
63 } EFI_FDC_DISK;
64
65 typedef struct {
66 UINT32 Signature;
67 LIST_ENTRY Link;
68 BOOLEAN FddResetPerformed;
69 EFI_STATUS FddResetStatus;
70 BOOLEAN NeedRecalibrate;
71 UINT8 NumberOfDrive;
72 UINT16 BaseAddress;
73 } FLOPPY_CONTROLLER_CONTEXT;
74
75 typedef struct {
76 UINTN Signature;
77 EFI_HANDLE Handle;
78 EFI_BLOCK_IO_PROTOCOL BlkIo;
79 EFI_BLOCK_IO_MEDIA BlkMedia;
80
81 EFI_ISA_IO_PROTOCOL *IsaIo;
82
83 UINT16 BaseAddress;
84
85 EFI_FDC_DISK Disk;
86 UINT8 PresentCylinderNumber;
87 UINT8 *Cache;
88
89 EFI_EVENT Event;
90 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
91 FLOPPY_CONTROLLER_CONTEXT *ControllerState;
92
93 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
94 } FDC_BLK_IO_DEV;
95
96 #include "ComponentName.h"
97
98 #define FDD_BLK_IO_FROM_THIS(a) CR (a, FDC_BLK_IO_DEV, BlkIo, FDC_BLK_IO_DEV_SIGNATURE)
99 #define FLOPPY_CONTROLLER_FROM_LIST_ENTRY(a) \
100 CR (a, \
101 FLOPPY_CONTROLLER_CONTEXT, \
102 Link, \
103 FLOPPY_CONTROLLER_CONTEXT_SIGNATURE \
104 )
105
106 #define DISK_1440K_EOT 0x12
107 #define DISK_1440K_GPL 0x1b
108 #define DISK_1440K_DTL 0xff
109 #define DISK_1440K_NUMBER 0x02
110 #define DISK_1440K_MAXTRACKNUM 0x4f
111 #define DISK_1440K_BYTEPERSECTOR 512
112
113 typedef struct {
114 UINT8 CommandCode;
115 UINT8 DiskHeadSel;
116 UINT8 Cylinder;
117 UINT8 Head;
118 UINT8 Sector;
119 UINT8 Number;
120 UINT8 EndOfTrack;
121 UINT8 GapLength;
122 UINT8 DataLength;
123 } FDD_COMMAND_PACKET1;
124
125 typedef struct {
126 UINT8 CommandCode;
127 UINT8 DiskHeadSel;
128 } FDD_COMMAND_PACKET2;
129
130 typedef struct {
131 UINT8 CommandCode;
132 UINT8 SrtHut;
133 UINT8 HltNd;
134 } FDD_SPECIFY_CMD;
135
136 typedef struct {
137 UINT8 CommandCode;
138 UINT8 DiskHeadSel;
139 UINT8 NewCylinder;
140 } FDD_SEEK_CMD;
141
142 typedef struct {
143 UINT8 CommandCode;
144 UINT8 DiskHeadSel;
145 UINT8 Cylinder;
146 UINT8 Head;
147 UINT8 Sector;
148 UINT8 EndOfTrack;
149 UINT8 GapLength;
150 UINT8 ScanTestPause;
151 } FDD_SCAN_CMD;
152
153 typedef struct {
154 UINT8 Status0;
155 UINT8 Status1;
156 UINT8 Status2;
157 UINT8 C;
158 UINT8 H;
159 UINT8 S;
160 UINT8 Number;
161 } FDD_RESULT_PACKET;
162
163 //
164 // FDC Registers
165 //
166 //
167 // 0x3F2 Digital Output Register
168 //
169 #define FDC_REGISTER_DOR 2
170
171 //
172 // 0x3F4 Main Status Register
173 //
174 #define FDC_REGISTER_MSR 4
175
176 //
177 // 0x3F5 Data Register
178 //
179 #define FDC_REGISTER_DTR 5
180
181 //
182 // 0x3F7 Configuration Control Register(data rate select)
183 //
184 #define FDC_REGISTER_CCR 7
185
186 //
187 // 0x3F7 Digital Input Register(diskchange)
188 //
189 #define FDC_REGISTER_DIR 7
190
191
192
193 //
194 // FDC Register Bit Definitions
195 //
196 //
197 // Digital Out Register(WO)
198 //
199 //
200 // Select Drive: 0=A 1=B
201 //
202 #define SELECT_DRV BIT0
203
204 //
205 // Reset FDC
206 //
207 #define RESET_FDC BIT2
208
209 //
210 // Enable Int & DMA
211 //
212 #define INT_DMA_ENABLE BIT3
213
214 //
215 // Turn On Drive A Motor
216 //
217 #define DRVA_MOTOR_ON BIT4
218
219 //
220 // Turn On Drive B Motor
221 //
222 #define DRVB_MOTOR_ON BIT5
223
224 //
225 // Main Status Register(RO)
226 //
227 //
228 // Drive A Busy
229 //
230 #define MSR_DAB BIT0
231
232 //
233 // Drive B Busy
234 //
235 #define MSR_DBB BIT1
236
237 //
238 // FDC Busy
239 //
240 #define MSR_CB BIT4
241
242 //
243 // Non-DMA Mode
244 //
245 #define MSR_NDM BIT5
246
247 //
248 // Data Input/Output
249 //
250 #define MSR_DIO BIT6
251
252 //
253 // Request For Master
254 //
255 #define MSR_RQM BIT7
256
257 //
258 // Configuration Control Register(WO)
259 //
260 //
261 // Data Rate select
262 //
263 #define CCR_DRC (BIT0 | BIT1)
264
265 //
266 // Digital Input Register(RO)
267 //
268 //
269 // Disk change line
270 //
271 #define DIR_DCL BIT7
272 //
273 // #define CCR_DCL BIT7 // Diskette change
274 //
275 // 500K
276 //
277 #define DRC_500KBS 0x0
278
279 //
280 // 300K
281 //
282 #define DRC_300KBS 0x01
283
284 //
285 // 250K
286 //
287 #define DRC_250KBS 0x02
288
289 //
290 // FDC Command Code
291 //
292 #define READ_DATA_CMD 0x06
293 #define WRITE_DATA_CMD 0x05
294 #define WRITE_DEL_DATA_CMD 0x09
295 #define READ_DEL_DATA_CMD 0x0C
296 #define READ_TRACK_CMD 0x02
297 #define READ_ID_CMD 0x0A
298 #define FORMAT_TRACK_CMD 0x0D
299 #define SCAN_EQU_CMD 0x11
300 #define SCAN_LOW_EQU_CMD 0x19
301 #define SCAN_HIGH_EQU_CMD 0x1D
302 #define SEEK_CMD 0x0F
303 #define RECALIBRATE_CMD 0x07
304 #define SENSE_INT_STATUS_CMD 0x08
305 #define SPECIFY_CMD 0x03
306 #define SENSE_DRV_STATUS_CMD 0x04
307
308 //
309 // CMD_MT: Multi_Track Selector
310 // when set , this flag selects the multi-track operating mode.
311 // In this mode, the FDC treats a complete cylinder under head0 and 1
312 // as a single track
313 //
314 #define CMD_MT BIT7
315
316 //
317 // CMD_MFM: MFM/FM Mode Selector
318 // A one selects the double density(MFM) mode
319 // A zero selects single density (FM) mode
320 //
321 #define CMD_MFM BIT6
322
323 //
324 // CMD_SK: Skip Flag
325 // When set to 1, sectors containing a deleted data address mark will
326 // automatically be skipped during the execution of Read Data.
327 // When set to 0, the sector is read or written the same as the read and
328 // write commands.
329 //
330 #define CMD_SK BIT5
331
332 //
333 // FDC Status Register Bit Definitions
334 //
335 //
336 // Status Register 0
337 //
338 //
339 // Interrupt Code
340 //
341 #define STS0_IC (BIT7 | BIT6)
342
343 //
344 // Seek End: the FDC completed a seek or recalibrate command
345 //
346 #define STS0_SE BIT5
347
348 //
349 // Equipment Check
350 //
351 #define STS0_EC BIT4
352
353 //
354 // Not Ready(unused), this bit is always 0
355 //
356 #define STS0_NR BIT3
357
358 //
359 // Head Address: the current head address
360 //
361 #define STS0_HA BIT2
362
363 //
364 // STS0_US1 & STS0_US0: Drive Select(the current selected drive)
365 //
366 //
367 // Unit Select1
368 //
369 #define STS0_US1 BIT1
370
371 //
372 // Unit Select0
373 //
374 #define STS0_US0 BIT0
375
376 //
377 // Status Register 1
378 //
379 //
380 // End of Cylinder
381 //
382 #define STS1_EN BIT7
383
384 //
385 // BIT6 is unused
386 //
387 //
388 // Data Error: The FDC detected a CRC error in either the ID field or
389 // data field of a sector
390 //
391 #define STS1_DE BIT5
392
393 //
394 // Overrun/Underrun: Becomes set if FDC does not receive CPU or DMA service
395 // within the required time interval
396 //
397 #define STS1_OR BIT4
398
399 //
400 // BIT3 is unused
401 //
402 //
403 // No data
404 //
405 #define STS1_ND BIT2
406
407 //
408 // Not Writable
409 //
410 #define STS1_NW BIT1
411
412 //
413 // Missing Address Mark
414 //
415 #define STS1_MA BIT0
416
417 //
418 // Control Mark
419 //
420 #define STS2_CM BIT6
421
422 //
423 // Data Error in Data Field: The FDC detected a CRC error in the data field
424 //
425 #define STS2_DD BIT5
426
427 //
428 // Wrong Cylinder: The track address from sector ID field is different from
429 // the track address maintained inside FDC
430 //
431 #define STS2_WC BIT4
432
433 //
434 // Bad Cylinder
435 //
436 #define STS2_BC BIT1
437
438 //
439 // Missing Address Mark in Data Field
440 //
441 #define STS2_MD BIT0
442
443 //
444 // Write Protected
445 //
446 #define STS3_WP BIT6
447
448 //
449 // Track 0
450 //
451 #define STS3_T0 BIT4
452
453 //
454 // Head Address
455 //
456 #define STS3_HD BIT2
457
458 //
459 // STS3_US1 & STS3_US0 : Drive Select
460 //
461 #define STS3_US1 BIT1
462 #define STS3_US0 BIT0
463
464 //
465 // Status Register 0 Interrupt Code Description
466 //
467 //
468 // Normal Termination of Command
469 //
470 #define IC_NT 0x0
471
472 //
473 // Abnormal Termination of Command
474 //
475 #define IC_AT 0x40
476
477 //
478 // Invalid Command
479 //
480 #define IC_IC 0x80
481
482 //
483 // Abnormal Termination caused by Polling
484 //
485 #define IC_ATRC 0xC0
486
487 //
488 // Global Variables
489 //
490 extern EFI_DRIVER_BINDING_PROTOCOL gFdcControllerDriver;
491
492 //
493 // EFI Driver Binding Protocol Functions
494 //
495 EFI_STATUS
496 EFIAPI
497 FdcControllerDriverSupported (
498 IN EFI_DRIVER_BINDING_PROTOCOL *This,
499 IN EFI_HANDLE Controller,
500 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
501 )
502 /*++
503
504 Routine Description:
505
506 GC_TODO: Add function description
507
508 Arguments:
509
510 This - GC_TODO: add argument description
511 Controller - GC_TODO: add argument description
512 RemainingDevicePath - GC_TODO: add argument description
513
514 Returns:
515
516 GC_TODO: add return values
517
518 --*/
519 ;
520
521 EFI_STATUS
522 EFIAPI
523 FdcControllerDriverStart (
524 IN EFI_DRIVER_BINDING_PROTOCOL *This,
525 IN EFI_HANDLE Controller,
526 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
527 )
528 /*++
529
530 Routine Description:
531
532 GC_TODO: Add function description
533
534 Arguments:
535
536 This - GC_TODO: add argument description
537 Controller - GC_TODO: add argument description
538 RemainingDevicePath - GC_TODO: add argument description
539
540 Returns:
541
542 GC_TODO: add return values
543
544 --*/
545 ;
546
547 EFI_STATUS
548 EFIAPI
549 FdcControllerDriverStop (
550 IN EFI_DRIVER_BINDING_PROTOCOL *This,
551 IN EFI_HANDLE Controller,
552 IN UINTN NumberOfChildren,
553 IN EFI_HANDLE *ChildHandleBuffer
554 )
555 /*++
556
557 Routine Description:
558
559 GC_TODO: Add function description
560
561 Arguments:
562
563 This - GC_TODO: add argument description
564 Controller - GC_TODO: add argument description
565 NumberOfChildren - GC_TODO: add argument description
566 ChildHandleBuffer - GC_TODO: add argument description
567
568 Returns:
569
570 GC_TODO: add return values
571
572 --*/
573 ;
574
575 //
576 // EFI Block I/O Protocol Functions
577 //
578 EFI_STATUS
579 EFIAPI
580 FdcReset (
581 IN EFI_BLOCK_IO_PROTOCOL *This,
582 IN BOOLEAN ExtendedVerification
583 )
584 /*++
585
586 Routine Description:
587
588 GC_TODO: Add function description
589
590 Arguments:
591
592 This - GC_TODO: add argument description
593 ExtendedVerification - GC_TODO: add argument description
594
595 Returns:
596
597 GC_TODO: add return values
598
599 --*/
600 ;
601
602 EFI_STATUS
603 EFIAPI
604 FddFlushBlocks (
605 IN EFI_BLOCK_IO_PROTOCOL *This
606 )
607 /*++
608
609 Routine Description:
610
611 GC_TODO: Add function description
612
613 Arguments:
614
615 This - GC_TODO: add argument description
616
617 Returns:
618
619 GC_TODO: add return values
620
621 --*/
622 ;
623
624 EFI_STATUS
625 EFIAPI
626 FddReadBlocks (
627 IN EFI_BLOCK_IO_PROTOCOL *This,
628 IN UINT32 MediaId,
629 IN EFI_LBA LBA,
630 IN UINTN BufferSize,
631 OUT VOID *Buffer
632 )
633 /*++
634
635 Routine Description:
636
637 GC_TODO: Add function description
638
639 Arguments:
640
641 This - GC_TODO: add argument description
642 MediaId - GC_TODO: add argument description
643 LBA - GC_TODO: add argument description
644 BufferSize - GC_TODO: add argument description
645 Buffer - GC_TODO: add argument description
646
647 Returns:
648
649 GC_TODO: add return values
650
651 --*/
652 ;
653
654 EFI_STATUS
655 EFIAPI
656 FddWriteBlocks (
657 IN EFI_BLOCK_IO_PROTOCOL *This,
658 IN UINT32 MediaId,
659 IN EFI_LBA LBA,
660 IN UINTN BufferSize,
661 IN VOID *Buffer
662 )
663 /*++
664
665 Routine Description:
666
667 GC_TODO: Add function description
668
669 Arguments:
670
671 This - GC_TODO: add argument description
672 MediaId - GC_TODO: add argument description
673 LBA - GC_TODO: add argument description
674 BufferSize - GC_TODO: add argument description
675 Buffer - GC_TODO: add argument description
676
677 Returns:
678
679 GC_TODO: add return values
680
681 --*/
682 ;
683
684 //
685 // Prototypes of internal functions
686 //
687 EFI_STATUS
688 DiscoverFddDevice (
689 IN FDC_BLK_IO_DEV *FdcDev
690 )
691 /*++
692
693 Routine Description:
694
695 GC_TODO: Add function description
696
697 Arguments:
698
699 FdcDev - GC_TODO: add argument description
700
701 Returns:
702
703 GC_TODO: add return values
704
705 --*/
706 ;
707
708 EFI_STATUS
709 FddIdentify (
710 IN FDC_BLK_IO_DEV *FdcDev
711 )
712 /*++
713
714 Routine Description:
715
716 GC_TODO: Add function description
717
718 Arguments:
719
720 FdcDev - GC_TODO: add argument description
721
722 Returns:
723
724 GC_TODO: add return values
725
726 --*/
727 ;
728
729 EFI_STATUS
730 FddReset (
731 IN FDC_BLK_IO_DEV *FdcDev
732 )
733 /*++
734
735 Routine Description:
736
737 GC_TODO: Add function description
738
739 Arguments:
740
741 FdcDev - GC_TODO: add argument description
742
743 Returns:
744
745 GC_TODO: add return values
746
747 --*/
748 ;
749
750 EFI_STATUS
751 MotorOn (
752 IN FDC_BLK_IO_DEV *FdcDev
753 )
754 /*++
755
756 Routine Description:
757
758 GC_TODO: Add function description
759
760 Arguments:
761
762 FdcDev - GC_TODO: add argument description
763
764 Returns:
765
766 GC_TODO: add return values
767
768 --*/
769 ;
770
771 EFI_STATUS
772 MotorOff (
773 IN FDC_BLK_IO_DEV *FdcDev
774 )
775 /*++
776
777 Routine Description:
778
779 GC_TODO: Add function description
780
781 Arguments:
782
783 FdcDev - GC_TODO: add argument description
784
785 Returns:
786
787 GC_TODO: add return values
788
789 --*/
790 ;
791
792 EFI_STATUS
793 DisketChanged (
794 IN FDC_BLK_IO_DEV *FdcDev
795 )
796 /*++
797
798 Routine Description:
799
800 GC_TODO: Add function description
801
802 Arguments:
803
804 FdcDev - GC_TODO: add argument description
805
806 Returns:
807
808 GC_TODO: add return values
809
810 --*/
811 ;
812
813 EFI_STATUS
814 Specify (
815 IN FDC_BLK_IO_DEV *FdcDev
816 )
817 /*++
818
819 Routine Description:
820
821 GC_TODO: Add function description
822
823 Arguments:
824
825 FdcDev - GC_TODO: add argument description
826
827 Returns:
828
829 GC_TODO: add return values
830
831 --*/
832 ;
833
834 EFI_STATUS
835 Recalibrate (
836 IN FDC_BLK_IO_DEV *FdcDev
837 )
838 /*++
839
840 Routine Description:
841
842 GC_TODO: Add function description
843
844 Arguments:
845
846 FdcDev - GC_TODO: add argument description
847
848 Returns:
849
850 GC_TODO: add return values
851
852 --*/
853 ;
854
855 EFI_STATUS
856 Seek (
857 IN FDC_BLK_IO_DEV *FdcDev,
858 IN EFI_LBA Lba
859 )
860 /*++
861
862 Routine Description:
863
864 GC_TODO: Add function description
865
866 Arguments:
867
868 FdcDev - GC_TODO: add argument description
869 Lba - GC_TODO: add argument description
870
871 Returns:
872
873 GC_TODO: add return values
874
875 --*/
876 ;
877
878 EFI_STATUS
879 SenseIntStatus (
880 IN FDC_BLK_IO_DEV *FdcDev,
881 IN OUT UINT8 *StatusRegister0,
882 IN OUT UINT8 *PresentCylinderNumber
883 )
884 /*++
885
886 Routine Description:
887
888 GC_TODO: Add function description
889
890 Arguments:
891
892 FdcDev - GC_TODO: add argument description
893 StatusRegister0 - GC_TODO: add argument description
894 PresentCylinderNumber - GC_TODO: add argument description
895
896 Returns:
897
898 GC_TODO: add return values
899
900 --*/
901 ;
902
903 EFI_STATUS
904 SenseDrvStatus (
905 IN FDC_BLK_IO_DEV *FdcDev,
906 IN EFI_LBA Lba
907 )
908 /*++
909
910 Routine Description:
911
912 GC_TODO: Add function description
913
914 Arguments:
915
916 FdcDev - GC_TODO: add argument description
917 Lba - GC_TODO: add argument description
918
919 Returns:
920
921 GC_TODO: add return values
922
923 --*/
924 ;
925
926 EFI_STATUS
927 DetectMedia (
928 IN FDC_BLK_IO_DEV *FdcDev
929 )
930 /*++
931
932 Routine Description:
933
934 GC_TODO: Add function description
935
936 Arguments:
937
938 FdcDev - GC_TODO: add argument description
939
940 Returns:
941
942 GC_TODO: add return values
943
944 --*/
945 ;
946
947 EFI_STATUS
948 Setup (
949 IN FDC_BLK_IO_DEV *FdcDev
950 )
951 /*++
952
953 Routine Description:
954
955 GC_TODO: Add function description
956
957 Arguments:
958
959 FdcDev - GC_TODO: add argument description
960
961 Returns:
962
963 GC_TODO: add return values
964
965 --*/
966 ;
967
968 EFI_STATUS
969 ReadWriteDataSector (
970 IN FDC_BLK_IO_DEV *FdcDev,
971 IN VOID *HostAddress,
972 IN EFI_LBA Lba,
973 IN UINTN NumberOfBlocks,
974 IN BOOLEAN Read
975 )
976 /*++
977
978 Routine Description:
979
980 GC_TODO: Add function description
981
982 Arguments:
983
984 FdcDev - GC_TODO: add argument description
985 HostAddress - GC_TODO: add argument description
986 Lba - GC_TODO: add argument description
987 NumberOfBlocks - GC_TODO: add argument description
988 Read - GC_TODO: add argument description
989
990 Returns:
991
992 GC_TODO: add return values
993
994 --*/
995 ;
996
997 VOID
998 FillPara (
999 IN FDC_BLK_IO_DEV *FdcDev,
1000 IN EFI_LBA Lba,
1001 IN FDD_COMMAND_PACKET1 *Command
1002 )
1003 /*++
1004
1005 Routine Description:
1006
1007 GC_TODO: Add function description
1008
1009 Arguments:
1010
1011 FdcDev - GC_TODO: add argument description
1012 Lba - GC_TODO: add argument description
1013 Command - GC_TODO: add argument description
1014
1015 Returns:
1016
1017 GC_TODO: add return values
1018
1019 --*/
1020 ;
1021
1022 EFI_STATUS
1023 DataInByte (
1024 IN FDC_BLK_IO_DEV *FdcDev,
1025 IN UINT8 *Pointer
1026 )
1027 /*++
1028
1029 Routine Description:
1030
1031 GC_TODO: Add function description
1032
1033 Arguments:
1034
1035 FdcDev - GC_TODO: add argument description
1036 Pointer - GC_TODO: add argument description
1037
1038 Returns:
1039
1040 GC_TODO: add return values
1041
1042 --*/
1043 ;
1044
1045 EFI_STATUS
1046 DataOutByte (
1047 IN FDC_BLK_IO_DEV *FdcDev,
1048 IN UINT8 *Pointer
1049 )
1050 /*++
1051
1052 Routine Description:
1053
1054 GC_TODO: Add function description
1055
1056 Arguments:
1057
1058 FdcDev - GC_TODO: add argument description
1059 Pointer - GC_TODO: add argument description
1060
1061 Returns:
1062
1063 GC_TODO: add return values
1064
1065 --*/
1066 ;
1067
1068 EFI_STATUS
1069 FddWaitForBSYClear (
1070 IN FDC_BLK_IO_DEV *FdcDev,
1071 IN UINTN TimeoutInSeconds
1072 )
1073 /*++
1074
1075 Routine Description:
1076
1077 GC_TODO: Add function description
1078
1079 Arguments:
1080
1081 FdcDev - GC_TODO: add argument description
1082 TimeoutInSeconds - GC_TODO: add argument description
1083
1084 Returns:
1085
1086 GC_TODO: add return values
1087
1088 --*/
1089 ;
1090
1091 EFI_STATUS
1092 FddDRQReady (
1093 IN FDC_BLK_IO_DEV *FdcDev,
1094 IN BOOLEAN Dio,
1095 IN UINTN TimeoutInSeconds
1096 )
1097 /*++
1098
1099 Routine Description:
1100
1101 GC_TODO: Add function description
1102
1103 Arguments:
1104
1105 FdcDev - GC_TODO: add argument description
1106 Dio - GC_TODO: add argument description
1107 TimeoutInSeconds - GC_TODO: add argument description
1108
1109 Returns:
1110
1111 GC_TODO: add return values
1112
1113 --*/
1114 ;
1115
1116 EFI_STATUS
1117 CheckResult (
1118 IN FDD_RESULT_PACKET *Result,
1119 IN OUT FDC_BLK_IO_DEV *FdcDev
1120 )
1121 /*++
1122
1123 Routine Description:
1124
1125 GC_TODO: Add function description
1126
1127 Arguments:
1128
1129 Result - GC_TODO: add argument description
1130 FdcDev - GC_TODO: add argument description
1131
1132 Returns:
1133
1134 GC_TODO: add return values
1135
1136 --*/
1137 ;
1138
1139 EFI_STATUS
1140 CheckStatus3 (
1141 IN UINT8 StatusRegister3
1142 )
1143 /*++
1144
1145 Routine Description:
1146
1147 GC_TODO: Add function description
1148
1149 Arguments:
1150
1151 StatusRegister3 - GC_TODO: add argument description
1152
1153 Returns:
1154
1155 GC_TODO: add return values
1156
1157 --*/
1158 ;
1159
1160 UINTN
1161 GetTransferBlockCount (
1162 IN FDC_BLK_IO_DEV *FdcDev,
1163 IN EFI_LBA LBA,
1164 IN UINTN NumberOfBlocks
1165 )
1166 /*++
1167
1168 Routine Description:
1169
1170 GC_TODO: Add function description
1171
1172 Arguments:
1173
1174 FdcDev - GC_TODO: add argument description
1175 LBA - GC_TODO: add argument description
1176 NumberOfBlocks - GC_TODO: add argument description
1177
1178 Returns:
1179
1180 GC_TODO: add return values
1181
1182 --*/
1183 ;
1184
1185 VOID
1186 EFIAPI
1187 FddTimerProc (
1188 IN EFI_EVENT Event,
1189 IN VOID *Context
1190 )
1191 /*++
1192
1193 Routine Description:
1194
1195 GC_TODO: Add function description
1196
1197 Arguments:
1198
1199 Event - GC_TODO: add argument description
1200 Context - GC_TODO: add argument description
1201
1202 Returns:
1203
1204 GC_TODO: add return values
1205
1206 --*/
1207 ;
1208
1209 UINT8
1210 FdcReadPort (
1211 IN FDC_BLK_IO_DEV *FdcDev,
1212 IN UINT32 Offset
1213 )
1214 /*++
1215
1216 Routine Description:
1217
1218 GC_TODO: Add function description
1219
1220 Arguments:
1221
1222 FdcDev - GC_TODO: add argument description
1223 Offset - GC_TODO: add argument description
1224
1225 Returns:
1226
1227 GC_TODO: add return values
1228
1229 --*/
1230 ;
1231
1232 VOID
1233 FdcWritePort (
1234 IN FDC_BLK_IO_DEV *FdcDev,
1235 IN UINT32 Offset,
1236 IN UINT8 Data
1237 )
1238 /*++
1239
1240 Routine Description:
1241
1242 GC_TODO: Add function description
1243
1244 Arguments:
1245
1246 FdcDev - GC_TODO: add argument description
1247 Offset - GC_TODO: add argument description
1248 Data - GC_TODO: add argument description
1249
1250 Returns:
1251
1252 GC_TODO: add return values
1253
1254 --*/
1255 ;
1256
1257 EFI_STATUS
1258 FddReadWriteBlocks (
1259 IN EFI_BLOCK_IO_PROTOCOL *This,
1260 IN UINT32 MediaId,
1261 IN EFI_LBA LBA,
1262 IN UINTN BufferSize,
1263 IN BOOLEAN Operation,
1264 OUT VOID *Buffer
1265 )
1266 /*++
1267
1268 Routine Description:
1269
1270 GC_TODO: Add function description
1271
1272 Arguments:
1273
1274 This - GC_TODO: add argument description
1275 MediaId - GC_TODO: add argument description
1276 LBA - GC_TODO: add argument description
1277 BufferSize - GC_TODO: add argument description
1278 Operation - GC_TODO: add argument description
1279 Buffer - GC_TODO: add argument description
1280
1281 Returns:
1282
1283 GC_TODO: add return values
1284
1285 --*/
1286 ;
1287
1288 VOID
1289 FdcFreeCache (
1290 IN FDC_BLK_IO_DEV *FdcDev
1291 )
1292 /*++
1293
1294 Routine Description:
1295
1296 GC_TODO: Add function description
1297
1298 Arguments:
1299
1300 FdcDev - GC_TODO: add argument description
1301
1302 Returns:
1303
1304 GC_TODO: add return values
1305
1306 --*/
1307 ;
1308
1309 #endif