[kernel] Reworked the use of lowmem DMASEG in xd and floppy driver + more #103
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.
This PR introduces the new scheme for allocating bounce buffers and floppy cache from low memory/DMASEG - discussed in ghaerr/elks#2091 and #88. The new DMASEG map has a bounce buffer for xd drives (XT class) or Lance ethernet (AT class) at the bottom, then a bounce buffer for the
directfd
driver, handling both DMA wraps and XMS bouncing. Then the floppy sector cache if configured. This means - for thedirectfd
driver - that the cache and the bounce buffer are permanently separated and that the cache may be configured completely out of the code by setting the CONFIG_FLOPPY_CACHE value to 0 in menuconfig. For 386+ systems that don't need or benefit from the cache, this is meaningful memory saved.Other changes to the
directfd
driver:config.h
. As before, the actual size and the configured cache memory is reported at boot time - unless configured to 0.fdcache=
in/bootopts
may now be set to 0 and the cache will be disabled in the driver. Functionally this is similar to the way it worked before (when the bounce buffer and the cache were integrated), but then the 'turn-off' value was 1 to accommodate the bounce buffer, not 0.Also in this PR is an update to the
xd.c
driver to work in the changes to the bounce buffer setup inconfig.h
. These changes have not been tested yet for lack of working hardware. Further:debug.h
and changed debug statements infs/block_dev.c
accordingly.debug.h
has had a number of other additions too, part of a process to improve the debug tooling in TLVC.