Re: Update PS2 R5900 to kernel 4.x?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Joshua!

> 3 aug. 2017 kl. 16:25 skrev Joshua Kinard <kumba@xxxxxxxxxx>:
> 
> Didn't the PS2 kernel need a lot of userland changes and a special toolchain to
> deal with the hybrid nature of the R5900?

It depends, as I understand it. R5900 implements 64-bit MIPS III except LL, SC,
LLD and SCD, plus many extensions. Some instructions are emulated by the
kernel for compatibility, see changes to arch/mips/kernel/traps.c:

    https://github.com/frno7/linux/blob/ps2-v3.9-rc1-974fdb3/arch/mips/kernel/traps.c#L613

Since emulation is slow and R5900 has 128-bit load/store instructions, some
(optional) extensions were made:

    config R5900_128BIT_SUPPORT
        bool "Support for 128 bit general purpose registers”

    config MIPS_N32
        bool "Kernel support for n32 binaries”

as well as adding e.g. arch/mips/kernel/scall32-n32.S:

    https://github.com/frno7/linux/blob/ps2-v3.9-rc1-974fdb3/arch/mips/kernel/scall32-n32.S

Then there is a set of hardware bugs involving NOPs to avoid short loops, SYNCs
for MFC0 and MTC0, etc. Several updates address these. Jürgen Urban worked on
both the kernel and binutils about five years ago:

    https://sourceware.org/ml/binutils/2012-11/msg00360.html

I suspect the reason it crashes on 3.9 is that some of the changes are way out
of synch with the rest of the kernel since 2.6.35, even if the patch applies
fairly easily.

> Do you have a working userland that can run under the 3.9 kernel?

I started with the ”Black Rhino” (Debian) distribution and its Busybox, which
boots with 3.8, but I was actually hoping to get Gentoo MIPS working, as I’ve
seen you have stage 3 MIPS binaries. What are your thoughts on this?

> Last I heard, the latest kernel that would work
> on PS2 was a Sony-modified ~2.4.17 that was put out for some kind of
> specialized PS2 hardware found only in Japan.

I have a normal SCPH-70004 unit and as far as I understand the majority of the
manufactured PS2 units work (the last ones excepted). A slightly tricky part is
installing a boot loader (e.g. Free MC boot) on a memory card. No modifications
such as soldering is required.

All the best,
Fredrik





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux