source: rtems/c/src/lib/libbsp/arm/raspberrypi/startup/mm_config_table.c @ 7ad725f2

4.115
Last change on this file since 7ad725f2 was 7ad725f2, checked in by Hesham AL-Matary <heshamelmatary@…>, on 10/14/13 at 13:34:58

Modify raspberrypi mm_config_table to map GPIO and registers.

Changes include reverting back to setting all page-table section entries
as invalid and modify mm_config_table to apply the correct memory attributes
for raspbberypi memory sections at startup. The newly added entry at mm_config_table
maps raspberrypi GPIO and other registers found at raspberrypi.h

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 * Copyright (c) 2013 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <info@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.com/license/LICENSE.
13 */
14
15#include <bsp/start.h>
16#include <bsp/arm-cp15-start.h>
17
18#ifdef RTEMS_SMP
19  #define MMU_DATA_READ_WRITE ARMV7_MMU_DATA_READ_WRITE_SHAREABLE
20#else
21  #define MMU_DATA_READ_WRITE ARMV7_MMU_DATA_READ_WRITE_CACHED
22#endif
23
24BSP_START_DATA_SECTION const arm_cp15_start_section_config
25bsp_mm_config_table[] = {
26  {
27    .begin = (uint32_t) bsp_section_fast_text_begin,
28    .end = (uint32_t) bsp_section_fast_text_end,
29    .flags = ARMV7_MMU_CODE_CACHED
30  }, {
31    .begin = (uint32_t) bsp_section_fast_data_begin,
32    .end = (uint32_t) bsp_section_fast_data_end,
33    .flags = MMU_DATA_READ_WRITE
34  }, {
35    .begin = (uint32_t) bsp_section_start_begin,
36    .end = (uint32_t) bsp_section_start_end,
37    .flags = ARMV7_MMU_CODE_CACHED
38  }, {
39    .begin = (uint32_t) bsp_section_vector_begin,
40    .end = (uint32_t) bsp_section_vector_end,
41    .flags = MMU_DATA_READ_WRITE
42  }, {
43    .begin = (uint32_t) bsp_section_text_begin,
44    .end = (uint32_t) bsp_section_text_end,
45    .flags = ARMV7_MMU_READ_WRITE
46  }, {
47    .begin = (uint32_t) bsp_section_rodata_begin,
48    .end = (uint32_t) bsp_section_rodata_end,
49    .flags = ARMV7_MMU_DATA_READ_ONLY_CACHED
50  }, {
51    .begin = (uint32_t) bsp_section_data_begin,
52    .end = (uint32_t) bsp_section_data_end,
53    .flags = MMU_DATA_READ_WRITE
54  }, {
55    .begin = (uint32_t) bsp_section_bss_begin,
56    .end = (uint32_t) bsp_section_bss_end,
57    .flags = MMU_DATA_READ_WRITE
58  }, {
59    .begin = (uint32_t) bsp_section_work_begin,
60    .end = (uint32_t) bsp_section_work_end,
61    .flags = MMU_DATA_READ_WRITE
62  }, {
63    .begin = (uint32_t) bsp_section_stack_begin,
64    .end = (uint32_t) bsp_section_stack_end,
65    .flags = MMU_DATA_READ_WRITE
66  }, {
67    .begin = 0x20000000,
68    .end = 0x21000000,
69    .flags = ARMV7_MMU_DEVICE
70  }
71};
72
73BSP_START_DATA_SECTION const size_t bsp_mm_config_table_size =
74RTEMS_ARRAY_SIZE(bsp_mm_config_table);
Note: See TracBrowser for help on using the repository browser.