[directfd] Add configurable bounce and cache buffers to DF driver #2082
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.
Improvements made to DF driver along the lines of discussion in Mellvik/TLVC#88. The ELKS DF driver still performs full-track caching, but with these changes should be fairly easy to add semi-track or fixed-size cache caching.
The DF driver is now configurable to allow sharing portions of DMASEG for separate bounce and cache buffers, if desired, without having to invalidate the cache when non-overlapped. Testing has not shown a big need for this (yet), as application writes always go into the system buffer area and queue up before driver write I/O is required. However, because ELKS can be configured for BIOS hard drive access and DF floppy, DMASEG is still unprotected, and the low memory segment either needs to be separated between the drivers, or mutex protection for any shared bounce buffers.
The heap-allocated bounce buffer is now removed (which was 64k address wrap unsafe BTW).
Recalculates, yet again, the IODELAY emulation delay, my last revision was incorrect; reverted.
Doesn't restart FDC kernel timeout on cache reads.
Removed improper illegal buffer usage message.
Refactors and simplifies some code.
Renames some variables to be closer to TLVC's directfd.c.
Retabs include/fdreg.h
Tested on QEMU w/caching, no caching, XMS and EXT buffers.