diff options
author | Yongbok Kim <yongbok.kim@mips.com> | 2018-10-09 18:15:46 +0200 |
---|---|---|
committer | Aleksandar Markovic <amarkovic@wavecomp.com> | 2018-10-18 20:37:20 +0200 |
commit | fa75ad1459f4f6abbeb6d375a812dfad61320f58 (patch) | |
tree | 87f3a29e0eee3cf26255f84e18624990ac0c1ef7 /target/mips/cpu.h | |
parent | 5e31fdd59fda5c4ba9eb0daadc2a26273a29a0b6 (diff) | |
download | qemu-fa75ad1459f4f6abbeb6d375a812dfad61320f58.zip qemu-fa75ad1459f4f6abbeb6d375a812dfad61320f58.tar.gz qemu-fa75ad1459f4f6abbeb6d375a812dfad61320f58.tar.bz2 |
target/mips: Add CP0 PWField register
Add PWField register (CP0 Register 5, Select 6).
The PWField 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:
MIPS64:
BDI (37..32) - Base Directory index
GDI (29..24) - Global Directory index
UDI (23..18) - Upper Directory index
MDI (17..12) - Middle Directory index
PTI (11..6 ) - Page Table index
PTEI ( 5..0 ) - Page Table Entry shift
MIPS32:
GDW (29..24) - Global Directory index
UDW (23..18) - Upper Directory index
MDW (17..12) - Middle Directory index
PTW (11..6 ) - Page Table index
PTEW ( 5..0 ) - Page Table Entry shift
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Yongbok Kim <yongbok.kim@mips.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Diffstat (limited to 'target/mips/cpu.h')
-rw-r--r-- | target/mips/cpu.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 9cbde99..31c9583 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -417,6 +417,21 @@ struct CPUMIPSState { #define CP0SC2_XR_MASK (0xFFULL << CP0SC2_XR) #define CP0SC2_MASK (CP0SC_1GMASK | (CP0SC_1GMASK << 16) | CP0SC2_XR_MASK) target_ulong CP0_PWBase; + target_ulong CP0_PWField; +#if defined(TARGET_MIPS64) +#define CP0PF_BDI 32 /* 37..32 */ +#define CP0PF_GDI 24 /* 29..24 */ +#define CP0PF_UDI 18 /* 23..18 */ +#define CP0PF_MDI 12 /* 17..12 */ +#define CP0PF_PTI 6 /* 11..6 */ +#define CP0PF_PTEI 0 /* 5..0 */ +#else +#define CP0PF_GDW 24 /* 29..24 */ +#define CP0PF_UDW 18 /* 23..18 */ +#define CP0PF_MDW 12 /* 17..12 */ +#define CP0PF_PTW 6 /* 11..6 */ +#define CP0PF_PTEW 0 /* 5..0 */ +#endif /* * CP0 Register 6 */ |