summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c
diff options
context:
space:
mode:
authorHesham AL-Matary <heshamelmatary@gmail.com>2013-09-28 10:08:25 +0200
committerGedare Bloom <gedare@rtems.org>2013-10-03 08:55:33 -0400
commit5ceefe18f0a6a055e04a1e5333983bae86738be8 (patch)
tree7256c26f30a1cd90a1a5938f7de144d843c06074 /c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c
parentAdd a new necessary definition needed for raspberrypi MMU support (diff)
downloadrtems-5ceefe18f0a6a055e04a1e5333983bae86738be8.tar.bz2
Shared MMU initialization for ARM BSPs and RaspberryPi MMU support
Add support for MMU initialization for RaspberryPi. Introduce new shared MMU configuration table that can be used by other BSPs that call the arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache function. Demonstrate the use of the generic table with RaspberryPi.
Diffstat (limited to 'c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c')
-rw-r--r--c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c b/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c
index a2241687cc..71b2ff1a44 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c
+++ b/c/src/lib/libbsp/arm/raspberrypi/startup/bspstarthooks.c
@@ -7,6 +7,7 @@
*/
/*
+ * Copyright (c) 2013. Hesham AL-Matary
* Copyright (c) 2013 by Alan Cudmore
* based on work by:
* Copyright (c) 2009
@@ -24,33 +25,16 @@
#include <bspopts.h>
#include <bsp/start.h>
#include <bsp/raspberrypi.h>
-#include <bsp/mmu.h>
-
-static void BSP_START_TEXT_SECTION raspberrypi_cache_setup(void)
-{
- uint32_t ctrl = 0;
-
- /* Disable MMU and cache, basic settings */
- ctrl = arm_cp15_get_control();
- ctrl &= ~(ARM_CP15_CTRL_I | ARM_CP15_CTRL_R | ARM_CP15_CTRL_C
- | ARM_CP15_CTRL_V | ARM_CP15_CTRL_M);
- ctrl |= ARM_CP15_CTRL_S;
- arm_cp15_set_control(ctrl);
-
- arm_cp15_cache_invalidate();
- arm_cp15_tlb_invalidate();
-
-}
-
+#include <bsp/mm.h>
void BSP_START_TEXT_SECTION bsp_start_hook_0(void)
{
- raspberrypi_cache_setup();
}
void BSP_START_TEXT_SECTION bsp_start_hook_1(void)
{
bsp_start_copy_sections();
+ bsp_memory_management_initialize();
bsp_start_clear_bss();
}