SceIdStorage: Difference between revisions
CelesteBlue (talk | contribs) |
No edit summary |
||
(26 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
See [[IdStorage]]. | |||
== Module == | == Module == | ||
Line 4: | Line 6: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version | ! Version !! World !! Privilege | ||
|- | |- | ||
| 3.60 | | 0.931-3.60 || Non-secure || Kernel | ||
|} | |} | ||
Line 19: | Line 19: | ||
! Version !! Name !! World !! Visibility !! NID | ! Version !! Name !! World !! Visibility !! NID | ||
|- | |- | ||
| | | 0.931-3.60 || [[SceIdStorage#SceIdStorageForDriver|SceIdStorageForDriver]] || Non-secure || Kernel || 0xE1AC6D7C | ||
|- | |||
| 0.931 || [[SceIdStorage#SceIdStorage|SceIdStorage]] || Non-secure || Usermode || 0xC27594F4 | |||
|} | |} | ||
== SceIdStorageForDriver == | == SceIdStorageForDriver == | ||
<source> | === sceIdStorageCreateAtomicLeavesForDriver === | ||
{| class="wikitable" | |||
|- | |||
! 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: | |||
<source lang="C"> | |||
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> | ||
=== sceIdStorageCreateLeafForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0x08A471A6 | |||
|} | |||
<source lang="C">int sceIdStorageCreateLeafForDriver(SceUInt16 key);</source> | |||
=== sceIdStorageDeleteLeafForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0x2C97AB36 | |||
|} | |||
<source lang="C">int sceIdStorageDeleteLeafForDriver(SceUInt16 key);</source> | |||
=== sceIdStorageEnumIdForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0x31E08AFB | |||
|} | |||
Locks then unlocks the IDStorage enumerator mutex. | |||
Returns 0 on success. | |||
<source lang="C">int sceIdStorageEnumIdForDriver(void);</source> | |||
=== sceIdStorageGetFreeLeavesForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0x37833CB8 | |||
|} | |||
<source lang="C">int sceIdStorageGetFreeLeavesForDriver(void);</source> | |||
=== sceIdStorageGetLeafSizeForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0xEB830733 | |||
|} | |||
<source lang="C">SceSize sceIdStorageGetLeafSizeForDriver(void);</source> | |||
=== sceIdStorageLookupForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0x6FE062D1 | |||
|} | |||
Retrieves the value associated with a key. | |||
<source lang="C"> | |||
// 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); | |||
</source> | |||
=== sceIdStorageReadLeafForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0xEB00C509 | |||
|} | |||
Reads the whole 512 byte container for the idstorage key. | |||
<source lang="C"> | |||
// key - idstorage key | |||
// buf - buffer with at last 512 bytes of storage | |||
int sceIdStorageReadLeafForDriver(SceUInt16 key, void *buf); | |||
</source> | |||
=== sceIdStorageWriteLeafForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0x1FA4D135 | |||
|} | |||
Writes 512-bytes to the idstorage key. | |||
<source lang="C"> | |||
// 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); | |||
</source> | |||
=== sceIdStorageFlushForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0x3AD32523 | |||
|} | |||
Finalizes a write. | |||
<source lang="C">int sceIdStorageFlushForDriver(void);</source> | |||
=== sceIdStorageIsFormattedForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0xFEFA40C2 | |||
|} | |||
Check if the IdStorage is formatted. | |||
<source lang="C">char sceIdStorageIsFormattedForDriver(void);</source> | |||
=== sceIdStorageIsDirtyForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0xB9069BAD | |||
|} | |||
Check if IdStorage has superficial damage. | |||
<source lang="C">char sceIdStorageIsDirtyForDriver(void);</source> | |||
=== sceIdStorageIsReadOnlyForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0x2D633688 | |||
|} | |||
Checks idstorage for readonly status. | |||
<source lang="C">char sceIdStorageIsReadOnlyForDriver(void);</source> | |||
=== sceIdStorageFormatForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0x958089DB | |||
|} | |||
Format IDStorage (with values like 0xfff5 and 0xffff). | |||
<source lang="C"> | |||
// Returns 0 on success, 0x80230000 if PSVita is not in manufacturing mode. | |||
int sceIdStorageFormatForDriver(void); | |||
</source> | |||
=== sceIdStorageUnformatForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0xF4BCB3EE | |||
|} | |||
Clears IDStorage (zeroes it). | |||
<source lang="C"> | |||
// Returns 0 on success, 0x80230000 if PSVita is not in manufacturing mode. | |||
int sceIdStorageUnformatForDriver(void); | |||
</source> | |||
=== sceIdStorageUpdateForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0x683AAC10 | |||
|} | |||
Inverse function of sceIdStorageLookupForDriver. | |||
<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 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); | |||
</source> | |||
=== sceIdStorageRestartForDriver === | |||
{| class="wikitable" | |||
|- | |||
! Version !! NID | |||
|- | |||
| 0.931-3.60 || 0x60B647A5 | |||
|} | |||
<source lang="C"> | |||
// 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); | |||
</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:ARM]] | |||
[[Category:Kernel]] | |||
[[Category:Modules]] | [[Category:Modules]] | ||
[[Category: | [[Category:Library]] |
Latest revision as of 21:04, 1 May 2023
See IdStorage.
Module
Known NIDs
Version | World | Privilege |
---|---|---|
0.931-3.60 | 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
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);