Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Re: Linux and the Sony Playstation
@ 2002-06-19  7:17 Hartvig Ekner
  2002-06-19  7:17 ` Hartvig Ekner
  2002-06-19  9:39 ` Kevin D. Kissell
  0 siblings, 2 replies; 6+ messages in thread
From: Hartvig Ekner @ 2002-06-19  7:17 UTC (permalink / raw)
  To: user alias

Forwarded message:
> From: "Kevin D. Kissell" <kevink@mips.com>
> To: <linux-mips@fnet.fr>, <linux-mips@oss.sgi.com>
> Subject: Linux and the Sony Playstation 2
> Date: Tue, 18 Jun 2002 15:59:57 +0200
> 
> The Sony PS2 Linux kit has been shipping for nearly
> a month now, and I'm frankly astonished at how little
> I've seen on this mailing list about it.  For better or
> for worse, this changes everything for MIPS/Linux.
> The number of MIPS/Linux users worldwide has
> just gone up by at least an order of magnitude,
> and they are on a platform running a 2.2.1-derived
> kernel and using gcc 2.95.2.
> 
> It's a perfectly usable platform out of the box, but
> Carsten has thrown "crashme" at it, and it goes down
> relatively quickly.  People trying to port kaffe and
> other programs that do double-precision float are
> blocked because there's no double precision on the
> R5900, and the Sony kernel lacks the Algorithmics
> emulator.

The few simple double-precision programs (ala hello world) I ran worked,
and the compiler substitutes integer code (softfloat) for any double
precision operation. What are the things known not to work?

> It's not clear what Sony is going to put into further
> development, and what they are going to expect the
> user community to take over from here.  There is a 
> group of people trying to take the kernel up to
> 2.2.20, but I'm not yet sure whether they know
> what they are doing, and anyway, that box needs
> to get to 2.4.x ASAP.

It would be great to get 2.4.x on PS/2, and if one doesn't run into 
glibc/kernel dependencies in the upgrade, it should be a reasonable amount
of work. The biggest benefit I see is that a 2.4.x upgrade with the emulator
would allow binary portability of userland using double prec floats.

But one thing which I really admire on the Sony release is the thoroughness
and completeness of their offering. The kernel has full support for the
additional T5900 SIMD state, all new instructions and state is supported
fully in toolchain: binutils, gdb, you name it. Everything in the kit works
(at least what I have tested).

Getting the kernel upgraded would be nice, but there is probably even
more work getting the toolchain, glibc and userland up to speed. There
are about  600 binary userland RPMs provided, which is also a ton of
work to keep updated.

One needs to be very careful that the individual "upgrade" pieces people
do doesn't break the overall nice picture of "everything works out of
the box". What is really needed is that somebody puts together a
productized PS/2 Linux kit version 2.0, which has the
kernel/glibc/toolchain/userland RPMs upgraded to recent versions. 

If somebody else volunteers for the rest, I'll do the kernel :-)
(One of us here here might do it anyway).

/Hartvig


-- 
 _    _   _____  ____     Hartvig Ekner        Mailto:hartvige@mips.com
 |\  /| | |____)(____                          Direct: +45 4486 5503
 | \/ | | |     _____)    MIPS Denmark         Switch: +45 4486 5555
T E C H N O L O G I E S   http://www.mips.com  Fax...: +45 4486 5556

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux and the Sony Playstation
  2002-06-19  7:17 Linux and the Sony Playstation Hartvig Ekner
@ 2002-06-19  7:17 ` Hartvig Ekner
  2002-06-19  9:39 ` Kevin D. Kissell
  1 sibling, 0 replies; 6+ messages in thread
From: Hartvig Ekner @ 2002-06-19  7:17 UTC (permalink / raw)
  To: user alias

Forwarded message:
> From: "Kevin D. Kissell" <kevink@mips.com>
> To: <linux-mips@fnet.fr>, <linux-mips@oss.sgi.com>
> Subject: Linux and the Sony Playstation 2
> Date: Tue, 18 Jun 2002 15:59:57 +0200
> 
> The Sony PS2 Linux kit has been shipping for nearly
> a month now, and I'm frankly astonished at how little
> I've seen on this mailing list about it.  For better or
> for worse, this changes everything for MIPS/Linux.
> The number of MIPS/Linux users worldwide has
> just gone up by at least an order of magnitude,
> and they are on a platform running a 2.2.1-derived
> kernel and using gcc 2.95.2.
> 
> It's a perfectly usable platform out of the box, but
> Carsten has thrown "crashme" at it, and it goes down
> relatively quickly.  People trying to port kaffe and
> other programs that do double-precision float are
> blocked because there's no double precision on the
> R5900, and the Sony kernel lacks the Algorithmics
> emulator.

The few simple double-precision programs (ala hello world) I ran worked,
and the compiler substitutes integer code (softfloat) for any double
precision operation. What are the things known not to work?

> It's not clear what Sony is going to put into further
> development, and what they are going to expect the
> user community to take over from here.  There is a 
> group of people trying to take the kernel up to
> 2.2.20, but I'm not yet sure whether they know
> what they are doing, and anyway, that box needs
> to get to 2.4.x ASAP.

It would be great to get 2.4.x on PS/2, and if one doesn't run into 
glibc/kernel dependencies in the upgrade, it should be a reasonable amount
of work. The biggest benefit I see is that a 2.4.x upgrade with the emulator
would allow binary portability of userland using double prec floats.

But one thing which I really admire on the Sony release is the thoroughness
and completeness of their offering. The kernel has full support for the
additional T5900 SIMD state, all new instructions and state is supported
fully in toolchain: binutils, gdb, you name it. Everything in the kit works
(at least what I have tested).

Getting the kernel upgraded would be nice, but there is probably even
more work getting the toolchain, glibc and userland up to speed. There
are about  600 binary userland RPMs provided, which is also a ton of
work to keep updated.

One needs to be very careful that the individual "upgrade" pieces people
do doesn't break the overall nice picture of "everything works out of
the box". What is really needed is that somebody puts together a
productized PS/2 Linux kit version 2.0, which has the
kernel/glibc/toolchain/userland RPMs upgraded to recent versions. 

If somebody else volunteers for the rest, I'll do the kernel :-)
(One of us here here might do it anyway).

/Hartvig


-- 
 _    _   _____  ____     Hartvig Ekner        Mailto:hartvige@mips.com
 |\  /| | |____)(____                          Direct: +45 4486 5503
 | \/ | | |     _____)    MIPS Denmark         Switch: +45 4486 5555
T E C H N O L O G I E S   http://www.mips.com  Fax...: +45 4486 5556

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux and the Sony Playstation
  2002-06-19  7:17 Linux and the Sony Playstation Hartvig Ekner
  2002-06-19  7:17 ` Hartvig Ekner
@ 2002-06-19  9:39 ` Kevin D. Kissell
  2002-06-19  9:51   ` Hartvig Ekner
  1 sibling, 1 reply; 6+ messages in thread
From: Kevin D. Kissell @ 2002-06-19  9:39 UTC (permalink / raw)
  To: Hartvig Ekner, user alias

From: "Hartvig Ekner" <hartvige@mips.com>
To: "user alias" <linux-mips@oss.sgi.com>
> > From: "Kevin D. Kissell" <kevink@mips.com>
> > To: <linux-mips@fnet.fr>, <linux-mips@oss.sgi.com>
> > Subject: Linux and the Sony Playstation 2
> > Date: Tue, 18 Jun 2002 15:59:57 +0200
> > 
> > The Sony PS2 Linux kit has been shipping for nearly
> > a month now, and I'm frankly astonished at how little
> > I've seen on this mailing list about it.  For better or
> > for worse, this changes everything for MIPS/Linux.
> > The number of MIPS/Linux users worldwide has
> > just gone up by at least an order of magnitude,
> > and they are on a platform running a 2.2.1-derived
> > kernel and using gcc 2.95.2.
> > 
> > It's a perfectly usable platform out of the box, but
> > Carsten has thrown "crashme" at it, and it goes down
> > relatively quickly.  People trying to port kaffe and
> > other programs that do double-precision float are
> > blocked because there's no double precision on the
> > R5900, and the Sony kernel lacks the Algorithmics
> > emulator.
> 
> The few simple double-precision programs (ala hello world) I ran worked,
> and the compiler substitutes integer code (softfloat) for any double
> precision operation. What are the things known not to work?

You didn't disassemble the code.  The Sony gcc distribution
is hard-wired to generate soft-float code, even if you 
specify -mhard-float on the command line.

Since most embedded/multimedia FP is single precision,
one could imagine why Sony and Toshiba could have
decided to leave out floating doubles.  The real problem
is the accursed C stipulation that all FP arguments be
promoted to doubles.  Having every damned passed
argument converted by the kernel would be a bit of
a hit, but I would expect that, in any (single precision)
floating point computation intensive application, that
would be more than made up for by the time gained
in executing the loops native.  And, as always, we
have the correctness issue.  We need to get the PS2
to 2.4.x (and 2.5) fairly quickly, and we want to 
be able to have interoperability of MIPS32 binaries 
across PS2 and non-PS2 platforms, including those 
who habitually use their FPUs.  I've started hacking 
the current (2.4.18+) MIPS/Algorithmics emulator 
code into the Sony 2.2.1 kernel as a stopgap, but
it's a little tricky to test, given that the Sony tools
go out of their way to stop me generating any 
real FP instructions. 

            Regards,

            Kevin K.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux and the Sony Playstation
  2002-06-19  9:39 ` Kevin D. Kissell
@ 2002-06-19  9:51   ` Hartvig Ekner
  2002-06-19  9:51     ` Hartvig Ekner
  2002-06-19 10:15     ` Kevin D. Kissell
  0 siblings, 2 replies; 6+ messages in thread
From: Hartvig Ekner @ 2002-06-19  9:51 UTC (permalink / raw)
  To: Kevin D. Kissell; +Cc: Hartvig Ekner, user alias

Kevin D. Kissell writes:
> 
> From: "Hartvig Ekner" <hartvige@mips.com>
> To: "user alias" <linux-mips@oss.sgi.com>
> > > From: "Kevin D. Kissell" <kevink@mips.com>
> > > To: <linux-mips@fnet.fr>, <linux-mips@oss.sgi.com>
> > > Subject: Linux and the Sony Playstation 2
> > > Date: Tue, 18 Jun 2002 15:59:57 +0200
> > > 
> > > The Sony PS2 Linux kit has been shipping for nearly
> > > a month now, and I'm frankly astonished at how little
> > > I've seen on this mailing list about it.  For better or
> > > for worse, this changes everything for MIPS/Linux.
> > > The number of MIPS/Linux users worldwide has
> > > just gone up by at least an order of magnitude,
> > > and they are on a platform running a 2.2.1-derived
> > > kernel and using gcc 2.95.2.
> > > 
> > > It's a perfectly usable platform out of the box, but
> > > Carsten has thrown "crashme" at it, and it goes down
> > > relatively quickly.  People trying to port kaffe and
> > > other programs that do double-precision float are
> > > blocked because there's no double precision on the
> > > R5900, and the Sony kernel lacks the Algorithmics
> > > emulator.
> > 
> > The few simple double-precision programs (ala hello world) I ran worked,
> > and the compiler substitutes integer code (softfloat) for any double
> > precision operation. What are the things known not to work?
> 
> You didn't disassemble the code.  The Sony gcc distribution
> is hard-wired to generate soft-float code, even if you 
> specify -mhard-float on the command line.


I did disassemble the code. It generates true FPU code for floats, and
soft-float for double. See the example below:

[hartvige@copps01 test]$ more hellof.c
int main()
{
float a,b;
a = 3.0f;
b = a + 2.0f;
printf("hello world %f\n",b);
}

gcc hellof.c, and disassembling:

0000000000400a70 <main>:
  400a70:       3c1c0fc0        lui     $gp,0xfc0
  400a74:       279c75c0        addiu   $gp,$gp,30144
  400a78:       0399e021        addu    $gp,$gp,$t9
  400a7c:       27bdffc0        addiu   $sp,$sp,-64
  400a80:       afbc0010        sw      $gp,16($sp)
  400a84:       afbf0038        sw      $ra,56($sp)
  400a88:       afbe0034        sw      $s8,52($sp)
  400a8c:       afbc0030        sw      $gp,48($sp)
  400a90:       03a0f021        move    $s8,$sp
  400a94:       3c014040        lui     $at,0x4040
  400a98:       44810000        mtc1    $at,$f0
  400a9c:       00000000        nop
  400aa0:       e7c00020        swc1    $f0,32($s8)
  400aa4:       c7c00020        lwc1    $f0,32($s8)
  400aa8:       3c014000        lui     $at,0x4000
  400aac:       44810800        mtc1    $at,$f1
  400ab0:       00000000        nop
  400ab4:       46010000        add.s   $f0,$f0,$f1
  400ab8:       e7c00024        swc1    $f0,36($s8)
  400abc:       c7cc0024        lwc1    $f12,36($s8)
  400ac0:       8f998054        lw      $t9,-32684($gp)
  400ac4:       0320f809        jalr    $t9
  400ac8:       00000000        nop
  400acc:       8fdc0010        lw      $gp,16($s8)
  400ad0:       8f848018        lw      $a0,-32744($gp)
  400ad4:       24841040        addiu   $a0,$a0,4160
  400ad8:       00403021        move    $a2,$v0
  400adc:       00603821        move    $a3,$v1
  400ae0:       8f998064        lw      $t9,-32668($gp)
  400ae4:       0320f809        jalr    $t9
  400ae8:       00000000        nop
  400aec:       8fdc0010        lw      $gp,16($s8)
  400af0:       03c0e821        move    $sp,$s8


Were you talking about double-precision only, or is there something different
in the kits?

/Hartvig

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux and the Sony Playstation
  2002-06-19  9:51   ` Hartvig Ekner
@ 2002-06-19  9:51     ` Hartvig Ekner
  2002-06-19 10:15     ` Kevin D. Kissell
  1 sibling, 0 replies; 6+ messages in thread
From: Hartvig Ekner @ 2002-06-19  9:51 UTC (permalink / raw)
  To: Kevin D. Kissell; +Cc: Hartvig Ekner, user alias

Kevin D. Kissell writes:
> 
> From: "Hartvig Ekner" <hartvige@mips.com>
> To: "user alias" <linux-mips@oss.sgi.com>
> > > From: "Kevin D. Kissell" <kevink@mips.com>
> > > To: <linux-mips@fnet.fr>, <linux-mips@oss.sgi.com>
> > > Subject: Linux and the Sony Playstation 2
> > > Date: Tue, 18 Jun 2002 15:59:57 +0200
> > > 
> > > The Sony PS2 Linux kit has been shipping for nearly
> > > a month now, and I'm frankly astonished at how little
> > > I've seen on this mailing list about it.  For better or
> > > for worse, this changes everything for MIPS/Linux.
> > > The number of MIPS/Linux users worldwide has
> > > just gone up by at least an order of magnitude,
> > > and they are on a platform running a 2.2.1-derived
> > > kernel and using gcc 2.95.2.
> > > 
> > > It's a perfectly usable platform out of the box, but
> > > Carsten has thrown "crashme" at it, and it goes down
> > > relatively quickly.  People trying to port kaffe and
> > > other programs that do double-precision float are
> > > blocked because there's no double precision on the
> > > R5900, and the Sony kernel lacks the Algorithmics
> > > emulator.
> > 
> > The few simple double-precision programs (ala hello world) I ran worked,
> > and the compiler substitutes integer code (softfloat) for any double
> > precision operation. What are the things known not to work?
> 
> You didn't disassemble the code.  The Sony gcc distribution
> is hard-wired to generate soft-float code, even if you 
> specify -mhard-float on the command line.


I did disassemble the code. It generates true FPU code for floats, and
soft-float for double. See the example below:

[hartvige@copps01 test]$ more hellof.c
int main()
{
float a,b;
a = 3.0f;
b = a + 2.0f;
printf("hello world %f\n",b);
}

gcc hellof.c, and disassembling:

0000000000400a70 <main>:
  400a70:       3c1c0fc0        lui     $gp,0xfc0
  400a74:       279c75c0        addiu   $gp,$gp,30144
  400a78:       0399e021        addu    $gp,$gp,$t9
  400a7c:       27bdffc0        addiu   $sp,$sp,-64
  400a80:       afbc0010        sw      $gp,16($sp)
  400a84:       afbf0038        sw      $ra,56($sp)
  400a88:       afbe0034        sw      $s8,52($sp)
  400a8c:       afbc0030        sw      $gp,48($sp)
  400a90:       03a0f021        move    $s8,$sp
  400a94:       3c014040        lui     $at,0x4040
  400a98:       44810000        mtc1    $at,$f0
  400a9c:       00000000        nop
  400aa0:       e7c00020        swc1    $f0,32($s8)
  400aa4:       c7c00020        lwc1    $f0,32($s8)
  400aa8:       3c014000        lui     $at,0x4000
  400aac:       44810800        mtc1    $at,$f1
  400ab0:       00000000        nop
  400ab4:       46010000        add.s   $f0,$f0,$f1
  400ab8:       e7c00024        swc1    $f0,36($s8)
  400abc:       c7cc0024        lwc1    $f12,36($s8)
  400ac0:       8f998054        lw      $t9,-32684($gp)
  400ac4:       0320f809        jalr    $t9
  400ac8:       00000000        nop
  400acc:       8fdc0010        lw      $gp,16($s8)
  400ad0:       8f848018        lw      $a0,-32744($gp)
  400ad4:       24841040        addiu   $a0,$a0,4160
  400ad8:       00403021        move    $a2,$v0
  400adc:       00603821        move    $a3,$v1
  400ae0:       8f998064        lw      $t9,-32668($gp)
  400ae4:       0320f809        jalr    $t9
  400ae8:       00000000        nop
  400aec:       8fdc0010        lw      $gp,16($s8)
  400af0:       03c0e821        move    $sp,$s8


Were you talking about double-precision only, or is there something different
in the kits?

/Hartvig

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux and the Sony Playstation
  2002-06-19  9:51   ` Hartvig Ekner
  2002-06-19  9:51     ` Hartvig Ekner
@ 2002-06-19 10:15     ` Kevin D. Kissell
  1 sibling, 0 replies; 6+ messages in thread
From: Kevin D. Kissell @ 2002-06-19 10:15 UTC (permalink / raw)
  To: Hartvig Ekner; +Cc: user alias

> > You didn't disassemble the code.  The Sony gcc distribution
> > is hard-wired to generate soft-float code, even if you 
> > specify -mhard-float on the command line.
> 
> I did disassemble the code. It generates true FPU code for floats, and
> soft-float for double. See the example below:

I tested both double and single variants last night, 
and I *thought* that I had seen soft-float code
generated for both cases.  By the light of day,
I can see that that the single case disassembly
does indeed use the FPU - I must have gotten
the disassembly files confused last night.  In any
case, as I said, even if you specify "hard-float",
you'll get soft doubles from the Sony gcc.

While various users have complained about
both the speed and the accuracy of the Sony
soft float implementation, it does pass paranoia
with flying colors.

            Kevin K.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-06-19 10:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-19  7:17 Linux and the Sony Playstation Hartvig Ekner
2002-06-19  7:17 ` Hartvig Ekner
2002-06-19  9:39 ` Kevin D. Kissell
2002-06-19  9:51   ` Hartvig Ekner
2002-06-19  9:51     ` Hartvig Ekner
2002-06-19 10:15     ` Kevin D. Kissell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox