Official Gitbrew Forums
These forums cover all aspects of the Gitbrew biosphere. If you would like your development project to be based here, ask an admin.

Home » PS3 » OtherOS++ » Linux » PS3 VUART Tools
PS3 VUART Tools [message #555] Sat, 04 February 2012 17:41 Go to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
I started to port ps3dm-utils and ps3sm-utils to Linux Kernel 3.
I intend to add ps3av-utils too. I have to rewrite the old tools because i changed the VUART drivers on Linux 3, removed IOCTLs and replaced with fs read/write operations. That will allow us to use the tools on petitboot and FreeBSD too, without any changes.

Here: http://gitbrew.org/~glevand/ps3/linux/linux-3/ps3vuart-tools .tar.gz

I ported some commands already.

glevand@debian-hdd:~/ps3vuart-tools/ps3dm$ sudo ./ps3dm sm get_rnd
63 e4 e2 4c 8b 13 d8 5c 8d b8 c4 85 b2 59 8e e1 a6 4e 89 e2 f8 37 fa f6
glevand@debian-hdd:~/ps3vuart-tools/ps3dm$


glevand@debian-hdd:~/ps3vuart-tools/ps3sm$ sudo ./ps3sm ring_buzzer 0x25 0xa 0x1b6
Re: PS3 VUART Tools [message #556 is a reply to message #555] Sat, 04 February 2012 19:01 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
As i asid, these tools allow us to use DM services on petitboot too.
Here is the patch which creates OpenWRT package.

http://gitbrew.org/~glevand/ps3/linux/openwrt/ps3vuart-tools -package.patch

I tested it on petitboot, it works Smile
Re: PS3 VUART Tools [message #563 is a reply to message #556] Sat, 04 February 2012 23:03 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Imported initial version of ps3av tool.

Example:

glevand@debian-hdd:~/ps3vuart-tools/ps3av$ sudo ./ps3av av_get_hw_conf
1 1 1      # hdmi avmulti spdif

[Updated on: Sat, 04 February 2012 23:05]

Report message to a moderator

Re: PS3 VUART Tools [message #567 is a reply to message #563] Sat, 04 February 2012 23:46 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Now you can dump your HDCP KSV Smile

glevand@debian-hdd:~/ps3vuart-tools/ps3av$ sudo ./ps3av av_get_hdcp_ksv
xx xx xx xx xx


It dumps 5 bytes because KSV is 40bits long.

What is KSV: http://en.wikipedia.org/wiki/Key_selection_vector

[Updated on: Sat, 04 February 2012 23:49]

Report message to a moderator

Re: PS3 VUART Tools [message #568 is a reply to message #567] Sat, 04 February 2012 23:52 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Wow, we can even set KSV, trying to figure out how.
Re: PS3 VUART Tools [message #600 is a reply to message #568] Mon, 06 February 2012 16:42 Go to previous messageGo to next message
masterzorag is currently offline  masterzorag
Messages: 99
Registered: August 2011
Location: maiworld
Gitbrew Member
petitboot-3.2.2-on-fat: confirmed triple beeps, ps3av av_get_hw_conf and getting KSV works!
Re: PS3 VUART Tools [message #603 is a reply to message #600] Mon, 06 February 2012 18:25 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Cool, i will add more and more commands to the vuart tools.
Re: PS3 VUART Tools [message #675 is a reply to message #603] Sat, 25 February 2012 16:43 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Implemented Secure RTC Set Time and Get Time.

Time is just Unix epoch time in seconds.

Get Time
---------

glevand@debian:~/ps3vuart-tools/ps3dm$ sudo ./ps3dm srtc get_time 0 # 0 means SONY epoch time which is 0x386D4380 = Year 2000 = SONY Epoch
0000000000000090 0000000000000000

glevand@debian:~/ps3vuart-tools/ps3dm$ sudo ./ps3dm srtc get_time 1 # 1 means UNIX epoch time
00000000386d4418 0000000000000000

Set Time
---------

glevand@debian:~/ps3vuart-tools/ps3dm$ sudo ./ps3dm srtc set_time 0
glevand@debian:~/ps3vuart-tools/ps3dm$ sudo ./ps3dm srtc get_time 0
0000000000000005 0000000000000000

http://www.epochconverter.com/

[Updated on: Sat, 25 February 2012 23:23]

Report message to a moderator

Re: PS3 VUART Tools [message #676 is a reply to message #675] Sun, 26 February 2012 12:01 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Implemented Get Inter LPAR Parameter command.

arg 1
-------

glevand@debian:~/ps3vuart-tools/ps3sm$ sudo ./ps3sm get_inter_lpar_param 1
01 00 00 00

arg 2
------

glevand@debian:~/ps3vuart-tools/ps3sm$ sudo ./ps3sm get_inter_lpar_param 2
02 00 00 00 00000004 4800000000000007
Re: PS3 VUART Tools [message #1724 is a reply to message #676] Fri, 20 July 2012 18:14 Go to previous messageGo to next message
masterzorag is currently offline  masterzorag
Messages: 99
Registered: August 2011
Location: maiworld
Gitbrew Member
How can I dump now EID0? With old tools was like:
ps3dm_iim /dev/ps3dmproxy get_data 0x0 > EID0.bin

Re: PS3 VUART Tools [message #1725 is a reply to message #1724] Fri, 20 July 2012 18:59 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Yeah, i know, have to port old tools and implement command in new tools.

But you have full access to FLASH.
On my PS3 slim i did this:

sudo dd if=/dev/ps3nflasha of=eid0 bs=1 count=$((0x860)) skip=$((0x2f070))


How i got the right offset on FLASH:

[glevand@arch ~]$ sudo hexdump -C /dev/ps3nflasha | less
00000430  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000440  00 00 00 00 00 02 ec 00  00 00 00 00 00 01 00 00  |................|
00000450  65 45 49 44 00 00 00 00  00 00 00 00 00 00 00 00  |eEID............|


That means EID begins at 0x2ec00 + 0x400 = 0x2f000.

Then go to offset 0x2f000. There you will find a header first.

0002f010  00 00 00 70 00 00 08 60  00 00 00 00 00 00 00 00  |...p...`........|


The first 4 bytes is the offset to EID0. So, EID0 is at 0x2f070. Size is in the next 4 bytes. So, 0x860 bytes.

[Updated on: Fri, 20 July 2012 19:00]

Report message to a moderator

Re: PS3 VUART Tools [message #1734 is a reply to message #1725] Sat, 21 July 2012 09:28 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Updated ps3dm and implemeted iim commands get_data and get_data_size.

Test:

[glevand@arch ps3dm]$ sudo ./ps3dm iim get_data_size 0
860
[glevand@arch ps3dm]$
[glevand@arch ps3dm]$ sudo ./ps3dm iim get_data 0 | hexdump -C | less


Now you can dump EID0 with ps3vuart-tools.

Updated version is here: http://gitbrew.org/~glevand/ps3/linux/linux-3/ps3vuart-tools .tar.gz

[Updated on: Sat, 21 July 2012 09:42]

Report message to a moderator

Re: PS3 VUART Tools [message #1736 is a reply to message #1734] Sat, 21 July 2012 10:04 Go to previous messageGo to next message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Implemented AIM commands get_dev_type and get_dev_id.

[glevand@arch ps3dm]$ sudo ./ps3dm aim get_dev_type
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 
Re: PS3 VUART Tools [message #1776 is a reply to message #1734] Mon, 23 July 2012 18:58 Go to previous messageGo to next message
masterzorag is currently offline  masterzorag
Messages: 99
Registered: August 2011
Location: maiworld
Gitbrew Member
Dumped eid0:
[root@fedora_clone ps3dm]# sudo  ./ps3dm iim get_data_size 0
860
[root@fedora_clone ps3dm]# sudo ./ps3dm iim get_data 0 > EID0.bin

to later test spuisofs with aim_spu_module.self

get_time seems to be broken:
[root@fedora_clone ps3dm]# sudo ./ps3dm srtc get_time 0
device error
[root@fedora_clone ps3dm]# ls -lnht /dev/rtc0 
crw-rw---- 1 0 0 254, 0 Jul 22 13:35 /dev/rtc0

all others commands works as expected.
Re: PS3 VUART Tools [message #1778 is a reply to message #1776] Mon, 23 July 2012 19:03 Go to previous message
glevand is currently offline  glevand
Messages: 955
Registered: July 2011
Location: SONY
Gitbrew God
Hmm, works fine for me.
You have to set time first, else get_time fails.
Tested on petitboot.

[Updated on: Mon, 23 July 2012 19:03]

Report message to a moderator

Previous Topic: OtherOS++ for Noobs
Next Topic: How to cross-compile Linux kernel for PS3
Goto Forum:
  


Current Time: Thu Jun 20 07:25:32 CEST 2013

Total time taken to generate the page: 0.02188 seconds