bsp/altera-cyclone-v: Move MMU configuration table

This makes it possible to use application specific version.
This commit is contained in:
Sebastian Huber
2014-07-01 15:30:07 +02:00
parent 9eb1994fd2
commit 7ab6046a62
3 changed files with 37 additions and 20 deletions

View File

@@ -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

View File

@@ -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
);
}

View 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);