From: Michael Uhler <uhler@mips.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Ralf Baechle <ralf@linux-mips.org>,
"Finney, Steve" <Steve.Finney@spirentcom.com>,
linux-mips@linux-mips.org
Subject: Re: 64 bit operations w/32 bit kernel
Date: 30 Sep 2003 12:27:36 -0700 [thread overview]
Message-ID: <1064950055.12992.99.camel@uhler-linux.mips.com> (raw)
In-Reply-To: <Pine.GSO.3.96.1030930205322.11368E-100000@delta.ds2.pg.gda.pl>
On Tue, 2003-09-30 at 12:10, Maciej W. Rozycki wrote:
> On 30 Sep 2003, Michael Uhler wrote:
>
> > > 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.
>
> Well, I think this is OK -- 64-bit opcodes are generally useless for
> software built for the o32 ABI, so they should not normally happen in
> regular code. Perhaps some fancy hand-coded assembly might try to use
> them to get unusual results, including an invalid opcode trap handler for
> the processors that do not support them at all. But I don't think we
> should try to work hard to prevent broken software from shooting into its
> foot.
I'm not a real fan of architecting software to dismiss broken (or rogue)
programs since it tends to open up a whole lot of holes that cause
O/S crashes. For instance, an o32 program should never be able to pass
a non-sign-extended value thru a GPR to the O/S in a system call. How
many places in the O/S implicitly assume this is true? The architecture
was never intended to run real 32-bit programs with 64-bit ops enabled,
and I would strongly urge you not to do this now.
>
> And the advantage is we have a single TLB refill handler.
This hardly seems compelling given how short the handlers are. Further,
since N64 needs the 64-bit address support anyway, setting UX and PX
correctly will allow you to run the N32 code with the TLB handler
instead of the XTLB handler. That way the XTLB handler is only
invoked when a real extended address reference happens. That seems
cleaner to me, but I admit I'm not the one that has to write the
code.
/gmu
>
> Maciej
--
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
next prev parent reply other threads:[~2003-09-30 19: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
2003-09-30 19:10 ` Maciej W. Rozycki
2003-09-30 19:27 ` Michael Uhler [this message]
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=1064950055.12992.99.camel@uhler-linux.mips.com \
--to=uhler@mips.com \
--cc=Steve.Finney@spirentcom.com \
--cc=linux-mips@linux-mips.org \
--cc=macro@ds2.pg.gda.pl \
--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