[GSoC] Translate high-level memory abstract attributes into CPU specific attributes
Hesham Moustafa
heshamelmatary at gmail.com
Thu Jul 25 02:19:23 UTC 2013
Hi all,
To make libmm abstract for the user who wants to apply memory attributes
for a region of memory, libmm defines general common attributes at
high-level that maps to specific CPU attributes for each target. These
attributes are for Caches, memory protection currently. I propose two
solution for translation process and I'd like to get a feedback.
#1 : Translation Table :
Place a translation table for every BSP that maps high-level attributes to
CPU attributes.
Performance is O(1) regardless of how many attributes.
Size is O(n) : where n is the number of attributes entries.
This solution is good from performance perspective, but it cost some space.
As the attributes would be a few, the size issue can be neglectable.
#2 : Conditional translation (the current implementation) :
A function which simply do conditional checking for high-level attributes
and set return with the corresponding CPU attribute
Performance is O(n) : where n is the number of attributes combinations.
No size would be taken for attributes, it deals with macros (the current
implementation).
The more attributes we support, the more the performance would be hurt
during translation phase.
Which solution is more convenient for RTEMS ?
I prefer the first solution of translation table as it would consume only a
few bytes for the table.
Regards,
Hesham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20130725/55dc6ec9/attachment.html>
More information about the devel
mailing list