diff options
Diffstat (limited to 'bsps/arm/raspberrypi')
-rw-r--r-- | bsps/arm/raspberrypi/start/bspstarthooks.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/bsps/arm/raspberrypi/start/bspstarthooks.c b/bsps/arm/raspberrypi/start/bspstarthooks.c index 165a555880..b39c8b1959 100644 --- a/bsps/arm/raspberrypi/start/bspstarthooks.c +++ b/bsps/arm/raspberrypi/start/bspstarthooks.c @@ -25,9 +25,10 @@ #include <bspopts.h> #include <bsp/start.h> #include <bsp/raspberrypi.h> -#include <bsp/mm.h> #include <libcpu/arm-cp15.h> #include <bsp.h> +#include <bsp/linker-symbols.h> +#include <bsp/arm-cp15-start.h> #ifdef RTEMS_SMP #include <rtems/score/smp.h> @@ -97,6 +98,21 @@ void BSP_START_TEXT_SECTION bsp_start_hook_0(void) #endif } +BSP_START_TEXT_SECTION static void bsp_memory_management_initialize(void) +{ + uint32_t ctrl = arm_cp15_get_control(); + + ctrl |= ARM_CP15_CTRL_AFE | ARM_CP15_CTRL_S | ARM_CP15_CTRL_XP; + + arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache( + ctrl, + (uint32_t *) bsp_translation_table_base, + ARM_MMU_DEFAULT_CLIENT_DOMAIN, + &arm_cp15_start_mmu_config_table[0], + arm_cp15_start_mmu_config_table_size + ); +} + void BSP_START_TEXT_SECTION bsp_start_hook_1(void) { bsp_start_copy_sections(); |