mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target/mips: Add CP0 PWCtl register
Add PWCtl register (CP0 Register 5, Select 6). The PWCtl register configures hardware page table walking for TLB refills. This register is required for the hardware page walker feature. It exists only if Config3 PW bit is set to 1. It contains following fields: PWEn (31) - Hardware Page Table walker enable PWDirExt (30) - If 1, 4-th level implemented (MIPS64 only) XK (28) - If 1, walker handles xkseg (MIPS64 only) XS (27) - If 1, walker handles xsseg (MIPS64 only) XU (26) - If 1, walker handles xuseg (MIPS64 only) DPH (7) - Dual Page format of Huge Page support HugePg (6) - Huge Page PTE supported in Directory levels PSn (5..0) - Bit position of PTEvld in Huge Page PTE Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Yongbok Kim <yongbok.kim@mips.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
This commit is contained in:
parent
20b28ebc49
commit
103be64c26
5 changed files with 45 additions and 2 deletions
|
@ -1527,6 +1527,16 @@ void helper_mtc0_wired(CPUMIPSState *env, target_ulong arg1)
|
|||
}
|
||||
}
|
||||
|
||||
void helper_mtc0_pwctl(CPUMIPSState *env, target_ulong arg1)
|
||||
{
|
||||
#if defined(TARGET_MIPS64)
|
||||
/* PWEn = 0. Hardware page table walking is not implemented. */
|
||||
env->CP0_PWCtl = (env->CP0_PWCtl & 0x000000C0) | (arg1 & 0x5C00003F);
|
||||
#else
|
||||
env->CP0_PWCtl = (arg1 & 0x800000FF);
|
||||
#endif
|
||||
}
|
||||
|
||||
void helper_mtc0_srsconf0(CPUMIPSState *env, target_ulong arg1)
|
||||
{
|
||||
env->CP0_SRSConf0 |= arg1 & env->CP0_SRSConf0_rw_bitmask;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue