[GSOC]Progress Report of MMU support project
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Jul 12 10:11:47 UTC 2011
On 07/11/2011 01:41 PM, Quanming Shi wrote:
> 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 Length Access 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 );
What is the difference between memp and mprot? RTEMS in general uses no
abbreviations in its API.
> 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);
I would not use size_t here since this is used for the size of single objects.
I would use uintptr_t instead.
> 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);
[...]
One problem with set and get methods is that you cannot atomically set and get
things. Thus rtems_task_set_priority() can be used for example to set and get
the priority of a task (there are similar functions in the RTEMS API).
--
Sebastian Huber, embedded brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list