Line 13... |
Line 13... |
#define TLB_FIXED 4 /* number of fixed TLB entries */
|
#define TLB_FIXED 4 /* number of fixed TLB entries */
|
|
|
#define TLB_WRITE (1 << 1) /* write bit in EntryLo */
|
#define TLB_WRITE (1 << 1) /* write bit in EntryLo */
|
#define TLB_VALID (1 << 0) /* valid bit in EntryLo */
|
#define TLB_VALID (1 << 0) /* valid bit in EntryLo */
|
|
|
|
#define MMU_ACCS_MASK 0x07 /* bits used in BadAccs */
|
|
#define MMU_ACCS_READ 0x00 /* access type = read */
|
|
#define MMU_ACCS_WRITE 0x04 /* access type = write */
|
|
#define MMU_ACCS_BYTE 0x00 /* access width = byte */
|
|
#define MMU_ACCS_HALF 0x01 /* access width = half */
|
|
#define MMU_ACCS_WORD 0x02 /* access width = word */
|
|
|
|
|
typedef struct {
|
typedef struct {
|
Word page; /* 20 high-order bits of virtual address */
|
Word page; /* 20 high-order bits of virtual address */
|
Word frame; /* 20 high-order bits of physical address */
|
Word frame; /* 20 high-order bits of physical address */
|
Bool write; /* must be true to allow writing to the page */
|
Bool write; /* must be true to allow writing to the page */
|
Line 37... |
Line 44... |
void mmuSetEntryHi(Word value);
|
void mmuSetEntryHi(Word value);
|
Word mmuGetEntryLo(void);
|
Word mmuGetEntryLo(void);
|
void mmuSetEntryLo(Word value);
|
void mmuSetEntryLo(Word value);
|
Word mmuGetBadAddr(void);
|
Word mmuGetBadAddr(void);
|
void mmuSetBadAddr(Word value);
|
void mmuSetBadAddr(Word value);
|
|
Word mmuGetBadAccs(void);
|
|
void mmuSetBadAccs(Word value);
|
|
|
void mmuTbs(void);
|
void mmuTbs(void);
|
void mmuTbwr(void);
|
void mmuTbwr(void);
|
void mmuTbri(void);
|
void mmuTbri(void);
|
void mmuTbwi(void);
|
void mmuTbwi(void);
|