Changeset 1dcf5fe in rtems


Ignore:
Timestamp:
May 31, 2013, 7:59:27 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
5b391f85
Parents:
ac2bb464
git-author:
Sebastian Huber <sebastian.huber@…> (05/31/13 07:59:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/31/13 13:20:31)
Message:

bsps/arm: Merge ARMv7 MMU section definitions

Location:
c/src/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/realview-pbx-a9/include/bsp.h

    rac2bb464 r1dcf5fe  
    3232#endif /* __cplusplus */
    3333
    34 #define BSP_ARM_MMU_CLIENT_DOMAIN 15U
    35 
    36 #define BSP_ARM_MMU_READ_ONLY \
    37   ((BSP_ARM_MMU_CLIENT_DOMAIN << ARM_MMU_SECT_DOMAIN_SHIFT) \
    38     | ARM_MMU_SECT_AP_0 \
    39     | ARM_MMU_SECT_AP_2 \
    40     | ARM_MMU_SECT_DEFAULT)
    41 
    42 #define BSP_ARM_MMU_READ_ONLY_CACHED \
    43   (BSP_ARM_MMU_READ_ONLY | ARM_MMU_SECT_C | ARM_MMU_SECT_B)
    44 
    45 #define BSP_ARM_MMU_READ_WRITE \
    46   ((BSP_ARM_MMU_CLIENT_DOMAIN << ARM_MMU_SECT_DOMAIN_SHIFT) \
    47     | ARM_MMU_SECT_AP_0 \
    48     | ARM_MMU_SECT_DEFAULT)
    49 
    50 #define BSP_ARM_MMU_READ_WRITE_CACHED \
    51   (BSP_ARM_MMU_READ_WRITE | ARM_MMU_SECT_C | ARM_MMU_SECT_B)
    52 
    53 #define BSP_ARM_MMU_READ_WRITE_DATA \
    54   BSP_ARM_MMU_READ_WRITE_CACHED
    55 
    56 #define BSP_ARM_MMU_READ_ONLY_DATA \
    57   BSP_ARM_MMU_READ_ONLY_CACHED
    58 
    59 #define BSP_ARM_MMU_CODE BSP_ARM_MMU_READ_ONLY_CACHED
    60 
    6134#define BSP_ARM_A9MPCORE_PT_BASE 0x1f000600
    6235
  • c/src/lib/libbsp/arm/realview-pbx-a9/startup/bspstarthooks.c

    rac2bb464 r1dcf5fe  
    2828    .begin = (uint32_t) bsp_section_fast_text_begin,
    2929    .end = (uint32_t) bsp_section_fast_text_end,
    30     .flags = BSP_ARM_MMU_CODE
     30    .flags = ARMV7_MMU_CODE_CACHED
    3131  }, {
    3232    .begin = (uint32_t) bsp_section_fast_data_begin,
    3333    .end = (uint32_t) bsp_section_fast_data_end,
    34     .flags = BSP_ARM_MMU_READ_WRITE_DATA
     34    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    3535  }, {
    3636    .begin = (uint32_t) bsp_section_start_begin,
    3737    .end = (uint32_t) bsp_section_start_end,
    38     .flags = BSP_ARM_MMU_CODE
     38    .flags = ARMV7_MMU_CODE_CACHED
    3939  }, {
    4040    .begin = (uint32_t) bsp_section_vector_begin,
    4141    .end = (uint32_t) bsp_section_vector_end,
    42     .flags = BSP_ARM_MMU_READ_WRITE_CACHED
     42    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    4343  }, {
    4444    .begin = (uint32_t) bsp_section_text_begin,
    4545    .end = (uint32_t) bsp_section_text_end,
    46     .flags = BSP_ARM_MMU_CODE
     46    .flags = ARMV7_MMU_CODE_CACHED
    4747  }, {
    4848    .begin = (uint32_t) bsp_section_rodata_begin,
    4949    .end = (uint32_t) bsp_section_rodata_end,
    50     .flags = BSP_ARM_MMU_READ_ONLY_DATA
     50    .flags = ARMV7_MMU_DATA_READ_ONLY_CACHED
    5151  }, {
    5252    .begin = (uint32_t) bsp_section_data_begin,
    5353    .end = (uint32_t) bsp_section_data_end,
    54     .flags = BSP_ARM_MMU_READ_WRITE_DATA
     54    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    5555  }, {
    5656    .begin = (uint32_t) bsp_section_bss_begin,
    5757    .end = (uint32_t) bsp_section_bss_end,
    58     .flags = BSP_ARM_MMU_READ_WRITE_DATA
     58    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    5959  }, {
    6060    .begin = (uint32_t) bsp_section_work_begin,
    6161    .end = (uint32_t) bsp_section_work_end,
    62     .flags = BSP_ARM_MMU_READ_WRITE_DATA
     62    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    6363  }, {
    6464    .begin = (uint32_t) bsp_section_stack_begin,
    6565    .end = (uint32_t) bsp_section_stack_end,
    66     .flags = BSP_ARM_MMU_READ_WRITE_DATA
     66    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    6767  }, {
    6868    .begin = 0x10000000U,
    6969    .end = 0x10020000U,
    70     .flags = BSP_ARM_MMU_READ_WRITE
     70    .flags = ARMV7_MMU_DEVICE
    7171  }, {
    7272    .begin = 0x1f000000U,
    7373    .end = 0x20000000U,
    74     .flags = BSP_ARM_MMU_READ_WRITE
     74    .flags = ARMV7_MMU_DEVICE
    7575  }
    7676};
     
    8686    ctrl,
    8787    (uint32_t *) bsp_translation_table_base,
    88     BSP_ARM_MMU_CLIENT_DOMAIN,
     88    ARM_MMU_DEFAULT_CLIENT_DOMAIN,
    8989    &rvpbxa9_mmu_config_table[0],
    9090    RTEMS_ARRAY_SIZE(rvpbxa9_mmu_config_table)
  • c/src/lib/libbsp/arm/xilinx-zynq/include/bsp.h

    rac2bb464 r1dcf5fe  
    3232#endif /* __cplusplus */
    3333
    34 #define BSP_ARM_MMU_CLIENT_DOMAIN 15U
    35 
    36 #define BSP_ARM_MMU_READ_ONLY \
    37   ((BSP_ARM_MMU_CLIENT_DOMAIN << ARM_MMU_SECT_DOMAIN_SHIFT) \
    38     | ARM_MMU_SECT_AP_0 \
    39     | ARM_MMU_SECT_AP_2 \
    40     | ARM_MMU_SECT_DEFAULT)
    41 
    42 #define BSP_ARM_MMU_READ_ONLY_CACHED \
    43   (BSP_ARM_MMU_READ_ONLY | ARM_MMU_SECT_C | ARM_MMU_SECT_B)
    44 
    45 #define BSP_ARM_MMU_READ_WRITE \
    46   ((BSP_ARM_MMU_CLIENT_DOMAIN << ARM_MMU_SECT_DOMAIN_SHIFT) \
    47     | ARM_MMU_SECT_AP_0 \
    48     | ARM_MMU_SECT_DEFAULT)
    49 
    50 #define BSP_ARM_MMU_READ_WRITE_CACHED \
    51   (BSP_ARM_MMU_READ_WRITE | ARM_MMU_SECT_C | ARM_MMU_SECT_B)
    52 
    53 #define BSP_ARM_MMU_READ_WRITE_DATA \
    54   BSP_ARM_MMU_READ_WRITE_CACHED
    55 
    56 #define BSP_ARM_MMU_READ_ONLY_DATA \
    57   BSP_ARM_MMU_READ_ONLY_CACHED
    58 
    59 #define BSP_ARM_MMU_CODE BSP_ARM_MMU_READ_ONLY_CACHED
    60 
    6134#define BSP_ARM_A9MPCORE_PT_BASE 0xf8f00600
    6235
  • c/src/lib/libbsp/arm/xilinx-zynq/startup/bspstarthooks.c

    rac2bb464 r1dcf5fe  
    2828    .begin = (uint32_t) bsp_section_fast_text_begin,
    2929    .end = (uint32_t) bsp_section_fast_text_end,
    30     .flags = BSP_ARM_MMU_CODE
     30    .flags = ARMV7_MMU_CODE_CACHED
    3131  }, {
    3232    .begin = (uint32_t) bsp_section_fast_data_begin,
    3333    .end = (uint32_t) bsp_section_fast_data_end,
    34     .flags = BSP_ARM_MMU_READ_WRITE_DATA
     34    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    3535  }, {
    3636    .begin = (uint32_t) bsp_section_start_begin,
    3737    .end = (uint32_t) bsp_section_start_end,
    38     .flags = BSP_ARM_MMU_CODE
     38    .flags = ARMV7_MMU_CODE_CACHED
    3939  }, {
    4040    .begin = (uint32_t) bsp_section_vector_begin,
    4141    .end = (uint32_t) bsp_section_vector_end,
    42     .flags = BSP_ARM_MMU_READ_WRITE_CACHED
     42    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    4343  }, {
    4444    .begin = (uint32_t) bsp_section_text_begin,
    4545    .end = (uint32_t) bsp_section_text_end,
    46     .flags = BSP_ARM_MMU_CODE
     46    .flags = ARMV7_MMU_CODE_CACHED
    4747  }, {
    4848    .begin = (uint32_t) bsp_section_rodata_begin,
    4949    .end = (uint32_t) bsp_section_rodata_end,
    50     .flags = BSP_ARM_MMU_READ_ONLY_DATA
     50    .flags = ARMV7_MMU_DATA_READ_ONLY_CACHED
    5151  }, {
    5252    .begin = (uint32_t) bsp_section_data_begin,
    5353    .end = (uint32_t) bsp_section_data_end,
    54     .flags = BSP_ARM_MMU_READ_WRITE_DATA
     54    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    5555  }, {
    5656    .begin = (uint32_t) bsp_section_bss_begin,
    5757    .end = (uint32_t) bsp_section_bss_end,
    58     .flags = BSP_ARM_MMU_READ_WRITE_DATA
     58    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    5959  }, {
    6060    .begin = (uint32_t) bsp_section_work_begin,
    6161    .end = (uint32_t) bsp_section_work_end,
    62     .flags = BSP_ARM_MMU_READ_WRITE_DATA
     62    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    6363  }, {
    6464    .begin = (uint32_t) bsp_section_stack_begin,
    6565    .end = (uint32_t) bsp_section_stack_end,
    66     .flags = BSP_ARM_MMU_READ_WRITE_DATA
     66    .flags = ARMV7_MMU_DATA_READ_WRITE_CACHED
    6767  }, {
    6868    .begin = 0xe0000000U,
    6969    .end = 0xe0200000U,
    70     .flags = BSP_ARM_MMU_READ_WRITE
     70    .flags = ARMV7_MMU_DEVICE
    7171  }, {
    7272    .begin = 0xf8000000U,
    7373    .end = 0xf9000000U,
    74     .flags = BSP_ARM_MMU_READ_WRITE
     74    .flags = ARMV7_MMU_DEVICE
    7575  }
    7676};
     
    8686    ctrl,
    8787    (uint32_t *) bsp_translation_table_base,
    88     BSP_ARM_MMU_CLIENT_DOMAIN,
     88    ARM_MMU_DEFAULT_CLIENT_DOMAIN,
    8989    &zynq_mmu_config_table[0],
    9090    RTEMS_ARRAY_SIZE(zynq_mmu_config_table)
  • c/src/lib/libcpu/arm/shared/include/arm-cp15.h

    rac2bb464 r1dcf5fe  
    8383#define ARM_MMU_TRANSLATION_TABLE_ENTRY_COUNT 4096U
    8484
     85#define ARM_MMU_DEFAULT_CLIENT_DOMAIN 15U
     86
     87#define ARMV7_MMU_READ_ONLY \
     88  ((ARM_MMU_DEFAULT_CLIENT_DOMAIN << ARM_MMU_SECT_DOMAIN_SHIFT) \
     89    | ARM_MMU_SECT_AP_0 \
     90    | ARM_MMU_SECT_AP_2 \
     91    | ARM_MMU_SECT_DEFAULT)
     92
     93#define ARMV7_MMU_READ_ONLY_CACHED \
     94  (ARMV7_MMU_READ_ONLY | ARM_MMU_SECT_C | ARM_MMU_SECT_B)
     95
     96#define ARMV7_MMU_READ_WRITE \
     97  ((ARM_MMU_DEFAULT_CLIENT_DOMAIN << ARM_MMU_SECT_DOMAIN_SHIFT) \
     98    | ARM_MMU_SECT_AP_0 \
     99    | ARM_MMU_SECT_DEFAULT)
     100
     101#define ARMV7_MMU_READ_WRITE_CACHED \
     102  (ARMV7_MMU_READ_WRITE | ARM_MMU_SECT_C | ARM_MMU_SECT_B)
     103
     104#define ARMV7_MMU_DATA_READ_ONLY \
     105  ARMV7_MMU_READ_ONLY
     106
     107#define ARMV7_MMU_DATA_READ_ONLY_CACHED \
     108  ARMV7_MMU_READ_ONLY_CACHED
     109
     110#define ARMV7_MMU_DATA_READ_WRITE \
     111  ARMV7_MMU_READ_WRITE
     112
     113#define ARMV7_MMU_DATA_READ_WRITE_CACHED \
     114  ARMV7_MMU_READ_WRITE_CACHED
     115
     116#define ARMV7_MMU_DATA_READ_WRITE_SHAREABLE \
     117  (ARMV7_MMU_READ_WRITE_CACHED | ARM_MMU_SECT_S)
     118
     119#define ARMV7_MMU_CODE \
     120  ARMV7_MMU_READ_ONLY
     121
     122#define ARMV7_MMU_CODE_CACHED \
     123  ARMV7_MMU_READ_ONLY_CACHED
     124
     125#define ARMV7_MMU_DEVICE \
     126  (ARMV7_MMU_READ_WRITE | ARM_MMU_SECT_B)
     127
    85128/** @} */
    86129
Note: See TracChangeset for help on using the changeset viewer.