2012-11-01 16:19:01 +01:00
|
|
|
// Copyright (c) 2012- PPSSPP Project.
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
2012-11-04 23:01:49 +01:00
|
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
2012-11-01 16:19:01 +01:00
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official git repository and contact information can be found at
|
|
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "../Util/BlockAllocator.h"
|
2012-12-26 22:45:19 -08:00
|
|
|
#include "sceKernel.h"
|
2012-11-01 16:19:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
//todo: "real" memory block allocator,
|
|
|
|
// have elf loader grab its memory block first to avoid overwriting,
|
|
|
|
// etc
|
|
|
|
|
|
|
|
|
|
|
|
extern BlockAllocator userMemory;
|
|
|
|
extern BlockAllocator kernelMemory;
|
|
|
|
|
|
|
|
void __KernelMemoryInit();
|
2012-12-27 14:21:39 -08:00
|
|
|
void __KernelMemoryDoState(PointerWrap &p);
|
2012-11-01 16:19:01 +01:00
|
|
|
void __KernelMemoryShutdown();
|
2012-12-26 22:45:19 -08:00
|
|
|
KernelObject *__KernelMemoryFPLObject();
|
|
|
|
KernelObject *__KernelMemoryVPLObject();
|
|
|
|
KernelObject *__KernelMemoryPMBObject();
|
2013-12-02 23:29:52 -08:00
|
|
|
KernelObject *__KernelTlsplObject();
|
2012-11-01 16:19:01 +01:00
|
|
|
|
2012-12-30 18:19:00 -08:00
|
|
|
SceUID sceKernelCreateVpl(const char *name, int partition, u32 attr, u32 vplSize, u32 optPtr);
|
2013-01-17 22:05:46 -08:00
|
|
|
int sceKernelDeleteVpl(SceUID uid);
|
2013-01-15 22:13:11 -08:00
|
|
|
int sceKernelAllocateVpl(SceUID uid, u32 size, u32 addrPtr, u32 timeoutPtr);
|
|
|
|
int sceKernelAllocateVplCB(SceUID uid, u32 size, u32 addrPtr, u32 timeoutPtr);
|
|
|
|
int sceKernelTryAllocateVpl(SceUID uid, u32 size, u32 addrPtr);
|
2013-01-16 00:47:06 -08:00
|
|
|
int sceKernelFreeVpl(SceUID uid, u32 addr);
|
2013-01-17 22:05:46 -08:00
|
|
|
int sceKernelCancelVpl(SceUID uid, u32 numWaitThreadsPtr);
|
|
|
|
int sceKernelReferVplStatus(SceUID uid, u32 infoPtr);
|
2012-11-01 16:19:01 +01:00
|
|
|
|
2013-08-25 00:14:14 -07:00
|
|
|
int sceKernelCreateFpl(const char *name, u32 mpid, u32 attr, u32 blocksize, u32 numBlocks, u32 optPtr);
|
2013-08-25 12:49:49 -07:00
|
|
|
int sceKernelDeleteFpl(SceUID uid);
|
2013-08-25 13:45:38 -07:00
|
|
|
int sceKernelAllocateFpl(SceUID uid, u32 blockPtrAddr, u32 timeoutPtr);
|
|
|
|
int sceKernelAllocateFplCB(SceUID uid, u32 blockPtrAddr, u32 timeoutPtr);
|
|
|
|
int sceKernelTryAllocateFpl(SceUID uid, u32 blockPtrAddr);
|
2013-08-25 15:13:39 -07:00
|
|
|
int sceKernelFreeFpl(SceUID uid, u32 blockPtr);
|
2013-08-25 12:49:49 -07:00
|
|
|
int sceKernelCancelFpl(SceUID uid, u32 numWaitThreadsPtr);
|
2013-08-25 12:56:35 -07:00
|
|
|
int sceKernelReferFplStatus(SceUID uid, u32 statusPtr);
|
2012-11-01 16:19:01 +01:00
|
|
|
|
2012-12-25 13:30:10 +01:00
|
|
|
int sceKernelGetCompiledSdkVersion();
|
2012-11-01 16:19:01 +01:00
|
|
|
|
2013-12-02 23:29:52 -08:00
|
|
|
SceUID sceKernelCreateTlspl(const char *name, u32 partitionid, u32 attr, u32 size, u32 count, u32 optionsPtr);
|
|
|
|
int sceKernelDeleteTlspl(SceUID uid);
|
|
|
|
int sceKernelGetTlsAddr(SceUID uid);
|
|
|
|
int sceKernelFreeTlspl(SceUID uid);
|
|
|
|
int sceKernelReferTlsplStatus(SceUID uid, u32 infoPtr);
|
2013-04-07 20:57:53 -07:00
|
|
|
|
2012-11-01 16:19:01 +01:00
|
|
|
void Register_SysMemUserForUser();
|