SceIdStorage: Difference between revisions
CelesteBlue (talk | contribs) No edit summary |
CelesteBlue (talk | contribs) No edit summary |
||
Line 18: | Line 18: | ||
|- | |- | ||
| 0.931-3.60 || [[SceIdStorage#SceIdStorageForDriver|SceIdStorageForDriver]] || Non-secure || Kernel || 0xE1AC6D7C | | 0.931-3.60 || [[SceIdStorage#SceIdStorageForDriver|SceIdStorageForDriver]] || Non-secure || Kernel || 0xE1AC6D7C | ||
|- | |||
| 0.931 || [[SceIdStorage#SceIdStorage|SceIdStorage]] || Non-secure || Usermode || 0xC27594F4 | |||
|} | |} | ||
Line 31: | Line 33: | ||
| 0.931-3.60 || 0x99ACCB71 | | 0.931-3.60 || 0x99ACCB71 | ||
|} | |} | ||
Creates multiple leaves as an atomic operation. Because each leaf is only one block in size (0x200 Bytes), data requiring more than 0x200 bytes will need more than one leaf. This function allows to create multiple leaves as a single operation. This saves from having to call sceIdStorageCreateLeaf for each individual leaf. | |||
A good example of this are the UMD keys (0x102-0x106), which hold a single continuous stream of data split over 5 seperate leaves: | |||
<source lang="C"> | <source lang="C"> | ||
int sceIdStorageCreateAtomicLeavesForDriver( | SceUInt16 umdKeys[5] = {0x102, 0x103, 0x104, 0x105, 0x106}; | ||
sceIdStorageCreateAtomicLeaves(umdKeys, 5); | |||
</source> | |||
<source lang="C"> | |||
// keys is the array of leaf keys to create | |||
// numLeaves is the number of leaves to create | |||
// Returns 0 on success. | |||
// Returns 0x80230000 if PSVita is not in manufacturing mode | |||
// Returns 0x80230001 if key > 0xFFEF | |||
// Returns 0x80230002 if out-of-bounds numLeaves | |||
// Returns 0x80230003 if IDStorage is not formatted | |||
// Returns 0x80230004 if SceIdStorage heap error | |||
// Returns 0x80230006 if key already exists | |||
// Returns 0xffffffff if IDStorage is read-only | |||
int sceIdStorageCreateAtomicLeavesForDriver(SceUInt16 *keys, SceUInt32 numLeaves); | |||
</source> | </source> | ||
Line 44: | Line 64: | ||
|} | |} | ||
<source lang="C">int sceIdStorageCreateLeafForDriver( | <source lang="C">int sceIdStorageCreateLeafForDriver(SceUInt16 key);</source> | ||
=== sceIdStorageDeleteLeafForDriver === | === sceIdStorageDeleteLeafForDriver === | ||
Line 54: | Line 74: | ||
|} | |} | ||
<source lang="C">int sceIdStorageDeleteLeafForDriver( | <source lang="C">int sceIdStorageDeleteLeafForDriver(SceUInt16 key);</source> | ||
=== sceIdStorageEnumIdForDriver === | === sceIdStorageEnumIdForDriver === | ||
Line 99: | Line 119: | ||
Retrieves the value associated with a key. | Retrieves the value associated with a key. | ||
<source lang="C"> | <source lang="C"> | ||
Line 107: | Line 125: | ||
// buf - buffer with enough storage | // buf - buffer with enough storage | ||
// len - amount of data to retrieve (offset + len must be <= 512 bytes) | // len - amount of data to retrieve (offset + len must be <= 512 bytes) | ||
int sceIdStorageLookupForDriver( | // Returns 0x80230000 if offset + size > 512. | ||
// Returns 0x80230001 if key > 0xFFEF. | |||
// Returns 0x80230003 if IDStorage is not formatted. | |||
// Returns 0x80230005 for enumerator issue. | |||
int sceIdStorageLookupForDriver(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size); | |||
</source> | </source> | ||
Line 123: | Line 145: | ||
// key - idstorage key | // key - idstorage key | ||
// buf - buffer with at last 512 bytes of storage | // buf - buffer with at last 512 bytes of storage | ||
int sceIdStorageReadLeafForDriver( | int sceIdStorageReadLeafForDriver(SceUInt16 key, void *buf); | ||
</source> | </source> | ||
Line 135: | Line 157: | ||
Writes 512-bytes to the idstorage key. | Writes 512-bytes to the idstorage key. | ||
<source lang="C"> | <source lang="C"> | ||
// key - idstorage key | // key - idstorage key | ||
// buf - buffer of at least 512 bytes | // buf - buffer of at least 512 bytes | ||
int sceIdStorageWriteLeafForDriver( | // Returns 0x80230001 if key > 0xFFEF. | ||
// Returns 0x80230003 if IDStorage is not formatted. | |||
// Returns 0x80230005 for enumerator issue. | |||
// Returns 0xffffffff if IDStorage is read-only. | |||
int sceIdStorageWriteLeafForDriver(SceUInt16 key, const void *buf); | |||
</source> | </source> | ||
Line 163: | Line 187: | ||
| 0.931-3.60 || 0xFEFA40C2 | | 0.931-3.60 || 0xFEFA40C2 | ||
|} | |} | ||
Check if the IdStorage is formatted. | |||
<source lang="C">char sceIdStorageIsFormattedForDriver(void);</source> | <source lang="C">char sceIdStorageIsFormattedForDriver(void);</source> | ||
Line 173: | Line 199: | ||
| 0.931-3.60 || 0xB9069BAD | | 0.931-3.60 || 0xB9069BAD | ||
|} | |} | ||
Check if IdStorage has superficial damage. | |||
<source lang="C">char sceIdStorageIsDirtyForDriver(void);</source> | <source lang="C">char sceIdStorageIsDirtyForDriver(void);</source> | ||
Line 195: | Line 223: | ||
| 0.931-3.60 || 0x958089DB | | 0.931-3.60 || 0x958089DB | ||
|} | |} | ||
Format IDStorage (with values like 0xfff5 and 0xffff). | |||
<source lang="C"> | <source lang="C"> | ||
Line 208: | Line 238: | ||
| 0.931-3.60 || 0xF4BCB3EE | | 0.931-3.60 || 0xF4BCB3EE | ||
|} | |} | ||
Clears IDStorage (zeroes it). | |||
<source lang="C"> | <source lang="C"> | ||
Line 221: | Line 253: | ||
| 0.931-3.60 || 0x683AAC10 | | 0.931-3.60 || 0x683AAC10 | ||
|} | |} | ||
Inverse function of sceIdStorageLookupForDriver. | |||
<source lang="C"> | <source lang="C"> | ||
// key - idstorage key | |||
// offset - offset within the 512 byte leaf | |||
// buf - buffer with enough storage | |||
// size - amount of data to write (offset + size must be <= 512 bytes) | |||
// Returns 0 on success. | // Returns 0 on success. | ||
// Returns 0x80230000 if PSVita is not in manufacturing mode, 0xffffffff if IDStorage is read-only. | // Returns 0x80230000 if PSVita is not in manufacturing mode, 0xffffffff if IDStorage is read-only. | ||
// Returns 0x80230000 if offset + size > 512, 0x80230001 if key > 0xFFEF. | // Returns 0x80230000 if offset + size > 512, 0x80230001 if key > 0xFFEF. | ||
// Returns 0x80230003 if IDStorage is not formatted, 0x80230005 for enumerator issue. | // Returns 0x80230003 if IDStorage is not formatted, 0x80230005 for enumerator issue. | ||
int sceIdStorageUpdateForDriver(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size); | |||
int sceIdStorageUpdateForDriver( | |||
</source> | </source> | ||
Line 243: | Line 277: | ||
<source lang="C"> | <source lang="C"> | ||
// flush: set to true to call sceIdStorageFlushForDriver | |||
// Returns 0 on success. | // Returns 0 on success. | ||
// Returns 0x80230000 if PSVita is not in manufacturing mode. | // Returns 0x80230000 if PSVita is not in manufacturing mode. | ||
// | // Returns 0x80230004 if SceIdStorage heap error. | ||
int sceIdStorageRestartForDriver(SceBool flush); | int sceIdStorageRestartForDriver(SceBool flush); | ||
</source> | </source> | ||
== SceIdStorage == | |||
=== sceIdStorageUpdate === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0x03D78B85 | |||
|} | |||
<source lang="C">int sceIdStorageUpdate(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size);</source> | |||
=== sceIdStorageFlush === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0x0A9A0ACF | |||
|} | |||
<source lang="C">int sceIdStorageFlush(void);</source> | |||
=== sceIdStorageRestart === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0x0E66352F | |||
|} | |||
<source lang="C">int sceIdStorageRestart(SceBool flush);</source> | |||
=== sceIdStorageIsDirty === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0x17F41BC5 | |||
|} | |||
<source lang="C">char sceIdStorageIsDirty(void);</source> | |||
=== sceIdStorageFormat === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0x181BE2F8 | |||
|} | |||
<source lang="C">int sceIdStorageFormat(void);</source> | |||
=== sceIdStorageIsReadOnly === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0x64395003 | |||
|} | |||
<source lang="C">char sceIdStorageIsReadOnly(void);</source> | |||
=== sceIdStorageLookup === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0xAA2E5186 | |||
|} | |||
<source lang="C">int sceIdStorageLookup(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size);</source> | |||
=== sceIdStorageUnformat === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0xB41D010F | |||
|} | |||
<source lang="C">int sceIdStorageUnformat(void);</source> | |||
=== sceIdStorageWriteLeaf === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0xBB48CAA2 | |||
|} | |||
<source lang="C">int sceIdStorageWriteLeaf(SceUInt16 key, const void *buf);</source> | |||
=== sceIdStorageReadLeaf === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0xBC17BCBD | |||
|} | |||
<source lang="C">int sceIdStorageReadLeaf(SceUInt16 key, void *buf);</source> | |||
=== sceIdStorageCreateLeaf === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0xC78A732C | |||
|} | |||
<source lang="C">int sceIdStorageCreateLeaf(SceUInt16 key);</source> | |||
=== sceIdStorageIsFormatted === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0xD2EA13E5 | |||
|} | |||
<source lang="C">char sceIdStorageIsFormatted(void);</source> | |||
=== sceIdStorageGetFreeLeaves === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0xDE264DBD | |||
|} | |||
<source lang="C">int sceIdStorageGetFreeLeaves(void);</source> | |||
=== sceIdStorageGetLeafSize === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0xE68DEF55 | |||
|} | |||
<source lang="C">SceSize sceIdStorageGetLeafSize(void);</source> | |||
=== sceIdStorageCreateAtomicLeaves === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0xEA05C0D3 | |||
|} | |||
<source lang="C">int sceIdStorageCreateAtomicLeaves(SceUInt16 *keys, SceUInt32 numLeaves);</source> | |||
=== sceIdStorageDeleteLeaf === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931 || 0xFB757107 | |||
|} | |||
<source lang="C">int sceIdStorageDeleteLeaf(SceUInt16 key);</source> | |||
[[Category:Modules]] | [[Category:Modules]] | ||
[[Category:Kernel]] | [[Category:Kernel]] |
Revision as of 00:13, 2 February 2020
Module
Known NIDs
Version | Name | World | Privilege | NID |
---|---|---|---|---|
0.931-3.60 | SceIdStorage | Non-secure | Kernel | ? |
Libraries
Known NIDs
Version | Name | World | Visibility | NID |
---|---|---|---|---|
0.931-3.60 | SceIdStorageForDriver | Non-secure | Kernel | 0xE1AC6D7C |
0.931 | SceIdStorage | Non-secure | Usermode | 0xC27594F4 |
SceIdStorageForDriver
Reference: [1]
sceIdStorageCreateAtomicLeavesForDriver
Version | NID |
---|---|
0.931-3.60 | 0x99ACCB71 |
Creates multiple leaves as an atomic operation. Because each leaf is only one block in size (0x200 Bytes), data requiring more than 0x200 bytes will need more than one leaf. This function allows to create multiple leaves as a single operation. This saves from having to call sceIdStorageCreateLeaf for each individual leaf. A good example of this are the UMD keys (0x102-0x106), which hold a single continuous stream of data split over 5 seperate leaves:
SceUInt16 umdKeys[5] = {0x102, 0x103, 0x104, 0x105, 0x106}; sceIdStorageCreateAtomicLeaves(umdKeys, 5);
// keys is the array of leaf keys to create // numLeaves is the number of leaves to create // Returns 0 on success. // Returns 0x80230000 if PSVita is not in manufacturing mode // Returns 0x80230001 if key > 0xFFEF // Returns 0x80230002 if out-of-bounds numLeaves // Returns 0x80230003 if IDStorage is not formatted // Returns 0x80230004 if SceIdStorage heap error // Returns 0x80230006 if key already exists // Returns 0xffffffff if IDStorage is read-only int sceIdStorageCreateAtomicLeavesForDriver(SceUInt16 *keys, SceUInt32 numLeaves);
sceIdStorageCreateLeafForDriver
Version | NID |
---|---|
0.931-3.60 | 0x08A471A6 |
int sceIdStorageCreateLeafForDriver(SceUInt16 key);
sceIdStorageDeleteLeafForDriver
Version | NID |
---|---|
0.931-3.60 | 0x2C97AB36 |
int sceIdStorageDeleteLeafForDriver(SceUInt16 key);
sceIdStorageEnumIdForDriver
Version | NID |
---|---|
0.931-3.60 | 0x31E08AFB |
Locks then unlocks the IDStorage enumerator mutex.
Returns 0 on success.
int sceIdStorageEnumIdForDriver(void);
sceIdStorageGetFreeLeavesForDriver
Version | NID |
---|---|
0.931-3.60 | 0x37833CB8 |
int sceIdStorageGetFreeLeavesForDriver(void);
sceIdStorageGetLeafSizeForDriver
Version | NID |
---|---|
0.931-3.60 | 0xEB830733 |
SceSize sceIdStorageGetLeafSizeForDriver(void);
sceIdStorageLookupForDriver
Version | NID |
---|---|
0.931-3.60 | 0x6FE062D1 |
Retrieves the value associated with a key.
// key - idstorage key // offset - offset within the 512 byte leaf // buf - buffer with enough storage // len - amount of data to retrieve (offset + len must be <= 512 bytes) // Returns 0x80230000 if offset + size > 512. // Returns 0x80230001 if key > 0xFFEF. // Returns 0x80230003 if IDStorage is not formatted. // Returns 0x80230005 for enumerator issue. int sceIdStorageLookupForDriver(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size);
sceIdStorageReadLeafForDriver
Version | NID |
---|---|
0.931-3.60 | 0xEB00C509 |
Reads the whole 512 byte container for the idstorage key.
// key - idstorage key // buf - buffer with at last 512 bytes of storage int sceIdStorageReadLeafForDriver(SceUInt16 key, void *buf);
sceIdStorageWriteLeafForDriver
Version | NID |
---|---|
0.931-3.60 | 0x1FA4D135 |
Writes 512-bytes to the idstorage key.
// key - idstorage key // buf - buffer of at least 512 bytes // Returns 0x80230001 if key > 0xFFEF. // Returns 0x80230003 if IDStorage is not formatted. // Returns 0x80230005 for enumerator issue. // Returns 0xffffffff if IDStorage is read-only. int sceIdStorageWriteLeafForDriver(SceUInt16 key, const void *buf);
sceIdStorageFlushForDriver
Version | NID |
---|---|
0.931-3.60 | 0x3AD32523 |
Finalizes a write.
int sceIdStorageFlushForDriver(void);
sceIdStorageIsFormattedForDriver
Version | NID |
---|---|
0.931-3.60 | 0xFEFA40C2 |
Check if the IdStorage is formatted.
char sceIdStorageIsFormattedForDriver(void);
sceIdStorageIsDirtyForDriver
Version | NID |
---|---|
0.931-3.60 | 0xB9069BAD |
Check if IdStorage has superficial damage.
char sceIdStorageIsDirtyForDriver(void);
sceIdStorageIsReadOnlyForDriver
Version | NID |
---|---|
0.931-3.60 | 0x2D633688 |
Checks idstorage for readonly status.
char sceIdStorageIsReadOnlyForDriver(void);
sceIdStorageFormatForDriver
Version | NID |
---|---|
0.931-3.60 | 0x958089DB |
Format IDStorage (with values like 0xfff5 and 0xffff).
// Returns 0 on success, 0x80230000 if PSVita is not in manufacturing mode. int sceIdStorageFormatForDriver(void);
sceIdStorageUnformatForDriver
Version | NID |
---|---|
0.931-3.60 | 0xF4BCB3EE |
Clears IDStorage (zeroes it).
// Returns 0 on success, 0x80230000 if PSVita is not in manufacturing mode. int sceIdStorageUnformatForDriver(void);
sceIdStorageUpdateForDriver
Version | NID |
---|---|
0.931-3.60 | 0x683AAC10 |
Inverse function of sceIdStorageLookupForDriver.
// key - idstorage key // offset - offset within the 512 byte leaf // buf - buffer with enough storage // size - amount of data to write (offset + size must be <= 512 bytes) // Returns 0 on success. // Returns 0x80230000 if PSVita is not in manufacturing mode, 0xffffffff if IDStorage is read-only. // Returns 0x80230000 if offset + size > 512, 0x80230001 if key > 0xFFEF. // Returns 0x80230003 if IDStorage is not formatted, 0x80230005 for enumerator issue. int sceIdStorageUpdateForDriver(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size);
sceIdStorageRestartForDriver
Version | NID |
---|---|
0.931-3.60 | 0x60B647A5 |
// flush: set to true to call sceIdStorageFlushForDriver // Returns 0 on success. // Returns 0x80230000 if PSVita is not in manufacturing mode. // Returns 0x80230004 if SceIdStorage heap error. int sceIdStorageRestartForDriver(SceBool flush);
SceIdStorage
sceIdStorageUpdate
Version | NID |
---|---|
0.931 | 0x03D78B85 |
int sceIdStorageUpdate(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size);
sceIdStorageFlush
Version | NID |
---|---|
0.931 | 0x0A9A0ACF |
int sceIdStorageFlush(void);
sceIdStorageRestart
Version | NID |
---|---|
0.931 | 0x0E66352F |
int sceIdStorageRestart(SceBool flush);
sceIdStorageIsDirty
Version | NID |
---|---|
0.931 | 0x17F41BC5 |
char sceIdStorageIsDirty(void);
sceIdStorageFormat
Version | NID |
---|---|
0.931 | 0x181BE2F8 |
int sceIdStorageFormat(void);
sceIdStorageIsReadOnly
Version | NID |
---|---|
0.931 | 0x64395003 |
char sceIdStorageIsReadOnly(void);
sceIdStorageLookup
Version | NID |
---|---|
0.931 | 0xAA2E5186 |
int sceIdStorageLookup(SceUInt16 key, SceUInt32 offset, void *buf, SceSize size);
sceIdStorageUnformat
Version | NID |
---|---|
0.931 | 0xB41D010F |
int sceIdStorageUnformat(void);
sceIdStorageWriteLeaf
Version | NID |
---|---|
0.931 | 0xBB48CAA2 |
int sceIdStorageWriteLeaf(SceUInt16 key, const void *buf);
sceIdStorageReadLeaf
Version | NID |
---|---|
0.931 | 0xBC17BCBD |
int sceIdStorageReadLeaf(SceUInt16 key, void *buf);
sceIdStorageCreateLeaf
Version | NID |
---|---|
0.931 | 0xC78A732C |
int sceIdStorageCreateLeaf(SceUInt16 key);
sceIdStorageIsFormatted
Version | NID |
---|---|
0.931 | 0xD2EA13E5 |
char sceIdStorageIsFormatted(void);
sceIdStorageGetFreeLeaves
Version | NID |
---|---|
0.931 | 0xDE264DBD |
int sceIdStorageGetFreeLeaves(void);
sceIdStorageGetLeafSize
Version | NID |
---|---|
0.931 | 0xE68DEF55 |
SceSize sceIdStorageGetLeafSize(void);
sceIdStorageCreateAtomicLeaves
Version | NID |
---|---|
0.931 | 0xEA05C0D3 |
int sceIdStorageCreateAtomicLeaves(SceUInt16 *keys, SceUInt32 numLeaves);
sceIdStorageDeleteLeaf
Version | NID |
---|---|
0.931 | 0xFB757107 |
int sceIdStorageDeleteLeaf(SceUInt16 key);