Subversion Repositories HelenOS-historic

Rev

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

Rev 341 Rev 389
Line 29... Line 29...
29
#ifndef __mips32_TLB_H__
29
#ifndef __mips32_TLB_H__
30
#define __mips32_TLB_H__
30
#define __mips32_TLB_H__
31
 
31
 
32
#include <arch/exception.h>
32
#include <arch/exception.h>
33
 
33
 
-
 
34
#define TLB_SIZE    48
-
 
35
 
-
 
36
#define TLB_WIRED       1
-
 
37
#define TLB_KSTACK_WIRED_INDEX  0
-
 
38
 
-
 
39
#define TLB_PAGE_MASK_16K   (0x3<<13)
-
 
40
 
34
#define PAGE_UNCACHED           2
41
#define PAGE_UNCACHED           2
35
#define PAGE_CACHEABLE_EXC_WRITE    5
42
#define PAGE_CACHEABLE_EXC_WRITE    5
36
 
43
 
37
struct entry_lo {
44
struct entry_lo {
38
    unsigned g : 1;     /* global bit */
45
    unsigned g : 1;     /* global bit */
Line 63... Line 70...
63
    struct page_mask mask;
70
    struct page_mask mask;
64
} __attribute__ ((packed));
71
} __attribute__ ((packed));
65
 
72
 
66
typedef struct entry_lo pte_t;
73
typedef struct entry_lo pte_t;
67
 
74
 
-
 
75
/** Read Indexed TLB Entry
-
 
76
 *
-
 
77
 * Read Indexed TLB Entry.
-
 
78
 */
-
 
79
static inline void tlbr(void)
-
 
80
{
-
 
81
    __asm__ volatile ("tlbr\n\t");
-
 
82
}
-
 
83
 
-
 
84
/** Write Indexed TLB Entry
-
 
85
 *
-
 
86
 * Write Indexed TLB Entry.
-
 
87
 */
-
 
88
static inline void tlbwi(void)
-
 
89
{
-
 
90
    __asm__ volatile ("tlbwi\n\t");
-
 
91
}
-
 
92
 
-
 
93
/** Write Random TLB Entry
-
 
94
 *
-
 
95
 * Write Random TLB Entry.
-
 
96
 */
-
 
97
static inline void tlbwr(void)
-
 
98
{
-
 
99
    __asm__ volatile ("tlbwr\n\t");
-
 
100
}
-
 
101
 
68
extern void tlb_invalid(struct exception_regdump *pstate);
102
extern void tlb_invalid(struct exception_regdump *pstate);
69
extern void tlb_refill(struct exception_regdump *pstate);
103
extern void tlb_refill(struct exception_regdump *pstate);
-
 
104
extern void tlb_modified(struct exception_regdump *pstate);
70
 
105
 
71
#endif
106
#endif