<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 5, 2020 at 6:19 PM Hesham Almatary <<a href="mailto:heshamelmatary@gmail.com">heshamelmatary@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Utkarsh,<br>
<br>
TTBR1 is there primarily for UNIX-like kernels to be re-mapped at very<br>
high addresses and user space can use TTBR0. In the case of RTEMS, we<br>
don't have that user vs kernel separation. Furthermore, using TTBR1<br>
won't allow us to do 1:1 fixed mappings.<br>
<br></blockquote><div><br></div><div>I agree, sorry, after looking around a bit more I realized some of the above limitations.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Could you give more details why having different page sizes would be<br>
an issue? You would normally have multi-level page tables for more<br>
fine-grained page sizes.</blockquote><div> </div><div>No this will not be an issue, we can set the bits[1:0] of the table-entry to account for the levels of page tables. I was thinking about ways to simplify the implementation of stack allocation, but doing this is definitely not feasible.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Thu, 4 Jun 2020 at 11:44, Utkarsh Rai <<a href="mailto:utkarsh.rai60@gmail.com" target="_blank">utkarsh.rai60@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> Section B3.3.3 of the ARMv7-A Reference manual says that we can have TTBR0 and 1 split up the address space into two parts, where each register has the address of the translation table base<br>
> of the divided address space.<br>
> One of the ways to simplify the implementation of thread-stack protection in ARMv7-A MMU can be, to have the global statically allocated sections being pointed by the TTBR1 register and the work-space area being pointed out by the TTBR0 register. This way during context switch we would only have to change the TTBR0 register, this would also simplify the implementation as we won't have to worry about addresses of different page sizes being pointed by the same translation-table base.<br>
> In the current implementation, TTB is put in TTBR0, and TTBR1 is not used.<br>
> Is the above-suggested implementation feasible?<br>
><br>
> Regards,<br>
> Utkarsh<br>
<br>
<br>
<br>
--<br>
Hesham<br>
</blockquote></div></div>