[rtems commit] bsps/arm: Add ARMV7_CP15_START_DEFAULT_SECTIONS
Sebastian Huber
sebh at rtems.org
Sun Oct 27 18:36:16 UTC 2013
Module: rtems
Branch: master
Commit: fbed79bdd02e16628dad465e6cdafedf82a566b8
Changeset: http://git.rtems.org/rtems/commit/?id=fbed79bdd02e16628dad465e6cdafedf82a566b8
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Sun Oct 27 19:35:16 2013 +0100
bsps/arm: Add ARMV7_CP15_START_DEFAULT_SECTIONS
---
.../arm/realview-pbx-a9/startup/bspstarthooks.c | 42 +------------------
.../lib/libbsp/arm/shared/include/arm-cp15-start.h | 44 ++++++++++++++++++++
.../libbsp/arm/xilinx-zynq/startup/bspstarthooks.c | 42 +------------------
3 files changed, 46 insertions(+), 82 deletions(-)
diff --git a/c/src/lib/libbsp/arm/realview-pbx-a9/startup/bspstarthooks.c b/c/src/lib/libbsp/arm/realview-pbx-a9/startup/bspstarthooks.c
index ce9c3ce..2865972 100644
--- a/c/src/lib/libbsp/arm/realview-pbx-a9/startup/bspstarthooks.c
+++ b/c/src/lib/libbsp/arm/realview-pbx-a9/startup/bspstarthooks.c
@@ -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
diff --git a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
index dafad80..1ff5222 100644
--- a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
+++ b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
@@ -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;
diff --git a/c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstarthooks.c b/c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstarthooks.c
index d3d5d75..aa6009d 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstarthooks.c
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstarthooks.c
@@ -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
More information about the vc
mailing list