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 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

See SceSdstor for "sdstor0:" Block Device.

Dev Minor

VFS Implementation
Information can be found on separate page VFS Implementation

Note
Max vfs node number is 0x1000.

sceVopCloseForDriver
In logs it is sceVopClsoe.

sceVopLookupForDriver
Temp name was sceVfsNodeInitializePartitionForDriver.

sceVopLinkForDriver
Temp name was sceVop_unk_offset_0x54_ForDriver.

sceVopUnlinkForDriver
Temp name was sceVop_unk_offset_0x58_ForDriver.

sceVopFgetstatForDriver
Temp name was sceVopGetStateByFdForDriver.

sceVopFchstatForDriver
Temp name was sceVopChstatByFdForDriver.

sceVopWhiteoutForDriver
Temp name was sceVopTrashForDriver.

Move target node entry file/directory to.

sceVopCleanupForDriver
Temp name was sceVop_unk_offset_0x6C_ForDriver.

sceVopZerofillForDriver
Temp name was sceVop_unk_offset_0x70_ForDriver.

create_SceUIDVfsFileClass
creates instance of SceUIDVfsFileClass using

vfsIsLockedMntForDriver
some thread op

vfsBuffCacheCtlForDriver
big function

vfsBuffCacheFreeForDriver
some node op

sceVfsLockVnodeForDriver
Temp name was sceVfsNodeWaitEventFlagForDriver.

calls  using   from

1. If the ownerId of the locked vnode is -1 (no anyone), set own thread as owner and leave the function.

2. If the ownerId is already mine, increment recursiveCount and leave the function.

3. If we get here we increment waiter.

4. Just to be sure, we do a check for 1 again and if the ownerId is -1, we set the ownerId to ourselves in the thread, then decrement waiter and leave the function.

5. If you've come this far, wait for the other owner to unlock the vnode with sceKernelWaitEventFlag.

6. Decrement the waiter and set the ownerId to its own thread and leave the function.

sceVfsUnlockVnodeForDriver
Temp name was sceVfsNodeSetEventFlagForDriver.

calls  using   from

1. The function fails if the ownerId is not its own thread.

2. If recursiveCount is not 0, decrement recursiveCount and leave the function.

3. If recursiveCount is 0, checks waiter value.

4. If waiter is not 0, set ownerId to 0xfffffffd, then notify other waiting threads of unlock with sceKernelSetEventFlag and leave the function.

5. Check ownerId and waiter again and execute 4 if there is a discrepancy with the first check.

6. Set waiter to 0 and ownerId to -1 and leave the function.

sceVfsAddVfsForDriver
Used by SceSdstor, SceTty2uart, SceKernelBlueScreenOfDeath.

sceVfsAllocateFileForDriver
Creates a  object and returns UID and pointer to created object.

sceVfsFreeFileForDriver
Frees a file created with sceVfsAllocateFileForDriver.

sceVfsOpenForDriver
Temp name was t_sceIoOpenForDriver.

thread callback for

sceVfsCloseForDriver
Temp name was t_sceIoCloseForDriver.

thread callback for

sceVfsReadForDriver
Temp name was t_sceIoReadForDriver.

thread callback for

sceVfsWriteForDriver
Temp name was t_sceIoWriteForDriver.

thread callback for

sceVfsIoctlForDriver
Temp name was t_sceIoIoctlForDriver.

thread callback for

sceVfsChstatForDriver
Temp name was t_sceIoChstatForDriver.

thread callback for

sceVfsChstatByFdForDriver
Temp name was t_sceIoChstatByFdForDriver.

thread callback for

sceVfsPreadForDriver
Temp name was t_sceIoPreadForDriver.

thread callback for

sceVfsPwriteForDriver
Temp name was t_sceIoPwriteForDriver.

thread callback for

sceIoMountForDriver
operation index 1 in

sceIoUmountForDriver
operation index 2 in

scePfsMgrVfsMountForDriver
operation index 3 in

scePfsMgrVfsUmountForDriver
operation index 4 in

sceIoRmdevForDriver
Like sceIoRemove?

The difference with sceIoRemove is that sceIoRmdev seems to remove the entry to be deleted directly without moving it to SceIoTrash.

sceIoDelDrvForDriver
Example: "tty"

sceIoDreadForDriver
Call interface is same as.

sceIoDreadForVshbridgeForDriver
Temp name was 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.

If the process is game or non-game, the `SCE_O_NOBUF` flag will be ignored.

sceIoOpenForPidForDriver
This is a wrapper for sceIoOpenForDriver.

Pid is used for.

sceIoChstatForDriver
Call interface is same as

sceIoChstatForVshbridgeForDriver
Temp name was 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.

sceIoGetstatForVshbridgeForDriver
Temp name was 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
cmd list

Derived from _sceIoDevctl.

This performs device-specific operations. The details of the operations are driver-dependent.

It has the same prototype as SceLibKernel.

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

not_sceIoSyncByFd_maybe_SyncByFd2ForDriver
This function is not sceIoSyncByFdForDriver.

Derived from

sceIoSyncAsyncForDriver
Derived from

sceIoSyncForDriver
Derived from

sceIoWriteAsyncForDriver
Derived from

sceIoCreateMountEventForDriver
Derived from vshIoCreateMountEvent

sceIoCreateErrorEventForDriver
Derived from vshIoCreateErrorEvent

sceIoClearErrorEventForDriver
Derived from vshIoClearErrorEvent

sceIoDeleteMountEventForDriver
Derived from vshIoDeleteMountEvent

sceIoDeleteErrorEventForDriver
Derived from vshIoDeleteErrorEvent

sceIoSetMountEventForDriver
Temp name was sceIoInvokeMountEventForDriver.

sceIoUmount2ForDriver
This is a guessed name.

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 (Pseudo Drive mount point aquired by ScePfsMgr)
 * 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

sceIoGetMediaTypeForDriver
Was wrongly named sceIoGetPathIdExForDriver.

May also call callback function set by sceIoSetPathMappingFunctionForDriver.

This callback function does path mapping since result in result_path is passed to sceSblACMgrGetMediaTypeForKernel.

sceIoGetRemoteKPLSDataForDriver
This is a guessed name.

sceIoSetErrorEventForDriver
Previously (wrongfully) called sceIoGetGUIDErrorEventListForDriver.

sceIoGetFileInfoForDriver
This is a guessed name.

SceIofilemgrForDriver_12F8D58E
get some value

SceIofilemgrForDriver_15C17487
A possible name is sceIoSchedulerIssueAnotherIoRequestForDriver.

SceIofilemgrForDriver_2EFDFA12
set path by flags?

SceIofilemgrForDriver_3675ECB9
could be sceIoSchedDispatcherFsResourceUnavailableForDriver.

some node op. dec ctr.

SceIofilemgrForDriver_3A79FAC9
delete fd by flags

SceIofilemgrForDriver_6BEEDDB4
setting some to fd of dir entry

SceIofilemgrForDriver_B499287E
delete some puid from a1

sceIoGetMountInfoForDriver
This is a guessed name.

sceIoGetMountVectorForDriver
This is a guessed name.

SceIofilemgrForDriver_C722DF35
some node op. inc ctr.

_sceIoDevctl
This performs device-specific operations. The details of the operations are driver-dependent.

This is a wrapper for sceIoDevctlForDriver.