Merge pull request #13006 from sum2012/kernel_minor3

Wrap some SysMemForKernel and sceKernelUnloadModule
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2020-06-07 09:26:59 +02:00
commit fe1807b2ec
4 files changed
+11 -3

No files matched your search

+3
View File
@@ -87,6 +87,9 @@ const HLEFunction SysMemForKernel[] = {
{ 0X636C953B, &WrapI_II<sceKernelAllocHeapMemory>, "sceKernelAllocHeapMemory", 'x', "ii" },
{ 0XC9805775, &WrapI_I<sceKernelDeleteHeap>, "sceKernelDeleteHeap", 'i', "i" },
{ 0X1C1FBFE7, &WrapI_IIIC<sceKernelCreateHeap>, "sceKernelCreateHeap", 'i', "iixs" },
{ 0X237DBD4F, &WrapI_ICIUU<sceKernelAllocPartitionMemory>, "sceKernelAllocPartitionMemory", 'i', "isixx",HLE_KERNEL_SYSCALL },
{ 0XB6D61D02, &WrapI_I<sceKernelFreePartitionMemory>, "sceKernelFreePartitionMemory", 'i', "i",HLE_KERNEL_SYSCALL },
{ 0X9D9A5BA1, &WrapU_I<sceKernelGetBlockHeadAddr>, "sceKernelGetBlockHeadAddr", 'x', "i",HLE_KERNEL_SYSCALL },
};
void Register_SysMemForKernel() {
+3 -3
View File
@@ -969,7 +969,7 @@ static u32 sceKernelTotalFreeMemSize()
return retVal;
}
static int sceKernelAllocPartitionMemory(int partition, const char *name, int type, u32 size, u32 addr)
int sceKernelAllocPartitionMemory(int partition, const char *name, int type, u32 size, u32 addr)
{
if (name == NULL)
{
@@ -1019,14 +1019,14 @@ static int sceKernelAllocPartitionMemory(int partition, const char *name, int ty
return uid;
}
static int sceKernelFreePartitionMemory(SceUID id)
int sceKernelFreePartitionMemory(SceUID id)
{
DEBUG_LOG(SCEKERNEL,"sceKernelFreePartitionMemory(%d)",id);
return kernelObjects.Destroy<PartitionMemoryBlock>(id);
}
static u32 sceKernelGetBlockHeadAddr(SceUID id)
u32 sceKernelGetBlockHeadAddr(SceUID id)
{
u32 error;
PartitionMemoryBlock *block = kernelObjects.Get<PartitionMemoryBlock>(id, error);
+4
View File
@@ -67,3 +67,7 @@ int sceKernelFreeTlspl(SceUID uid);
int sceKernelReferTlsplStatus(SceUID uid, u32 infoPtr);
void Register_SysMemUserForUser();
int sceKernelAllocPartitionMemory(int partition, const char *name, int type, u32 size, u32 addr);
int sceKernelFreePartitionMemory(SceUID id);
u32 sceKernelGetBlockHeadAddr(SceUID id);
+1
View File
@@ -2546,6 +2546,7 @@ const HLEFunction ModuleMgrForKernel[] =
{0xA1A78C58, &WrapU_CUU<sceKernelLoadModuleForLoadExecVSHDisc>, "sceKernelLoadModuleForLoadExecVSHDisc", 'x', "sxx", HLE_KERNEL_SYSCALL }, //fix for tiger x dragon
{0x748CBED9, &WrapU_UU<sceKernelQueryModuleInfo>, "sceKernelQueryModuleInfo", 'x', "xx", HLE_KERNEL_SYSCALL },
{0x644395E2, &WrapU_UUU<sceKernelGetModuleIdList>, "sceKernelGetModuleIdList", 'x', "xxx", HLE_KERNEL_SYSCALL },
{0X2E0911AA, &WrapU_U<sceKernelUnloadModule>, "sceKernelUnloadModule", 'x', "x" , HLE_KERNEL_SYSCALL },
};
void Register_ModuleMgrForUser()