1 | /* |
---|
2 | * mmutlbtab.c |
---|
3 | * |
---|
4 | * This file defines the MMU_TLB_table for the MBX8xx. |
---|
5 | * |
---|
6 | * Copyright (c) 1999, National Research Council of Canada |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may be |
---|
9 | * found in the file LICENSE in this distribution or at |
---|
10 | * http://www.OARcorp.com/rtems/license.html. |
---|
11 | */ |
---|
12 | |
---|
13 | #include <bsp.h> |
---|
14 | #include <mpc8xx/mmu.h> |
---|
15 | |
---|
16 | /* |
---|
17 | * This MMU_TLB_table is used to statically initialize the Table Lookaside |
---|
18 | * Buffers in the MMU of the MBX8xx board. |
---|
19 | * |
---|
20 | * We initialize the entries in both the instruction and data TLBs |
---|
21 | * with the same values - a few bits relevant to the data TLB are unused |
---|
22 | * in the instruction TLB. |
---|
23 | * |
---|
24 | * An Effective Page Number (EPN), Tablewalk Control Register (TWC) and |
---|
25 | * Real Page Number (RPN) value are supplied in the table for each TLB entry. |
---|
26 | * |
---|
27 | * The instruction and data TLBs each can hold 32 entries, so _TLB_Table must |
---|
28 | * not have more than 32 lines in it! |
---|
29 | * |
---|
30 | * We set up the virtual memory map so that virtual address of a |
---|
31 | * location is equal to its real address. |
---|
32 | */ |
---|
33 | MMU_TLB_table_t MMU_TLB_table[] = { |
---|
34 | /* |
---|
35 | * DRAM: CS1, Start address 0x00000000, 4M, |
---|
36 | * ASID=0x0, APG=0x0, not guarded memory, copyback data cache policy, |
---|
37 | * R/W,X for all, no ASID comparison, not cache-inhibited. |
---|
38 | * Last 512K block is cache-inhibited, but not guarded for use by EPPCBug. |
---|
39 | * EPN TWC RPN |
---|
40 | */ |
---|
41 | { 0x00000200, 0x05, 0x000009FD }, /* DRAM - PS=512K */ |
---|
42 | { 0x00080200, 0x05, 0x000809FD }, /* DRAM - PS=512K */ |
---|
43 | { 0x00100200, 0x05, 0x001009FD }, /* DRAM - PS=512K */ |
---|
44 | { 0x00180200, 0x05, 0x001809FD }, /* DRAM - PS=512K */ |
---|
45 | { 0x00200200, 0x05, 0x002009FD }, /* DRAM - PS=512K */ |
---|
46 | { 0x00280200, 0x05, 0x002809FD }, /* DRAM - PS=512K */ |
---|
47 | { 0x00300200, 0x05, 0x003009FD }, /* DRAM - PS=512K */ |
---|
48 | { 0x00380200, 0x05, 0x003809FF }, /* DRAM - PS=512K, cache-inhibited */ |
---|
49 | /* |
---|
50 | * |
---|
51 | * NVRAM: CS4, Start address 0xFA000000, 32K, |
---|
52 | * ASID=0x0, APG=0x0, not guarded memory, copyback data cache policy, |
---|
53 | * R/W,X for all, no ASID comparison, cache-inhibited. |
---|
54 | * |
---|
55 | * EPN TWC RPN |
---|
56 | */ |
---|
57 | { 0xFA000200, 0x01, 0xFA0009FF }, /* NVRAM - PS=16K */ |
---|
58 | { 0xFA004200, 0x01, 0xFA0049FF }, /* NVRAM - PS=16K */ |
---|
59 | /* |
---|
60 | * |
---|
61 | * Board Control/Status Register #1/#2: CS4, Start address 0xFA100000, (4 x 8 bits?) |
---|
62 | * ASID=0x0, APG=0x0, guarded memory, copyback data cache policy, |
---|
63 | * R/W,X for all, no ASID comparison, cache-inhibited. |
---|
64 | * EPN TWC RPN |
---|
65 | */ |
---|
66 | { 0xFA100200, 0x11, 0xFA1009F7 }, /* BCSR - PS=4K */ |
---|
67 | /* |
---|
68 | * |
---|
69 | * (IMMR-SPRs) Dual Port RAM: Start address 0xFA200000, 16K, |
---|
70 | * ASID=0x0, APG=0x0, guarded memory, copyback data cache policy, |
---|
71 | * R/W,X for all, no ASID comparison, cache-inhibited. |
---|
72 | * |
---|
73 | * Note: We use the value in MBXA/PG2, which is also the value that |
---|
74 | * EPPC-Bug programmed into our boards. The alternative is the value |
---|
75 | * in MBXA/PG1: 0xFFA00000. This value might well depend on the revision |
---|
76 | * of the firmware. |
---|
77 | * EPN TWC RPN |
---|
78 | */ |
---|
79 | { 0xFA200200, 0x11, 0xFA2009FF }, /* IMMR - PS=16K */ |
---|
80 | /* |
---|
81 | * |
---|
82 | * Flash: CS0, Start address 0xFE000000, 4M, (BootROM-EPPCBug) |
---|
83 | * ASID=0x0, APG=0x0, not guarded memory, |
---|
84 | * R/O,X for all, no ASID comparison, not cache-inhibited. |
---|
85 | * EPN TWC RPN |
---|
86 | */ |
---|
87 | { 0xFE000200, 0x05, 0xFE000CFD }, /* Flash - PS=512K */ |
---|
88 | { 0xFE080200, 0x05, 0xFE080CFD }, /* Flash - PS=512K */ |
---|
89 | { 0xFE100200, 0x05, 0xFE100CFD }, /* Flash - PS=512K */ |
---|
90 | { 0xFE180200, 0x05, 0xFE180CFD }, /* Flash - PS=512K */ |
---|
91 | { 0xFE200200, 0x05, 0xFE200CFD }, /* Flash - PS=512K */ |
---|
92 | { 0xFE280200, 0x05, 0xFE280CFD }, /* Flash - PS=512K */ |
---|
93 | { 0xFE300200, 0x05, 0xFE300CFD }, /* Flash - PS=512K */ |
---|
94 | { 0xFE380200, 0x05, 0xFE380CFD }, /* Flash - PS=512K */ |
---|
95 | /* |
---|
96 | * BootROM: CS7, Start address 0xFC000000, 4M?, (socketed FLASH) |
---|
97 | * ASID=0x0, APG=0x0, not guarded memory, |
---|
98 | * R/O,X for all, no ASID comparison, not cache-inhibited. |
---|
99 | * EPN TWC RPN |
---|
100 | */ |
---|
101 | { 0xFC000200, 0x05, 0xFC000CFD }, /* BootROM - PS=512K */ |
---|
102 | /* |
---|
103 | * |
---|
104 | * PCI/ISA I/O Space: CS5, Start address 0x80000000, 512M? |
---|
105 | * ASID=0x0, APG=0x0, guarded memory, |
---|
106 | * R/W,X for all, no ASID comparison, cache-inhibited. |
---|
107 | * EPN TWC RPN |
---|
108 | */ |
---|
109 | { 0x80000200, 0x1D, 0x800009FF }, /* PCI I/O - PS=8M */ |
---|
110 | /* |
---|
111 | * |
---|
112 | * PCI/ISA Memory Space: CS5, Start address 0xC0000000, 512M? |
---|
113 | * ASID=0x0, APG=0x0, guarded memory, |
---|
114 | * R/W,X for all, no ASID comparison, cache-inhibited. |
---|
115 | * EPN TWC RPN |
---|
116 | */ |
---|
117 | { 0xC0000200, 0x1D, 0xC00009FF }, /* PCI Memory - PS=8M */ |
---|
118 | /* |
---|
119 | * |
---|
120 | * PCI Bridge/QSPAN Registers: CS6, Start address 0xFA210000, 4K |
---|
121 | * ASID=0x0, APG=0x0, guarded memory, |
---|
122 | * R/W,X for all, no ASID comparison, cache-inhibited. |
---|
123 | * EPN TWC RPN |
---|
124 | */ |
---|
125 | { 0xFA210200, 0x11, 0xFA2109F7 } /* QSPAN - PS=4K */ |
---|
126 | }; |
---|
127 | |
---|
128 | /* |
---|
129 | * MMU_N_TLB_Table_Entries is defined here because the size of the |
---|
130 | * MMU_TLB_table is only known in this file. |
---|
131 | */ |
---|
132 | int MMU_N_TLB_Table_Entries = ( sizeof(MMU_TLB_table) / sizeof(MMU_TLB_table[0]) ); |
---|