Wednesday, September 18, 2013

[GSoC] Final report of MMU project for RTEMS

Brief :


The goal of this year project was to enhance low-level memory management Hardware/Software initialization and boost the process of merging libmm framework with RTEMS main stream. After working mainly on ARM BSPs with enhancements to avoid MMU code duplications, now many ARM BSPs can share a single implementation for low-level libmm. This way, we can move up to high-level layers (i.e POSIX) that rely on the low-level layer.

Enhancements (Finished Tasks) :


The enhancements  for ARM architectures are :

- Using existing arm-cp15.h code for implementing low-level libmm.
- Using newly add MMU code used by realview.
- Creating new mm.c and mminit.c file representing low-level libmm implementation for ARM.
  • mminit.c contains function that initializes MMU at BSP startup.
  • mm.c dynamically set new attributes for pages.
- Share mminit.c and mm.c between varios BSPs like (realview, xilinx).
- Use mminit.c and mm.c to create MMU support for RaspberryPi BSP.
- arm920 can share new code although Skyeye1.2.8 do not support all Cache instructions used by the shared code.
- Added new test case for SMP environment (realview BSP).

Figure-1 shows libmm hierachy in RTEMS.
Figure-1. Libmm Hierachy in RTEMS


Experience gained :


The most useful experience I got is when I was trying to share MMU ARM code between many BSPs. I was able to share MMU code between Realview BSP which has ARM Cortex-A9 (ARMv7) and RaspberryPi Board that has Broadcom BCM2835 system on a chip (SoC), which includes an ARM1176JZF-S CPU (ARMv6). To achieve this goal I had to :

  • Study ARMv6 and ARMv7 ISAs.
  • Analyze compatibility between previous architectures.
  • Review new ARMv6 Security Extension.
  • Study different page-table formats and make them compatible with each other by enabling/disabling some features on CPUs. (i.e subpages extension in ARM1176JZF processor).

Future goals (TODO) :


  • Port POSIX mman.h, shm.h.
  • Unify Cache management with libmm.
  • Spread out libmm by supporting more BSPs.


The following post reveals some low-level details regarding libmm and how BSPs can support it.

No comments:

Post a Comment