source: rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-config-mmu.c @ 13a8b19

4.115
Last change on this file since 13a8b19 was 13a8b19, checked in by Sebastian Huber <sebastian.huber@…>, on 04/24/12 at 09:21:46

bsp/mpc55xxevb: Change early MMU settings

Add internal SRAM sections with cache enabled to early MMU settings.
The internal SRAM initialization will use the early MMU settings. This
allows applications to use cache inhibited areas in the internal SRAM.

  • Property mode set to 100644
File size: 5.4 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup mpc55xx
5 *
6 * @brief MMU configuration.
7 */
8
9/*
10 * Copyright (c) 2008-2012 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Obere Lagerstr. 30
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.com/license/LICENSE.
21 */
22
23#include <bsp.h>
24#include <bsp/start.h>
25#include <bsp/mpc55xx-config.h>
26
27BSP_START_TEXT_SECTION const struct MMU_tag
28  mpc55xx_start_config_mmu [] = {
29#if defined(MPC55XX_BOARD_GWLCFM)
30  /* External Ethernet Controller 64k */
31  MPC55XX_MMU_TAG_INITIALIZER(5, 0x3fff8000, MPC55XX_MMU_64K, 0, 1, 1, 1)
32#elif defined(MPC55XX_BOARD_PHYCORE_MPC5554)
33    /* XXX I'm not using TLB1 entry 2 the same way as
34         * in the BAM.
35     */
36    /*  Set up MMU TLB1 entry 2 for external ram. */
37    /*  Effective Base address = 0x2100_0000 XXX NOT LIKE BAM */
38    /*       Real Base address = 0x2100_0000 XXX NOT LIKE BAM */
39    /*  Page Size            6 =  4MB XXX Not like BAM */
40    /*  Not Guarded, Cache Enable, All Access (0, 3F) */
41    {
42        { .R = 0x10020000},     /* MAS0 */
43        { .R = 0xC0000600},     /* MAS1 */
44        { .R = 0x21000000},     /* MAS2 */
45        { .R = 0x2100003F}      /* MAS3 */
46    },
47
48    /*  Set up MMU TLB1 entry 5 for second half of SRAM (debug RAM) */
49    /*  Effective Base address = 0x2140_0000 */
50    /*       Real Base address = 0x2140_0000 */
51    /*  Page Size            6 = 4MB */
52    /*  Not Guarded, Cache Enable, All Access (0, 3F) */
53    {
54        { .R =  0x10050000 },   /* MAS0 */
55        { .R =  0xC0000600 },   /* MAS1 */
56        { .R =  0x21400000 },   /* MAS2 */
57        { .R =  0x2140003F }    /* MAS3 */
58    },
59    /*  Set up MMU TLB1 entry 6 for External LAN91C111 */
60    /*  Effective Base address = 0x2200_0000 */
61    /*       Real Base address = 0x2200_0000 */
62    /*  Page Size            7 = 16MB */
63    /*  Write-through, Guarded, Cache Inhibit, All Access (E, 3F) */
64    {
65        { .R = 0x10060000},     /* MAS0 */
66        { .R = 0xC0000700},     /* MAS1 */
67        { .R = 0x2200000E},     /* MAS2 */
68        { .R = 0x2200003F}      /* MAS3 */
69    },
70
71    /*  Set up MMU TLB1 entry 7 for External FPGA */
72    /*  Effective Base address = 0x2300_0000 */
73    /*       Real Base address = 0x2300_0000 */
74    /*  Page Size            7 = 16MB */
75    /*  Write-through, Guarded, Cache Inhibit, All Access (E, 3F) */
76    {
77        { .R = 0x10070000},     /* MAS0 */
78        { .R = 0xC0000700},     /* MAS1 */
79        { .R = 0x2300000E},     /* MAS2 */
80        { .R = 0x2300003F},     /* MAS3 */
81    },
82
83        /* Should also set up maps for the debug RAM and the
84         * external flash.
85         */
86#elif defined(MPC55XX_BOARD_MPC5566EVB)
87  /* Internal flash 3M */
88  MPC55XX_MMU_TAG_INITIALIZER(1, 0x00000000, MPC55XX_MMU_64K, 1, 0, 1, 0),
89  MPC55XX_MMU_TAG_INITIALIZER(6, 0x00010000, MPC55XX_MMU_64K, 1, 0, 1, 0),
90  MPC55XX_MMU_TAG_INITIALIZER(7, 0x00020000, MPC55XX_MMU_64K, 1, 0, 1, 0),
91  MPC55XX_MMU_TAG_INITIALIZER(8, 0x00030000, MPC55XX_MMU_64K, 1, 0, 1, 0),
92  MPC55XX_MMU_TAG_INITIALIZER(9, 0x00040000, MPC55XX_MMU_256K, 1, 0, 1, 0),
93  MPC55XX_MMU_TAG_INITIALIZER(10, 0x00080000, MPC55XX_MMU_256K, 1, 0, 1, 0),
94  MPC55XX_MMU_TAG_INITIALIZER(11, 0x000c0000, MPC55XX_MMU_256K, 1, 0, 1, 0),
95  MPC55XX_MMU_TAG_INITIALIZER(12, 0x00100000, MPC55XX_MMU_1M, 1, 0, 1, 0),
96  MPC55XX_MMU_TAG_INITIALIZER(13, 0x00200000, MPC55XX_MMU_1M, 1, 0, 1, 0),
97  /* External SRAM 512k */
98  MPC55XX_MMU_TAG_INITIALIZER(2, 0x20000000, MPC55XX_MMU_256K, 0, 1, 1, 0),
99  MPC55XX_MMU_TAG_INITIALIZER(14, 0x20040000, MPC55XX_MMU_256K, 0, 1, 1, 0),
100  /* Internal SRAM 128k */
101  MPC55XX_MMU_TAG_INITIALIZER(3, 0x40000000, MPC55XX_MMU_64K, 0, 1, 1, 0),
102  MPC55XX_MMU_TAG_INITIALIZER(5, 0x40010000, MPC55XX_MMU_64K, 0, 1, 1, 0),
103  /* External Ethernet Controller 64k */
104  MPC55XX_MMU_TAG_INITIALIZER(15, 0x3fff8000, MPC55XX_MMU_64K, 0, 1, 1, 1)
105#elif defined(MPC55XX_BOARD_MPC5674FEVB)
106  /* Internal flash 4M */
107  MPC55XX_MMU_TAG_INITIALIZER(1, 0x00000000, MPC55XX_MMU_64K, 1, 0, 1, 0),
108  MPC55XX_MMU_TAG_INITIALIZER(5, 0x00010000, MPC55XX_MMU_64K, 1, 0, 1, 0),
109  MPC55XX_MMU_TAG_INITIALIZER(6, 0x00020000, MPC55XX_MMU_128K, 1, 0, 1, 0),
110  MPC55XX_MMU_TAG_INITIALIZER(7, 0x00040000, MPC55XX_MMU_256K, 1, 0, 1, 0),
111  MPC55XX_MMU_TAG_INITIALIZER(8, 0x00080000, MPC55XX_MMU_512K, 1, 0, 1, 0),
112  MPC55XX_MMU_TAG_INITIALIZER(9, 0x00100000, MPC55XX_MMU_1M, 1, 0, 1, 0),
113  MPC55XX_MMU_TAG_INITIALIZER(10, 0x00200000, MPC55XX_MMU_2M, 1, 0, 1, 0),
114  /* External SRAM 512k */
115  MPC55XX_MMU_TAG_INITIALIZER(2, 0x20000000, MPC55XX_MMU_512K, 0, 1, 1, 0),
116  /* Internal SRAM 256k */
117  MPC55XX_MMU_TAG_INITIALIZER(3, 0x40000000, MPC55XX_MMU_256K, 0, 1, 1, 0),
118  /* External Ethernet controller */
119  MPC55XX_MMU_TAG_INITIALIZER(15, 0x3fff8000, MPC55XX_MMU_64K, 0, 1, 1, 1)
120#elif MPC55XX_CHIP_TYPE / 10 == 564
121  /* Internal flash 1M */
122  MPC55XX_MMU_TAG_INITIALIZER(0, 0x00000000, MPC55XX_MMU_1M, 1, 0, 1, 0),
123  /* IO */
124  MPC55XX_MMU_TAG_INITIALIZER(1, 0xffe00000, MPC55XX_MMU_2M, 0, 1, 1, 1),
125  MPC55XX_MMU_TAG_INITIALIZER(2, 0xc3f00000, MPC55XX_MMU_1M, 0, 1, 1, 1),
126  /* Internal SRAM 64k + 64k */
127  MPC55XX_MMU_TAG_INITIALIZER(3, 0x40000000, MPC55XX_MMU_64K, 0, 1, 1, 0),
128  MPC55XX_MMU_TAG_INITIALIZER(4, 0x50000000, MPC55XX_MMU_64K, 0, 1, 1, 0)
129#endif
130};
131
132BSP_START_TEXT_SECTION const size_t mpc55xx_start_config_mmu_count [] = {
133  sizeof(mpc55xx_start_config_mmu) / sizeof(mpc55xx_start_config_mmu [0])
134};
Note: See TracBrowser for help on using the repository browser.