RPi Graphic testing

Pavel Pisa pisa at cmp.felk.cvut.cz
Mon Jul 20 22:52:15 UTC 2015

Hello Qiao Yang,

On Monday 20 of July 2015 20:50:32 QIAO YANG wrote:
> So it has got the right pointer for frame buffer.
> Please set the macros
> BCM2835_FBMEM_BASE to 0x1C006000
> and BCM2835_FBMEM_SIZE to 0x500000
> according to your log.

I have got to testing at home where I have other RPi board
and have no luck till. The memory setup is different there so I tried
to recompiled for that one. I will rerun test at the university
on the previous board again on Wednesday. If you have some
enhancements, commit them to your RTEMS git, please.

As for memory map adaptation, RTEMS does not include infrastructure
for memory management setup changes at runtime but the before
bsp_memory_management_initialize() is called then CPU runs in 1:1
mapping where physical and virtual addresses match. The main
reason to setup and enable MMU on ARM is that without MMU
cache cannot be enabled so execution is slow. Even instruction
cache can be enabled without MMU enable on some ARM models.
So the system is mostly/completely operational before MMU

arm_cp15_start_mmu_config_table table is declared as const
but if it is not marked that way and compiler error is prevented
then it can be manipulated before bsp_memory_management_initialize();
in bsp_start_hook_1() is called


So it should be possible to parse ATAGs or even access VideoCore
before MMU is configured.

The MMU config requires arm_cp15_start_mmu_config_table to be global
variable. There is other solution even if problem with
const does not allows simple modification of the table
(but brute cast in the function adding video region would work either).

It is most probable possible to skip to call 
bsp_memory_management_initialize() from the hook
and use local variant of that code which would be RPi BSP



#include <bsp/start.h>
#include <bsp/arm-cp15-start.h>
#include <bsp/linker-symbols.h>
#include <bsp/mm.h>

BSP_START_TEXT_SECTION void bsp_memory_management_initialize(void)
  uint32_t ctrl = arm_cp15_get_control();


    (uint32_t *) bsp_translation_table_base,

So it is quite short sequence and even highly dynamic table can be used.

The mechanism to obtain installed/board provided memory size
is required even to setup correctly size of memory and heap
available for RTEMS system workspace and user application.

So this should be solved (at least in long term horizon) some
more generic/autoconfigured way.

Best wishes,


More information about the devel mailing list