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
_______________________________________________ rtems-devel mailing list rtems-devel@rtems.org http://www.rtems.org/mailman/listinfo/rtems-devel