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