提交 cc6747f4 编写于 作者: B blueswir1

Add mmu tlb demap support (Igor Kovalenko)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5332 c046a42c-6fe2-441c-8c8c-71466251a162
上级 06e67a82
......@@ -1941,6 +1941,8 @@ void helper_st_asi(target_ulong addr, target_ulong val, int asi, int size)
}
case 0x55: // I-MMU data access
{
// TODO: auto demap
unsigned int i = (addr >> 3) & 0x3f;
env->itlb_tag[i] = env->immuregs[6];
......@@ -1948,7 +1950,22 @@ void helper_st_asi(target_ulong addr, target_ulong val, int asi, int size)
return;
}
case 0x57: // I-MMU demap
// XXX
{
unsigned int i;
for (i = 0; i < 64; i++) {
if ((env->itlb_tte[i] & 0x8000000000000000ULL) != 0) {
target_ulong mask = 0xffffffffffffe000ULL;
mask <<= 3 * ((env->itlb_tte[i] >> 61) & 3);
if ((val & mask) == (env->itlb_tag[i] & mask)) {
env->itlb_tag[i] = 0;
env->itlb_tte[i] = 0;
}
return;
}
}
}
return;
case 0x58: // D-MMU regs
{
......@@ -2018,6 +2035,23 @@ void helper_st_asi(target_ulong addr, target_ulong val, int asi, int size)
return;
}
case 0x5f: // D-MMU demap
{
unsigned int i;
for (i = 0; i < 64; i++) {
if ((env->dtlb_tte[i] & 0x8000000000000000ULL) != 0) {
target_ulong mask = 0xffffffffffffe000ULL;
mask <<= 3 * ((env->dtlb_tte[i] >> 61) & 3);
if ((val & mask) == (env->dtlb_tag[i] & mask)) {
env->dtlb_tag[i] = 0;
env->dtlb_tte[i] = 0;
}
return;
}
}
}
return;
case 0x49: // Interrupt data receive
// XXX
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册