2 * Acess2 IDE Harddisk Driver
12 #define MAX_ATA_DISKS 4
13 #define SECTOR_SIZE 512
14 #define MAX_DMA_SECTORS (0x1000 / SECTOR_SIZE)
16 #define IDE_PRI_BASE 0x1F0
17 #define IDE_SEC_BASE 0x170
19 #define IDE_PRDT_LAST 0x8000
22 \brief Commands to be sent to HDD_CMD
38 Uint8 BootCode[0x1BE];
41 Uint8 Unused1; // Also CHS Start
42 Uint16 StartHi; // Also CHS Start
44 Uint8 Unused2; // Also CHS Length
45 Uint16 LengthHi; // Also CHS Length
48 } __attribute__ ((packed)) Parts[4];
49 Uint16 BootFlag; // = 0xAA 55
50 } __attribute__ ((packed)) tMBR;
66 tATA_Partition *Partitions;
70 extern tATA_Disk gATA_Disks[];
73 extern void ATA_int_MakePartition(tATA_Partition *Part, int Disk, int Num, Uint64 Start, Uint64 Length);
74 extern int ATA_ReadDMA(Uint8 Disk, Uint64 Address, Uint Count, void *Buffer);
75 extern int ATA_WriteDMA(Uint8 Disk, Uint64 Address, Uint Count, void *Buffer);