[okl4-developer] okl41.4.1.1:okl4 address space mapping and USER_UTCB_REF
Akshay
akshayts at yahoo.co.in
Mon Oct 12 13:36:58 EST 2009
Hi,
Can u please explain the address space mapping mechanism in okl4 1.4.1.1,
the next function in addmapping(...) should point to the next pointer of the
first/second level descriptor.
pgent_t * next (generic_space_t * s, pgsize_e pgsize, word_t num)
{
#if defined(CONFIG_ARM_TINY_PAGES)
if (pgsize == size_4k)
{
return this + (num * 4);
} else
#endif
if (pgsize == size_64k)
{
//WHY ADD 16 WORDS HERE????
return this + (num * (arm_l2_ptab_size (s) >> 6));
}
return this + num;
}
In the above statement return this + (num * (arm_l2_ptab_size (s) >> 6)),
why are they adding 16 words to the current second level page table entry?,
it should just be this + num;
2nd question:
USER_UTCB_REF is defined as #define USER_UTCB_REF (*(word_t
*)(USER_KIP_PAGE + 0xff0))
this is mapped as follows in init.cc
get_kernel_space()->add_mapping((addr_t)USER_KIP_PAGE,
virt_to_phys((addr_t) get_kip()), KIP_KIP_PGSIZE,
space_t::read_execute, false);
this is readonly, but in tcb.h the code is trying to write
USER_UTCB_REF = tcb->get_utcb_location();. So i get a page fault at this
point. can Someone explain what is the solution for this and how can they
write to this location.
Should we change the domain as manager instead of client? Any
ideas/suggestions will be helpful.
--
View this message in context: http://n2.nabble.com/okl41-4-1-1-okl4-address-space-mapping-and-USER-UTCB-REF-tp3805837p3805837.html
Sent from the OKL4 Community Forum mailing list archive at Nabble.com.
More information about the Developer
mailing list