Remove MMU hacks
Unicorn has included some ugly hacks to provide a envirement where vaddr == paddr. These hacks where to use the full 64 bit mappings on x86 without init the mmu and some memory redirect for MIPS. The UC_TLB_CPU mode defaults to vaddr == paddr, therfor these hacks aren't required anymore.
This commit is contained in:
@@ -5066,7 +5066,6 @@ static void x86_cpu_common_class_init(struct uc_struct *uc, CPUClass *oc, void *
|
||||
cc->cpu_exec_enter = x86_cpu_exec_enter;
|
||||
cc->cpu_exec_exit = x86_cpu_exec_exit;
|
||||
cc->tcg_initialize = tcg_x86_init;
|
||||
cc->tlb_fill = x86_cpu_tlb_fill;
|
||||
cc->tlb_fill_cpu = x86_cpu_tlb_fill;
|
||||
}
|
||||
|
||||
|
||||
@@ -635,12 +635,7 @@ do_check_protect_pse36:
|
||||
/* align to page_size */
|
||||
pte &= PG_ADDRESS_MASK & ~(page_size - 1);
|
||||
page_offset = addr & (page_size - 1);
|
||||
/* HACK allow full 64 bit mapping in u64 without paging */
|
||||
if (env->cr[0] & CR0_PG_MASK) {
|
||||
paddr = get_hphys(cs, pte + page_offset, is_write1, &prot);
|
||||
} else {
|
||||
paddr = addr;
|
||||
}
|
||||
paddr = get_hphys(cs, pte + page_offset, is_write1, &prot);
|
||||
|
||||
/* Even if 4MB pages, we map only one 4KB page in the cache to
|
||||
avoid filling it too fast */
|
||||
|
||||
Reference in New Issue
Block a user