1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 20:57:35 +00:00

Kernel: Expand PATA driver to support multiple hard drives (#365)

The previous implementation of the PIIX3/4 PATA/IDE channel driver only
supported a single drive, as the object model was wrong (the channel
inherits the IRQ, not the disk drive itself). This fixes it by 'attaching'
two `PATADiskDevices` to a `PATAChannel`, which makes more sense.

The reading/writing code is presented as is, which violates the spec
outlined by Seagate in the linked datasheet. That spec is rather old,
so it might not be 100% up to date, though may cause issues on real
hardware, so until we can actually test it, this will suffice.
This commit is contained in:
Jesse 2019-07-28 23:44:01 +10:00 committed by Andreas Kling
parent cf57d64481
commit 59e122f8ba
6 changed files with 442 additions and 239 deletions

View file

@ -13,7 +13,8 @@ KERNEL_OBJS = \
CMOS.o \
Arch/i386/PIC.o \
Syscall.o \
Devices/IDEDiskDevice.o \
Devices/PATAChannel.o \
Devices/PATADiskDevice.o \
Devices/FloppyDiskDevice.o \
VM/MemoryManager.o \
VM/Region.o \