Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Ramdisk marked as Usable region in MemoryRegions #445

Copy link
Copy link
Closed
@Wasabi375

Description

@Wasabi375
Issue body actions

// check if region overlaps with kernel or ramdisk
let kernel_slice_end = kernel_slice_start + kernel_slice_len;
let ramdisk_slice_end = ramdisk_slice_start.map(|s| s + ramdisk_slice_len);
if region.kind == MemoryRegionKind::Usable
&& kernel_slice_start < region.end
&& kernel_slice_end > region.start
{
// region overlaps with kernel -> we might need to split it

} else if region.kind == MemoryRegionKind::Usable
&& ramdisk_slice_start.map(|s| s < region.end).unwrap_or(false)
&& ramdisk_slice_end.map(|e| e > region.start).unwrap_or(false)
{

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.