Subversion Repositories HelenOS

Rev

Rev 2787 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2787 Rev 3425
Line 33... Line 33...
33
 */
33
 */
34
 
34
 
35
#ifndef KERN_mips32_TLB_H_
35
#ifndef KERN_mips32_TLB_H_
36
#define KERN_mips32_TLB_H_
36
#define KERN_mips32_TLB_H_
37
 
37
 
-
 
38
#include <arch/types.h>
-
 
39
#include <typedefs.h>
-
 
40
#include <arch/mm/asid.h>
38
#include <arch/exception.h>
41
#include <arch/exception.h>
39
 
42
 
40
#ifdef TLBCNT
43
#ifdef TLBCNT
41
#   define TLB_ENTRY_COUNT      TLBCNT
44
#   define TLB_ENTRY_COUNT      TLBCNT
42
#else
45
#else
Line 44... Line 47...
44
#endif
47
#endif
45
 
48
 
46
#define TLB_WIRED       1
49
#define TLB_WIRED       1
47
#define TLB_KSTACK_WIRED_INDEX  0
50
#define TLB_KSTACK_WIRED_INDEX  0
48
 
51
 
-
 
52
#define TLB_PAGE_MASK_4K    (0x000 << 13)
49
#define TLB_PAGE_MASK_16K   (0x3<<13)
53
#define TLB_PAGE_MASK_16K   (0x003 << 13)
-
 
54
#define TLB_PAGE_MASK_64K   (0x00f << 13)
-
 
55
#define TLB_PAGE_MASK_256K  (0x03f << 13)
-
 
56
#define TLB_PAGE_MASK_1M    (0x0ff << 13)
-
 
57
#define TLB_PAGE_MASK_4M    (0x3ff << 13)
-
 
58
#define TLB_PAGE_MASK_16M   (0xfff << 13)
50
 
59
 
51
#define PAGE_UNCACHED           2
60
#define PAGE_UNCACHED           2
52
#define PAGE_CACHEABLE_EXC_WRITE    5
61
#define PAGE_CACHEABLE_EXC_WRITE    5
53
 
62
 
54
typedef union {
63
typedef union {
Line 157... Line 166...
157
#define tlb_invalidate(asid)    tlb_invalidate_asid(asid)
166
#define tlb_invalidate(asid)    tlb_invalidate_asid(asid)
158
 
167
 
159
extern void tlb_invalid(istate_t *istate);
168
extern void tlb_invalid(istate_t *istate);
160
extern void tlb_refill(istate_t *istate);
169
extern void tlb_refill(istate_t *istate);
161
extern void tlb_modified(istate_t *istate);
170
extern void tlb_modified(istate_t *istate);
-
 
171
extern void tlb_prepare_entry_lo(entry_lo_t *lo, bool g, bool v, bool d, bool cacheable, uintptr_t pfn);
-
 
172
extern void tlb_prepare_entry_hi(entry_hi_t *hi, asid_t asid, uintptr_t addr);
162
 
173
 
163
#endif
174
#endif
164
 
175
 
165
/** @}
176
/** @}
166
 */
177
 */