SceIofilemgr

SceIofilemgr is the primary interface for file IO. Read File Management for more information on file IO.

Module
This module exists only in non-secure world. The SELF can be found in.

Mount Points
This table is stored in data segment of SceIofilemgr as array of  elements.

When sceVfsMount is executed it finds vfs_add_data element by filesystem string and then selects appropriate mount scenario by devMinor and devMajor.


 * means random numeric string of length 13

Block Device Naming Rules
First level prefix: hardware device


 * int: internal eMMC
 * ext: external sdcard?
 * gcd: gamecard
 * mcd: memory card
 * uma: USB mass for PSTV (or pins on FAT PSVita)
 * usd: ?
 * xmc: external memory card

Second level prefix: partition table style?


 * lp: sce partition table?
 * pp: mbr partition table?

Third level prefix: active/backup selection (only used for SBL and os0:)


 * ina: inactive
 * act: active
 * ign: ignore (for devices that don't support this)

Fourth level prefix: partition


 * a
 * unused
 * idstor
 * sloader
 * os
 * vsh
 * vshdata
 * vtrm
 * user
 * userext
 * gamero
 * gamerw
 * updater
 * sysdata
 * mediaid
 * pidata
 * entire

Partition Block Devices
Each partition has numeric alias (string) that looks like to be used to reference the partition.

Numeric names most likely follow order of partitions in MBR.

To access device node use  prefix (like  ).

In total there can be 16 aliases from 0 to 15 per physical device (eMMC, Game Card, Memory Card). Alias 16 is hardcoded and is called.

Aliases 0-15 correspond to eMMC.

Aliases 100-115 correspond to Game Card.

Aliases 200-215 correspond to Memory Card.

VFS Implementation
Information can be found on separate page VFS Implementation

sceIoMountForDriver
operation index 1 in

sceIoUmountForDriver
operation index 2 in

scePfsMgrVfsMountForDriver
operation index 3 in

scePfsMgrVfsUmountForDriver
operation index 4 in

sceVfsNodeWaitEventFlag
calls  using   from

sceVfsNodeSetEventFlag
calls  using   from

sceIoDreadForDriver
Call interface is same as

sceIoDreadForDriver_2
Derived from _vshIoDread

Implementation is completely the same as sceIoDreadForDriver. The only difference is that st_attr in SceIoStat is not set.

sceIoWriteForDriver
Call interface is same as

sceIoDopenForDriver
Call interface is same as

sceIoLseekForDriver
Call interface is same as

sceIoOpenForDriver
Call interface is same as sceIoOpen.

sceIoOpenForPidForDriver
This is a wrapper for sceIoOpenForDriver.

Pid is used for.

sceIoChstatForDriver
Call interface is same as

sceIoChstatForDriver_2
Derived from _vshIoChstat

Implementation is completely the same as. The only difference is that (bits = bits & (~0x10000)) operation is not applied.

sceIoGetstatForDriver
Call interface is same as

sceIoGetstatForDriver_2
Derived from _vshIoGetstat

Implementation is completely the same as sceIoGetstatForDriver. The only difference is that st_attr in SceIoStat *buf is not set.

sceIoMkdirForDriver
Call interface is same as

sceIoReadForDriver
Call interface is same as

sceIoCloseForDriver
Call interface is same as

sceIoRenameForDriver
Call interface is same as

sceIoRemoveForDriver
Call interface is same as

sceIoCancelForDriver
Derived from

sceIoChstatAsyncForDriver
Derived from

sceIoChstatByFdAsyncForDriver
Derived from

sceIoChstatByFdForDriver
Derived from

sceIoCloseAsyncForDriver
Derived from

sceIoDevctlAsyncForDriver
Derived from

sceIoDevctlForDriver
Derived from

sceIoDcloseForDriver
Derived from

sceIoFlockForDriver
Derived from

sceIoGetstatByFdAsyncForDriver
Derived from

sceIoGetstatByFdForDriver
Derived from

sceIoGetstatAsyncForDriver
Derived from

sceIoIoctlAsyncForDriver
Derived from

sceIoIoctlForDriver
Derived from

sceIoLseekAsyncForDriver
Derived from

sceIoMkdirAsyncForDriver
Derived from

sceIoOpenAsyncForDriver
Derived from

sceIoPreadAsyncForDriver
Derived from

sceIoPreadForDriver
Derived from

sceIoPwriteAsyncForDriver
Derived from

sceIoPwriteForDriver
Derived from

sceIoReadAsyncForDriver
Derived from

sceIoRemoveAsyncForDriver
Derived from

sceIoRenameAsyncForDriver
Derived from

sceIoRmdirAsyncForDriver
Derived from

sceIoRmdirForDriver
Derived from

sceIoSyncByFdAsyncForDriver
Derived from

sceIoSyncByFdForDriver
Derived from

sceIoSyncAsyncForDriver
Derived from

sceIoSyncForDriver
Derived from

sceIoWriteAsyncForDriver
Derived from

t_sceIoOpenForDriver
thread callback for

t_sceIoCloseForDriver
thread callback for

t_sceIoReadForDriver
thread callback for

t_sceIoWriteForDriver
thread callback for

t_sceIoIoctlForDriver
thread callback for

t_sceIoChstatForDriver
thread callback for

t_sceIoChstatByFdForDriver
thread callback for

t_sceIoPreadForDriver
thread callback for

t_sceIoPwriteForDriver
thread callback for

sceIoCreateMountEventForDriver
Derived from vshIoCreateMountEvent

sceIoCreateErrorEventForDriver
Derived from vshIoCreateErrorEvent

sceIoClearErrorEventForDriver
Derived from vshIoClearErrorEvent

sceIoDeleteMountEventForDriver
Derived from vshIoDeleteMountEvent

sceIoDeleteErrorEventForDriver
Derived from vshIoDeleteErrorEvent

sceIoSetPathMappingFunctionForDriver
used by SceAppMgr

sets a callback function that does path mapping:


 * function tries to OverlayResolveSync input path
 * checks that it is not a PD path (temp mount point probably aquired by PFS)
 * takes beginning of path until symbol ":"
 * tries to do a lookup by that path copy in data segment global 0x3470C  item array
 * if item is found then  from   item is copied to
 * in any other case OverlayResolveSync result path is copied to

sceIoGetPathIdExForDriver
calls sceSblACMgrGetPathIdForKernel internally.

may also call callback function set by sceIoSetPathMappingFunctionForDriver.

this callback function does path mapping since result in result_path is passed to sceSblACMgrGetPathIdForKernel.

create_SceUIDVfsFileClass
creates instance of SceUIDVfsFileClass using