[GSOC]Progress Report of MMU support project

Quanming Shi shiquanming10 at gmail.com
Mon Jul 11 11:41:49 UTC 2011


Dear all

 This is midterm report of GSOC 2011 rtems mmu support project . This
project's target is adding an memory protect API to RTEMS.  In the last
month  I finished the general version of the API code.

I update the structure and functions of the project. Compare to the ALUT
structure mentioned in my last report, I removed the ID part, as shown below
    start address;                 size;             attribute;
Start Address
Address Space LengthAccess Attribute
In the functions , the block pointer is used as the ID of the specific ALUT
block.  I think this will be more convenient for users and don't need to
search blocks or  ID frequently.  Nearly all of the API functions accept the
block pointer as the first param.

Here is the list of the implemented  API functions :

rtems_status_code rtems_memp_alut_init ( void );

rtems_status_code
rtems_memp_alut_create_entry(
char* start_addr, size_t size, rtems_memp_access_attr attr,
rtems_mprot_alut_entry **p_ret);
rtems_status_code
rtems_memp_delete_entry(rtems_mprot_alut *p_ret);


rtems_status_code rtems_mprot_alut_search(char *addr, rtems_mprot_alut
**p_ret);

rtems_status_code
rtems_memp_alut_set_attr(rtems_mprot_alut *p_ret,  rtems_memp_access_attr*
new_attribute);
rtems_status_code
rtems_memp_get_attr(rtems_mprot_alut *p_ret, rtems_memp_access_attr*  attr);

rtems_status_code
rtems_memp_alut_set_size(rtems_mprot_alut *p_ret,  unsigned int* new_size);
rtems_status_code
rtems_memp_alut_get_size(rtems_mprot_alut *p_ret,  unsigned int* size);


rtems_memp_access_attr  rtems_memp_get_default_attr();
rtems_status_code rtems_memp_set_default_attr(rtems_memp_access_attr* attr);

Users can create, delete the ALUT block, modify the size and attribute of
the block, change the attribute of the address not mapped in the ALUT by the
default_attr function.


Next step , I am going to :

add the cache attribute control.  this should be quite useful for users.
learn and try to add a doxygen document for the API .
add test case for the project.
task support protection

posix API research and implement.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

********************
**DISCUSSION**
********************

rtems_status_code
rtems_memp_alut_set_size(rtems_mprot_alut *p_ret,  unsigned int* new_size);

This function can reset the size of blocks, I add it just because it is not
too diffifcult to implement. In practice is this useful? Maybe I should
remove the function if it will never be used.

~~~~~~~~~~~~~~~
In my proposal, there is a plan to integrate the memory protection API to
the RTEMS Partition API.
I think it may be not a good idea because it would make the relation of the
two APIs too complicated. Users can add the partition memory part to ALUT by
function list above. This will be a more simple and clear way for users.
Do you think so ?
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  For additional information you can refer to :
    - My project code and document :
http://code.google.com/p/gsoc2011-rtems-mmu-support-project/
(updated every few days)

    - The introduction page of the project on RTEMS wiki :
http://www.rtems.org/wiki/index.php/MMU_Support

    - The milestone report of this GSOC2011 :
http://www.rtems.org/pipermail/rtems-users/2011-June/008577.html

please do not hesitate to give me your advice.   thank you for read this
report



-- 
Best regards

Quanming Shi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20110711/3222cd3f/attachment.html>


More information about the users mailing list