<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jun 22, 2013 at 12:15 PM, Thomas Dörfler <span dir="ltr"><<a href="mailto:Thomas.Doerfler@embedded-brains.de" target="_blank">Thomas.Doerfler@embedded-brains.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
please note that some PPC derivatives (especially those for embedded<br>
projects) usually have eight DBATs and eight IBATs. This feature must be<br>
enabled (e.g. in a 603e core) with a special bit in one of the HID<br>
registers, but it will put the number of BAT ranges closer to what is<br>
needed in embedded computing.<br>
<br>
The advantage of BATs versus pages is definitively, that they usually<br>
get set up ONCE during startup and, due to their flexible size, will not<br>
need to be reloaded. Note that the pages usually only cover 4K of<br>
memory, and the "translation lookaside buffer" (TLB) only maintains the<br>
last 16-64 used pages, so there is always code involed reloading the<br>
required page info into the TLB. IMHO this reduces the realtime<br>
performance of the system.<br>
<br>
In short: Supporting both (BATs and pages) in libmm would be a good feature.<br>
<br></blockquote><div>Yes that's what I was thinking about. But how should I provide the user with the option of choosing which method to use: BAT or Pages ? </div><div>Through a configuration option at build time? libmm should be general and abstract in the way that it provides memory protection. Only a developer who ports libmm should know about HW details like BAT and Pages. </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
wkr,<br>
<br>
Thomas.<br>
<div><div class="h5"><br>
On 22.06.2013 04:11, Chris Johns wrote:<br>
> Hesham Moustafa wrote:<br>
>> Eight: 4 for data and 4 for instructions. BAT areas can not overlap.<br>
><br>
> Then I suggest we support for pages as well. There may be a need for<br>
> more areas in the future and I feel 4 may not be enough.<br>
><br>
> Chris<br>
</div></div>> _______________________________________________<br>
> rtems-devel mailing list<br>
> <a href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a><br>
> <a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-devel</a><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
--------------------------------------------<br>
Embedded Brains GmbH<br>
Thomas Doerfler Dornierstr. 4<br>
D-82178 Puchheim Germany<br>
email: <a href="mailto:Thomas.Doerfler@embedded-brains.de">Thomas.Doerfler@embedded-brains.de</a><br>
Phone: +49-89-18 94 741-12<br>
Fax: +49-89-18 94 741-09<br>
_______________________________________________<br>
rtems-devel mailing list<br>
<a href="mailto:rtems-devel@rtems.org">rtems-devel@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-devel</a><br>
</font></span></blockquote></div><br></div></div>