diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-21 01:24:46 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-21 01:24:46 +0200 |
commit | f08e34e4ca33cd247d17421f98fbf6e3d96b79be (patch) | |
tree | d62bce36b25c1aec78ea51fc120d082effa06413 /i386/i386at/biosmem.c | |
parent | 2b8bf64d3807a3c7eb9c0a88c1469573802d3e26 (diff) | |
download | gnumach-f08e34e4ca33cd247d17421f98fbf6e3d96b79be.tar.gz gnumach-f08e34e4ca33cd247d17421f98fbf6e3d96b79be.tar.bz2 gnumach-f08e34e4ca33cd247d17421f98fbf6e3d96b79be.zip |
page segments: Fix more dma32/directmap inversions
We need to make sure segments are in addresses order, and avoid returning
dma32 memory when it's not actually within directmap memory.
Diffstat (limited to 'i386/i386at/biosmem.c')
-rw-r--r-- | i386/i386at/biosmem.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/i386/i386at/biosmem.c b/i386/i386at/biosmem.c index 6d0a03ae..03736af3 100644 --- a/i386/i386at/biosmem.c +++ b/i386/i386at/biosmem.c @@ -840,10 +840,11 @@ biosmem_directmap_end(void) { if (biosmem_segment_size(VM_PAGE_SEG_DIRECTMAP) != 0) return biosmem_segment_end(VM_PAGE_SEG_DIRECTMAP); - else if (biosmem_segment_size(VM_PAGE_SEG_DMA32) != 0) +#if defined(VM_PAGE_DMA32_LIMIT) && (VM_PAGE_DMA32_LIMIT < VM_PAGE_DIRECTMAP_LIMIT) + if (biosmem_segment_size(VM_PAGE_SEG_DMA32) != 0) return biosmem_segment_end(VM_PAGE_SEG_DMA32); - else - return biosmem_segment_end(VM_PAGE_SEG_DMA); +#endif + return biosmem_segment_end(VM_PAGE_SEG_DMA); } static const char * __init |