summaryrefslogtreecommitdiffstats
path: root/bsps/arm/raspberrypi/start/bspstarthooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/arm/raspberrypi/start/bspstarthooks.c')
-rw-r--r--bsps/arm/raspberrypi/start/bspstarthooks.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/bsps/arm/raspberrypi/start/bspstarthooks.c b/bsps/arm/raspberrypi/start/bspstarthooks.c
index c2a9707d71..fd6aa53059 100644
--- a/bsps/arm/raspberrypi/start/bspstarthooks.c
+++ b/bsps/arm/raspberrypi/start/bspstarthooks.c
@@ -31,6 +31,8 @@
#include <bsp/linker-symbols.h>
#include <bsp/arm-cp15-start.h>
+#include <rtems/sysinit.h>
+
#ifdef RTEMS_SMP
#include <rtems/score/smp.h>
#endif
@@ -176,15 +178,27 @@ void BSP_START_TEXT_SECTION bsp_start_hook_1(void)
rpi_video_init();
}
-void bsp_work_area_initialize(void)
+static Memory_Area _Memory_Areas[1];
+
+static void bsp_memory_initialize(void)
{
- uintptr_t begin;
- uintptr_t end;
+ _Memory_Initialize(
+ &_Memory_Areas[0],
+ raspberrypi_mmu_config_table[ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX].begin,
+ raspberrypi_mmu_config_table[ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX].end
+ );
+}
+
+RTEMS_SYSINIT_ITEM(
+ bsp_memory_initialize,
+ RTEMS_SYSINIT_MEMORY,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
- begin = raspberrypi_mmu_config_table[ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX]
- .begin;
- end = raspberrypi_mmu_config_table[ARMV7_CP15_START_WORKSPACE_ENTRY_INDEX]
- .end;
+static const Memory_Information _Memory_Information =
+ MEMORY_INFORMATION_INITIALIZER(_Memory_Areas);
- bsp_work_area_initialize_default((void *) begin, end - begin);
+const Memory_Information *_Memory_Get(void)
+{
+ return &_Memory_Information;
}