[kernel] Add @Mellvik's direct floppy driver #1716
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@Mellvik took Linus's original direct floppy driver from ELKS and got it working using async I/O on his TLVC fork.
I was able to import @Mellvik's code back into ELKS and got it integrated and running in about half an hour. Nice work @Mellvik!!
The driver is currently experimental-only for ELKS and requires CONFIG_ASYNCIO=y to also be set. For testing, QEMU is being used (no real hardware yet), and the system is booted via the BIOS driver hard drive on /dev/hda. Then,
mount /dev/df0 /mnt
is used to open the direct FD driver and mount a 1200k floppy. (QEMU is reporting a 1200k floppy in CMOS even when a 360k floppy image is attached, so using 1200k only for now).ls -l /mnt
, etc works for a while, then the floppy system becomes heavily corrupted in RAM, for reasons unknown.This will likely be committed so that some other modifications can be made to ELKS, for instance to disable track caching for hard drives, which will then allow DMASEG to be used for (all) floppy I/O, without worries for DMA 64k boundary overruns and eventual sharing of the BIOS track caching code. I will then continue to investigate the issues seen to determine whether they are ELKS kernel issues with async I/O or with the FD driver.