[kernel] Split XMS/DMA buffer from track cache for BIOS and DF drivers #2094
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.
Second step in the DF and BIOS driver track cache enhancement discussed in #2091 - the low memory DMASEG and track cache are split into two areas, DMASEG and TRACKSEG, for use by the BIOS and DF drivers. Also discussed at length in Mellvik/TLVC#88 with @Mellvik.
With this enhancement, the DF driver can be used simultaneously with the BIOS HD driver correctly. Previously, it was possible that the single, shared DMASEG buffer could be written to by an ASYNCIO DF driver interrupt while the BIOS HD driver was also using it, allowing data corruption.
Now, the DF driver only uses the TRACKSEG buffer, and uses an area within that for XMS or DMA access if needed, invalidating its own cache in the process. The BIOS driver, in contrast, always uses the external DMASEG buffer for XMS or DMA access, and TRACKSEG separately for track caching (not invalidating its cache unless writing to floppy), thus removing the overlap problem between the drivers.
The next step will be implementing a variable sized track cache in the DF (and likely BIOS) drivers, which will also allow the track cache to be disabled on fast 386+ systems, for optimum performance.