From: Leon Alrae <leon.alrae@imgtec.com>
To: Yongbok Kim <yongbok.kim@imgtec.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "aurelien@aurel32.net" <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH 4/6] target-mips: add restrictions for possible values in registers
Date: Tue, 21 Oct 2014 14:54:31 +0100 [thread overview]
Message-ID: <54466597.60405@imgtec.com> (raw)
In-Reply-To: <5444E1CB.8000009@imgtec.com>
On 20/10/2014 11:19, Yongbok Kim wrote:
>> void helper_mtc0_wired(CPUMIPSState *env, target_ulong arg1)
>> {
>> - env->CP0_Wired = arg1 % env->tlb->nb_tlb;
>> + if (env->insn_flags & ISA_MIPS32R6) {
>> + if (arg1 < env->tlb->nb_tlb) {
>> + env->CP0_Wired = arg1;
>
> Wired field should be compared with Limit field (and as a result, number
> of entries in the TLB).
>From spec's point of view the implementation is correct. It supports
"Limit = 0" - maximum number of wired entries is equal to the number of
TLB entries minus one. Obviously we will have to add Limit field once we
decide to support Limit > 0.
>
>> + }
>> + } else {
>> + env->CP0_Wired = arg1 % env->tlb->nb_tlb;
>> + }
>> }
>>
>> void helper_mtc0_srsconf0(CPUMIPSState *env, target_ulong arg1)
>> @@ -1368,11 +1379,14 @@ void helper_mtc0_entryhi(CPUMIPSState *env, target_ulong arg1)
>> }
>>
>> /* 1k pages not implemented */
>> - val = arg1 & mask;
>> #if defined(TARGET_MIPS64)
>> - val &= env->SEGMask;
>> + if ((env->insn_flags & ISA_MIPS32R6) && extract64(arg1, 62, 2) == 0x2) {
>> + mask &= ~(0x3ull << 62);
>
> If Config0_AT = 1, R field is restricted for 1 as well.
Good spot, thanks.
Regards,
Leon
next prev parent reply other threads:[~2014-10-21 13:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 16:19 [Qemu-devel] [PATCH 0/6] target-mips: implement new MIPS64 Release 6 features Leon Alrae
2014-07-14 16:19 ` [Qemu-devel] [PATCH 1/6] target-mips: add Config5.SBRI Leon Alrae
2014-10-16 14:32 ` Yongbok Kim
2014-07-14 16:19 ` [Qemu-devel] [PATCH 2/6] target-mips: implement forbidden slot Leon Alrae
2014-10-20 11:10 ` Yongbok Kim
2014-07-14 16:19 ` [Qemu-devel] [PATCH 3/6] target-mips: CP0_Status.CU0 no longer allows the user to access CP0 Leon Alrae
2014-10-17 9:58 ` Yongbok Kim
2014-07-14 16:19 ` [Qemu-devel] [PATCH 4/6] target-mips: add restrictions for possible values in registers Leon Alrae
2014-10-20 10:19 ` Yongbok Kim
2014-10-21 13:54 ` Leon Alrae [this message]
2014-07-14 16:19 ` [Qemu-devel] [PATCH 5/6] target-mips: correctly handle access to unimplemented CP0 register Leon Alrae
2014-10-20 10:49 ` Yongbok Kim
2014-07-14 16:19 ` [Qemu-devel] [PATCH 6/6] target-mips: enable features in MIPS64R6-generic CPU Leon Alrae
2014-10-20 14:23 ` Yongbok Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54466597.60405@imgtec.com \
--to=leon.alrae@imgtec.com \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=yongbok.kim@imgtec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.