1 | /* |
---|
2 | * RTEMS TQM8xx BSP |
---|
3 | * |
---|
4 | * This file contains the console driver. |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * Copyright (c) 1999, National Research Council of Canada |
---|
9 | * Copyright (c) 2008 Thomas Doerfler, embedded brains GmbH & Co. KG |
---|
10 | * All rights reserved. |
---|
11 | * |
---|
12 | * The license and distribution terms for this file may be |
---|
13 | * found in the file LICENSE in this distribution or at |
---|
14 | * http://www.rtems.org/license/LICENSE. |
---|
15 | */ |
---|
16 | |
---|
17 | #include <bsp.h> |
---|
18 | #include <mpc8xx/mmu.h> |
---|
19 | /* |
---|
20 | * This MMU_TLB_table is used to statically initialize the Table Lookaside |
---|
21 | * Buffers in the MMU of the TQM8xx board. |
---|
22 | * |
---|
23 | * We initialize the entries in both the instruction and data TLBs |
---|
24 | * with the same values - a few bits relevant to the data TLB are unused |
---|
25 | * in the instruction TLB. |
---|
26 | * |
---|
27 | * An Effective Page Number (EPN), Tablewalk Control Register (TWC) and |
---|
28 | * Real Page Number (RPN) value are supplied in the table for each TLB entry. |
---|
29 | * |
---|
30 | * The instruction and data TLBs each can hold 32 entries, so _TLB_Table must |
---|
31 | * not have more than 32 lines in it! |
---|
32 | * |
---|
33 | * We set up the virtual memory map so that virtual address of a |
---|
34 | * location is equal to its real address. |
---|
35 | */ |
---|
36 | MMU_TLB_table_t MMU_TLB_table[] = { |
---|
37 | /* |
---|
38 | * DRAM: Start address 0x00000000, 128M, |
---|
39 | * ASID=0x0, APG=0x0, not guarded memory, copyback data cache policy, |
---|
40 | * R/W,X for all, no ASID comparison, not cache-inhibited. |
---|
41 | * EPN TWC RPN |
---|
42 | */ |
---|
43 | { 0x00000200, 0x0D, 0x000009FD }, /* DRAM - PS=8M */ |
---|
44 | { 0x00800200, 0x0D, 0x008009FD }, /* DRAM - PS=8M */ |
---|
45 | { 0x01000200, 0x0D, 0x010009FD }, /* DRAM - PS=8M */ |
---|
46 | { 0x01800200, 0x0D, 0x018009FD }, /* DRAM - PS=8M */ |
---|
47 | { 0x02000200, 0x0D, 0x020009FD }, /* DRAM - PS=8M */ |
---|
48 | { 0x02800200, 0x0D, 0x028009FD }, /* DRAM - PS=8M */ |
---|
49 | { 0x03000200, 0x0D, 0x030009FD }, /* DRAM - PS=8M */ |
---|
50 | { 0x03800200, 0x0D, 0x038009FD }, /* DRAM - PS=8M */ |
---|
51 | { 0x04000200, 0x0D, 0x040009FD }, /* DRAM - PS=8M */ |
---|
52 | { 0x04800200, 0x0D, 0x048009FD }, /* DRAM - PS=8M */ |
---|
53 | { 0x05000200, 0x0D, 0x050009FD }, /* DRAM - PS=8M */ |
---|
54 | { 0x05800200, 0x0D, 0x058009FD }, /* DRAM - PS=8M */ |
---|
55 | { 0x06000200, 0x0D, 0x060009FD }, /* DRAM - PS=8M */ |
---|
56 | { 0x06800200, 0x0D, 0x068009FD }, /* DRAM - PS=8M */ |
---|
57 | { 0x07000200, 0x0D, 0x070009FD }, /* DRAM - PS=8M */ |
---|
58 | { 0x07800200, 0x0D, 0x078009FD }, /* DRAM - PS=8M */ |
---|
59 | /* |
---|
60 | * |
---|
61 | * (IMMR-SPRs) Dual Port RAM: Start address 0xFA200000, 16K, |
---|
62 | * ASID=0x0, APG=0x0, guarded memory, write-through data cache policy, |
---|
63 | * R/W,X for all, no ASID comparison, cache-inhibited. |
---|
64 | * |
---|
65 | * Note: We use the value in MBXA/PG2, which is also the value that |
---|
66 | * EPPC-Bug programmed into our boards. The alternative is the value |
---|
67 | * in MBXA/PG1: 0xFFA00000. This value might well depend on the revision |
---|
68 | * of the firmware. |
---|
69 | * EPN TWC RPN |
---|
70 | */ |
---|
71 | { 0xFA200200, 0x13, 0xFA2009FF }, /* IMMR - PS=16K */ |
---|
72 | /* |
---|
73 | * |
---|
74 | * Flash: Start address 0x40000000, 8M, |
---|
75 | * ASID=0x0, APG=0x0, not guarded memory, |
---|
76 | * R/O,X for all, no ASID comparison, not cache-inhibited. |
---|
77 | * EPN TWC RPN |
---|
78 | */ |
---|
79 | { 0x40000200, 0x0D, 0x40000CFD } /* Flash - PS=8M */ |
---|
80 | }; |
---|
81 | |
---|
82 | /* |
---|
83 | * MMU_N_TLB_Table_Entries is defined here because the size of the |
---|
84 | * MMU_TLB_table is only known in this file. |
---|
85 | */ |
---|
86 | int MMU_N_TLB_Table_Entries = ( sizeof(MMU_TLB_table) / sizeof(MMU_TLB_table[0]) ); |
---|