Skip to content

Commit

Permalink
Temporarily fix error while creating user_task
Browse files Browse the repository at this point in the history
  • Loading branch information
Lockna committed Aug 20, 2024
1 parent 3c0bb4e commit e925abf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xernel/kernel/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,11 @@ extern "C" fn kernel_main() -> ! {

let process = Arc::new(Spinlock::new(Process::new(Some(KERNEL_PROCESS.clone()))));

let _user_task = Thread::new_user_thread(process.clone(), VirtAddr::new(0x200000));
// FIXME: If used in code, code panics with error "virtual address must be sign extended in bits 48 to 64"
//let _user_task = Thread::new_user_thread(process.clone(), VirtAddr::new(0x200000));

let page = FRAME_ALLOCATOR.lock().allocate_frame::<Size2MiB>().unwrap();

KERNEL_PAGE_MAPPER.lock().map(
page,
Page::from_start_address(VirtAddr::new(0x200000)).unwrap(),
Expand Down

0 comments on commit e925abf

Please sign in to comment.