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