rust-osdev / bootloader

An experimental pure-Rust x86 bootloader
Apache License 2.0
1.31k stars 202 forks source link

Ramdisk marked as Usable region in MemoryRegions #445

Closed Wasabi375 closed 2 days ago

Wasabi375 commented 2 weeks ago

https://github.com/rust-osdev/bootloader/blob/e10010e6cb6cbcbdb82ddf29fb59f3a8d27ff2ff/common/src/legacy_memory_region.rs#L163-L171

https://github.com/rust-osdev/bootloader/blob/e10010e6cb6cbcbdb82ddf29fb59f3a8d27ff2ff/common/src/legacy_memory_region.rs#L205-L208

This assumes that the memory region containing the kernel and the region containing the ramdisk are distinct. However if both fall within the same region only the kernel is marked as a bootloader region and the ramdisk is marked as usable.

Wasabi375 commented 2 weeks ago

Here is a sample test for this bug that is failing: 6aa66a7e836aa2ade2052ab2ef5b895a59bb53e6