6 * Copyright (c) 2005 Nathan Keynes.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
20 #ifndef lxdream_sh4_mmu_H
21 #define lxdream_sh4_mmu_H 1
29 #define VMA_TO_EXT_ADDR(vma) ((vma)&0x1FFFFFFF)
31 /************************** UTLB/ITLB Definitions ***************************/
32 #define ITLB_ENTRY_COUNT 4
33 #define UTLB_ENTRY_COUNT 64
36 #define TLB_VALID 0x00000100
37 #define TLB_USERMODE 0x00000040
38 #define TLB_WRITABLE 0x00000020
39 #define TLB_USERWRITABLE (TLB_WRITABLE|TLB_USERMODE)
40 #define TLB_SIZE_MASK 0x00000090
41 #define TLB_SIZE_1K 0x00000000
42 #define TLB_SIZE_4K 0x00000010
43 #define TLB_SIZE_64K 0x00000080
44 #define TLB_SIZE_1M 0x00000090
45 #define TLB_CACHEABLE 0x00000008
46 #define TLB_DIRTY 0x00000004
47 #define TLB_SHARE 0x00000002
48 #define TLB_WRITETHRU 0x00000001
50 #define MASK_1K 0xFFFFFC00
51 #define MASK_4K 0xFFFFF000
52 #define MASK_64K 0xFFFF0000
53 #define MASK_1M 0xFFF00000
56 sh4addr_t vpn; // Virtual Page Number
57 uint32_t asid; // Process ID
59 sh4addr_t ppn; // Physical Page Number
64 sh4addr_t vpn; // Virtual Page Number
65 uint32_t mask; // Page size mask
66 uint32_t asid; // Process ID
67 sh4addr_t ppn; // Physical Page Number
69 uint32_t pcmcia; // extra pcmcia data - not used
72 struct utlb_sort_entry {
73 sh4addr_t key; // Masked VPN + ASID
74 uint32_t mask; // Mask + 0x00FF
81 #endif /* !lxdream_sh4_mmu_H */
.