pspsysmem_kernel.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * pspsysmem_kernel.h - Interface to the system memory manager (kernel).
00007  *
00008  * Copyright (c) 2005 James F.
00009  *
00010  * $Id: pspsysmem.h 1095 2005-09-27 21:02:16Z jim $
00011  */
00012 
00013 /* Note: Some of the structures, types, and definitions in this file were
00014    extrapolated from symbolic debugging information found in the Japanese
00015    version of Puzzle Bobble. */
00016 
00017 #ifndef PSPSYSMEMKERNEL_H
00018 #define PSPSYSMEMKERNEL_H
00019 
00020 #include <pspkerneltypes.h>
00021 #include <pspsysmem.h>
00022 
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 typedef struct _PspSysmemPartitionInfo
00035 {
00036         SceSize size;
00037         unsigned int startaddr;
00038         unsigned int memsize;
00039         unsigned int attr;
00040 } PspSysmemPartitionInfo;
00041 
00050 int sceKernelQueryMemoryPartitionInfo(int pid, PspSysmemPartitionInfo *info);
00051 
00059 SceSize sceKernelPartitionTotalFreeMemSize(int pid);
00060 
00068 SceSize sceKernelPartitionMaxFreeMemSize(int pid);
00069 
00073 void sceKernelSysMemDump(void);
00074 
00078 void sceKernelSysMemDumpBlock(void);
00079 
00083 void sceKernelSysMemDumpTail(void);
00084 
00094 int sceKernelSetDdrMemoryProtection(void *addr, int size, int prot);
00095 
00106 SceUID sceKernelCreateHeap(SceUID partitionid, SceSize size, int unk, const char *name);
00107 
00116 void *sceKernelAllocHeapMemory(SceUID heapid, SceSize size);
00117 
00126 int sceKernelFreeHeapMemory(SceUID heapid, void *block);
00127 
00135 int sceKernelDeleteHeap(SceUID heapid);
00136 
00144 SceSize sceKernelHeapTotalFreeSize(SceUID heapid);
00145 
00147 struct _uidControlBlock {
00148     struct _uidControlBlock *parent;
00149     struct _uidControlBlock *nextChild;
00150     struct _uidControlBlock *type;   //(0x8)
00151     u32 UID;                                    //(0xC)
00152     char *name;                                 //(0x10)
00153         unsigned char unk;
00154         unsigned char size;                     // Size in words
00155     short attribute;
00156     struct _uidControlBlock *nextEntry;
00157 } __attribute__((packed));
00158 typedef struct _uidControlBlock uidControlBlock;
00159 
00168 int sceKernelGetUIDcontrolBlock(SceUID uid, uidControlBlock** block);
00169 
00179 int sceKernelGetUIDcontrolBlockWithType(SceUID uid, uidControlBlock* type, uidControlBlock** block);
00180 
00186 uidControlBlock* SysMemForKernel_536AD5E1(void);
00187 
00195 int sceKernelDeleteUID(SceUID uid);
00196 
00197 #ifdef __cplusplus
00198 }
00199 #endif
00200 
00203 #endif /* PSPSYSMEMKERNEL_H */

Generated on Tue Jul 24 15:21:23 2007 for PSPSDK-Rev2272 by  doxygen 1.5.2