Skip to content

[kernel] Split XMS/DMA buffer from track cache for BIOS and DF drivers#2094

Merged
ghaerr merged 2 commits intomasterfrom
splitdma
Nov 5, 2024
Merged

[kernel] Split XMS/DMA buffer from track cache for BIOS and DF drivers#2094
ghaerr merged 2 commits intomasterfrom
splitdma

Conversation

@ghaerr
Copy link
Copy Markdown
Owner

@ghaerr ghaerr commented Nov 4, 2024

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.

@ghaerr ghaerr merged commit 3c2b190 into master Nov 5, 2024
@ghaerr ghaerr deleted the splitdma branch November 5, 2024 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant