diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-04-24 06:37:06 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-04-24 08:04:52 +0200 |
commit | 65e59cc07056a1a0362bcb2f8dcd430986f3c965 (patch) | |
tree | 11c7fda8dd1c63e631794c8b1849e723a2fc9032 /bsps/arm/raspberrypi | |
parent | bsps: Remove obsolete documentation (diff) | |
download | rtems-65e59cc07056a1a0362bcb2f8dcd430986f3c965.tar.bz2 |
bsps/arm: Move bsp_memory_management_initialize()
This function is only used by the raspberrypi BSP.
This patch is a part of the BSP source reorganization.
Update #3285.
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(); |