Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hermit-os/kernel
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9b529598b68a9e865183d57ef681cb451d0b0a42
Choose a base ref
..
head repository: hermit-os/kernel
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4777319220cf8cc5c847cb4052fbfa4f4514a003
Choose a head ref
Showing with 2 additions and 3 deletions.
  1. +1 −1 src/arch/x86_64/mm/paging.rs
  2. +1 −2 src/arch/x86_64/mm/physicalmem.rs
2 changes: 1 addition & 1 deletion src/arch/x86_64/mm/paging.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ use x86_64::structures::idt::PageFaultErrorCode;
use x86_64::structures::paging::mapper::{TranslateResult, UnmapError};
pub use x86_64::structures::paging::PageTableFlags as PageTableEntryFlags;
use x86_64::structures::paging::{
Mapper, Page, PageTableIndex, PhysFrame, RecursivePageTable, Size2MiB, Translate,
Mapper, Page, PhysFrame, RecursivePageTable, Size2MiB, Translate,
};

use crate::arch::x86_64::kernel::processor;
3 changes: 1 addition & 2 deletions src/arch/x86_64/mm/physicalmem.rs
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ use multiboot::information::{MemoryType, Multiboot};
use crate::arch::x86_64::kernel::{boot_info, get_fdt, get_limit, get_mbinfo};
use crate::arch::x86_64::mm::paging::{BasePageSize, PageSize};
use crate::arch::x86_64::mm::{MultibootMemory, PhysAddr, VirtAddr};
use crate::mm::kernel_start_address;
use crate::{env, mm};

pub static PHYSICAL_FREE_LIST: InterruptTicketMutex<FreeList<16>> =
@@ -119,7 +118,7 @@ fn detect_from_uhyve() -> Result<(), ()> {
let kernel_end = mm::kernel_end_address().as_usize();
// add gap for the APIC
assert!(
kernel_end < KVM_32BIT_GAP_START || kernel_end > KVM_32BIT_GAP_START + KVM_32BIT_GAP_SIZE,
!(KVM_32BIT_GAP_START..=KVM_32BIT_GAP_START + KVM_32BIT_GAP_SIZE).contains(&kernel_end),
"Kernel was loaded into the KVM 32BIT GAP"
);
if physmem_end > KVM_32BIT_GAP_START && kernel_end < KVM_32BIT_GAP_START {