WIP: Track grant ownership.

This commit is contained in:
4lDO2
2023-06-20 20:06:34 +02:00
parent e7d94ddff5
commit 490e1b2777
9 changed files with 252 additions and 194 deletions
-2
View File
@@ -1,5 +1,3 @@
use core::num::NonZeroUsize;
use crate::interrupt::InterruptStack;
use crate::memory::{allocate_frames_complex, deallocate_frames, Frame, PAGE_SIZE};
use crate::paging::{PhysicalAddress, VirtualAddress};
+4 -2
View File
@@ -595,8 +595,10 @@ pub unsafe fn usermode_bootstrap(bootstrap: &Bootstrap) -> ! {
// deallocated?
addr_space.grants.insert(context::memory::Grant::physmap(
bootstrap.base.clone(),
Page::containing_address(VirtualAddress::new(0)),
bootstrap.page_count,
PageSpan::new(
Page::containing_address(VirtualAddress::new(0)),
bootstrap.page_count,
),
PageFlags::new().user(true).write(true).execute(true),
&mut addr_space.table.utable,
PageFlushAll::new(),