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