Editing SC EEPROM

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
Most of the information we have about the Syscon EEPROM comes from graf_chokolo reverse engineering of the HV. See [[Hypervisor Reverse Engineering]]  
Most of the information we have about the sc eeprom comes from graf_chokolo reverse engineering of the HV see [[Hypervisor Reverse Engineering]]  


Syscon EEPROM is where system flags, tokens and hashes are stored.
Here is where system flags, tokens and hashes are stored.


Right now, most of the communication we have with the Syscon EEPROM is through Linux using graf_chokolo ps3dm-utils and/or using his payloads.
Right now most of the communication we have with the sc eeprom is through Linux using graf_chokolo ps3dm-utils and/or using his payloads.


See also {{talk}} page and [[User_talk:Zer0Tolerance|Zer0Tolerance]]
See also {{talk}} page and [[User_talk:Zer0Tolerance|Zer0Tolerance]]


= Information =
= SC EEPROM Info =
*On [[Mullion]] syscons '''the EEPROM "pins" are exposed externally''' so we can capture the EEPROM traffic by attaching devices like Logic Analyzers, Protocol Analyzers, etc...
SC EEPROM from fat consoles is a custom/proprietary EEPROM chip that uses a special non standard commands to read/write from EEPROM.
**On [[Syscon CXR713 Series]] the EEPROM consists of '''0x4000''' blocks, every block contains 2 bytes of data, so the total EEPROM size is '''0x8000''' bytes ('''32KB''').
We are so lucky that Sony had exposed EEROM chip legs out of Syscon, so we have a physical access to it and we could attach devices like "'''Logic Analyzer'''", "'''Protocol Analyzer'''", "'''Custom made MCU boards'''" to capture traffic between console and Syscon EEPROM.
**On [[Syscon CXR714 Series]] the EEPROM consists of '''0x2800''' blocks, every block contains 2 bytes of data, so the total EEPROM size is '''0x5000''' bytes ('''20KB''').
*On [[Sherwood]] syscons '''the EEPROM is virtualized inside FLASH menory''', so there is not physical access to the EEPROM.
**On [[Syscon SW Series]], [[Syscon SW2 Series]] and [[Syscon SW3 Series]] the virtual EEPROM consists of '''0x4000''' blocks, every block contains 2 bytes of data, so the total EEPROM size is '''0x8000''' bytes ('''32KB''').


For FAT console Syscon EEPROM consists of: 0x4000 blocks, and every block is consists of 2 bytes of data.
So the total EEPROM size is: 0x8000 byte length.


Dont confuse the SPI block access (using blocks of 2 bytes leght) with the '''"Block ID"''' used by the '''SERV_NVS''' [[SC_Communication#Syscon_Services|Syscon Service]]
And since the pin-out of Syscon chip for Slim & Super Slim consoles is not known till now, we can not be sure if the Syscon EEPROM pins are exposed outside or not so we can access it like in FAT console without handling Syscon it self.


== SPI Commands ==
== SC EEPROM Commands ==
Syscon EEPROM uses a standard SPI protocol with proprietary commands as following:
 
FAT console's SC EEPROM used a standard SPI protocol with a proprietary commands as flow:


{| class="wikitable"
{| class="wikitable"
Line 26: Line 26:
| Unlock Command || 0xA3 0x00 0x00 || This command must be send first before write command.
| Unlock Command || 0xA3 0x00 0x00 || This command must be send first before write command.
|-
|-
| Write Command || 0xA4 0xXX 0xXX || XX XX is a block to be written (in the range 0x0000 up to 0x3FFF for [[Syscon CXR713 Series]], or 0x0000 up to 0x27FF for [[Syscon CXR714 Series]])<br>The maximum data to be written in one command cycle is 32 byte length (16 blocks).
| Write Command || 0xA4 0xXX 0xXX || XX XX is a block id to be written (value 0x0000 to 0x3FFF), the maximum data to be written in one command cycle is 32 byte length (16 blocks).
|-
|-
| Read Command || 0xA8 0xXX 0xXX || XX XX is a block to be read (in the range 0x0000 up to 0x3FFF for [[Syscon CXR713 Series]], or range 0x0000 up to 0x27FF for [[Syscon CXR714 Series]])<br>There is no maximum limit for read command so we can send it once with block 0x00 0x00 then read the full SC EEPROM at once without sending read command again.
| Read Command || 0xA8 0xXX 0xXX || XX XX is a block id to be read (value 0x0000 to 0x3FFF), there is no maximum limit for read command so we can send it once with block id 0x00 0x00 then read the full EEPROM at once without sending read command again.
|-
|-
| Check Status Command || 0xA9 0x00 0x00 0x00 || The response of this command is 0xFFFFFFFF if there is no error, or any other value if there is error happened or SC EEPROM still busy doing something.
| Check Status Command || 0xA9 0x00 0x00 0x00 || The response of this command is 0xFFFFFFFF if there is no error, or any other value if there is error happened or EEPROM still busy doing something.
|}
|}


= Dumps =
= SC EEPROM dumps =
 
* https://mega.co.nz/#!Bt8klAhQ!-t5YVetoL9gz6iZucpqQB9Vl9chCkbhFiMfqjbmotoc {{MD5|B0E0551116B718A4921757B2B074693F}}
* https://mega.co.nz/#!Bt8klAhQ!-t5YVetoL9gz6iZucpqQB9Vl9chCkbhFiMfqjbmotoc {{MD5|B0E0551116B718A4921757B2B074693F}}
* https://mega.co.nz/#!B51wWJYA!zg8O-vCvRBOgK5mpzTQ1H2hgBZmykglmbksB5w1Mlfg {{MD5|3E0E73DACF7E10F2369624EA439C661B}} (partial: {{MD5|7E2BAD4DFDEE485494C8749B1C3E5676}} / {{MD5|05D9ED4B545C709C9C4564F047028DE8}})
* https://mega.co.nz/#!B51wWJYA!zg8O-vCvRBOgK5mpzTQ1H2hgBZmykglmbksB5w1Mlfg {{MD5|3E0E73DACF7E10F2369624EA439C661B}} (partial: {{MD5|7E2BAD4DFDEE485494C8749B1C3E5676}} / {{MD5|05D9ED4B545C709C9C4564F047028DE8}})
Line 42: Line 41:
* https://mega.nz/#!iV0nGY4I!94ByAd-sourgK8_l_4s-6BX_V7iVOrysQd55bI0N6ws {{MD5|1DB1CAA8E3D54256A59D08B6AF2B9BC5}} (Dumped by Syscon EEPROM Flasher done by me "'''Abkarino'''" using Arduino Mega).
* https://mega.nz/#!iV0nGY4I!94ByAd-sourgK8_l_4s-6BX_V7iVOrysQd55bI0N6ws {{MD5|1DB1CAA8E3D54256A59D08B6AF2B9BC5}} (Dumped by Syscon EEPROM Flasher done by me "'''Abkarino'''" using Arduino Mega).


* https://mega.nz/#!AwF1jIaB!5qei9JOCzisgUHARcjARCw0zvQENkkvtAdd_O0dRUfI DECR Syscon EEPROM dump from lv2 um_manager, needs documentation.
* https://mega.nz/#!AwF1jIaB!5qei9JOCzisgUHARcjARCw0zvQENkkvtAdd_O0dRUfI DECR eeprom dump from lv2 um_manager, needs documentation.


Note: different consoles have same initial 16 bytes -> maybe key/iv?
different consoles, same initial 16 bytes. maybe key/iv?


= Important offsets =
=Important Offsets=


== SC EEPROM Offset Table - Flags and Tokens ==
== EEPROM Offset Table - Flags and Tokens ==


Here is the table of SC EEPROM offsets that can be accessed through Update Manager (3.15):  
Here is the table of EEPROM offsets that can be accessed through Update Manager (3.15):  


{| class="wikitable FCK__ShowTableBorders"
{| class="wikitable FCK__ShowTableBorders"
Line 58: Line 57:
| 0x02F00 || 8 || Manufacturing Update Release Version String
| 0x02F00 || 8 || Manufacturing Update Release Version String
|-
|-
| 0x02F08 || 0x18 || Manufacturing Update Build Version + Build Date String
| 0x02F08 || 0x10 || Manufacturing Update Build Version + Build Date String
|-
|-
| 0x02F20 || 8 || Manufacturing Update Build Target ID (Can be 0x83(CEX-ww), 0x82(DEX-ww), 0x81(DevelopmentTool) or 0xDEAD. Written during the <br>manufacturing fw update process according to target string inside /dev_flash/vsh/etc/version.txt)
| 0x02F20 || 8 || Manufacturing Update Build Target ID (Can be 0x83(CEX-ww), 0x82(DEX-ww), 0x81(DevelopmentTool) or 0xDEAD. Written during the <br>manufacturing fw update process according to target string inside /dev_flash/vsh/etc/version.txt)
|-
|-
| 0x02F28 || 0xD0 || Padding/undocumented (the sample below is from motherboard REX-001(eMMC), syscon SW3-304)
| 0x02F28 || 0xD0 || Padding/undocumented
<pre>
<pre>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF xx xx
FF FF FF FF FF FF FF FF FF FF FF FF FF FF D4 63
xx xx xx FF FF xx xx xx xx xx xx xx xx xx xx xx
4F 4C 95 5E 01 31 04 BA 7C 93 41 23 52 48 B0 E0
xx xx 00 00 00 00 FF xx 00 xx xx FF FF FF FF FF  
3E 02 10 00 00 00 FF 04 00 01 02 FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF xx xx xx 00 00  
FF FF FF FF FF FF FF FF FF FF FF 32 49 31 34 00
xx xx xx xx xx FF FF FF xx xx xx FF FF FF xx 00 </pre>
32 32 1D 26 26 FF FF FF 1D 26 26 FF FF FF 80 00
</pre>
|-
|-
| 0x02FF8 || 1 || Factory Bit (0 = ?, 1 = reset, 2 = ?, 3 = (on retails))
| 0x02FF8 || 1 || Factory Bit (0 = ?, 1 = reset, 2 = ?, 3 = (on retails))
|-
|-
| 0x02FF9 || 0x7 || Padding/undocumented
| 0x02FF9 || 0x7 || Padding/undocumented
<pre>00 00 00 01 01 01 00 </pre>
<pre>00 00 00 00 xx xx xx </pre>
|-
|-
|}
|}
Line 124: Line 121:
| colspan="2" | 0x48C00 || 0x20 || (lv0 NVS region 2 start)  
| colspan="2" | 0x48C00 || 0x20 || (lv0 NVS region 2 start)  
|-
|-
| rowspan="22" | <abbr title="lv0 NVS region 2: 0x48C00-0x48C1F"><small>2</small></abbr> || 0x48C00 || 1 || boot flag (load_image_in_rom flag (os_boot_order_flag)
| rowspan="22" | <abbr title="lv0 NVS region 2: 0x48C00-0x48C1F"><small>2</small></abbr> || 0x48C00 || 1 || boot flag (load_image_in_rom flag (os_boot_order_flag), 0 = network 1st, 1 = flash 1st)
0 = network 1st
1 = flash 1st
|-
|-
| 0x48C01 || 1 || sys.dbgcard.hostpc (force standalone mode related)  
| 0x48C01 || 1 || sys.dbgcard.hostpc (force standalone mode related)  
|-
|-
| 0x48C02 || 1 || Network Device Mode (sys.dbgcard.dgbe / debug interface (select_net_device)
| 0x48C02 || 1 || Network Device Mode (sys.dbgcard.dgbe / debug interface (select_net_device) (-1: Ethernet 2, 0: IFB, 1: CP, 2: SB UART, 3: CP ch4, 5: invalid <!-- used on retail consoles -->))
-1: Ethernet 2
  0: IFB
  1: CP
  2: SB UART
  3: CP ch4
  5: Disabled (default)
|-
|-
| 0x48C03 || 1 || sys.dbgcard.dgbe.index (select_dgbe_device)  
| 0x48C03 || 1 || sys.dbgcard.dgbe.index (select_dgbe_device)  
Line 146: Line 135:
| 0x48C06 || 1 || FSELF Control Flag / toggles release mode (fself_ctrl used by lv0 for failsafe mode and by lv2 to bypass protection checks)
| 0x48C06 || 1 || FSELF Control Flag / toggles release mode (fself_ctrl used by lv0 for failsafe mode and by lv2 to bypass protection checks)
|-
|-
| 0x48C07 || 1 || Non-secure Product Mode (only <= 0.85) / force Syscon remarry (only JIG firmwares)
| 0x48C07 || 1 || Product Mode (UM allows to read this offset, it can be also written but only when already in product mode)
|-
|-
| 0x48C08 || 1 || lv0 passes this to lv1ldr (not used on >= 0.82, maybe only CEB)  
| 0x48C08 || 1 || lv0 passes this to lv1ldr (not used on >= 0.82, maybe only CEB)  
Line 164: Line 153:
| 0x48C0F || 2 || cell os flags (loader parameter)
| 0x48C0F || 2 || cell os flags (loader parameter)
|-
|-
| 0x48C11 || 1 || bootrom trace level
| 0x48C11 || 1 || bootrom trace level (0x00: fatal errors, 0x01: errors, 0x02: information messages, 0x03: debug messages)
0x00: fatal errors
0x01: errors
0x02: information messages
0x03: debug messages
0xFF: ? (default)
|-
|-
| 0x48C12 || 1 || ?
| 0x48C12 || 1 || ?
Line 177: Line 161:
| 0x48C14 || 4 || cellos_spu_configure
| 0x48C14 || 4 || cellos_spu_configure
|-
|-
| 0x48C18 || 4 || Safe Mode System Language. Using the [[Languages|language codes]]. See also [[XRegistry.sys#Settings|XRegistry.sys/setting/system/language]]
| 0x48C18 || 4 || Safe Mode System Language [[XRegistry.sys#Settings]] ( /setting/system/language )
|-
|-
| 0x48C1C || 4 || Safe Mode VSH Target (maybe QA,Debug,Retail,Kiosk?). See [[Promo_flags.txt]] and [[VSH_Exports#vshmain|GetReleaseTarget]] vsh export
| 0x48C1C || 4 || Safe Mode VSH Target (seems it can be 0xFFFFFFFE, 0xFFFFFFFF, 0x00000001 default: 0x00000000 /maybe QA,Debug,Retail,Kiosk?)
0x00000000 = ? (default)
0x00000001 = ?
0x00000005 = dtcpipdevdex (can't update to any firmware, except dtcpipdevdex firmware)
0xFFFFFFFF = ?
0xFFFFFFFE = ?
|-{{cellcolors|lightgrey}}
|-{{cellcolors|lightgrey}}
| colspan="2" | 0x48C1F || - || (lv0 NVS region 2 end)
| colspan="2" | 0x48C1F || - || (lv0 NVS region 2 end)
Line 240: Line 219:
| 0x48C61 || 1 || Recover Mode Flag
| 0x48C61 || 1 || Recover Mode Flag
|-
|-
| 0x48C62 || 8 || boot param. Accessed by [[LV2_Functions_and_Syscalls|syscalls 404]] ?. See also [[Factory_Service_Mode#Game_OS|this]]
| 0x48C62 || 8 || boot param
|-
|-
| 0x48C6A || 2 || factory process completion (bitflags ?). Accessed by [[LV2_Functions_and_Syscalls|syscalls 405, 406, 407]] ?. See also [[Factory_Service_Mode#Game_OS|this]]
| 0x48C6A || 2 || factory process completion %
Usually FFFF, but also:
00E2 - CokC12, SEM-001, CXR713120-203GB
00EA - CokD10, DIA-001, CXR714120-301GB
00E6 - CokE10, DIA-002, CXR714120-302GB
00EA - CokF10, VER-001, SW-301
00AA - CokG11, DYN-001, SW2-301
00BE - CokH11, SUR-001, SW2-302
00B2 - CokJ13, JTP-001, SW2-303 & CokK10, KTE-001, SW3-301
00B0 - CokM20, MSX-001, SW3-302 & CokM30, MPX-001, SW3-302 & CokN10, NPX-001, SW3-302 & CokP10, PQX-001, SW3-304 & CokR40, REX-001, SW3-304
00F0 - CokD10, DIA-001, CXR714120-304GB Refurb 40nm RSX
01FE - Cok14, COK-001, CXR714120-304GB Refurb 40nm RSX
|-{{cellcolors|lightgrey}}
|-{{cellcolors|lightgrey}}
| colspan="2" | 0x48C4F || - || (lv0 NVS region 5 end)
| colspan="2" | 0x48C4F || - || (lv0 NVS region 5 end)
Line 372: Line 339:




| colspan="2" | 0x48D8E || 0x50 || mode_auth_data (read/cleared by ss_sc_init_pu, checked by spu_mode_auth, used to enter product mode on jig firmwares without a dongle)
| colspan="2" | 0x48D8E || 0x50 || mode_auth_data (read/cleared by ss_sc_init_pu, checked by spu_mode_auth)
|-
|-
|}
|}
Line 386: Line 353:
QA Token ECDSA Signature is stored in 0x48013 offset (starting from 3.60 firmwares)
QA Token ECDSA Signature is stored in 0x48013 offset (starting from 3.60 firmwares)


== Undocumented region ==
== Undocumented config ==
This is 0x48800 on SC EEPROM, or at 0x7100 (mullions with 32KB EEPROM used), or at 0x4100 (mullions with 20KB EEPROM used), or at 0x1100 (sherwoods)
 
Accessed by [[Hypervisor_Reverse_Engineering | Hypervisor Service ID 32]] '''REQUEST_SYSTEM_EVENT_LOG''' ?, and [[LV2_Functions_and_Syscalls| syscall 395]] '''sys_sm_request_system_event_log''' ?


There is an unknown syscon response of 0x100 bytes when using NVS service with such params: BlockID=1, Offset=0, Size=0.
There is an unknown syscon response of 0x100 bytes when using NVS service with such params: BlockID=1, Offset=0, Size=0.
Sometimes the whole region is filled with FF's (empty, never used, or erased), it seems this procedure can be used to reset it
It can be considered an structure composed by a 0x10 header, and six available "slots" of 0x28 each, the second byte of the header seems to be some kind of counter related with the slots where the only values posibles are 0-5. The presence of data in the slots could vary usually all them are filled with data but in some rare cases the slots are empty (filled with FF's)
Sample (CokH11, SUR-001, SW2-302)
<pre>
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00001100  FF 05 FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿ.ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00001110  16 0E F0 35 00 00 E1 18 00 04 53 00 0C 00 00 00  ..ð5..á...S.....
00001120  00 00 00 00 00 00 00 00 00 00 00 00 55 55 55 55  ............UUUU
00001130  00 00 00 00 00 00 00 00 18 F1 6F 68 00 00 E1 18  .........ñoh..á.
00001140  00 04 53 00 0C 00 00 00 00 00 00 00 00 00 00 00  ..S.............
00001150  00 00 00 00 55 55 55 55 00 00 00 00 00 00 00 00  ....UUUU........
00001160  18 F1 6F C7 00 00 E1 18 00 04 53 00 0C 00 00 00  .ñoÇ..á...S.....
00001170  00 00 00 00 00 00 00 00 00 00 00 00 55 55 55 55  ............UUUU
00001180  00 00 00 00 00 00 00 00 18 FF EE 91 00 00 E1 18  .........ÿî‘..á.
00001190  00 04 53 00 0C 00 00 00 00 00 00 00 00 00 00 00  ..S.............
000011A0  00 00 00 00 71 75 F4 75 00 00 00 00 00 00 00 00  ....quôu........
000011B0  1A 21 73 52 00 00 E1 18 00 04 53 00 0C 00 00 00  .!sR..á...S.....
000011C0  00 00 00 00 00 00 00 00 00 00 00 00 50 75 55 51  ............PuUQ
000011D0  00 00 00 00 00 00 00 00 16 0E EF D5 00 00 E1 18  ..........ïÕ..á.
000011E0  00 04 53 00 0C 00 00 00 00 00 00 00 00 00 00 00  ..S.............
000011F0  00 00 00 00 55 55 55 55 00 00 00 00 00 00 00 00  ....UUUU........
</pre>
Sample with 2 slots used
<pre>
<pre>
0000h: FF 02 FF FE FF 02 FF FF 19 FB E1 16 00 00 00 00  ÿ.ÿþÿ.ÿÿ.ûá.....  
0000h: FF 02 FF FE FF 02 FF FF 19 FB E1 16 00 00 00 00  ÿ.ÿþÿ.ÿÿ.ûá.....  
Line 439: Line 375:
</pre>
</pre>


Sample with only 1 slot used (CokP10, PQX-001nor, SW3-304)
This is 0x48800 on EEPROM
<pre>
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
 
00001100  FF 01 FF FF 0D FF FF FF 27 B5 4D 75 FF FF FF FF  ÿ.ÿÿ.ÿÿÿ'µMuÿÿÿÿ
00001110  1E 61 CF 07 00 00 E1 18 00 03 02 00 0C 03 00 00  .aÏ...á.........
00001120  A8 00 00 2D DC 40 00 00 00 20 00 00 3E AA A8 28  ¨..-Ü@... ..>ª¨(
00001130  00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF  ........ÿÿÿÿÿÿÿÿ
00001140  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00001150  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00001160  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00001170  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00001180  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00001190  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
000011A0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
000011B0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
000011C0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
000011D0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
000011E0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
000011F0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
</pre>
 
The structure of an slot seems to be: 0x4 (timestamp) + 0x2 (unknown, always 0000) + 0x1 (unknown, always 0xE1 or 0xE2) + 0x1 (Data Size ?, usually 0x18) + 0x4 (Data Type ?) + 0x1C (data, included padding)
*The timestamp follows the same format than the timestamps of the [[Syscon_Error_Codes#Error_log_format|Syscon Error Codes]], in some syscon models the lowest value posible for this timestamps seems to be 0x0B488680 (2005/12/31 00:00:00)


<pre>
cech-c (NO BD Drive): http://pastie.org/private/grl0dc0dxajisa36chgm7w
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F


00001110  0B 74 08 2F 00 00 E1 18 00 03 15 00 0C 03 00 00  .t./..á.........
== lv0 SC EEPROM usage ==
00001120  A8 00 00 18 32 E2 00 00 00 80 00 00 FF FF FF FF  ¨...2â...€..ÿÿÿÿ
00001130  00 00 00 00 00 00 00 00                          ........
</pre>
<pre>
<pre>
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
[*] lv0 NVS regions:
 
# start_offset end_offset block  size
00001110  1F AC E5 B0 00 00 E1 18 00 03 02 00 0C 03 00 00  .¬å°..á.........
0 0x00        0x12      0x48000 0x13
00001120  A8 00 00 15 8A 20 00 00 00 40 00 00 AA AA AA AA  ¨...Š ...@..ªªªª
1 0x00        0x0B      0x48800 0x0C
00001130  00 00 00 00 00 00 00 00                          ........
2 0x00        0x1F      0x48C00 0x20
</pre>
3 0x22        0x24      0x48C00 0x03
<pre>
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
 
00001110  1D 59 29 DB 00 00 E2 18 01 51 40 25 40 01 03 00  .Y)Û..â..Q@%@...
00001120  00 00 00 01 08 E5 00 13 00 C7 00 00 00 00 00 00  .....å...Ç......
00001130  00 00 00 00 00 00 00 00                          ........
</pre>
<pre>
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
 
00001110  16 0E F0 35 00 00 E1 18 00 04 53 00 0C 00 00 00  ..ð5..á...S.....
00001120  00 00 00 00 00 00 00 00 00 00 00 00 55 55 55 55  ............UUUU
00001130  00 00 00 00 00 00 00 00                          ........
</pre>
<pre>
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
 
00007110  0B 48 86 7D 00 00 E1 18 53 54 52 3A 50 41 54 41  .H†}..á.STR:PATA
00007120  43 30 3A 43 61 62 6C 65 20 4E 6F 74 20 43 6F 6E  C0:Cable Not Con
00007130  6E 65 63 74 00 00 00 00                          nect....
</pre>
 
*Notes
**See the timestamp of the last sample with value 0B48867D, very close to 0B488680 (2005/12/31 00:00:00)
 
== lv0 SC EEPROM usage ==
 
<pre>
[*] lv0 NVS regions:
# start_offset end_offset block  size
0 0x00        0x12      0x48000 0x13
1 0x00        0x0B      0x48800 0x0C
2 0x00        0x1F      0x48C00 0x20
3 0x22        0x24      0x48C00 0x03
4 0x30        0x3C      0x48C00 0x0D
4 0x30        0x3C      0x48C00 0x0D
5 0x40        0x4F      0x48C00 0x10
5 0x40        0x4F      0x48C00 0x10
Line 562: Line 437:
rsx.rdcy.7          0x48CB8 0x08 [0x08 value]
rsx.rdcy.7          0x48CB8 0x08 [0x08 value]
dgbe_config          0x48D00 0x0C [0x04 ip_addr, 0x04 ip_netmask, 0x04 ip_gateway]
dgbe_config          0x48D00 0x0C [0x04 ip_addr, 0x04 ip_netmask, 0x04 ip_gateway]
qa_token            0x48D3E 0x50 [0x50 token]
UNKNOWN              0x48D20 0x08 [0x08 value]
UNKNOWN              0x48D20 0x08 [0x08 value]
qa_token            0x48D3E 0x50 [0x50 token]
</pre>
</pre>


== System Data from SC EEPROM  ==
== System Data From EEPROM  ==


Here is the list of possible SC EEPROM offsets:  
Here is the list of possible EEPROM offsets:  


{|class="wikitable"
{|class="wikitable"
|-
|-
! Index !! SC EEPROM offset !! Data size !! Description
! Index !! SC EEPROM Offset !! Size Of Data !! Description
|-
| 4 || 0x48D00 || 4 ||?
|-
| 5 || 0x48D04 || 4 ||?
|-
| 6 || 0x48D08 || 4 ||?
|-
|-
| 0 || 0x48D20 || 6 ||?
| 0 || 0x48D20 || 6 ||?
Line 587: Line 456:
|-
|-
| 3 || 0x48D38 || 6 ||?
| 3 || 0x48D38 || 6 ||?
|-
| 4 || 0x48D00 || 4 ||?
|-
| 5 || 0x48D04 || 4 ||?
|-
| 6 || 0x48D08 || 4 ||?
|}
|}


== Dumpable SC EEPROM Offset - Block ID and Block Offset Mapping Table (NVS Service) ==
== Dumpable EEPROM Offset - Block ID and Block Offset Mapping Table (NVS Service) ==


Right now we only have read access to some portions of the SC EEPROM to have access to this regions DM needs to be patched, see section dumping SC EEPROM.
Right now we only have read access to some portions of the eeprom to have access to this regions DM needs to be patched, see section dumping eeprom


{|class="wikitable"
{|class="wikitable"
|-
|-
! SC EEPROM Offset !! Block ID !! Block Offset !! Description !! Physical Offset (CXR713) !! Physical Offset (CXR714) !! Virtual Offset (SW)
! EEPROM Offset !! Block ID !! Block Offset !! Description !! Physical Offset
|-
|-
| - || - || - || ERRLOG Errors are stored here || - || - || 0x900
| 0x48000 - 0x480FF || 0x00 || 0x48000 - 0x480FF || ? || 0x7000
|-
|-
| 0x2F00 - 0x2FFF || 0x10 || 0x2F00 - 0x2FFF || "Industry Area" aka OS Version Area || 0x2F00 || 0x2F00 || 0xE00
| 0x48800 - 0x488FF || 0x01 || 0x48800 - 0x488FF || Hypervisor Area || 0x7100
|-
|-
| 0x3000 - 0x30FF || 0x20 || 0x3000 - 0x30FF || "Customer Service Area" || 0x3000 || 0x3000 || 0xF00
| 0x48C00 - 0x48CFF || 0x02 || 0x48C00 - 0x48CFF || Contains flags and tokens/ see above || 0x7200
|-
|-
| 0x48000 - 0x480FF || 0x00 || 0x48000 - 0x480FF || ? || 0x7000 || 0x4000 || 0x1000
| 0x48D00 - 0x48DFF || 0x03 || 0x48D00 - 0x48DFF || System Data Region || 0x7300
|-
|-
| 0x48800 - 0x488FF || 0x01 || 0x48800 - 0x488FF || HyperVisor Area || 0x7100 || 0x4100  || 0x1100
| 0x2F00 - 0x2FFF || 0x10 || 0x2F00 - 0x2FFF || "Industry Area" aka OS Version Area || 0x2F00
|-
|-
| 0x48C00 - 0x48CFF || 0x02 || 0x48C00 - 0x48CFF || Contains flags and tokens/ see above || 0x7200 || 0x4200 || 0x1200
| 0x3000 - 0x30FF || 0x20 || 0x3000 - 0x30FF || "Customer Service Area" || 0x3000
|-
|-
| 0x48D00 - 0x48DFF || 0x03 || 0x48D00 - 0x48DFF || System Data Region || 0x7300 || 0x4300 || 0x1300
| N/A || 0xFF || N/A || ? sys_boot_gos flag is there || No eeprom activity
|-
|-
| N/A || 0xFF || N/A || ? sys_boot_gos flag is there || No SC EEPROM activity || ? || ?
| All other offsets || Invalid || Invalid || ? ||
|-
| All other offsets || Invalid || Invalid || ? || - || - || -
|}
|}


== Dumpable only with HW flasher SC EEPROM Offsets - Full Mapping Table (NAND only) ==
== Dumpable only with HW flasher EEPROM Offsets - Full Mapping Table (NAND Only) ==
*Sample from a [[CECHGxx]] with [[SEM-001]] motherboard


{|class="wikitable"
{|class="wikitable"
Line 625: Line 497:
| 0x0-0xF || magic0 (static bytes) || <pre>99D9662BB3D761546B9C3F9ED140EDB0</pre>
| 0x0-0xF || magic0 (static bytes) || <pre>99D9662BB3D761546B9C3F9ED140EDB0</pre>
|-
|-
| 0x10-0x28F || eEID1 (probably encrypted) ||
| 0x10-0x28F(0x280) || eEID1 (probably encrypted) ||
|-
|-
| 0x290-0x4FF || Unknown ||
| 0x290-0x4FF(0x270) || Unknown ||
|-  
|-  
| 0x500-0x55F || magic1 (static bytes)
| 0x500-0x55F || magic1(static bytes) ||
| <pre>E01B01CF9C7FBC7D79D670086DAF497F
9BD3A5D5178DDE1D825344AE398113DD
FF525D8BF4422CC76B13AA47FA2CC369
83A720CD45D18FB3D4112888187E3040
702B91D8E6ACEEC4B801315F357E1EE3
2DA1081408D72C41AFC1B61AE7C9882D</pre>
|-
|-
| 0x560-0x95F || Authenticated Data Region 0 (snvs region 0), not used || Used on COK-001, DIA-001 / CXR714120-304GB / 40nm RSX (official refurbished)
| 0x560-0x95F || Authenticated Data Region 0 (snvs region 0), not used ||
|-
|-
| 0x960-0xD5F || Authenticated Data Region 1 (snvs region 1), contains ss-service version, secure_product_mode flag,<BR> vtrm cipher/hasher keys, versions/hashes of installed update packages, etc... || Used on COK-001, DIA-001 / CXR714120-304GB / 40nm RSX (official refurbished)
| 0x960-0xD5F || Authenticated Data Region 1 (snvs region 1), contains ss-service version, secure_product_mode flag,<BR> vtrm cipher/hasher keys, versions/hashes of installed update packages, etc... ||
|-
|-
| 0xD60-0x115F || Authenticated Data Region 2 (snvs region 2), not used || Used on COK-001, DIA-001 / CXR714120-304GB / 40nm RSX (official refurbished)
| 0xD60-0x115F || Authenticated Data Region 2 (snvs region 2), not used ||
|-
|-
| 0x1160-0x155F || Authenticated Data Region 3 (snvs region 3), not used || Used on COK-001, DIA-001 / CXR714120-304GB / 40nm RSX (official refurbished)
| 0x1160-0x155F || Authenticated Data Region 3 (snvs region 3), not used ||
|-
|-
| 0x1560-0x195F || Authenticated Data Region 4 (snvs region 4), not used || Used on COK-001, DIA-001 / CXR714120-304GB / 40nm RSX (official refurbished)
| 0x1560-0x195F || Authenticated Data Region 4 (snvs region 4), not used ||
|-
|-
| 0x1960-0x1D5F || Authenticated Data Region 5 (snvs region 5), not used || Used on COK-001, DIA-001 / CXR714120-304GB / 40nm RSX (official refurbished)
| 0x1960-0x1D5F || Authenticated Data Region 5 (snvs region 5), not used ||
|-
|-
| 0x1D60-0x215F || Authenticated Data Region 6 (snvs region 6), not used || Used on COK-001, DIA-001 / CXR714120-304GB / 40nm RSX (official refurbished)
| 0x1D60-0x215F || Authenticated Data Region 6 (snvs region 6), not used ||
|-
|-
| 0x2160-0x255F || Authenticated Data Region 7 (snvs region 7), not used || Used on COK-001, DIA-001 / CXR714120-304GB / 40nm RSX (official refurbished)
| 0x2160-0x255F || Authenticated Data Region 7 (snvs region 7), not used ||
|-
|-
| 0x2560-0x25FF || FF Region ||
| 0x2560-0x26AF || FF Region ||
|-
|-
| 0x2600-0x26AF || FF Region || rowspan="6" | System Info
| 0x26B0-(0x26CF/0x26EF) || Unknown (0x20 byte on TMU, 0x40 byte on retail boards) ||  
|-
|-
| 0x26B0-0x26CF || Unknown, encrypted ?
| 0x26F0-0x26FF || FF Region ||  
|-
|-
| 0x26D0-0x26EF || Unknown, encrypted ? (filled with FF's on TMU)
| 0x2700 - 0x270F || magic2 (static bytes) (does not exist in TMU dump) || <pre>857C4DE5BFAFD6A4A361CB5BFDD72D26</pre>
|-
|-
| 0x26F0-0x26FF || FF Region
| 0x2710-0x27FF || FF Region ||
|-
|-
| 0x2700-0x270F || magic2 (static bytes) (does not exist in TMU dump) <pre>857C4DE5BFAFD6A4A361CB5BFDD72D26</pre>
| 0x2800 - 0x2BFF || Syscon Patch Content Top-Half ||
|-
|-
| 0x2710-0x27FF || FF Region
| 0x2C00 - 0x2EFF || FF Region ||
|-
|-
| 0x2800-0x2BFF || Syscon Patch Content Top-Half ||
| 0x2F00-0x2FFF || Industry Area  (nvs region 0x20) ||
|-
| 0x2C00-0x2EFF || FF Region ||
|-
|-
| 0x2F00-0x2FFF || Industry Area (nvs region 0x20) ||
| 0x3000-0x30FF || Costumer Service Area (nvs region 0x30) ||
|-
|-
| 0x3000-0x30FF || Customer Service Area (nvs region 0x30) ||
| 0x3100-0x31FF || Special Region #0 ||
|-
|-
| 0x3100-0x31FF || Special Region #0 || Platform Config ([[Platform_ID]]<small>(hex)</small> at relative offset 0xE
| 0x3200-0x32FF || Special Region #1 ||
|-
|-
| 0x3200-0x32FF || Special Region #1 || Hardware/XDR Config
| 0x3300-0x33FF || Special Region #2 || 3JMPRW
|-
|-
| 0x3300-0x33FF || Special Region #2 || [[Syscon Thermal Configs|Thermal Config]]
| 0x3400-0x34FF || Special Region #3 || 3JMPRW
|-
|-
| 0x3400-0x34FF || Special Region #3 || [[Syscon Thermal Configs|Thermal Config]]
| 0x3500-0x35FF || Special Region #4 || .....z
|-
|-
| 0x3500-0x35FF || Special Region #4 || On/Off Count, On-time
| 0x3600-0x36FF || Special Region #5 || ...,.z
|-
|-
| 0x3600-0x36FF || Special Region #5 || On/Off Count, On-time
| 0x3700-0x370F / 0x3700-0x37FF || Serial Num (DECR only) / Special Region #6 || 2M010001207K / 2D@ 40@ 
|-
|-
| 0x3700-0x37FF || Special Region #6 [[Syscon Error Codes|Errorlog]] (retail PS3 models) ...or... Serial Num (DECR only) || 2M010001207K / 2D@ 40@ 
| 0x3710 - 0x37FF || FF Region (DECR only) ||
|-
|-
| 0x3800-0x38FF || FF Region ...or... [[Syscon Error Codes|Errorlog]] (DECR only) ||  
| 0x3800-0x38FF || FF Region ||  
|-
|-
| 0x5000-0x6FFF || FF Region ||
| 0x7000-0x70FF OR 0x4000-0x40FF || Bluray Drive Area ?? (nvs region 0) ||
|-
|-
| 0x7000-0x70FF ...or... 0x4000-0x40FF || Bluray Drive Area ?? (nvs region 0) || rowspan="4" | System Software Config
| 0x7100-0x71FF OR 0x4100-0x41FF || HyperVisor Area (nvs region 1) ||
|-
|-
| 0x7100-0x71FF ...or... 0x4100-0x41FF || HyperVisor Area (nvs region 1)
| 0x7200-0x72FF OR 0x4200-0x42FF || Token Area (nvs region 2) ||
|-
|-
| 0x7200-0x72FF ...or... 0x4200-0x42FF || Token Area (nvs region 2)
| 0x7300-0x73FF OR 0x4300-0x43FF || System Data Area (nvs region 3) ||
|-
|-
| 0x7300-0x73FF ...or... 0x4300-0x43FF || System Data Area (nvs region 3)
| 0x7400 - 0x7FFF OR 0x4400 - 0x4FFF || Syscon Patch Content Bottom-Half ||
|-
|-
| 0x7400-0x7FFF ...or... 0x4400-0x4FFF || Syscon Patch Content Bottom-Half ||  
| 0x5000-0x6FFF || FF Region ||
|-
|-
|}
|}
Line 709: Line 573:
=== Tests ===
=== Tests ===


* [https://www.psdevwiki.com/ps3/File:A8g00bD.png AES128CBC with fixed key and incremented iv (by 1 each time)]
* http://i.imgur.com/A8g00bD.png <- aes 128 cbc with fixed key and incremented iv (by 1 each time)
* [https://www.psdevwiki.com/ps3/File:HZDWGSk.png results]
* http://i.imgur.com/HZDWGSk.png <- results
* [https://www.psdevwiki.com/ps3/File:2mtrtdm.png region 0 encrypted] vs [https://www.psdevwiki.com/ps3/File:7bSdQni.png decrypted]
* http://i.imgur.com/2mtrtdm.png region 0 encrypted vs http://i.imgur.com/7bSdQni.png decrypted
* [https://www.psdevwiki.com/ps3/File:FGJKkuz.png region 7 encrypted] vs [https://www.psdevwiki.com/ps3/File:7TSeHWK.png decrypted]
* http://i.imgur.com/FGJKkuz.png region 7 encrypted vs http://i.imgur.com/7TSeHWK.png decrypted


=== Conclusion ===
=== Conclusion ===


* different key for a different authenticated region.
* different key for a different authenticated region.
* Sony uses either AES 128-cbc or AES 256-cbc (most likely 128-cbc)
* sony uses either aes 128-cbc or aes 256-cbc (most likely 128-cbc)
* Sony does this weird cbc crypto in which they only decrypt portions of 0x10 bytes of the region, then increment or decrement (most likely increment) iv, and then decrypt again. I have decided to call it ctr-cbc.
* sony does this weird cbc crypto in which they only decrypt portions of 0x10 bytes of the region, then increment or decrement (most likely increment) iv, and then decrypt again. i've decided to call it ctr-cbc
* most likely the keys used are <strike>session</strike> perconsole keys.
* most likely the keys used are <strike>session</strike> perconsole keys.
* most likely the iv used starts with 00, then gets incremented by 1 for each 0x10 bytes
* most likely the iv used starts with 00, then gets incremented by 1 for each 0x10 bytes
Line 725: Line 589:


* Zer0Tolerance for the crypto findings
* Zer0Tolerance for the crypto findings
* flatz for his awesome Syscon tool
* flatz for his awesome syscon tool


= Dumping SC EEPROM =
=Dumping your SC EEPROM=


== Linux ==
==Linux==


First you need graf_chokolo kernel ps3dm-utils and linux_hv_scripts.
First you need graf_chokolo kernel ps3dm-utils and linux_hv_scripts.


Patch DM using linux_hv_scripts:
If you are ready.
 
Patch DM using linux_hv_scripts


<pre>
<pre>
Line 739: Line 605:
</pre>
</pre>


Read the data from the region you want for example (see tables above):
Read the data from the region you want for example (see tables above)


<pre>
<pre>
Line 745: Line 611:
</pre>
</pre>


You can see some coolstuff containing dumps.
You can see some coolstuff that containing dumps


= Hashes =
=Hashes=


Where exactly the hashes are stored is still a secret. It is said that those hashes are stored in SC EEPROM.
Where exactly the hashes are stored is still a secret, it is said that those hashes are stored in SC EEPROM


To retrieve the information about the packages you have installed you can also use ps3d_utils.
To retrieve the information about the packages you have installed you can also use ps3d_utils


== Linux ==
==Linux==


=== Installed Package info ===
===Installed Package info===


<pre>
<pre>
Line 769: Line 635:
0003004100000000
0003004100000000
</pre>
</pre>
 
get_pkg_info 2 - Revoke List for program
get_pkg_info 2 - Revoke List for program


Line 775: Line 641:
0003004100000000
0003004100000000
</pre>
</pre>
 
get_pkg_info 3 - Revoke list for package
get_pkg_info 3 - Revoke list for package
 
<pre>
<pre>
0002003000000000
0002003000000000
</pre>
</pre>
 
get_pkg_info 4
get_pkg_info 4
 
<pre>
<pre>
deadbeaffacebabe
deadbeaffacebabe
</pre>
</pre>
 
get_pkg_info 5
get_pkg_info 5
 
<pre>
<pre>
deadbeaffacebabe
deadbeaffacebabe
Line 795: Line 661:


get_pkg_info 6 - Firmware Package
get_pkg_info 6 - Firmware Package
 
<pre>
<pre>
0003005000000000
0003005000000000
</pre>
</pre>


You can find more information about this in [[Hypervisor Reverse Engineering]].


=== Hashes ===
You can find more information about this in [[Hypervisor Reverse Engineering]]


What algorithm is used and what exactly is hashed is still unknown. It seems that the content of files is hashed by the SHA-1.
 
===Hashes===
 
What algorithm is used and what exactly is hashed is still unknown (seems that the content of files is hashed by the SHA-1).


<pre>
<pre>
Line 1,327: Line 1,195:
</pre>
</pre>


=== DYN-001 ===
== Authenticated Regions ==
 
<pre>
0000000 4e5d 6b24 0001 0002 083e 0832 201a 0000
0000010 0faa 02ab 035d 009a 001a 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
*
0000090 0000 0000 0000 0000 0000 3001 a0f8 1a14
00000a0 0000 0000 0000 0000 0000 0000 0000 0000
*
0000fc0
</pre>
 
*To be continued...
 
== Authenticated Regions ==
 
Here is an example of data (partition 1) from syscon EEPROM which stores VTRM block key, SRK/SRH, region data, etc.


Here is an example of data (partition 1) from syscon which stores VTRM block key, SRK/SRH, region data, etc.
<br>
RETAIL TSOP:
RETAIL TSOP:
<pre>
<pre>
0x0000: 00 00 00 03 C0 00 00 FF 00 00 00 00 00 00 00 00  ................ <- version/mode  
0x0000: 00 00 00 03 C0 00 00 FF 00 00 00 00 00 00 00 00  ................ <- version/mode  
Line 1,415: Line 1,267:
</pre>
</pre>


PROTO BGA (DECR):
<br> PROTO BGA(DECR):


<pre>
<pre>
00000000: 00 00 00 02 c0 00 00 ff - 00 00 00 00 00 00 00 00  ........ ........
00000000: 00 00 00 02 c0 00 00 ff - 00 00 00 00 00 00 00 00  ........ ........
00000010: eb 49 35 4a c3 26 51 7a - 1e 88 c9 5d 52 03 f1 54  .I5J..Qz ....R..T
00000010: eb 49 35 4a c3 26 51 7a - 1e 88 c9 5d 52 03 f1 54  .I5J..Qz ....R..T
Line 1,550: Line 1,403:
000003f0: af 77 6c ab 06 08 d8 c9 - 91 2f f3 8d 45 fd df 39  .wl..... ....E..9
000003f0: af 77 6c ab 06 08 d8 c9 - 91 2f f3 8d 45 fd df 39  .wl..... ....E..9
</pre>
</pre>
<br>


RETAIL BGA:
RETAIL BGA:


<pre>
<pre>
00000000: 00 00 00 02 c0 00 00 ff - 00 00 00 00 00 00 00 00  ........ ........
00000000: 00 00 00 02 c0 00 00 ff - 00 00 00 00 00 00 00 00  ........ ........
00000010: 37 24 90 70 31 f5 64 48 - 12 7c a5 bc 37 6f 26 8d  7..p1.dH ....7o..
00000010: 37 24 90 70 31 f5 64 48 - 12 7c a5 bc 37 6f 26 8d  7..p1.dH ....7o..
Line 1,622: Line 1,478:
== More samples ==
== More samples ==


* [https://dl.dropboxusercontent.com/u/35197530/bin/eeprom.bin dead link]
* https://dl.dropboxusercontent.com/u/35197530/bin/eeprom.bin
 
= Tokens =
 
Here are documented the different types of tokens used in PS3.
 
All tokens are tied to EID0, more specifically to [[IDPS]].


Tokens enable additional repository nodes.
=Tokens=


== List ==
Here we will document the different types off tokens known in the PS3
All tokens are tied? encrypted? using EID0.
They enable additional repository nodes.


==List==
{| class="wikitable FCK__ShowTableBorders"
{| class="wikitable FCK__ShowTableBorders"
|-
|-
Line 1,640: Line 1,493:
| qa_token || sc_eeprom - 0x48D3E || 0x50 || spu_token_processor.self ||  
| qa_token || sc_eeprom - 0x48D3E || 0x50 || spu_token_processor.self ||  
|-
|-
| user_token || ?copied from HDD or USB storage to VTRM? || ?variable? || spu_utoken_processor.self  || Encrypted/Signed
| user_token || ? || ? || spu_utoken_processor.self  || Encrypted/Signed
|-
|-
| token_seed || memory (temporary data) || ? || ? || Used to create a QA Token with EID0.
| token_seed || ? || ? || ? || This is used to create the token with EID0
|}
|}


=== QA Token ===
==Token Seed==
 
Used internally by Sony developpers to test the console and OS.
 
=== User Token ===
 
Used to test a usermode application.
 
=== Token Seed ===


Unencrypted form of QA Token.
Unencrypted form of QA-token


== Structure ==
==Structure==


This section has to be corrected because it is almost only based on debug strings. We need to decrypt the tokens.
This section has to be corrected, is only based on debug strings, we need to decrypt the tokens


=== Token Seed ===
===Token Seed===


?
?


=== QA Token ===
===QA Token===
 
Size is about 0x50 bytes.


=== User Token ===


<syntaxhighlight lang="C">
struct user_token_attr {
    uint32_t type; // usually 1, 0 for last attribute
    uint32_t size;    // Size of this structure
    uint8_t data[0]; // size of data can be 0 */
}


struct user_token {
===User Token===
    uint32_t magic; // 0x73757400 = "sut\0"
    uint32_t format_version; // usually 1
    uint64_t size;
    uint8_t idps[16];
    uint64_t expire_date;
    uint64_t capability;
    union {
        struct user_token_attr attribute[0];
        uint8_t dummy[0xC00];
    } attributes;
    /* 0xC30 */
    uint8_t digest[0x14]; // certainly SHA-1
}
</syntaxhighlight>


{| class="wikitable FCK__ShowTableBorders"
{| class="wikitable FCK__ShowTableBorders"
|-
|-
! Offset !! Size !! Description
! Address !! Size !! Description
|-
|-
| ? || ? || m_magic
| ? || ? || m_magic
Line 1,704: Line 1,526:
| ? || ? || m_size
| ? || ? || m_size
|-
|-
| ? || ? || m_idps
| ? || ? || m_capability
|-
|-
| ? || ? || m_expire_date
| ? || ? || m_expire_date
|-
|-
| ? || ? || m_capability
| ? || ? || m_idps?
|-
|-
| ? || ? || m_attribute
| ? || ? || m_attribute
Line 1,715: Line 1,537:
|}
|}


For every attribute in the token:
For every atribute in the token


{| class="wikitable FCK__ShowTableBorders"
{| class="wikitable FCK__ShowTableBorders"
|-
|-
! Offset !! Size !! Description
! Address !! Size !! Description
|-
|-
| ? || ? || attr:m_type
| ? || ? || attr:m_type
Line 1,732: Line 1,554:
{| border="1" cellspacing="0" cellpadding="5" border="#999" class="wikitable" style="border:1px solid #999; border-collapse: collapse;"  
{| border="1" cellspacing="0" cellpadding="5" border="#999" class="wikitable" style="border:1px solid #999; border-collapse: collapse;"  
|-
|-
! style="background-color:red!important;" | <span style="background-color:lightred; color:white; font-size:200%; ">Warning</span>
! style="background-color:red;" | <span style="background-color:lightred; color:white; font-size:200%; ">Warning</span>
|-
|-
| <span style="white; color:red!important; font-size:150%; text-align:center; ">You can use this method at your own risk. Author is not responsible for any hardware damages and failures.  
| style="background-color:white;" | <span style="white; color:red; font-size:150%; text-align:center; ">You can use this method at your own risk. Author is not responsible for any hardware damages and failures.  
|}
|}
== Bus Pirate 3 Solderless method ==
== Bus Pirate 3 Solderless method ==


=== Requirements ===
=== You need ===
 
1) PS3 motherboard with BGA syscon chip (COK001, COK002, SEM001, DIA001, etc)
1) PS3 motherboard with BGA syscon chip (COK001, COK002, SEM001, DIA001, etc)


Line 1,755: Line 1,575:
=== Hardware Part ===
=== Hardware Part ===


Find the Syscon on your PS3 motherboard.
Find the syscon on your PS3 motherboard.
[[File:CXR713120 on SEM-001.JPG|thumbnail|none]]
[[File:CXR713120 on SEM-001.JPG|thumbnail|none]]


Look at the SC EEPROM Pins location and Draw serifs on the upper surface of the chip, strictly on these pins using pencil.
Look at the EEPROM Pins location and Draw serifs on the upper surface of the chip, strictly on these pins using pencil.
[[File:CXR713120_EEPROM_PINS.JPG||thumbnail|none]]
[[File:CXR713120_EEPROM_PINS.JPG||thumbnail|none]]


Line 1,767: Line 1,587:
[[File:Bus-Pirate-3 with Wires.jpg|thumbnail|none]]
[[File:Bus-Pirate-3 with Wires.jpg|thumbnail|none]]


Connect Bus-Pirate to the SC EEPROM pins using the folowing table:
Connect Bus-Pirate to the EEPROM Pins using the folowing table:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Bus Pirate pin !! SC EEPROM pin
! Bus Pirate pin !! EEPROM pin
|-
|-
| CLK || SKB
| CLK || SKB
Line 1,784: Line 1,604:
| GND || Any Ground Point
| GND || Any Ground Point
|}
|}
 
Use 1 finger to hold the wires. The wires should be well connected with the eeprom pins.
Use one finger to hold the wires. The wires should be well connected with the SC EEPROM pins.
[[File:CXR713120 EEPROM FingerTrick.JPG|thumbnail|none]]
[[File:CXR713120 EEPROM FingerTrick.JPG|thumbnail|none]]
 
Connect Bus-Pirate to you PC with Windows7 by USB.
Connect Bus-Pirate to your PC with Windows 7 by USB.


=== Software Part ===
=== Software Part ===
Line 1,803: Line 1,621:
Download and Run Syscon Flasher.exe
Download and Run Syscon Flasher.exe


Download link: https://www.sendspace.com/file/es86dh
Download link: https://www.sendspace.com/file/7jq6ka


MD5=D59A8AA9E7BB1AEB753D7C6391CE17B1
MD5=D59A8AA9E7BB1AEB753D7C6391CE17B1
Line 1,817: Line 1,635:
3) Press "Power on" button. If done correctly, then "VREG" Led on the Bus Pirate will be Red.
3) Press "Power on" button. If done correctly, then "VREG" Led on the Bus Pirate will be Red.


4) Press "Browse" button and specify location and file name for your SC EEPROM dump.
4) Press "Browse" button and specify location and file name for your syscon eeprom dump.


5) Specify Offset and Length. Offset=0 Length=0x8000 for full dump of the SC EEPROM.
5) Specify Offset and Length. Offset=0 Length=0x8000 for full dump the eeprom.


6) Press "Fast Read" button and wait about 15sec.
6) Press "Fast Read" button and wait about 15sec.


7) Enjoy
Enjoy:
 
My dump, for example:


My dump, for example: [https://mega.co.nz/#!E1kHgSZJ!4e7TdNLdkQQzinwlnRO2KmaBd0GeBliHuHFe2tkmBgQ download link]
https://mega.co.nz/#!E1kHgSZJ!4e7TdNLdkQQzinwlnRO2KmaBd0GeBliHuHFe2tkmBgQ


== Bus Pirate 3 method by: ([[User_talk:Zer0Tolerance|Zer0Tolerance]]) ==
== Bus Pirate 3 method by: ([[User_talk:Zer0Tolerance|Zer0Tolerance]]) ==


=== Requirements ===
=== You need ===
 
1) PS3 motherboard. I am using '''DIA-001'''. may be we can dump it from another boards, but it is unknown yet.
1) PS3 motherboard. I am using '''DIA-001'''. Maybe we can dump it from another motherboard, but it is unknown yet.


2) Device that can work with SPI interface and send any commands. I am using a Bus Pirate v3.6 with connectors.
2) Device that can work with SPI interface and send any commands. I am using a Bus Pirate v3.6 with connectors.
Line 1,845: Line 1,664:
=== Preparation ===
=== Preparation ===


Find the test points on the motherboard using the picture corresponding to your motherboard.
Find the test points on the motherboard using this picture. (for DIA-001 Users)
[[File:DIA-001 SysCon EPROM Interface.png|thumbnail|none]]
 
or this one, if you own a DECR-1400
 
[[File:DEB-001 SC EEPROM.png|thumbnail|none]]


for DIA-001:
All points are covered with varnish. You need to carefully remove the varnish to the copper and solder the wires to it.
[[File:DIA-001 SysCon EPROM Interface.png|thumbnail|none]]
 
 
Attach a Bus Pirate to the wires using the following table:
for DECR-1400:
    
[[File:DEB-001 SC EEPROM.png|thumbnail|none]]
{| class="wikitable"
 
|-
All points are covered with varnish. You need to carefully remove the varnish to the copper and solder the wires to it.
! Bus Pirate pin !! Test Point
 
|-
Attach a Bus Pirate to the wires using the following table:
| CLK || SKB
    
|-
{| class="wikitable"
| CS || CSB
|-
|-
! Bus Pirate pin !! Test Point
| MOSI || DI
|-
|-
| CLK || SKB
| MISO || DO
|-
|-
| CS || CSB
| 3V3 || WCB, RBB
|-
|-
| MOSI || DI
| GND || Any Ground Point
|-
|}
| MISO || DO
 
|-
Make sure that the battery is attached to the motherboard.
| 3V3 || RBB
|-
| GND || WCB, Any Ground Point
|}


Make sure that the battery is attached to the motherboard.
Plug your Bus pirate to the USB port on your PC using mini_USB_to_USB cable. (I am using the cable from the ps3 gamepad)


Plug your Bus Pirate to the USB port on your PC using mini_USB_to_USB cable. (I am using the cable from the ps3 gamepad)
It should be done like this, see the following picture:


It should be done like on the following picture:
[[File:Dumping SC EEPROM using Bus Pirate v3.6.JPG|thumbnail|none]]
[[File:Dumping SC EEPROM using Bus Pirate v3.6.JPG|thumbnail|none]]


=== Setup software ===
=== Setup software ===


1) Install the driver for the Bus Pirate and setup your virtual COM port for it using the following table:
1) Install the driver for the Bus Pirate and setup your virtual COM port for it using following table:
 
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 1,917: Line 1,735:


Now click Open button and setup mode for bus pirate using following commands:
Now click Open button and setup mode for bus pirate using following commands:
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 1,951: Line 1,768:
You can use Notepad++ and Hex Editor like HxD to convert the dump to binary format.
You can use Notepad++ and Hex Editor like HxD to convert the dump to binary format.


<small>Read Command is 0xA8 0xXX 0xXX, XX XX is a block id to be read, the full SC EEPROM is 32768 bytes length (0x8000),  [r:] are syntax command of the Bus Pirate for start, read byte and end</small>
<small>Read Command is 0xA8 0xXX 0xXX, XX XX is a block id to be read, the full EEPROM is 32768 bytes lenght (0x8000),  [r:] are syntax command of the Bus Pirate for start, read byte and end</small>


== Arduino Mega method by: ([[User_talk:Abkarino|Abkarino]]) ==  
== Arduino Mega method by: ([[User_talk:Abkarino|Abkarino]]) ==  


   I had build my own Syscon EEPROM flasher based on open source hardware "'''Arduino Mega'''" and some resistors.
   I had build my own Syscon EEPROM flasher based on open source hardware "'''Arduino Mega'''" and some resistors.
This flasher will allow you fully read/write to your Syscon EEPROM (FAT consoles only till now).


This flasher will allow you to fully read/write to your Syscon EEPROM (FAT consoles only till now).
=== You need ===
 
1) PS3 motherboard. I had used '''SEM-0001''' board by desoldering Syscon chip form it but you can use, '''DIA-001''' for example without desoldering Syscon chip since all eeprom pins had a test points in the board it self.
=== Requirements ===
 
1) PS3 motherboard. I had used '''SEM-0001''' board by desoldering Syscon chip form it but you can use, '''DIA-001''' for example without desoldering Syscon chip since all SC EEPROM pins had a test points in the board it self.


2) Arduino Mega or any Arduino board.
2) Arduino Mega or any Arduino board.
Line 1,969: Line 1,784:
4) Soldering station.
4) Soldering station.


5) Wires & Bread board  (optional).
5) Wires & Bread board  (Optional).


6) Any PC that have terminal software like Putty, RealTerm and so on to access serial port, and any Hex Editor like HxD.
6) Any PC that have terminal software like Putty, RealTerm and so on to access serial port, and any Hex Editor like HxD.
Line 1,977: Line 1,792:
Find the test points on the motherboard using this picture.
Find the test points on the motherboard using this picture.
[[File:DIA-001 SysCon EPROM Interface.png|thumbnail|none]]
[[File:DIA-001 SysCon EPROM Interface.png|thumbnail|none]]
 
Or if you have a very good soldering skills and tools to desolder your SysCon then you can desolder your SysCon and solder your wires to it directly.  
Or if you have very good soldering skills and tools to desolder your SysCon then you can desolder your SysCon and solder your wires to it directly.  


All points are covered with varnish. You need to carefully remove the varnish to the copper and solder the wires to it.
All points are covered with varnish. You need to carefully remove the varnish to the copper and solder the wires to it.
Line 2,020: Line 1,834:


=== Arduino Sketch Source Code ===
=== Arduino Sketch Source Code ===
Here is my Arduino Mega sketch source code to allow you to read/write/erase PS3 Syscon EEPROM.
http://pastie.org/10004682#8,19


Here is my Arduino Mega sketch source code to allow you to read/write/erase PS3 Syscon EEPROM. [http://pastie.org/10004682#8,19 dead link]




{{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude>
{{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude>
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)