30,6 → 30,7 |
#define __mips32_TLB_H__ |
|
#include <arch/exception.h> |
#include <typedefs.h> |
|
#define TLB_SIZE 48 |
|
41,6 → 42,11 |
#define PAGE_UNCACHED 2 |
#define PAGE_CACHEABLE_EXC_WRITE 5 |
|
typedef union entry_lo entry_lo_t; |
typedef union entry_hi entry_hi_t; |
typedef union page_mask page_mask_t; |
typedef union index tlb_index_t; |
|
union entry_lo { |
struct { |
unsigned g : 1; /* global bit */ |
53,15 → 59,14 |
__u32 value; |
}; |
|
struct pte { |
unsigned g : 1; /* global bit */ |
unsigned v : 1; /* valid bit */ |
unsigned d : 1; /* dirty/write-protect bit */ |
unsigned c : 3; /* cache coherency attribute */ |
unsigned pfn : 24; /* frame number */ |
unsigned w : 1; /* writable */ |
unsigned a : 1; /* accessed */ |
} __attribute__ ((packed)); |
union pte { |
entry_lo_t lo; |
struct { |
unsigned : 30; |
unsigned w : 1; /* writable */ |
unsigned a : 1; /* accessed */ |
} __attribute__ ((packed)); |
}; |
|
union entry_hi { |
struct { |
90,11 → 95,6 |
__u32 value; |
}; |
|
typedef union entry_lo entry_lo_t; |
typedef union entry_hi entry_hi_t; |
typedef union page_mask page_mask_t; |
typedef union index tlb_index_t; |
|
/** Probe TLB for Matching Entry |
* |
* Probe TLB for Matching Entry. |