More IDE clean-ups and properly implemented task file ownership, fixes OS/2 Warp 3.0 booting from IDE hard disks.
This commit is contained in:
@@ -36,9 +36,13 @@
|
||||
#define HDC_QUATERNARY_IRQ 10
|
||||
|
||||
enum {
|
||||
IDE_NONE = 0,
|
||||
IDE_HDD,
|
||||
IDE_ATAPI
|
||||
IDE_NONE = 0, /* Absent master or both. */
|
||||
IDE_HDD, /* Hard disk. */
|
||||
IDE_ATAPI, /* ATAPI device. */
|
||||
IDE_RESERVED, /* Reserved, do not use. */
|
||||
IDE_SHADOW, /* Shadow flag, do not assign on is own. */
|
||||
IDE_HDD_SHADOW, /* Shadow of a hard disk. */
|
||||
IDE_ATAPI_SHADOW /* Shadow of an ATAPI device. */
|
||||
};
|
||||
|
||||
typedef struct ide_tf_s {
|
||||
@@ -59,28 +63,26 @@ typedef struct ide_tf_s {
|
||||
uint8_t status;
|
||||
};
|
||||
uint8_t error;
|
||||
uint16_t pad;
|
||||
uint8_t sector;
|
||||
union {
|
||||
uint8_t drvsel;
|
||||
struct {
|
||||
uint8_t head :4;
|
||||
uint8_t pad :2;
|
||||
uint8_t lba :1;
|
||||
uint8_t pad0 :1;
|
||||
};
|
||||
};
|
||||
uint32_t pos;
|
||||
} ide_tf_t;
|
||||
|
||||
#ifdef _TIMER_H_
|
||||
typedef struct ide_s {
|
||||
#ifdef ANCIENT_CODE
|
||||
/* Task file. */
|
||||
uint8_t cylprecomp;
|
||||
uint8_t secount;
|
||||
uint16_t cylinder;
|
||||
uint8_t atastat;
|
||||
uint8_t error;
|
||||
uint16_t pad;
|
||||
uint32_t pos;
|
||||
#endif
|
||||
|
||||
/* The rest. */
|
||||
uint8_t selected;
|
||||
uint8_t command;
|
||||
uint8_t head;
|
||||
uint8_t sector;
|
||||
uint8_t pad;
|
||||
int type;
|
||||
int board;
|
||||
int irqstat;
|
||||
@@ -90,7 +92,6 @@ typedef struct ide_s {
|
||||
int hdd_num;
|
||||
int channel;
|
||||
int sector_pos;
|
||||
int lba;
|
||||
int reset;
|
||||
int mdma_mode;
|
||||
int do_initial_read;
|
||||
|
||||
Reference in New Issue
Block a user