Skip to content

Commit

Permalink
Merge pull request #46 from rel4team/write_it_asid_pool
Browse files Browse the repository at this point in the history
implement asid_init
  • Loading branch information
ZhiQiu-ovO authored Jul 16, 2024
2 parents ef169d5 + cf73444 commit 06b2df9
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/boot/root_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,21 +202,8 @@ fn asid_init(root_cnode_cap: cap_t, it_pd_cap: cap_t) -> bool {
}
#[cfg(target_arch = "aarch64")]
{
// asid_pool_t *ap = ASID_POOL_PTR(pptr_of_cap(it_ap_cap));
// asid_map_t asid_map = asid_map_asid_map_vspace_new(
// /* vspace_root: reference to vspace root page table object */
// (word_t)cap_vtable_root_get_basePtr(it_vspace_cap)
// );
// ap->array[IT_ASID] = asid_map;
// armKSASIDTable[IT_ASID >> asidLowBits] = ap;

log::warn!("asid_init needed to initialize");
let ap = it_ap_cap.get_cap_ptr();
// Why 8? because size_of::<usize> == 8
// The size of item in the array is 8 bytes
let ptr = (ap + 8 * IT_ASID) as *mut usize;
let asid_map = it_pd_cap.get_pgd_base_ptr();
log::warn!("todo: write armKSASIDTable");

write_it_asid_pool(&it_ap_cap, &it_pd_cap);
}
true
}
Expand Down

0 comments on commit 06b2df9

Please sign in to comment.