uofw/sysmem__kernel_8h_source.html
2015-05-28 23:10:41 +00:00

493 lines
38 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>uOFW: /home/travis/build/uofw/uofw/include/sysmem_kernel.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">uOFW
</div>
<div id="projectbrief">Reverse engineered PSP kernel 6.60.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/home/travis/build/uofw/uofw/include/sysmem_kernel.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Copyright (C) 2011, 2012, 2013 The uOFW team</span>
<a name="l00002"></a>00002 <span class="comment"> See the file COPYING for copying permission.</span>
<a name="l00003"></a>00003 <span class="comment">*/</span>
<a name="l00004"></a>00004
<a name="l00005"></a>00005 <span class="preprocessor">#ifndef SYSMEM_KERNEL_H</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define SYSMEM_KERNEL_H</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;stdarg.h&gt;</span>
<a name="l00009"></a>00009
<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;common_header.h&quot;</span>
<a name="l00011"></a>00011
<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;sysmem_user.h&quot;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;loadcore.h&quot;</span>
<a name="l00014"></a>00014
<a name="l00015"></a>00015 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00016"></a>00016 s32 unk0; <span class="comment">//0</span>
<a name="l00017"></a>00017 u32 numExportLibs; <span class="comment">//4 -- number of sysmem&#39;s export libraries - set in SysMemInit (from utopia)</span>
<a name="l00018"></a>00018 <a class="code" href="structSceResidentLibraryEntryTable.html">SceResidentLibraryEntryTable</a> *kernelLibs[8]; <span class="comment">//8 --array of sysmem&#39;s export tables set in SysMemInit (from utopia)</span>
<a name="l00019"></a>00019 u32 loadCoreAddr; <span class="comment">// 40 -- allocated in SysMemInit (from utopia)</span>
<a name="l00020"></a>00020 u32 numKernelLibs; <span class="comment">// 44 -- offset in export_lib at which user libraries begin - set in SysMemInit (from utopia)</span>
<a name="l00021"></a>00021 s32 unk48; <span class="comment">//48</span>
<a name="l00022"></a>00022 SceUID (*AllocPartitionMemory)(s32 mpid, <span class="keywordtype">char</span> *name, u32 type, u32 size, u32 addr); <span class="comment">// 52</span>
<a name="l00023"></a>00023 <span class="keywordtype">void</span> * (*GetBlockHeadAddr)(SceUID id); <span class="comment">// 56</span>
<a name="l00024"></a>00024 s32 (*ResizeMemoryBlock)(SceUID id, s32 leftShift, s32 rightShift); <span class="comment">// 60</span>
<a name="l00025"></a>00025 <a class="code" href="structSceStubLibraryEntryTable.html">SceStubLibraryEntryTable</a> *loadCoreImportTables; <span class="comment">//64 -- loadcore stubs - set in kactivate before booting loadcore (from utopia)</span>
<a name="l00026"></a>00026 u32 loadCoreImportTablesSize; <span class="comment">//68 -- total size of stubs - set in kactivate before booting loadcore (from utopia)</span>
<a name="l00027"></a>00027 <span class="keywordtype">void</span> *initThreadStack; <span class="comment">//72 -- allocated in SysMemInit (from utopia)</span>
<a name="l00028"></a>00028 <a class="code" href="structSceLoadCoreExecFileInfo.html">SceLoadCoreExecFileInfo</a> *sysMemExecInfo; <span class="comment">//76 -- set in kactivate before booting loadcore (from utopia)</span>
<a name="l00029"></a>00029 <a class="code" href="structSceLoadCoreExecFileInfo.html">SceLoadCoreExecFileInfo</a> *loadCoreExecInfo; <span class="comment">//80 -- set in kactivate before booting loadcore (from utopia)</span>
<a name="l00030"></a>00030 s32 (*CompareSubType)(u32 tag); <span class="comment">//84</span>
<a name="l00031"></a>00031 u32 (*CompareLatestSubType)(u32 tag); <span class="comment">//88</span>
<a name="l00032"></a>00032 s32 (*SetMaskFunction)(u32 unk1, vs32 *addr); <span class="comment">//92</span>
<a name="l00033"></a>00033 void (*Kprintf)(<span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...); <span class="comment">//96 -- set by sysmem (from utopia)</span>
<a name="l00034"></a>00034 s32 (*GetLengthFunction)(u8 *file, u32 size, u32 *newSize); <span class="comment">//100 -- set in kactivate before booting loadcore (from utopia)</span>
<a name="l00035"></a>00035 s32 (*PrepareGetLengthFunction)(u8 *buf, u32 size); <span class="comment">//104</span>
<a name="l00036"></a>00036 <a class="code" href="structSceResidentLibraryEntryTable.html">SceResidentLibraryEntryTable</a> *userLibs[3]; <span class="comment">//108 </span>
<a name="l00037"></a>00037 } SysMemThreadConfig;
<a name="l00038"></a>00038
<a name="l00040"></a>00040 <span class="keyword">enum</span> ScePspHwModels {
<a name="l00042"></a>00042 PSP_1000 = 0,
<a name="l00044"></a>00044 PSP_2000 = 1,
<a name="l00046"></a>00046 PSP_3000 = 2,
<a name="l00048"></a>00048 PSP_4000 = 3,
<a name="l00050"></a>00050 PSP_GO = 4,
<a name="l00052"></a>00052 PSP_7000 = 6,
<a name="l00054"></a>00054 PSP_9000 = 8,
<a name="l00056"></a>00056 PSP_11000 = 10,
<a name="l00057"></a>00057 };
<a name="l00058"></a>00058
<a name="l00059"></a>00059 <span class="comment">/* </span>
<a name="l00060"></a>00060 <span class="comment"> * Misc</span>
<a name="l00061"></a>00061 <span class="comment"> */</span>
<a name="l00062"></a>00062
<a name="l00063"></a>00063 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00064"></a>00064 u32 size; <span class="comment">// 0</span>
<a name="l00065"></a>00065 u32 flags; <span class="comment">// 4</span>
<a name="l00066"></a>00066 <span class="keywordtype">char</span> str8[16]; <span class="comment">// 8</span>
<a name="l00067"></a>00067 <span class="keywordtype">char</span> str24[11]; <span class="comment">// 24</span>
<a name="l00068"></a>00068 <span class="comment">// padding?</span>
<a name="l00069"></a>00069 <span class="keywordtype">int</span> unk36;
<a name="l00070"></a>00070 <span class="keywordtype">char</span> qtgp2[8]; <span class="comment">// 40</span>
<a name="l00071"></a>00071 <span class="keywordtype">char</span> qtgp3[16]; <span class="comment">// 48</span>
<a name="l00072"></a>00072 u32 allowReplaceUmd; <span class="comment">// 64</span>
<a name="l00073"></a>00073 <span class="keywordtype">char</span> gameId[14]; <span class="comment">// 68</span>
<a name="l00074"></a>00074 <span class="comment">// padding?</span>
<a name="l00075"></a>00075 u32 unk84; <span class="comment">// 84</span>
<a name="l00076"></a>00076 <span class="keywordtype">char</span> str88[8]; <span class="comment">// 88</span>
<a name="l00077"></a>00077 u32 umdCacheOn; <span class="comment">// 96</span>
<a name="l00078"></a>00078 u32 sdkVersion; <span class="comment">// 100</span>
<a name="l00079"></a>00079 u32 compilerVersion; <span class="comment">// 104</span>
<a name="l00080"></a>00080 u32 dnas; <span class="comment">// 108</span>
<a name="l00081"></a>00081 u32 unk112; <span class="comment">// 112</span>
<a name="l00082"></a>00082 <span class="keywordtype">char</span> str116[64]; <span class="comment">// 116</span>
<a name="l00083"></a>00083 <span class="keywordtype">char</span> str180[11]; <span class="comment">// 180</span>
<a name="l00084"></a>00084 <span class="comment">// padding?</span>
<a name="l00085"></a>00085 <span class="keywordtype">char</span> str196[8]; <span class="comment">// 196</span>
<a name="l00086"></a>00086 <span class="keywordtype">char</span> unk204[8]; <span class="comment">// 204</span>
<a name="l00087"></a>00087 <span class="keywordtype">int</span> unk212; <span class="comment">// 212</span>
<a name="l00088"></a>00088 <span class="keywordtype">int</span> unk216; <span class="comment">// 216</span>
<a name="l00089"></a>00089 } SceKernelGameInfo;
<a name="l00090"></a>00090
<a name="l00091"></a>00091 s32 SysMemForKernel_807179E7(<span class="keywordtype">char</span> *gameId, <span class="keywordtype">int</span> arg1, <span class="keywordtype">char</span> *arg2, <span class="keywordtype">char</span> *arg3, <span class="keywordtype">int</span> arg4, <span class="keywordtype">int</span> arg5, <span class="keywordtype">char</span> *arg6);
<a name="l00092"></a>00092 s32 sceKernelCopyGameInfo(SceKernelGameInfo *info);
<a name="l00093"></a>00093 s32 SysMemForKernel_F3BDB718(<span class="keywordtype">char</span> *arg0);
<a name="l00094"></a>00094 s32 sceKernelGetQTGP2(<span class="keywordtype">char</span> *qtgp2);
<a name="l00095"></a>00095 s32 sceKernelSetQTGP2(<span class="keywordtype">char</span> *qtgp2);
<a name="l00096"></a>00096 s32 sceKernelGetQTGP3(<span class="keywordtype">char</span> *qtgp3);
<a name="l00097"></a>00097 s32 sceKernelSetQTGP3(<span class="keywordtype">char</span> *qtgp3);
<a name="l00098"></a>00098 s32 sceKernelGetAllowReplaceUmd(u32 *allow);
<a name="l00099"></a>00099 s32 sceKernelSetAllowReplaceUmd(u32 allow);
<a name="l00100"></a>00100 s32 sceKernelSetUmdCacheOn(u32 umdCacheOn);
<a name="l00101"></a>00101 s32 SysMemForKernel_40B744A4(u32 unk112);
<a name="l00102"></a>00102 s32 SysMemForKernel_BFE08689(<span class="keywordtype">char</span> *str116);
<a name="l00103"></a>00103 s32 SysMemForKernel_2A8B8B2D(<span class="keywordtype">char</span> *unk204);
<a name="l00104"></a>00104 SceKernelGameInfo *sceKernelGetGameInfo(<span class="keywordtype">void</span>);
<a name="l00105"></a>00105 u32 sceKernelGetCompiledSdkVersion(<span class="keywordtype">void</span>);
<a name="l00106"></a>00106 s32 sceKernelSetCompiledSdkVersion100(u32 ver);
<a name="l00107"></a>00107 s32 sceKernelSetCompiledSdkVersion370(u32 ver);
<a name="l00108"></a>00108 s32 sceKernelSetCompiledSdkVersion380_390(u32 ver);
<a name="l00109"></a>00109 s32 sceKernelSetCompiledSdkVersion395(u32 ver);
<a name="l00110"></a>00110 s32 sceKernelSetCompiledSdkVersion410_420(u32 ver);
<a name="l00111"></a>00111 s32 sceKernelSetCompiledSdkVersion500_550(u32 ver);
<a name="l00112"></a>00112 s32 sceKernelSetCompiledSdkVersion570(u32 ver);
<a name="l00113"></a>00113 s32 sceKernelSetCompiledSdkVersion600_620(u32 ver);
<a name="l00114"></a>00114 s32 sceKernelSetCompiledSdkVersion630_650(u32 ver);
<a name="l00115"></a>00115 s32 sceKernelSetCompiledSdkVersion660(u32 ver);
<a name="l00116"></a>00116 s32 sceKernelGetCompilerVersion(<span class="keywordtype">void</span>);
<a name="l00117"></a>00117 s32 sceKernelSetCompilerVersion(s32 version);
<a name="l00118"></a>00118 s32 sceKernelGetDNAS(<span class="keywordtype">void</span>);
<a name="l00119"></a>00119 s32 sceKernelSetDNAS(s32 dnas);
<a name="l00120"></a>00120 s32 sceKernelGetInitialRandomValue(<span class="keywordtype">void</span>);
<a name="l00121"></a>00121 s32 SysMemForKernel_A0A9185A(<span class="keywordtype">void</span>);
<a name="l00122"></a>00122 u32 SysMemForKernel_13EE28DA(u32 flag);
<a name="l00123"></a>00123 u32 sceKernelGetModel(<span class="keywordtype">void</span>);
<a name="l00124"></a>00124 s32 sceKernelSetRebootKernel(s32 (*rebootKernel)());
<a name="l00125"></a>00125 s32 sceKernelRebootKernel(<span class="keywordtype">void</span> *arg);
<a name="l00126"></a>00126 s32 sceKernelRegisterGetIdFunc(<span class="keywordtype">void</span> *func);
<a name="l00127"></a>00127 s32 sceKernelGetId();
<a name="l00128"></a>00128
<a name="l00129"></a>00129 <span class="comment">/*</span>
<a name="l00130"></a>00130 <span class="comment"> * Debugging (disabled in release)</span>
<a name="l00131"></a>00131 <span class="comment"> */</span>
<a name="l00132"></a>00132 s32 sceKernelApiEvaluationInit();
<a name="l00133"></a>00133 s32 sceKernelRegisterApiEvaluation();
<a name="l00134"></a>00134 s32 sceKernelApiEvaliationAddData();
<a name="l00135"></a>00135 s32 sceKernelApiEvaluationReport();
<a name="l00136"></a>00136 s32 sceKernelSetGcovFunction();
<a name="l00137"></a>00137 s32 sceKernelCallGcovFunction();
<a name="l00138"></a>00138 s32 sceKernelSetGprofFunction();
<a name="l00139"></a>00139 s32 sceKernelCallGprofFunction();
<a name="l00140"></a>00140 <span class="keywordtype">int</span> sceKernelCheckDebugHandler();
<a name="l00141"></a>00141 s32 SysMemForKernel_7FF2F35A(<span class="keywordtype">char</span> *arg);
<a name="l00142"></a>00142 s32 SysMemForKernel_A03CB480(<span class="keywordtype">char</span> *arg);
<a name="l00143"></a>00143
<a name="l00144"></a>00144 <span class="comment">/*</span>
<a name="l00145"></a>00145 <span class="comment"> * Heap</span>
<a name="l00146"></a>00146 <span class="comment"> */</span>
<a name="l00147"></a>00147
<a name="l00148"></a>00148 <span class="keyword">typedef</span> <span class="keyword">struct </span>SceSysmemLowheapBlock {
<a name="l00149"></a>00149 <span class="keyword">struct </span>SceSysmemLowheapBlock *next;
<a name="l00150"></a>00150 u32 count;
<a name="l00151"></a>00151 } SceSysmemLowheapBlock;
<a name="l00152"></a>00152
<a name="l00153"></a>00153 <span class="keyword">typedef</span> <span class="keyword">struct </span>SceSysmemHeapBlock {
<a name="l00154"></a>00154 <span class="keyword">struct </span>SceSysmemHeapBlock *next, *prev; <span class="comment">// 0, 4</span>
<a name="l00155"></a>00155 <span class="comment">// followed by lowheap</span>
<a name="l00156"></a>00156 } SceSysmemHeapBlock;
<a name="l00157"></a>00157
<a name="l00158"></a>00158 SceUID sceKernelCreateHeap(SceUID mpid, SceSize size, <span class="keywordtype">int</span> flag, <span class="keyword">const</span> <span class="keywordtype">char</span> *name);
<a name="l00159"></a>00159
<a name="l00160"></a>00160 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00161"></a>00161 u32 size; <span class="comment">// 0</span>
<a name="l00162"></a>00162 <span class="keywordtype">char</span> name[32]; <span class="comment">// 4</span>
<a name="l00163"></a>00163 <span class="keywordtype">int</span> perm; <span class="comment">// 36</span>
<a name="l00164"></a>00164 <span class="keywordtype">int</span> attr; <span class="comment">// 40</span>
<a name="l00165"></a>00165 <span class="keywordtype">int</span> heapSize; <span class="comment">// 44</span>
<a name="l00166"></a>00166 <span class="keywordtype">int</span> totalsize; <span class="comment">// 48</span>
<a name="l00167"></a>00167 <span class="keywordtype">int</span> totalfreesize; <span class="comment">// 52</span>
<a name="l00168"></a>00168 <span class="keywordtype">int</span> maxfreesize; <span class="comment">// 56</span>
<a name="l00169"></a>00169 <span class="keywordtype">int</span> numheaps; <span class="comment">// 60</span>
<a name="l00170"></a>00170 SceSysmemHeapBlock *heaps[];
<a name="l00171"></a>00171 } SceSysmemHeapInfo;
<a name="l00172"></a>00172
<a name="l00173"></a>00173 <span class="keywordtype">int</span> sceKernelQueryHeapInfo(SceUID <span class="keywordtype">id</span>, SceSysmemHeapInfo *info);
<a name="l00174"></a>00174
<a name="l00175"></a>00175 <span class="keyword">typedef</span> <span class="keyword">struct </span>SceSysmemLowheapInfoBlock {
<a name="l00176"></a>00176 SceSysmemLowheapBlock *block;
<a name="l00177"></a>00177 u32 offset;
<a name="l00178"></a>00178 } SceSysmemLowheapInfoBlock;
<a name="l00179"></a>00179
<a name="l00180"></a>00180 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00181"></a>00181 u32 size; <span class="comment">// 0</span>
<a name="l00182"></a>00182 u32 heapSize; <span class="comment">// 4</span>
<a name="l00183"></a>00183 u32 usedSize; <span class="comment">// 8</span>
<a name="l00184"></a>00184 u32 freeSize; <span class="comment">// 12</span>
<a name="l00185"></a>00185 u32 maxFreeSize; <span class="comment">// 16</span>
<a name="l00186"></a>00186 u32 blockCount; <span class="comment">// 20</span>
<a name="l00187"></a>00187 SceSysmemLowheapInfoBlock infoBlocks[];
<a name="l00188"></a>00188 } SceSysmemLowheapInfo; <span class="comment">// size: 24</span>
<a name="l00189"></a>00189
<a name="l00190"></a>00190 s32 sceKernelQueryLowheapInfo(SceSysmemHeapBlock *block, SceSysmemLowheapInfo *info);
<a name="l00191"></a>00191 <span class="keywordtype">int</span> sceKernelDeleteHeap(SceUID <span class="keywordtype">id</span>);
<a name="l00192"></a>00192
<a name="l00193"></a>00193 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00194"></a>00194 u32 size; <span class="comment">// structure size (probably)</span>
<a name="l00195"></a>00195 u32 align;
<a name="l00196"></a>00196 } SceSysmemHeapAllocOption;
<a name="l00197"></a>00197
<a name="l00198"></a>00198 <span class="keywordtype">void</span> *sceKernelAllocHeapMemoryWithOption(SceUID <span class="keywordtype">id</span>, <span class="keywordtype">int</span> size, SceSysmemHeapAllocOption *opt);
<a name="l00199"></a>00199 <span class="keywordtype">void</span> *sceKernelAllocHeapMemory(SceUID <span class="keywordtype">id</span>, <span class="keywordtype">int</span> size);
<a name="l00200"></a>00200 s32 sceKernelFreeHeapMemory(SceUID <span class="keywordtype">id</span>, <span class="keywordtype">void</span> *addr);
<a name="l00201"></a>00201 s32 sceKernelHeapTotalFreeSize(SceUID <span class="keywordtype">id</span>);
<a name="l00202"></a>00202
<a name="l00203"></a>00203 <span class="comment">/*</span>
<a name="l00204"></a>00204 <span class="comment"> * Main</span>
<a name="l00205"></a>00205 <span class="comment"> */</span>
<a name="l00206"></a>00206
<a name="l00207"></a>00207 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00208"></a>00208 <span class="keywordtype">unsigned</span> used : 1; <span class="comment">// 0</span>
<a name="l00209"></a>00209 <span class="keywordtype">unsigned</span> next : 6; <span class="comment">/* next index */</span> <span class="comment">// 1</span>
<a name="l00210"></a>00210 <span class="keywordtype">unsigned</span> offset : 25; <span class="comment">/* offset (from the partition start, divided by 0x100) */</span> <span class="comment">// 7</span>
<a name="l00211"></a>00211 <span class="keywordtype">unsigned</span> isProtected : 1; <span class="comment">// 0</span>
<a name="l00212"></a>00212 <span class="keywordtype">unsigned</span> sizeLocked : 1; <span class="comment">// 1</span>
<a name="l00213"></a>00213 <span class="keywordtype">unsigned</span> prev : 6; <span class="comment">// 2</span>
<a name="l00214"></a>00214 <span class="keywordtype">unsigned</span> checkOverflow : 1; <span class="comment">// 8</span>
<a name="l00215"></a>00215 <span class="keywordtype">unsigned</span> size : 23; <span class="comment">/* size (divided by 0x100) */</span> <span class="comment">// 9</span>
<a name="l00216"></a>00216 } SceSysmemSeg; <span class="comment">// size: 8</span>
<a name="l00217"></a>00217
<a name="l00218"></a>00218 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00219"></a>00219 <span class="keyword">union </span>{
<a name="l00220"></a>00220 u32 segCount;
<a name="l00221"></a>00221 u32 segAddr;
<a name="l00222"></a>00222 } info;
<a name="l00223"></a>00223 u32 size; <span class="comment">// 4</span>
<a name="l00224"></a>00224 u32 unused8; <span class="comment">// 8</span>
<a name="l00225"></a>00225 SceSysmemSeg *curSeg; <span class="comment">// 12</span>
<a name="l00226"></a>00226 } SceSysMemoryInfo;
<a name="l00227"></a>00227
<a name="l00228"></a>00228 <span class="keywordtype">void</span> sceKernelGetSysMemoryInfo(s32 mpid, u32 needsInit, SceSysMemoryInfo *info);
<a name="l00229"></a>00229 s32 sceKernelGetSysmemIdList(s32 <span class="keywordtype">id</span>, s32 *uids, s32 maxCount, s32 *totalCount);
<a name="l00230"></a>00230 s32 sceKernelSysMemRealMemorySize(<span class="keywordtype">void</span>);
<a name="l00231"></a>00231 s32 sceKernelSysMemMemSize(<span class="keywordtype">void</span>);
<a name="l00232"></a>00232 s32 sceKernelSysMemMaxFreeMemSize(<span class="keywordtype">void</span>);
<a name="l00233"></a>00233 s32 sceKernelGetMEeDramSaveAddr(<span class="keywordtype">void</span>);
<a name="l00234"></a>00234 s32 sceKernelGetAWeDramSaveAddr(<span class="keywordtype">void</span>);
<a name="l00235"></a>00235 s32 sceKernelGetMEeDramSaveSize(<span class="keywordtype">void</span>);
<a name="l00236"></a>00236 s32 sceKernelGetAWeDramSaveSize(<span class="keywordtype">void</span>);
<a name="l00237"></a>00237 s32 sceKernelDevkitVersion(<span class="keywordtype">void</span>);
<a name="l00238"></a>00238 s32 sceKernelGetSystemStatus(<span class="keywordtype">void</span>);
<a name="l00239"></a>00239 s32 sceKernelSetSystemStatus(s32 newStatus);
<a name="l00240"></a>00240
<a name="l00241"></a>00241 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00242"></a>00242 s32 dlId;
<a name="l00243"></a>00243 <span class="keywordtype">void</span> *stall;
<a name="l00244"></a>00244 u32 count;
<a name="l00245"></a>00245 u32 max;
<a name="l00246"></a>00246 } SceGeLazy;
<a name="l00247"></a>00247
<a name="l00248"></a>00248 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00249"></a>00249 u32 size;
<a name="l00250"></a>00250 s32 *cmdList;
<a name="l00251"></a>00251 s32 (*sceGeListUpdateStallAddr_lazy)(s32 dlId, <span class="keywordtype">void</span> *stall);
<a name="l00252"></a>00252 SceGeLazy *lazySyncData;
<a name="l00253"></a>00253 } SceKernelUsersystemLibWork;
<a name="l00254"></a>00254
<a name="l00255"></a>00255 s32 sceKernelSetUsersystemLibWork(s32 *cmdList, s32 (*sceGeListUpdateStallAddr_lazy)(s32, <span class="keywordtype">void</span>*), SceGeLazy *lazy);
<a name="l00256"></a>00256 SceKernelUsersystemLibWork *sceKernelGetUsersystemLibWork(<span class="keywordtype">void</span>);
<a name="l00257"></a>00257
<a name="l00258"></a>00258 <span class="comment">/*</span>
<a name="l00259"></a>00259 <span class="comment"> * Memory Block</span>
<a name="l00260"></a>00260 <span class="comment"> */</span>
<a name="l00261"></a>00261
<a name="l00262"></a>00262 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00263"></a>00263 s32 size; <span class="comment">// Structure size</span>
<a name="l00264"></a>00264 } SceSysmemMemoryBlockAllocOption;
<a name="l00265"></a>00265
<a name="l00266"></a>00266 SceUID sceKernelAllocMemoryBlock(<span class="keywordtype">char</span> *name, u32 type, u32 size, SceSysmemMemoryBlockAllocOption *opt);
<a name="l00267"></a>00267 s32 sceKernelFreeMemoryBlock(SceUID <span class="keywordtype">id</span>);
<a name="l00268"></a>00268 s32 sceKernelGetMemoryBlockAddr(SceUID <span class="keywordtype">id</span>, <span class="keywordtype">void</span> **addrPtr);
<a name="l00269"></a>00269
<a name="l00270"></a>00270 <span class="comment">/*</span>
<a name="l00271"></a>00271 <span class="comment"> * Memory Main</span>
<a name="l00272"></a>00272 <span class="comment"> */</span>
<a name="l00273"></a>00273
<a name="l00274"></a>00274 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00275"></a>00275 u32 size; <span class="comment">// 0</span>
<a name="l00276"></a>00276 <span class="keywordtype">char</span> name[32]; <span class="comment">// 4</span>
<a name="l00277"></a>00277 u32 attr; <span class="comment">// 36</span>
<a name="l00278"></a>00278 u32 addr; <span class="comment">// 40</span>
<a name="l00279"></a>00279 u32 memSize; <span class="comment">// 44</span>
<a name="l00280"></a>00280 u32 sizeLocked; <span class="comment">// 48</span>
<a name="l00281"></a>00281 u32 used; <span class="comment">// 52</span>
<a name="l00282"></a>00282 } SceSysmemMemoryBlockInfo;
<a name="l00283"></a>00283
<a name="l00284"></a>00284 s32 sceKernelResizeMemoryBlock(SceUID <span class="keywordtype">id</span>, s32 leftShift, s32 rightShift);
<a name="l00285"></a>00285 s32 sceKernelJointMemoryBlock(SceUID id1, SceUID id2);
<a name="l00286"></a>00286 s32 sceKernelSeparateMemoryBlock(SceUID <span class="keywordtype">id</span>, u32 cutBefore, u32 size);
<a name="l00287"></a>00287 s32 sceKernelQueryMemoryBlockInfo(SceUID <span class="keywordtype">id</span>, SceSysmemMemoryBlockInfo *infoPtr);
<a name="l00288"></a>00288 s32 sceKernelSizeLockMemoryBlock(SceUID <span class="keywordtype">id</span>);
<a name="l00289"></a>00289 s32 sceKernelFreePartitionMemory(SceUID <span class="keywordtype">id</span>);
<a name="l00290"></a>00290 s32 sceKernelQueryMemoryInfo(u32 address, SceUID *partitionId, SceUID *memoryBlockId);
<a name="l00291"></a>00291 <span class="keywordtype">void</span> *sceKernelGetBlockHeadAddr(SceUID <span class="keywordtype">id</span>);
<a name="l00292"></a>00292 u32 SysMemForKernel_CC31DEAD(SceUID <span class="keywordtype">id</span>);
<a name="l00293"></a>00293 <span class="keywordtype">void</span> *<a class="code" href="group__UsersystemLib.html#gacb4b6ca5c01c74e1c12bdaad428c38f5">sceKernelMemset</a>(<span class="keywordtype">void</span> *src, s8 c, u32 size);
<a name="l00294"></a>00294 <span class="keywordtype">void</span> *sceKernelMemset32(<span class="keywordtype">void</span> *src, s32 c, u32 size);
<a name="l00295"></a>00295 <span class="keywordtype">void</span> *sceKernelMemmove(<span class="keywordtype">void</span> *dst, <span class="keywordtype">void</span> *src, u32 size);
<a name="l00296"></a>00296 <span class="keywordtype">void</span> *sceKernelMemmoveWithFill(<span class="keywordtype">void</span> *dst, <span class="keywordtype">void</span> *src, u32 size, s32 fill);
<a name="l00297"></a>00297 <span class="keywordtype">void</span> *<a class="code" href="group__UsersystemLib.html#gaeb89383520c91965b8b305a01b9075c5">sceKernelMemcpy</a>(<span class="keywordtype">void</span> *dst, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, u32 n);
<a name="l00298"></a>00298
<a name="l00299"></a>00299 <span class="comment">/*</span>
<a name="l00300"></a>00300 <span class="comment"> * Memory Operations</span>
<a name="l00301"></a>00301 <span class="comment"> */</span>
<a name="l00302"></a>00302 <span class="keywordtype">void</span> sceKernelMemoryExtendSize(<span class="keywordtype">void</span>);
<a name="l00303"></a>00303 <span class="keywordtype">void</span> sceKernelMemoryShrinkSize(<span class="keywordtype">void</span>);
<a name="l00304"></a>00304 u32 sceKernelMemoryOpenSize(<span class="keywordtype">void</span>);
<a name="l00305"></a>00305 <span class="keywordtype">void</span> sceKernelMemoryCloseSize(u32 state);
<a name="l00306"></a>00306 s32 sceKernelSetDdrMemoryProtection(u32 addr, u32 size, u32 <span class="keyword">set</span>);
<a name="l00307"></a>00307
<a name="l00308"></a>00308 <span class="comment">/*</span>
<a name="l00309"></a>00309 <span class="comment"> * Partitions</span>
<a name="l00310"></a>00310 <span class="comment"> */</span>
<a name="l00311"></a>00311
<a name="l00312"></a>00312 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00313"></a>00313 SceSize size; <span class="comment">// 0</span>
<a name="l00314"></a>00314 u32 startAddr; <span class="comment">// 4</span>
<a name="l00315"></a>00315 u32 memSize; <span class="comment">// 8</span>
<a name="l00316"></a>00316 u32 attr; <span class="comment">// 12</span>
<a name="l00317"></a>00317 } SceSysmemPartitionInfo;
<a name="l00318"></a>00318
<a name="l00319"></a>00319 s32 sceKernelQueryMemoryPartitionInfo(s32 mpid, SceSysmemPartitionInfo *info);
<a name="l00320"></a>00320 u32 sceKernelPartitionMaxFreeMemSize(s32 mpid);
<a name="l00321"></a>00321 u32 sceKernelPartitionTotalMemSize(s32 mpid);
<a name="l00322"></a>00322 u32 sceKernelTotalMemSize(<span class="keywordtype">void</span>);
<a name="l00323"></a>00323 u32 sceKernelPartitionTotalFreeMemSize(s32 mpid);
<a name="l00324"></a>00324 s32 sceKernelFillFreeBlock(s32 mpid, u32 c);
<a name="l00325"></a>00325 SceUID sceKernelAllocPartitionMemory(s32 mpid, <span class="keywordtype">char</span> *name, u32 type, u32 size, u32 addr);
<a name="l00326"></a>00326
<a name="l00327"></a>00327 <span class="comment">/*</span>
<a name="l00328"></a>00328 <span class="comment"> * UIDs</span>
<a name="l00329"></a>00329 <span class="comment"> */</span>
<a name="l00330"></a>00330
<a name="l00331"></a>00331 <span class="preprocessor">#define UID_CB_TO_DATA(uid, typeStruct, type) ((type*)((void*)uid + typeStruct-&gt;size * 4))</span>
<a name="l00332"></a>00332 <span class="preprocessor"></span><span class="preprocessor">#define UID_DATA_TO_CB(data, typeStruct) ((SceSysmemUidCB*)((void*)data - typeStruct-&gt;size * 4))</span>
<a name="l00333"></a>00333 <span class="preprocessor"></span>
<a name="l00334"></a>00334 <span class="keyword">struct </span>SceSysmemUidLookupFunc;
<a name="l00335"></a>00335
<a name="l00336"></a>00336 <span class="keyword">typedef</span> <span class="keyword">struct </span>SceSysmemUidCB {
<a name="l00337"></a>00337 <span class="keyword">struct </span>SceSysmemUidCB *PARENT0; <span class="comment">// 0</span>
<a name="l00338"></a>00338 <span class="keyword">struct </span>SceSysmemUidCB *nextChild; <span class="comment">// 4</span>
<a name="l00339"></a>00339 <span class="keyword">struct </span>SceSysmemUidCB *meta; <span class="comment">// 8: the type UID</span>
<a name="l00340"></a>00340 SceUID uid; <span class="comment">// 12</span>
<a name="l00341"></a>00341 <span class="keywordtype">char</span> *name; <span class="comment">// 16</span>
<a name="l00342"></a>00342 u8 childSize; <span class="comment">// 20</span>
<a name="l00343"></a>00343 u8 size; <span class="comment">// 21</span>
<a name="l00344"></a>00344 u16 attr; <span class="comment">// 22</span>
<a name="l00345"></a>00345 <span class="keyword">union </span>{
<a name="l00346"></a>00346 <span class="keyword">struct </span>SceSysmemUidCB *next; <span class="comment">// 24</span>
<a name="l00347"></a>00347 s32 numChild; <span class="comment">// 24</span>
<a name="l00348"></a>00348 } next;
<a name="l00349"></a>00349 <span class="keyword">struct </span>SceSysmemUidCB *PARENT1; <span class="comment">// 28</span>
<a name="l00350"></a>00350 <span class="keyword">struct </span>SceSysmemUidLookupFunc *funcTable; <span class="comment">// 32</span>
<a name="l00351"></a>00351 } __attribute__((packed)) SceSysmemUidCB; <span class="comment">// size: 36</span>
<a name="l00352"></a>00352
<a name="l00353"></a>00353 typedef s32 (*SceSysmemUidFunc)(SceSysmemUidCB *uid, SceSysmemUidCB *uidWithFunc, s32 funcId, va_list ap);
<a name="l00354"></a>00354
<a name="l00355"></a>00355 typedef struct SceSysmemUidLookupFunc {
<a name="l00356"></a>00356 s32 id;
<a name="l00357"></a>00357 SceSysmemUidFunc func;
<a name="l00358"></a>00358 } SceSysmemUidLookupFunc;
<a name="l00359"></a>00359
<a name="l00360"></a>00360 s32 sceKernelCallUIDFunction(SceUID <span class="keywordtype">id</span>, <span class="keywordtype">int</span> funcId, ...);
<a name="l00361"></a>00361 s32 sceKernelCallUIDObjFunction(SceSysmemUidCB *uid, s32 funcId, ...);
<a name="l00362"></a>00362 <span class="keywordtype">int</span> sceKernelLookupUIDFunction(SceSysmemUidCB *uid, <span class="keywordtype">int</span> <span class="keywordtype">id</span>, SceSysmemUidFunc *func, SceSysmemUidCB **parentUidWithFunc);
<a name="l00363"></a>00363 s32 sceKernelCallUIDObjCommonFunction(SceSysmemUidCB *uid, SceSysmemUidCB *uidWithFunc, s32 funcId, va_list ap);
<a name="l00364"></a>00364 <span class="keywordtype">int</span> sceKernelCreateUIDtypeInherit(<span class="keyword">const</span> <span class="keywordtype">char</span> *parentName, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> size,
<a name="l00365"></a>00365 SceSysmemUidLookupFunc *funcTable, SceSysmemUidLookupFunc *metaFuncTable,
<a name="l00366"></a>00366 SceSysmemUidCB **uidTypeOut);
<a name="l00367"></a>00367 <span class="keywordtype">int</span> sceKernelCreateUID(SceSysmemUidCB *type, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">char</span> k1, SceSysmemUidCB **outUid);
<a name="l00368"></a>00368 SceUID sceKernelSearchUIDbyName(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, SceUID typeId);
<a name="l00369"></a>00369 <span class="keywordtype">int</span> sceKernelCreateUIDtype(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> size, SceSysmemUidLookupFunc *funcTable,
<a name="l00370"></a>00370 SceSysmemUidLookupFunc *metaFuncTable, SceSysmemUidCB **uidTypeOut);
<a name="l00371"></a>00371 s32 sceKernelDeleteUIDtype(SceSysmemUidCB *uid);
<a name="l00372"></a>00372 s32 sceKernelGetUIDname(SceUID <span class="keywordtype">id</span>, s32 len, <span class="keywordtype">char</span> *out);
<a name="l00373"></a>00373 s32 sceKernelRenameUID(SceUID <span class="keywordtype">id</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *name);
<a name="l00374"></a>00374 s32 sceKernelGetUIDtype(SceUID <span class="keywordtype">id</span>);
<a name="l00375"></a>00375 s32 sceKernelDeleteUID(SceUID <span class="keywordtype">id</span>);
<a name="l00376"></a>00376 s32 sceKernelGetUIDcontrolBlock(SceUID <span class="keywordtype">id</span>, SceSysmemUidCB **uidOut);
<a name="l00377"></a>00377 s32 sceKernelGetUIDcontrolBlockWithType(SceUID <span class="keywordtype">id</span>, SceSysmemUidCB *type, SceSysmemUidCB **outUid);
<a name="l00378"></a>00378 s32 sceKernelIsKindOf(SceSysmemUidCB *uid, SceSysmemUidCB *type);
<a name="l00379"></a>00379 s32 sceKernelPrintUidListAll(<span class="keywordtype">void</span>);
<a name="l00380"></a>00380
<a name="l00381"></a>00381 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00382"></a>00382 SceSysmemUidCB *root; <span class="comment">// 0</span>
<a name="l00383"></a>00383 SceSysmemUidCB *metaRoot; <span class="comment">// 4</span>
<a name="l00384"></a>00384 SceSysmemUidCB *basic; <span class="comment">// 8</span>
<a name="l00385"></a>00385 s32 count; <span class="comment">// 12</span>
<a name="l00386"></a>00386 } SceSysmemUidList;
<a name="l00387"></a>00387
<a name="l00388"></a>00388 SceSysmemUidList *sceKernelGetUidmanCB(<span class="keywordtype">void</span>);
<a name="l00389"></a>00389 s32 sceKernelIsHold(SceSysmemUidCB *uid0, SceSysmemUidCB *uid1);
<a name="l00390"></a>00390 s32 sceKernelHoldUID(SceUID id0, SceUID id1);
<a name="l00391"></a>00391 s32 sceKernelReleaseUID(SceUID id0, SceUID id1);
<a name="l00392"></a>00392
<a name="l00393"></a>00393 <span class="preprocessor">#endif</span>
<a name="l00394"></a>00394 <span class="preprocessor"></span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>
Generated on Thu May 28 2015 23:10:39 for uOFW by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>