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

263 lines
17 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/interruptman.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/interruptman.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 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">#include &quot;common_header.h&quot;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;loadcore.h&quot;</span>
<a name="l00007"></a>00007
<a name="l00008"></a>00008 <span class="keyword">enum</span> SceInterrupts {
<a name="l00009"></a>00009 SCE_GPIO_INT = 4,
<a name="l00010"></a>00010 SCE_ATA_INT = 5,
<a name="l00011"></a>00011 SCE_UMD_INT = 6,
<a name="l00012"></a>00012 SCE_MSCM0_INT = 7,
<a name="l00013"></a>00013 SCE_WLAN_INT = 8,
<a name="l00014"></a>00014 SCE_AUDIO_INT = 10,
<a name="l00015"></a>00015 SCE_I2C_INT = 12,
<a name="l00016"></a>00016 SCE_SIRCS_INT = 14,
<a name="l00017"></a>00017 SCE_SYSTIMER0_INT = 15,
<a name="l00018"></a>00018 SCE_SYSTIMER1_INT = 16,
<a name="l00019"></a>00019 SCE_SYSTIMER2_INT = 17,
<a name="l00020"></a>00020 SCE_SYSTIMER3_INT = 18,
<a name="l00021"></a>00021 SCE_THREAD0_INT = 19,
<a name="l00022"></a>00022 SCE_NAND_INT = 20,
<a name="l00023"></a>00023 SCE_DMACPLUS_INT = 21,
<a name="l00024"></a>00024 SCE_DMA0_INT = 22,
<a name="l00025"></a>00025 SCE_DMA1_INT = 23,
<a name="l00026"></a>00026 SCE_MEMLMD_INT = 24,
<a name="l00027"></a>00027 SCE_GE_INT = 25,
<a name="l00028"></a>00028 SCE_VBLANK_INT = 30,
<a name="l00029"></a>00029 SCE_MECODEC_INT = 31,
<a name="l00030"></a>00030 SCE_HPREMOTE_INT = 36,
<a name="l00031"></a>00031 SCE_MSCM1_INT = 60,
<a name="l00032"></a>00032 SCE_MSCM2_INT = 61,
<a name="l00033"></a>00033 SCE_THREAD1_INT = 65,
<a name="l00034"></a>00034 SCE_INTERRUPT_INT = 66
<a name="l00035"></a>00035 };
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00038"></a>00038 <span class="comment">// Handler address</span>
<a name="l00039"></a>00039 s32 handler; <span class="comment">// 0</span>
<a name="l00040"></a>00040 <span class="comment">// GP of the module</span>
<a name="l00041"></a>00041 s32 gp; <span class="comment">// 4</span>
<a name="l00042"></a>00042 <span class="comment">// Argument given by sceKernelRegisterSubIntrHandler</span>
<a name="l00043"></a>00043 s32 arg; <span class="comment">// 8</span>
<a name="l00044"></a>00044 s32 u12, u16, u20;
<a name="l00045"></a>00045 <span class="comment">// See disableCb</span>
<a name="l00046"></a>00046 s32 enableCb; <span class="comment">// 24</span>
<a name="l00047"></a>00047 <span class="comment">// Pointer to the callback called by sceKernelDisableSubIntr(), that takes the same arguments as it</span>
<a name="l00048"></a>00048 s32 disableCb; <span class="comment">// 28</span>
<a name="l00049"></a>00049 <span class="comment">// See disableCb</span>
<a name="l00050"></a>00050 s32 suspendCb; <span class="comment">// 32</span>
<a name="l00051"></a>00051 <span class="comment">// See disableCb</span>
<a name="l00052"></a>00052 s32 resumeCb; <span class="comment">// 36</span>
<a name="l00053"></a>00053 <span class="comment">// See disableCb</span>
<a name="l00054"></a>00054 s32 isOccuredCb; <span class="comment">// 40</span>
<a name="l00055"></a>00055 s32 u44;
<a name="l00056"></a>00056 <span class="comment">// Some options</span>
<a name="l00057"></a>00057 s32 v48; <span class="comment">// 48</span>
<a name="l00058"></a>00058 s32 u52, u56, u60;
<a name="l00059"></a>00059 } SubInterrupt; <span class="comment">// Size: 64</span>
<a name="l00060"></a>00060
<a name="l00061"></a>00061 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00062"></a>00062 s32 size; <span class="comment">// 0</span>
<a name="l00063"></a>00063 s32 u4;
<a name="l00064"></a>00064 <span class="comment">// Callback called before setting sub interrupt, when registering</span>
<a name="l00065"></a>00065 s32 (*cbRegBefore)(s32, s32, <span class="keywordtype">void</span>*, <span class="keywordtype">void</span>*); <span class="comment">// 8</span>
<a name="l00066"></a>00066 <span class="comment">// Callback called after</span>
<a name="l00067"></a>00067 s32 (*cbRegAfter)(s32, s32, <span class="keywordtype">void</span>*, <span class="keywordtype">void</span>*); <span class="comment">// 12</span>
<a name="l00068"></a>00068 <span class="comment">// Callback called before resetting handler to 0</span>
<a name="l00069"></a>00069 s32 (*cbRelBefore)(s32, s32); <span class="comment">// 16</span>
<a name="l00070"></a>00070 <span class="comment">// Callback called after</span>
<a name="l00071"></a>00071 s32 (*cbRelAfter)(s32, s32); <span class="comment">// 20</span>
<a name="l00072"></a>00072 s32 (*cbEnable)(s32, s32); <span class="comment">// 24</span>
<a name="l00073"></a>00073 s32 (*cbDisable)(s32, s32); <span class="comment">// 28</span>
<a name="l00074"></a>00074 s32 (*cbSuspend)(s32, s32, s32*); <span class="comment">// 32</span>
<a name="l00075"></a>00075 s32 (*cbResume)(s32, s32, s32); <span class="comment">// 36</span>
<a name="l00076"></a>00076 s32 (*cbIsOccured)(s32, s32); <span class="comment">// 40</span>
<a name="l00077"></a>00077 } SceIntrCb; <span class="comment">// Size: 44</span>
<a name="l00078"></a>00078
<a name="l00079"></a>00079 <span class="comment">// Arg4 in sceKernelRegisterIntrHandler()</span>
<a name="l00080"></a>00080 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00081"></a>00081 <span class="comment">// Handler address, sometimes OR&#39;ed with 2 ?!?</span>
<a name="l00082"></a>00082 s32 handler; <span class="comment">// 0</span>
<a name="l00083"></a>00083 <span class="comment">// GP of the module</span>
<a name="l00084"></a>00084 s32 gp; <span class="comment">// 4</span>
<a name="l00085"></a>00085 <span class="comment">// Argument given by sceKernelRegisterIntrHandler</span>
<a name="l00086"></a>00086 <span class="keywordtype">void</span> *arg; <span class="comment">// 8</span>
<a name="l00087"></a>00087 s32 u12, u16, u20, u24, u28, u32, u36;
<a name="l00088"></a>00088 <span class="comment">// Pointer to sub interrupts</span>
<a name="l00089"></a>00089 SubInterrupt *subIntrs; <span class="comment">// 40</span>
<a name="l00090"></a>00090 <span class="comment">// Some value set by sceKernelRegisterIntrHandler, using arg4 SubIntrInfo.callbacks, contains some handlers ran by sceKernelRegisterSubIntrHandler</span>
<a name="l00091"></a>00091 SceIntrCb *cb; <span class="comment">// 44</span>
<a name="l00092"></a>00092 <span class="comment">// InterruptManagerForKernel_D01EAA3F changes a bit depending on arg1, sceKernelRegisterIntrHandler changes some also; lower byte is the max number of sub interrupts</span>
<a name="l00093"></a>00093 s32 v48; <span class="comment">// 48</span>
<a name="l00094"></a>00094 s32 u52, u56, u60;
<a name="l00095"></a>00095 } Interrupt; <span class="comment">// Size: 64</span>
<a name="l00096"></a>00096
<a name="l00097"></a>00097 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00098"></a>00098 s32 size; <span class="comment">// must be 12</span>
<a name="l00099"></a>00099 s32 numSubIntrs; <span class="comment">// 4</span>
<a name="l00100"></a>00100 SceIntrCb *callbacks; <span class="comment">// 8</span>
<a name="l00101"></a>00101 } SubIntrInfo; <span class="comment">// Size: 12</span>
<a name="l00102"></a>00102
<a name="l00103"></a>00103 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00104"></a>00104 s32 size;
<a name="l00105"></a>00105 s32 attr;
<a name="l00106"></a>00106 <span class="keywordtype">void</span> *cb;
<a name="l00107"></a>00107 } SceIntrHandler;
<a name="l00108"></a>00108
<a name="l00109"></a>00109 <span class="keyword">typedef</span> s32 (*MonitorCb)(s32 intrNum, s32 subIntrNum, s32, s32, s32, s32, s8);
<a name="l00110"></a>00110
<a name="l00111"></a>00111 s32 sceKernelRegisterIntrHandler(s32 intrNum, s32 arg1, <span class="keywordtype">void</span> *func, <span class="keywordtype">void</span> *arg3, SceIntrHandler *handler);
<a name="l00112"></a>00112 s32 sceKernelSetUserModeIntrHanlerAcceptable(s32 intrNum, s32 subIntrNum, s32 setBit);
<a name="l00113"></a>00113 s32 sceKernelReleaseIntrHandler(s32 intrNum);
<a name="l00114"></a>00114 s32 sceKernelSetIntrLevel(s32 intrNum, s32 num);
<a name="l00115"></a>00115 s32 sceKernelSetIntrLogging(s32 intrNum, s32 arg1);
<a name="l00116"></a>00116 s32 sceKernelEnableIntr(s32 intNum);
<a name="l00117"></a>00117 s32 sceKernelSuspendIntr(s32 arg0, s32 *arg1);
<a name="l00118"></a>00118 s32 sceKernelResumeIntr(s32 intrNum, s32 arg1);
<a name="l00119"></a>00119 <span class="keywordtype">void</span> ReleaseContextHooks();
<a name="l00120"></a>00120 <span class="keywordtype">void</span> InterruptManagerForKernel_E790EAED(s32 (*arg0)(), s32 (*arg1)());
<a name="l00121"></a>00121 s32 sceKernelCallSubIntrHandler(s32 intrNum, s32 subIntrNum, s32 arg2, s32 arg3);
<a name="l00122"></a>00122 s32 sceKernelGetUserIntrStack();
<a name="l00123"></a>00123 s32 sceKernelRegisterSubIntrHandler(s32 intrNum, s32 subIntrNum, <span class="keywordtype">void</span> *handler, <span class="keywordtype">void</span> *arg);
<a name="l00124"></a>00124 s32 sceKernelReleaseSubIntrHandler(s32 intrNum, s32 subIntrNum);
<a name="l00125"></a>00125 s32 sceKernelEnableSubIntr(s32 intrNum, s32 subIntrNum);
<a name="l00126"></a>00126 s32 sceKernelDisableSubIntr(s32 intrNum, s32 subIntrNum);
<a name="l00127"></a>00127 s32 sceKernelSuspendSubIntr(s32 intrNum, s32 subIntrNum, s32 *arg2);
<a name="l00128"></a>00128 s32 sceKernelResumeSubIntr(s32 intrNum, s32 subIntrNum, s32 arg2);
<a name="l00129"></a>00129 s32 sceKernelIsSubInterruptOccured(s32 intrNum, s32 subIntrNum);
<a name="l00130"></a>00130 s32 sceKernelQueryIntrHandlerInfo(s32 intrNum, s32 subIntrNum, s32 out);
<a name="l00131"></a>00131 s32 sceKernelSetPrimarySyscallHandler(s32 syscallId, <span class="keywordtype">void</span> (*syscall)());
<a name="l00132"></a>00132 <span class="keywordtype">void</span> sceKernelCpuEnableIntr();
<a name="l00133"></a>00133 s32 InterruptManagerForKernel_6FCBA912(s32 <span class="keyword">set</span>);
<a name="l00134"></a>00134 s32 sceKernelClearIntrLogging(s32 intrNum);
<a name="l00135"></a>00135 s32 sceKernelIsInterruptOccurred(s32 intrNum);
<a name="l00136"></a>00136 s32 sceKernelDisableIntr(s32 intrNum);
<a name="l00137"></a>00137 <span class="keywordtype">void</span> RegisterSubIntrruptMonitor(MonitorCb before, MonitorCb after);
<a name="l00138"></a>00138 <span class="keywordtype">void</span> ReleaseSubIntrruptMonitor();
<a name="l00139"></a>00139 s32 UnSupportIntr(s32 intrNum);
<a name="l00140"></a>00140 s32 InterruptManagerForKernel_8DFBD787();
<a name="l00141"></a>00141 s32 QueryIntrHandlerInfoForUser();
<a name="l00142"></a>00142 s32 sceKernelRegisterUserSpaceIntrStack(s32 addr, s32 size, s32 arg2);
<a name="l00143"></a>00143 s32 sceKernelGetCpuClockCounter();
<a name="l00144"></a>00144 u64 sceKernelGetCpuClockCounterWide();
<a name="l00145"></a>00145 u32 _sceKernelGetCpuClockCounterLow();
<a name="l00146"></a>00146 s32 sceKernelRegisterSystemCallTable(<a class="code" href="structSceSyscallTable.html">SceSyscallTable</a> *newMap);
<a name="l00147"></a>00147 s32 sceKernelQuerySystemCall(<span class="keywordtype">void</span> (*sysc)());
<a name="l00148"></a>00148 <span class="keywordtype">void</span> InterruptManagerForKernel_E526B767(s32 arg);
<a name="l00149"></a>00149 s32 sceKernelGetSyscallRA(<span class="keywordtype">void</span>);
<a name="l00150"></a>00150 s32 <a class="code" href="group__UsersystemLib.html#ga20367eeefab6198dc1d7f6791d020075">sceKernelCpuSuspendIntr</a>(<span class="keywordtype">void</span>);
<a name="l00151"></a>00151 <span class="keywordtype">void</span> <a class="code" href="group__UsersystemLib.html#ga944ecd9597a355cc700f3f811d40d3ed">sceKernelCpuResumeIntr</a>(s32 intr);
<a name="l00152"></a>00152 <span class="keywordtype">void</span> <a class="code" href="group__UsersystemLib.html#gaeffc8cbe0a840a61390159b851b47cd4">sceKernelCpuResumeIntrWithSync</a>(s32 intr);
<a name="l00153"></a>00153 s32 sceKernelIsIntrContext(<span class="keywordtype">void</span>);
<a name="l00154"></a>00154 <span class="keywordtype">int</span> sceKernelCallUserIntrHandler(<span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>);
<a name="l00155"></a>00155
</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>