Editing Storage Manager
Jump to navigation
Jump to search
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: | ||
Storage Manager communicates with devices '''/dev/encdec0''' and '''/dev/rbd0''' from LPAR 1 | Storage Manager communicates with devices '''/dev/encdec0''' and '''/dev/rbd0''' from LPAR 1 | ||
<br> | |||
Lv2 Kernel usage e.g. by: | Lv2 Kernel usage e.g. by: | ||
Line 10: | Line 11: | ||
*'''EID4''' data is passed to '''sb_iso_spu_module.self''' module. | *'''EID4''' data is passed to '''sb_iso_spu_module.self''' module. | ||
== 0x5000 - Security Hardware Framework == | == 0x5000 - Security Hardware Framework == | ||
{| class="wikitable FCK__ShowTableBorders" | {| class="wikitable FCK__ShowTableBorders" | ||
Line 42: | Line 43: | ||
| | | | ||
| | | | ||
| | | Userland access | ||
|- | |- | ||
| 0x5005 | | 0x5005 | ||
Line 60: | Line 61: | ||
| | | | ||
| | | | ||
| | | Userland access | ||
|- | |- | ||
| 0x5008 | | 0x5008 | ||
Line 66: | Line 67: | ||
| | | | ||
| | | | ||
| | | Userland access | ||
|- | |- | ||
| 0x5009 | | 0x5009 | ||
Line 90: | Line 91: | ||
| | | | ||
| | | | ||
| | | Userland access | ||
|- | |- | ||
| 0x5012 | | 0x5012 | ||
Line 96: | Line 97: | ||
| | | | ||
| | | | ||
| | | Userland access | ||
|- | |||
|} | |} | ||
==== SB Isolation DMA Buffer Header ==== | |||
<pre>struct sb_iso_header | <pre>struct sb_iso_header | ||
{ | { | ||
Line 112: | Line 114: | ||
*seqno has values 0x03 to 0x08. It is incremented when sending and receiving data from the spu. | *seqno has values 0x03 to 0x08. It is incremented when sending and receiving data from the spu. | ||
=== 0x5001 - Set Encdec Key === | === 0x5001 - Set Encdec Key === | ||
* This service allows you to set ENCDEC keys with index '''0xC - 0xF''' | * This service allows you to set ENCDEC keys with index '''0xC - 0xF''' | ||
Line 123: | Line 125: | ||
Per default, keys with index 0x0 - 0xB are not free. But we could patch it also. | Per default, keys with index 0x0 - 0xB are not free. But we could patch it also. | ||
=== 0x5002 - Set/Delete ATA (Encdec) Key === | === 0x5002 - Set/Delete ATA (Encdec) Key === | ||
*Sets/Deletes ATA (Encdec) Key | *Sets/Deletes ATA (Encdec) Key | ||
Line 157: | Line 159: | ||
|} | |} | ||
=== 0x5003 - Get Random Number === | === 0x5003 - Get Random Number === | ||
*I have got access to Get Random Number service through DM and tested it with PSGroove | *I have got access to Get Random Number service through DM and tested it with PSGroove | ||
Line 165: | Line 167: | ||
*This service is used e.g. by USB Dongle Authenticator to generate the body of a challenge or by GameOS to generate hardware random numbers. | *This service is used e.g. by USB Dongle Authenticator to generate the body of a challenge or by GameOS to generate hardware random numbers. | ||
=== 0x5004 - Authenticate BD Drive === | === 0x5004 - Authenticate BD Drive === | ||
*Used by LPAR Manager in HV Process 9 during LPAR 2 loading and unloading. | *Used by LPAR Manager in HV Process 9 during LPAR 2 loading and unloading. | ||
Line 209: | Line 211: | ||
|- | |- | ||
| 0x5A | | 0x5A | ||
| (only gets [[AIM_Manager#0x19004_-_Get_PS_Code|PSCode]]) | | (only gets [[AIM_Manager#0x19004_-_Get_PS_Code|PSCode]] ) | ||
|- | |- | ||
| 0x8D | | 0x8D | ||
Line 215: | Line 217: | ||
|} | |} | ||
=== 0x5005 - PS2 Disc Authenticate === | === 0x5005 - PS2 Disc Authenticate === | ||
=== 0x5006 - Get Version === | === 0x5006 - Get Version === | ||
* By default not accessible from GameOS | * By default not accessible from GameOS. But it can be enabled by patching Dispatcher Manager. | ||
=== 0x5007 - Control BD Drive === | === 0x5007 - Control BD Drive === | ||
*Used by GameOS to authenticate discs and for BD emulation. | *Used by GameOS to authenticate discs and for BD emulation. | ||
Line 245: | Line 247: | ||
|- | |- | ||
| 0x46 | | 0x46 | ||
| HW_ps3_disc_auth, get disc hash key | | HW_ps3_disc_auth, get disc hash key | ||
|- | |- | ||
| 0x4B | | 0x4B | ||
Line 272: | Line 274: | ||
|} | |} | ||
=== 0x5008 - HW mc === | === 0x5008 - HW mc === | ||
==== Service Parameter Table ==== | ==== Service Parameter Table ==== | ||
Line 289: | Line 291: | ||
|} | |} | ||
=== 0x5011 - Retrieve "M1m" === | 1 | ||
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 | |||
11 | |||
12 | |||
13 | |||
14 | |||
15 | |||
16 | |||
17 | |||
18 | |||
19 | |||
20 | |||
21 | |||
22 | |||
23 | |||
24 | |||
25 | |||
26 | |||
27 | |||
28 | |||
29 | |||
30 | |||
31 | |||
32 | |||
33 | |||
34 | |||
35 | |||
36 | |||
37 | |||
38 | |||
39 | |||
40 | |||
41 | |||
42 | |||
43 | |||
44 | |||
45 | |||
46 | |||
47 | |||
48 | |||
49 | |||
50 | |||
51 | |||
52 | |||
53 | |||
54 | |||
55 | |||
56 | |||
57 | |||
58 | |||
59 | |||
60 | |||
61 | |||
#include <stdio.h> | |||
#include <stdlib.h> | |||
#include <string.h> | |||
#include <sys/syscall.h> | |||
#define STORAGE_MANAGER_IF 864 | |||
#define CELL_OK 0 | |||
typedef struct { | |||
uint64_t buffer_size; | |||
uint8_t MasterDataId[0x20]; | |||
uint8_t Padding[0x10]; | |||
} INPUT_DATA; | |||
typedef struct { | |||
uint64_t service_id; | |||
uint32_t input; | |||
uint32_t output; | |||
} COMMAND; | |||
uint64_t lv2_syscall_2(uint64_t id, uint64_t a1, uint64_t a2) | |||
{ | |||
system_call_2(id, a1, a2); | |||
return_to_user_prog(uint64_t); | |||
} | |||
//put your Disc ID here | |||
char MasterDataId[] = "BLES-01132 "; | |||
int main(void) | |||
{ | |||
//setup buffers | |||
INPUT_DATA *input = new INPUT_DATA(); | |||
uint8_t *output = (uint8_t *)malloc(sizeof(uint8_t) * 0x400); | |||
//setup the input data | |||
input->buffer_size = 0x38ULL; | |||
memcpy(input->MasterDataId, MasterDataId, 0x20); | |||
memset(input->Padding, 0xFF, 0x10); | |||
//setup the command | |||
COMMAND *cmd = new COMMAND(); | |||
cmd->service_id = 0x45ULL; | |||
cmd->input = (uint32_t)input; | |||
cmd->output = (uint32_t)output; | |||
//issue the command | |||
uint64_t packet_id = 0x5011; | |||
int32_t result = lv2_syscall_2(STORAGE_MANAGER_IF, packet_id, (uint64_t)cmd); | |||
if (result != CELL_OK){ | |||
printf(" - return: 0x%08x\n", result); | |||
return result; | |||
} | |||
//write to the file | |||
FILE* f = fopen("/dev_usb000/M1m.bin", "wb"); | |||
fwrite(output, 0x400, 1, f); | |||
return 0; | |||
} | |||
Download as | |||
=== 0x5011 - Retrieve "M1m" === | |||
https://paste.ubuntu.com/p/7PvZjF6BY4/ | https://paste.ubuntu.com/p/7PvZjF6BY4/ | ||
=== 0x5012 - Retrieve "X-I-5-Passphrase" === | === 0x5012 - Retrieve "X-I-5-Passphrase" === | ||
https://paste.ubuntu.com/p/bb6gjF9Cxm/ | https://paste.ubuntu.com/p/bb6gjF9Cxm/ |