qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Meador Inge <meadori@codesourcery.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: "Andreas Färber" <afaerber@suse.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-mips: Enable access to required RDHWR hardware registers
Date: Tue, 21 Aug 2012 11:04:09 -0500	[thread overview]
Message-ID: <5033B179.6080007@codesourcery.com> (raw)
In-Reply-To: <5033AEC8.6050006@aurel32.net>

On 08/21/2012 10:52 AM, Aurelien Jarno wrote:

> Le 21/08/2012 17:41, Meador Inge a écrit :
>> On 08/21/2012 05:14 AM, Andreas Färber wrote:
>>> So what about the non-MIPS32r2 case? IIUC then the SYNCI_Step register
>>> would no longer be accessible, which your commit message does not
>>> mention. Intentional?
>>
>> Yes, that is intentional.  In Section 9.13 of [1] it is stated that these
>> registers are only required starting at release 2 of the architecture.  The
>> Linux kernel follows the same approach.
> 
> Remember this is linux user mode, as such you should not look at the
> MIPS architecture, but rather at the behavour of MIPS architecture +
> Linux kernel. SYNCI_Step is emulated by the Linux kernel for non R2
> CPUs, as such it should be  available even for non R2 CPUs *in user mode
> only*. At a first glance, it seems to be the same for CPUNum, CC and
> CCRes, but someone has to check that more in details.

Ah, thanks Aurelien.  I see that in the kernel sources now.  Specifically,
it seems that 'simulate_rdhwr' handles the emulation [1] and that it includes
support for CPUNum, SYNCI_Step, CC, CCRes, and ULR (User Local register).  So,
I will remove the conditional.

I am not quite sure how to handle ULR at the moment.

[1]
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=arch/mips/kernel/traps.c;h=9be3df1fa8a461dc4e1e5563582f483e4ed7c103;hb=HEAD

-- 
Meador Inge
CodeSourcery / Mentor Embedded
http://www.mentor.com/embedded-software

      reply	other threads:[~2012-08-21 16:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-20 23:41 [Qemu-devel] [PATCH] target-mips: Enable access to required RDHWR hardware registers Meador Inge
2012-08-21 10:14 ` Andreas Färber
2012-08-21 15:41   ` Meador Inge
2012-08-21 15:52     ` Aurelien Jarno
2012-08-21 16:04       ` Meador Inge [this message]

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=5033B179.6080007@codesourcery.com \
    --to=meadori@codesourcery.com \
    --cc=afaerber@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).