[rtems commit] bsps/arm: ARMV7_MMU_DATA_READ_WRITE_SHAREABLE
Sebastian Huber
sebh at rtems.org
Sun Oct 27 18:36:16 UTC 2013
Module: rtems
Branch: master
Commit: f074a4d1bba5dd60188bdd2bce1ecbaaac7aa9a7
Changeset: http://git.rtems.org/rtems/commit/?id=f074a4d1bba5dd60188bdd2bce1ecbaaac7aa9a7
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Sun Oct 27 19:27:44 2013 +0100
bsps/arm: ARMV7_MMU_DATA_READ_WRITE_SHAREABLE
Delete ARMV7_MMU_DATA_READ_WRITE_SHAREABLE and move RTEMS_SMP
specific MMU attribute settings to arm-cp15.h.
---
.../arm/raspberrypi/startup/mm_config_table.c | 18 ++++++------------
.../arm/realview-pbx-a9/startup/bspstarthooks.c | 18 ++++++------------
.../libbsp/arm/xilinx-zynq/startup/bspstarthooks.c | 18 ++++++------------
c/src/lib/libcpu/arm/shared/include/arm-cp15.h | 14 +++++++++-----
4 files changed, 27 insertions(+), 41 deletions(-)
diff --git a/c/src/lib/libbsp/arm/raspberrypi/startup/mm_config_table.c b/c/src/lib/libbsp/arm/raspberrypi/startup/mm_config_table.c
index 607394d..6e46cb1 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/startup/mm_config_table.c
+++ b/c/src/lib/libbsp/arm/raspberrypi/startup/mm_config_table.c
@@ -15,12 +15,6 @@
#include <bsp/start.h>
#include <bsp/arm-cp15-start.h>
-#ifdef RTEMS_SMP
- #define MMU_DATA_READ_WRITE ARMV7_MMU_DATA_READ_WRITE_SHAREABLE
-#else
- #define MMU_DATA_READ_WRITE ARMV7_MMU_DATA_READ_WRITE_CACHED
-#endif
-
BSP_START_DATA_SECTION const arm_cp15_start_section_config
bsp_mm_config_table[] = {
{
@@ -30,7 +24,7 @@ bsp_mm_config_table[] = {
}, {
.begin = (uint32_t) bsp_section_fast_data_begin,
.end = (uint32_t) bsp_section_fast_data_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_start_begin,
.end = (uint32_t) bsp_section_start_end,
@@ -38,7 +32,7 @@ bsp_mm_config_table[] = {
}, {
.begin = (uint32_t) bsp_section_vector_begin,
.end = (uint32_t) bsp_section_vector_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_text_begin,
.end = (uint32_t) bsp_section_text_end,
@@ -50,19 +44,19 @@ bsp_mm_config_table[] = {
}, {
.begin = (uint32_t) bsp_section_data_begin,
.end = (uint32_t) bsp_section_data_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_bss_begin,
.end = (uint32_t) bsp_section_bss_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_work_begin,
.end = (uint32_t) bsp_section_work_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_stack_begin,
.end = (uint32_t) bsp_section_stack_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = 0x20000000,
.end = 0x21000000,
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 e598c06..ce9c3ce 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
@@ -18,12 +18,6 @@
#include <bsp/arm-a9mpcore-start.h>
#include <bsp/linker-symbols.h>
-#ifdef RTEMS_SMP
- #define MMU_DATA_READ_WRITE ARMV7_MMU_DATA_READ_WRITE_SHAREABLE
-#else
- #define MMU_DATA_READ_WRITE ARMV7_MMU_DATA_READ_WRITE_CACHED
-#endif
-
BSP_START_DATA_SECTION static const arm_cp15_start_section_config
rvpbxa9_mmu_config_table[] = {
{
@@ -33,7 +27,7 @@ rvpbxa9_mmu_config_table[] = {
}, {
.begin = (uint32_t) bsp_section_fast_data_begin,
.end = (uint32_t) bsp_section_fast_data_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_start_begin,
.end = (uint32_t) bsp_section_start_end,
@@ -41,7 +35,7 @@ rvpbxa9_mmu_config_table[] = {
}, {
.begin = (uint32_t) bsp_section_vector_begin,
.end = (uint32_t) bsp_section_vector_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_text_begin,
.end = (uint32_t) bsp_section_text_end,
@@ -53,19 +47,19 @@ rvpbxa9_mmu_config_table[] = {
}, {
.begin = (uint32_t) bsp_section_data_begin,
.end = (uint32_t) bsp_section_data_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_bss_begin,
.end = (uint32_t) bsp_section_bss_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_work_begin,
.end = (uint32_t) bsp_section_work_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_stack_begin,
.end = (uint32_t) bsp_section_stack_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = 0x10000000U,
.end = 0x10020000U,
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 8d02c25..d3d5d75 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstarthooks.c
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstarthooks.c
@@ -18,12 +18,6 @@
#include <bsp/arm-a9mpcore-start.h>
#include <bsp/linker-symbols.h>
-#ifdef RTEMS_SMP
- #define MMU_DATA_READ_WRITE ARMV7_MMU_DATA_READ_WRITE_SHAREABLE
-#else
- #define MMU_DATA_READ_WRITE ARMV7_MMU_DATA_READ_WRITE_CACHED
-#endif
-
BSP_START_DATA_SECTION static const arm_cp15_start_section_config
zynq_mmu_config_table[] = {
{
@@ -33,7 +27,7 @@ zynq_mmu_config_table[] = {
}, {
.begin = (uint32_t) bsp_section_fast_data_begin,
.end = (uint32_t) bsp_section_fast_data_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_start_begin,
.end = (uint32_t) bsp_section_start_end,
@@ -41,7 +35,7 @@ zynq_mmu_config_table[] = {
}, {
.begin = (uint32_t) bsp_section_vector_begin,
.end = (uint32_t) bsp_section_vector_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_text_begin,
.end = (uint32_t) bsp_section_text_end,
@@ -53,19 +47,19 @@ zynq_mmu_config_table[] = {
}, {
.begin = (uint32_t) bsp_section_data_begin,
.end = (uint32_t) bsp_section_data_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_bss_begin,
.end = (uint32_t) bsp_section_bss_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_work_begin,
.end = (uint32_t) bsp_section_work_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = (uint32_t) bsp_section_stack_begin,
.end = (uint32_t) bsp_section_stack_end,
- .flags = MMU_DATA_READ_WRITE
+ .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
}, {
.begin = 0xe0000000U,
.end = 0xe0200000U,
diff --git a/c/src/lib/libcpu/arm/shared/include/arm-cp15.h b/c/src/lib/libcpu/arm/shared/include/arm-cp15.h
index a92ce79..40d4a59 100644
--- a/c/src/lib/libcpu/arm/shared/include/arm-cp15.h
+++ b/c/src/lib/libcpu/arm/shared/include/arm-cp15.h
@@ -99,8 +99,15 @@ extern "C" {
| ARM_MMU_SECT_AP_0 \
| ARM_MMU_SECT_DEFAULT)
-#define ARMV7_MMU_READ_WRITE_CACHED \
- (ARMV7_MMU_READ_WRITE | ARM_MMU_SECT_TEX_0 | ARM_MMU_SECT_C | ARM_MMU_SECT_B)
+#ifdef RTEMS_SMP
+ #define ARMV7_MMU_READ_WRITE_CACHED \
+ (ARMV7_MMU_READ_WRITE \
+ | ARM_MMU_SECT_TEX_0 | ARM_MMU_SECT_C | ARM_MMU_SECT_B | ARM_MMU_SECT_S)
+#else
+ #define ARMV7_MMU_READ_WRITE_CACHED \
+ (ARMV7_MMU_READ_WRITE \
+ | ARM_MMU_SECT_TEX_0 | ARM_MMU_SECT_C | ARM_MMU_SECT_B)
+#endif
#define ARMV7_MMU_DATA_READ_ONLY \
ARMV7_MMU_READ_ONLY
@@ -114,9 +121,6 @@ extern "C" {
#define ARMV7_MMU_DATA_READ_WRITE_CACHED \
ARMV7_MMU_READ_WRITE_CACHED
-#define ARMV7_MMU_DATA_READ_WRITE_SHAREABLE \
- (ARMV7_MMU_READ_WRITE_CACHED | ARM_MMU_SECT_S)
-
#define ARMV7_MMU_CODE \
ARMV7_MMU_READ_ONLY
More information about the vc
mailing list