Issues with ps3rsx kernel module or Xorg drivers thread

Investigation into how Linux on the PS3 might lead to homebrew development.

Moderators: cheriff, emoon

Post Reply
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Issues with ps3rsx kernel module or Xorg drivers thread

Post by Panajev2001a »

I thought about opening this thread to collect issues users experience when using Glaurung's kernel module and driver and that was separate from the FIFO hunting and binary drivers discussion :).

Kernel: 2.6.24-rc5-gdf3521d4

Issue: rmmod-ing and insmod-ing of the ps3rsx.ko kernel module.

Procedure:

clean boot, ps3rsx.ko module loaded.

cd /usr/src/ps3rsx_kmod (where the git repo has been cloned into)

make clean

make && (rmmod ps3rsx.ko; insmod ps3rsx.ko) #this is the load script modified in order to remove dmesg as I want to execute it after to just collect the ps3rsx messages.

Code: Select all

[root@IGGS-PS3 ps3rsx_kmod]# ./load2
make -C /lib/modules/`uname -r`/build M=/usr/src/ps3rsx_kmod modules
make[1]: Entering directory `/usr/src/ps3-linux'
  CC [M]  /usr/src/ps3rsx_kmod/ps3rsx.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/ps3rsx_kmod/ps3rsx.mod.o
  LD [M]  /usr/src/ps3rsx_kmod/ps3rsx.ko
make[1]: Leaving directory `/usr/src/ps3-linux'
./load2: line 2:  2444 Segmentation fault      insmod ps3rsx.ko

Code: Select all

[root@IGGS-PS3 ps3rsx_kmod]# dmesg | grep ps3rsx
ps3rsx: PS3 RSX access module, 1.0.0
ps3rsx: reserved XDR memory is @c000000000d00000, len 9437184
ps3rsx: 254MB of DDR video ram at 0x700190000000 mapped at d000080080780000 handle 5a5a5a5b
ps3rsx: context 0x55555554 dma=440000381000 driver=4000001a4000 reports=4800006d0000 reports_size=10000
ps3rsx: ctrl=d00008008010e000 drv=d0000800905c0000 reports=d0000800804e0000
ps3rsx: version 2.11 RSX rev17 0MB RAM channel 1 core 500MHz mem 650MHz
ps3rsx: remapped XDR apperture at c000000000d00000 size 9216kB to RSX
ps3rsx: context 0x55555557 dma=440000382000 driver=4000001a8000 reports=4800006e0000 reports_size=10000
ps3rsx: ctrl=d00008008011c000 drv=d000080090600000 reports=d0000800805e0000
ps3rsx: version 2.11 RSX rev17 0MB RAM channel 2 core 500MHz mem 650MHz
ps3rsx: remapped XDR apperture at c000000000d00000 size 9216kB to RSX
ps3rsx: PS3 RSX access module, 1.0.0
ps3rsx: reserved XDR memory is @c000000000d00000, len 9437184
ps3rsx: 254MB of DDR video ram at 0x700190000000 mapped at d000080080780000 handle 5a5a5a58
ps3rsx: context 0x55555554 dma=440000381000 driver=4000001a4000 reports=4800006d0000 reports_size=10000
ps3rsx: ctrl=d00008008010e000 drv=d0000800905c0000 reports=d0000800804e0000
ps3rsx: version 2.11 RSX rev17 0MB RAM channel 1 core 500MHz mem 650MHz
ps3rsx: remapped XDR apperture at c000000000d00000 size 9216kB to RSX
ps3rsx: FIFO timeout (0d8e00a4/0d8e0000/0d8e0000)
ps3rsx: context setup timeout
ps3rsx: failed to allocate kernel RSX context
Modules linked in: ps3rsx autofs4 snd_ps3 ps3_sys_manager snd_pcm usb_storage snd_page_alloc snd_timer snd soundcore sg ehci_hcd ohci_hcd usbcore
LR [d0000000000001cc] .cleanup_ps3rsx+0x88/0xc0 [ps3rsx]
[c0006c005e267b60] [d0000000000001cc] .cleanup_ps3rsx+0x88/0xc0 [ps3rsx]
[c0006c005e267be0] [d000000000000ca0] ._ps3rsx_init+0x25c/0x82c [ps3rsx]

Shouldn't rmmod remove the module from memory so that insmod can load it back again ? Should we insert a sleep between the two phases ?

If I execute rmmod after that segfault:

Code: Select all

[root@IGGS-PS3 ps3rsx_kmod]# rmmod ps3rsx.ko
ERROR: Module ps3rsx is in use

Let's try another way:

reboot

rmmod ps3rsx.ko #right after boot

sleep 10

cd /usr/src/ps3rsx_kmod/

make && (rmmod ps3rsx.ko; insmod ps3rsx.ko)

Code: Select all

[root@IGGS-PS3 ps3rsx_kmod]# ./load2
make -C /lib/modules/`uname -r`/build M=/usr/src/ps3rsx_kmod modules
make[1]: Entering directory `/usr/src/ps3-linux'
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: Leaving directory `/usr/src/ps3-linux'
ERROR: Module ps3rsx does not exist in /proc/modules
[root@IGGS-PS3 ps3rsx_kmod]# lsmod
Module                  Size  Used by
ps3rsx                 11864  0
autofs4                32088  2
usb_storage            52944  0
snd_ps3                17352  0
ps3_sys_manager         6676  0 [permanent]
snd_pcm               113868  1 snd_ps3
snd_page_alloc         10616  1 snd_pcm
snd_timer              31712  1 snd_pcm
snd                    71712  3 snd_ps3,snd_pcm,snd_timer
soundcore               9976  1 snd
sg                     44256  0
ehci_hcd               42844  0
ohci_hcd               30140  0
usbcore               177576  4 usb_storage,ehci_hcd,ohci_hcd
The module was successfully loaded this time.

Now, dmesg's rsx output:

Code: Select all

[root@IGGS-PS3 ps3rsx_kmod]# dmesg | grep ps3rsx
ps3rsx: PS3 RSX access module, 1.0.0
ps3rsx: reserved XDR memory is @c000000000d00000, len 9437184
ps3rsx: 254MB of DDR video ram at 0x700190000000 mapped at d000080080780000 handle 5a5a5a5b
ps3rsx: context 0x55555554 dma=440000381000 driver=4000001a4000 reports=4800006d0000 reports_size=10000
ps3rsx: ctrl=d00008008010e000 drv=d0000800905c0000 reports=d0000800804e0000
ps3rsx: version 2.11 RSX rev17 0MB RAM channel 1 core 500MHz mem 650MHz
ps3rsx: remapped XDR apperture at c000000000d00000 size 9216kB to RSX
ps3rsx: context 0x55555557 dma=440000382000 driver=4000001a8000 reports=4800006e0000 reports_size=10000
ps3rsx: ctrl=d00008008011c000 drv=d000080090600000 reports=d0000800805e0000
ps3rsx: version 2.11 RSX rev17 0MB RAM channel 2 core 500MHz mem 650MHz
ps3rsx: remapped XDR apperture at c000000000d00000 size 9216kB to RSX
ps3rsx: PS3 RSX access module, 1.0.0
ps3rsx: reserved XDR memory is @c000000000d00000, len 9437184
ps3rsx: 254MB of DDR video ram at 0x700190000000 mapped at d000080080780000 handle 5a5a5a58
ps3rsx: context 0x55555554 dma=440000381000 driver=4000001a4000 reports=4800006d0000 reports_size=10000
ps3rsx: ctrl=d00008008010e000 drv=d0000800905c0000 reports=d0000800804e0000
ps3rsx: version 2.11 RSX rev17 0MB RAM channel 1 core 500MHz mem 650MHz
ps3rsx: remapped XDR apperture at c000000000d00000 size 9216kB to RSX
jyck
Posts: 2
Joined: Thu Dec 13, 2007 9:10 am

Post by jyck »

Hi,

I have tested also the ps3rsx kernel module withh 100% success, I don't have any problem with kernel.Now I'm trying with Glaurung's ps3fb modified, when I get results I'll post them.

The last thing, have you compiled ps3rsx with the ps3fb modified or the normal one? and why do you reserve only 9Mb for video memory buffer? I think that is enough but, all the setups that I have seen have 18Mb me included.

Thanks

PD: Sorry for my english ;)
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

I do not have problems running or compiling, just that in some cases you can basically force some problems where there should not be none no matter what you play around with :).

About the 9 MB of reserved XDR memory: since a few PS3 kernel releases ago the ps3fb interface got some changes and one of them reduced the amount of XDR memory reserved for the XDR based frame-buffer.
I am still using the Xorg driver and RSX kernel module with Glaurung's patch applied to the latest ps3fb sources they do not seem to generate conflict, they never have so far.

Thanks for your reply though :).
Post Reply