Line 781... |
Line 781... |
}
|
}
|
}
|
}
|
|
|
|
|
static void doTLB(char *tokens[], int n) {
|
static void doTLB(char *tokens[], int n) {
|
|
static char *mmuAccsWidth[4] = { "byte", "half", "word", "????" };
|
int index;
|
int index;
|
TLB_Entry tlbEntry;
|
TLB_Entry tlbEntry;
|
|
Word mmuAccs;
|
Word data;
|
Word data;
|
|
|
if (n == 1) {
|
if (n == 1) {
|
for (index = 0; index < TLB_SIZE; index++) {
|
for (index = 0; index < TLB_SIZE; index++) {
|
tlbEntry = mmuGetTLB(index);
|
tlbEntry = mmuGetTLB(index);
|
Line 797... |
Line 799... |
}
|
}
|
cPrintf("Index(1) %08X\n", mmuGetIndex());
|
cPrintf("Index(1) %08X\n", mmuGetIndex());
|
cPrintf("EntryHi(2) %08X\n", mmuGetEntryHi());
|
cPrintf("EntryHi(2) %08X\n", mmuGetEntryHi());
|
cPrintf("EntryLo(3) %08X\n", mmuGetEntryLo());
|
cPrintf("EntryLo(3) %08X\n", mmuGetEntryLo());
|
cPrintf("BadAddr(4) %08X\n", mmuGetBadAddr());
|
cPrintf("BadAddr(4) %08X\n", mmuGetBadAddr());
|
|
mmuAccs = mmuGetBadAccs();
|
|
cPrintf("BadAccs (5) %08X (%s %s)\n",
|
|
mmuAccs,
|
|
(mmuAccs & MMU_ACCS_WRITE) ? "write" : "read",
|
|
mmuAccsWidth[mmuAccs & 0x03]);
|
} else if (n == 2) {
|
} else if (n == 2) {
|
if (!getDecNumber(tokens[1], &index) || index < 0 || index >= TLB_SIZE) {
|
if (!getDecNumber(tokens[1], &index) || index < 0 || index >= TLB_SIZE) {
|
cPrintf("illegal TLB index\n");
|
cPrintf("illegal TLB index\n");
|
return;
|
return;
|
}
|
}
|