Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Michael Uhler <uhler@mips.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: "Finney, Steve" <Steve.Finney@spirentcom.com>, linux-mips@linux-mips.org
Subject: Re: 64 bit operations w/32 bit kernel
Date: 30 Sep 2003 11:29:28 -0700	[thread overview]
Message-ID: <1064946568.13742.51.camel@uhler-linux.mips.com> (raw)
In-Reply-To: <20030930160023.GB4231@linux-mips.org>

On Tue, 2003-09-30 at 09:00, Ralf Baechle wrote:
> On Mon, Sep 29, 2003 at 07:31:57AM -1000, Finney, Steve wrote:
> 
> > What would be the downside to enabling 64 bit operations in user space
> > on a 32 bit kernel (setting the PX bit in the status register?). The
> > particular issue is that I want to access 64 bit-memory mapped registers,
> > and I really need to do it as an atomic operation. I tried borrowing
> > sibyte/64bit.h from the kernel, but I get an illegal instruction on the
> > double ops.
> 
> Common design bug in hardware, imho ...
> 
> > Also, assuming this isn't a horrible idea, is there any obvious single
> > place where "default" values in the CP0 status register get set?
> 
> There isn't.
> 
> What you want really is a 64-bit kernel.  On a 64-bit kernel even for
> processes running in 32-bit address spaces (o32, N32) the processor
> will run with the UX bit enabled.  o32 userspace still lives in the
> assumption that registers are 32-bit so only those bits will be restored
> in function calls etc.  N32 (where userspace isn't ready for prime time
> yet) does guarantee that.  And N64 (userspace similarly not ready for
> prime time) obviously is fully 64-bit everything.

I don't think you want to run o32 processes with the UX bit set.  UX not
only enables 64-bit addressing (which you can, in software, make look
like 32-bit addressing), it also enables access to the 64-bit opcodes.
This means that you are going to get unexpected and potentially
unreproducible results.

N32 is a 64-bit data model with 32-bit addresses, so you're OK there.

/gmu

> 
>   Ralf
-- 

Michael Uhler, Chief Technology Officer
MIPS Technologies, Inc.  Email: uhler@mips.com  Pager:uhler_p@mips.com
1225 Charleston Road     Voice:  (650)567-5025  FAX:   (650)567-5225
Mountain View, CA 94043  Mobile: (650)868-6870  Admin: (650)567-5085

  parent reply	other threads:[~2003-09-30 18:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-29 17:31 64 bit operations w/32 bit kernel Finney, Steve
2003-09-29 17:31 ` Finney, Steve
2003-09-29 19:01 ` Michael Uhler
2003-09-30 14:49   ` Kip Walker
2003-09-30 16:00 ` Ralf Baechle
2003-09-30 18:04   ` Maciej W. Rozycki
2003-09-30 18:47     ` Ralf Baechle
2003-10-01  3:58       ` Maciej W. Rozycki
2003-09-30 18:29   ` Michael Uhler [this message]
2003-09-30 19:10     ` Maciej W. Rozycki
2003-09-30 19:27       ` Michael Uhler
2003-10-01  4:26         ` Maciej W. Rozycki
2003-10-01 16:24           ` Ralf Baechle
2003-09-30 19:48     ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2003-09-30 19:23 Finney, Steve
2003-09-30 19:23 ` Finney, Steve

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=1064946568.13742.51.camel@uhler-linux.mips.com \
    --to=uhler@mips.com \
    --cc=Steve.Finney@spirentcom.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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