forked from Imagelibrary/rtems
bsps/arm: Add ARMV7_CP15_START_DEFAULT_SECTIONS
This commit is contained in:
@@ -16,51 +16,11 @@
|
||||
#include <bsp/start.h>
|
||||
#include <bsp/arm-cp15-start.h>
|
||||
#include <bsp/arm-a9mpcore-start.h>
|
||||
#include <bsp/linker-symbols.h>
|
||||
|
||||
BSP_START_DATA_SECTION static const arm_cp15_start_section_config
|
||||
rvpbxa9_mmu_config_table[] = {
|
||||
ARMV7_CP15_START_DEFAULT_SECTIONS,
|
||||
{
|
||||
.begin = (uint32_t) bsp_section_fast_text_begin,
|
||||
.end = (uint32_t) bsp_section_fast_text_end,
|
||||
.flags = ARMV7_MMU_CODE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_fast_data_begin,
|
||||
.end = (uint32_t) bsp_section_fast_data_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_start_begin,
|
||||
.end = (uint32_t) bsp_section_start_end,
|
||||
.flags = ARMV7_MMU_CODE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_vector_begin,
|
||||
.end = (uint32_t) bsp_section_vector_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_text_begin,
|
||||
.end = (uint32_t) bsp_section_text_end,
|
||||
.flags = ARMV7_MMU_CODE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_rodata_begin,
|
||||
.end = (uint32_t) bsp_section_rodata_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_ONLY_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_data_begin,
|
||||
.end = (uint32_t) bsp_section_data_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_bss_begin,
|
||||
.end = (uint32_t) bsp_section_bss_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_work_begin,
|
||||
.end = (uint32_t) bsp_section_work_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_stack_begin,
|
||||
.end = (uint32_t) bsp_section_stack_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = 0x10000000U,
|
||||
.end = 0x10020000U,
|
||||
.flags = ARMV7_MMU_DEVICE
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <libcpu/arm-cp15.h>
|
||||
#include <bsp/start.h>
|
||||
#include <bsp/linker-symbols.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -29,6 +30,49 @@ typedef struct {
|
||||
uint32_t flags;
|
||||
} arm_cp15_start_section_config;
|
||||
|
||||
#define ARMV7_CP15_START_DEFAULT_SECTIONS \
|
||||
{ \
|
||||
.begin = (uint32_t) bsp_section_fast_text_begin, \
|
||||
.end = (uint32_t) bsp_section_fast_text_end, \
|
||||
.flags = ARMV7_MMU_CODE_CACHED \
|
||||
}, { \
|
||||
.begin = (uint32_t) bsp_section_fast_data_begin, \
|
||||
.end = (uint32_t) bsp_section_fast_data_end, \
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED \
|
||||
}, { \
|
||||
.begin = (uint32_t) bsp_section_start_begin, \
|
||||
.end = (uint32_t) bsp_section_start_end, \
|
||||
.flags = ARMV7_MMU_CODE_CACHED \
|
||||
}, { \
|
||||
.begin = (uint32_t) bsp_section_vector_begin, \
|
||||
.end = (uint32_t) bsp_section_vector_end, \
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED \
|
||||
}, { \
|
||||
.begin = (uint32_t) bsp_section_text_begin, \
|
||||
.end = (uint32_t) bsp_section_text_end, \
|
||||
.flags = ARMV7_MMU_CODE_CACHED \
|
||||
}, { \
|
||||
.begin = (uint32_t) bsp_section_rodata_begin, \
|
||||
.end = (uint32_t) bsp_section_rodata_end, \
|
||||
.flags = ARMV7_MMU_DATA_READ_ONLY_CACHED \
|
||||
}, { \
|
||||
.begin = (uint32_t) bsp_section_data_begin, \
|
||||
.end = (uint32_t) bsp_section_data_end, \
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED \
|
||||
}, { \
|
||||
.begin = (uint32_t) bsp_section_bss_begin, \
|
||||
.end = (uint32_t) bsp_section_bss_end, \
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED \
|
||||
}, { \
|
||||
.begin = (uint32_t) bsp_section_work_begin, \
|
||||
.end = (uint32_t) bsp_section_work_end, \
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED \
|
||||
}, { \
|
||||
.begin = (uint32_t) bsp_section_stack_begin, \
|
||||
.end = (uint32_t) bsp_section_stack_end, \
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED \
|
||||
}
|
||||
|
||||
extern const arm_cp15_start_section_config bsp_mm_config_table[];
|
||||
extern const size_t bsp_mm_config_table_size;
|
||||
|
||||
|
||||
@@ -16,51 +16,11 @@
|
||||
#include <bsp/start.h>
|
||||
#include <bsp/arm-cp15-start.h>
|
||||
#include <bsp/arm-a9mpcore-start.h>
|
||||
#include <bsp/linker-symbols.h>
|
||||
|
||||
BSP_START_DATA_SECTION static const arm_cp15_start_section_config
|
||||
zynq_mmu_config_table[] = {
|
||||
ARMV7_CP15_START_DEFAULT_SECTIONS,
|
||||
{
|
||||
.begin = (uint32_t) bsp_section_fast_text_begin,
|
||||
.end = (uint32_t) bsp_section_fast_text_end,
|
||||
.flags = ARMV7_MMU_CODE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_fast_data_begin,
|
||||
.end = (uint32_t) bsp_section_fast_data_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_start_begin,
|
||||
.end = (uint32_t) bsp_section_start_end,
|
||||
.flags = ARMV7_MMU_CODE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_vector_begin,
|
||||
.end = (uint32_t) bsp_section_vector_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_text_begin,
|
||||
.end = (uint32_t) bsp_section_text_end,
|
||||
.flags = ARMV7_MMU_CODE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_rodata_begin,
|
||||
.end = (uint32_t) bsp_section_rodata_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_ONLY_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_data_begin,
|
||||
.end = (uint32_t) bsp_section_data_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_bss_begin,
|
||||
.end = (uint32_t) bsp_section_bss_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_work_begin,
|
||||
.end = (uint32_t) bsp_section_work_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = (uint32_t) bsp_section_stack_begin,
|
||||
.end = (uint32_t) bsp_section_stack_end,
|
||||
.flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
|
||||
}, {
|
||||
.begin = 0xe0000000U,
|
||||
.end = 0xe0200000U,
|
||||
.flags = ARMV7_MMU_DEVICE
|
||||
|
||||
Reference in New Issue
Block a user