forked from Imagelibrary/rtems
bsp/altera-cyclone-v: Move MMU configuration table
This makes it possible to use application specific version.
This commit is contained in:
@@ -151,6 +151,7 @@ libbsp_a_SOURCES += startup/bspreset.c
|
||||
libbsp_a_SOURCES += startup/bspstart.c
|
||||
libbsp_a_SOURCES += startup/bspstarthooks.c
|
||||
libbsp_a_SOURCES += startup/nocache-heap.c
|
||||
libbsp_a_SOURCES += startup/mmu-config.c
|
||||
if HAS_SMP
|
||||
libbsp_a_SOURCES += startup/bspsmp.c
|
||||
endif
|
||||
|
||||
@@ -27,24 +27,6 @@
|
||||
/* 1 MB reset default value for address filtering start */
|
||||
#define BSPSTART_L2_CACHE_ADDR_FILTERING_START_RESET 0x100000
|
||||
|
||||
LINKER_SYMBOL(bsp_section_nocache_size);
|
||||
LINKER_SYMBOL(bsp_section_nocache_end);
|
||||
LINKER_SYMBOL(bsp_section_nocache_begin);
|
||||
|
||||
BSP_START_DATA_SECTION static const arm_cp15_start_section_config
|
||||
altcycv_mmu_config_table[] = {
|
||||
ARMV7_CP15_START_DEFAULT_SECTIONS,
|
||||
{
|
||||
.begin = (uint32_t) bsp_section_nocache_begin,
|
||||
.end = (uint32_t) bsp_section_nocache_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE
|
||||
}, { /* Periphery area */
|
||||
.begin = 0xFC000000U,
|
||||
.end = 0x00000000U,
|
||||
.flags = ARMV7_MMU_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
BSP_START_TEXT_SECTION void bsp_start_hook_0( void )
|
||||
{
|
||||
arm_cp15_instruction_cache_invalidate();
|
||||
@@ -63,8 +45,8 @@ BSP_START_TEXT_SECTION static void setup_mmu_and_cache(void)
|
||||
ctrl,
|
||||
(uint32_t *) bsp_translation_table_base,
|
||||
ARM_MMU_DEFAULT_CLIENT_DOMAIN,
|
||||
&altcycv_mmu_config_table[0],
|
||||
RTEMS_ARRAY_SIZE(altcycv_mmu_config_table)
|
||||
&arm_cp15_start_mmu_config_table[0],
|
||||
arm_cp15_start_mmu_config_table_size
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
34
c/src/lib/libbsp/arm/altera-cyclone-v/startup/mmu-config.c
Normal file
34
c/src/lib/libbsp/arm/altera-cyclone-v/startup/mmu-config.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2014 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Dornierstr. 4
|
||||
* 82178 Puchheim
|
||||
* Germany
|
||||
* <info@embedded-brains.de>
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.org/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <bsp/arm-cp15-start.h>
|
||||
|
||||
LINKER_SYMBOL(bsp_section_nocache_end);
|
||||
LINKER_SYMBOL(bsp_section_nocache_begin);
|
||||
|
||||
const arm_cp15_start_section_config arm_cp15_start_mmu_config_table[] = {
|
||||
ARMV7_CP15_START_DEFAULT_SECTIONS,
|
||||
{
|
||||
.begin = (uint32_t) bsp_section_nocache_begin,
|
||||
.end = (uint32_t) bsp_section_nocache_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE
|
||||
}, { /* Periphery area */
|
||||
.begin = 0xFC000000U,
|
||||
.end = 0x00000000U,
|
||||
.flags = ARMV7_MMU_DEVICE
|
||||
}
|
||||
};
|
||||
|
||||
const size_t arm_cp15_start_mmu_config_table_size =
|
||||
RTEMS_ARRAY_SIZE(arm_cp15_start_mmu_config_table);
|
||||
Reference in New Issue
Block a user