mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
target/openrisc: Merge tlb allocation into CPUOpenRISCState
There is no reason to allocate this separately. This was probably copied from target/mips which makes the same mistake. While doing so, move tlb into the clear-on-reset range. While not all of the TLB bits are guaranteed zero on reset, all of the valid bits are cleared, and the rest of the bits are unspecified. Therefore clearing the whole of the TLB is correct. Reviewed-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Stafford Horne <shorne@gmail.com>
This commit is contained in:
parent
c28fa81f91
commit
455d45d22c
6 changed files with 46 additions and 49 deletions
|
@ -36,18 +36,18 @@ void HELPER(rfe)(CPUOpenRISCState *env)
|
|||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
if (cpu->env.sr & SR_DME) {
|
||||
cpu->env.tlb->cpu_openrisc_map_address_data =
|
||||
cpu->env.tlb.cpu_openrisc_map_address_data =
|
||||
&cpu_openrisc_get_phys_data;
|
||||
} else {
|
||||
cpu->env.tlb->cpu_openrisc_map_address_data =
|
||||
cpu->env.tlb.cpu_openrisc_map_address_data =
|
||||
&cpu_openrisc_get_phys_nommu;
|
||||
}
|
||||
|
||||
if (cpu->env.sr & SR_IME) {
|
||||
cpu->env.tlb->cpu_openrisc_map_address_code =
|
||||
cpu->env.tlb.cpu_openrisc_map_address_code =
|
||||
&cpu_openrisc_get_phys_code;
|
||||
} else {
|
||||
cpu->env.tlb->cpu_openrisc_map_address_code =
|
||||
cpu->env.tlb.cpu_openrisc_map_address_code =
|
||||
&cpu_openrisc_get_phys_nommu;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue