Implement floppy disk controller driver (AI)
Add Intel 82077AA-compatible floppy disk controller driver with: - CMOS-based drive detection (register 0x10) - FDC reset with DOR toggle and SPECIFY command - Motor control with spin-up delay - ISA DMA channel 2 setup for data transfers - LBA-to-CHS conversion for 1.44MB geometry - Single-sector read/write via DMA with 7-byte result phase - Seek and recalibrate with sense interrupt verification - IRQ 6 handler (vector 38) for command completion - Devicefs integration as 'floppy' class block devices The IRQ wait function detects whether interrupts are enabled (EFLAGS IF bit) and temporarily enables them if needed, allowing the driver to work during early init before the kernel calls STI. The scheduler safely handles timer interrupts in this window since no user processes exist yet. Tested with QEMU: drive detected as 1.44M 3.5", registered as /dev/floppy1, full boot succeeds with CD+HDD+floppy attached.
This commit is contained in:
@@ -64,7 +64,7 @@ Once a task is completed, it should be checked off.
|
||||
- [x] Create a `sysfs` vfs driver. It should allow drivers to expose text/config files to the VFS. Each driver can request a namespace in the sysfs. E.g.: the IDE driver could request `ide`. During this registration, the drive must provide a struct containing function callbacks. The callbacks must contain the function `list`, `read`, and `write`. These are executed when the user lists a directory, reads a file, or writes a file. It is expected that the contents of these files are extremely small and can simply be stored on the stack. It should be very easy for a driver to expose new information.
|
||||
- [x] Create a FAT32 driver. It should allow reading and writing to and from a block device.
|
||||
- [x] Create the `mount` app. It should allow on to mount a block device using the fat32 driver. Internally, it should use sysfs (which should be mounted automatically by the kernel to `/sys`) to setup a new mount.
|
||||
- [ ] Create a floppy driver. Each floppy device should be exposed as `/dev/floppyN`.
|
||||
- [x] Create a floppy driver. Each floppy device should be exposed as `/dev/floppyN`.
|
||||
- [ ] Add support for character device to the devicefs subsystem.
|
||||
- [ ] Create an app called `diskpart`. This app can be used to modify the MBR partitions on a block device.
|
||||
- [ ] Create an app called `mkfs.fat32`. This app can be used to format a block into a FAT32 filesystem.
|
||||
|
||||
Reference in New Issue
Block a user