Support up to 4 ATA drives (primary and secondary bus)
This commit is contained in:
@ -32,7 +32,10 @@ void storedev_register_dev_entry(StoreDev *sd, int32_t sdtype) {
|
||||
if (sdtype == STOREDEV_RAMSD) {
|
||||
ksprintf(key, "ramsd-%zu", ramsd_counter++);
|
||||
} else if (sdtype == STOREDEV_ATASD) {
|
||||
ksprintf(key, "atasd-ch0-%c", sd->sd.atasd.devno == 0x00 ? 'M' : 'S');
|
||||
ksprintf(key, "atasd-ch%d-%c",
|
||||
sd->sd.atasd.iobase == 0x1F0 ? 0 : 1,
|
||||
sd->sd.atasd.devno == 0x00 ? 'M' : 'S'
|
||||
);
|
||||
}
|
||||
|
||||
spinlock_acquire(&DEVTABLE.spinlock);
|
||||
|
||||
Reference in New Issue
Block a user