Add a workaround to treat bootstrap mem as owned.
This commit is contained in:
@@ -588,14 +588,18 @@ pub unsafe fn usermode_bootstrap(bootstrap: &Bootstrap) -> ! {
|
||||
let mut addr_space = addr_space.write();
|
||||
let addr_space = &mut *addr_space;
|
||||
|
||||
addr_space.grants.insert(context::memory::Grant::physmap(
|
||||
let mut grant = context::memory::Grant::physmap(
|
||||
bootstrap.base.clone(),
|
||||
Page::containing_address(VirtualAddress::new(0)),
|
||||
bootstrap.page_count,
|
||||
PageFlags::new().user(true).write(true).execute(true),
|
||||
&mut addr_space.table.utable,
|
||||
PageFlushAll::new(),
|
||||
).expect("failed to physmap bootstrap memory"));
|
||||
).expect("failed to physmap bootstrap memory");
|
||||
grant.allocator_owned = false;
|
||||
grant.owned = true;
|
||||
|
||||
addr_space.grants.insert(grant);
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
|
||||
Reference in New Issue
Block a user