mirror of
https://github.com/joel16/uofw.git
synced 2024-11-23 19:49:58 +00:00
221 lines
17 KiB
HTML
221 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/common/module.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 Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="annotated.html"><span>Data 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 List</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">/home/travis/build/uofw/uofw/include/common/module.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 COMMON_INCLUDED</span>
|
|
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor"># error "Only include common_imp.h or common_header.h!"</span>
|
|
<a name="l00007"></a>00007 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
|
<a name="l00008"></a>00008 <span class="preprocessor"></span>
|
|
<a name="l00009"></a>00009 <span class="preprocessor">#include "../pspmoduleexport.h"</span>
|
|
<a name="l00010"></a>00010
|
|
<a name="l00012"></a>00012 <span class="preprocessor">#define SCE_MODULE_NAME_LEN (27)</span>
|
|
<a name="l00013"></a>00013 <span class="preprocessor"></span>
|
|
<a name="l00015"></a>00015 <span class="preprocessor">#define MODULE_VERSION_MINOR (0)</span>
|
|
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define MODULE_VERSION_MAJOR (1)</span>
|
|
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define MODULE_VERSION_NUMBER_CATEGORY_SIZE (2) </span><span class="comment">/* current number category size */</span>
|
|
<a name="l00018"></a>00018
|
|
<a name="l00020"></a><a class="code" href="structSceModuleInfo.html">00020</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
|
|
<a name="l00025"></a><a class="code" href="structSceModuleInfo.html#ac3b0411f08e739faad2963e774f04b06">00025</a> u16 <a class="code" href="structSceModuleInfo.html#ac3b0411f08e739faad2963e774f04b06">modAttribute</a>;
|
|
<a name="l00027"></a><a class="code" href="structSceModuleInfo.html#aad9242b2be4b2e8864bf81560324851e">00027</a> u8 modVersion[MODULE_VERSION_NUMBER_CATEGORY_SIZE];
|
|
<a name="l00029"></a><a class="code" href="structSceModuleInfo.html#a7db7c60a7a6535cec7bda124b6318d48">00029</a> <span class="keywordtype">char</span> modName[SCE_MODULE_NAME_LEN];
|
|
<a name="l00031"></a><a class="code" href="structSceModuleInfo.html#a6a51a781ef899635458acc6d0c223461">00031</a> s8 <a class="code" href="structSceModuleInfo.html#a6a51a781ef899635458acc6d0c223461">terminal</a>;
|
|
<a name="l00033"></a><a class="code" href="structSceModuleInfo.html#a8b816358995dc777b3aa9af2f46750cf">00033</a> <span class="keywordtype">void</span> *<a class="code" href="structSceModuleInfo.html#a8b816358995dc777b3aa9af2f46750cf">gpValue</a>;
|
|
<a name="l00038"></a><a class="code" href="structSceModuleInfo.html#a81484232e97526d78929d7f6ea2a7aff">00038</a> <span class="keywordtype">void</span> *<a class="code" href="structSceModuleInfo.html#a81484232e97526d78929d7f6ea2a7aff">entTop</a>;
|
|
<a name="l00043"></a><a class="code" href="structSceModuleInfo.html#af8eaaf8d08218b3bea5c690be14c5713">00043</a> <span class="keywordtype">void</span> *<a class="code" href="structSceModuleInfo.html#af8eaaf8d08218b3bea5c690be14c5713">entEnd</a>;
|
|
<a name="l00048"></a><a class="code" href="structSceModuleInfo.html#afd8a984a55a3fdae370bd4b4c893e2e4">00048</a> <span class="keywordtype">void</span> *<a class="code" href="structSceModuleInfo.html#afd8a984a55a3fdae370bd4b4c893e2e4">stubTop</a>;
|
|
<a name="l00053"></a><a class="code" href="structSceModuleInfo.html#a078c34a757e0866e799fc0de94766845">00053</a> <span class="keywordtype">void</span> *<a class="code" href="structSceModuleInfo.html#a078c34a757e0866e799fc0de94766845">stubEnd</a>;
|
|
<a name="l00054"></a>00054 } <a class="code" href="structSceModuleInfo.html">SceModuleInfo</a>;
|
|
<a name="l00055"></a>00055
|
|
<a name="l00056"></a>00056 <span class="comment">/* </span>
|
|
<a name="l00057"></a>00057 <span class="comment"> * Entry thread structure - an entry thread is used for executing the </span>
|
|
<a name="l00058"></a>00058 <span class="comment"> * module entry functions. </span>
|
|
<a name="l00059"></a>00059 <span class="comment"> */</span>
|
|
<a name="l00060"></a>00060 <span class="keyword">typedef</span> <span class="keyword">struct </span>{
|
|
<a name="l00061"></a>00061 <span class="comment">/* The number of entry thread parameters, typically 3. */</span>
|
|
<a name="l00062"></a>00062 u32 numParams;
|
|
<a name="l00063"></a>00063 <span class="comment">/* The initial priority of the entry thread. */</span>
|
|
<a name="l00064"></a>00064 u32 initPriority;
|
|
<a name="l00065"></a>00065 <span class="comment">/* The stack size of the entry thread. */</span>
|
|
<a name="l00066"></a>00066 u32 stackSize;
|
|
<a name="l00067"></a>00067 <span class="comment">/* The attributes of the entry thread. */</span>
|
|
<a name="l00068"></a>00068 u32 attr;
|
|
<a name="l00069"></a>00069 } SceModuleEntryThread;
|
|
<a name="l00070"></a>00070
|
|
<a name="l00071"></a>00071 <span class="keyword">extern</span> <span class="keywordtype">char</span> _gp[];
|
|
<a name="l00072"></a>00072
|
|
<a name="l00076"></a>00076 <span class="keyword">enum</span> SceModuleAttribute {
|
|
<a name="l00078"></a>00078 SCE_MODULE_ATTR_NONE = 0x0000,
|
|
<a name="l00080"></a>00080 SCE_MODULE_ATTR_CANT_STOP = 0x0001,
|
|
<a name="l00085"></a>00085 SCE_MODULE_ATTR_EXCLUSIVE_LOAD = 0x0002,
|
|
<a name="l00090"></a>00090 SCE_MODULE_ATTR_EXCLUSIVE_START = 0x0004,
|
|
<a name="l00091"></a>00091 };
|
|
<a name="l00092"></a>00092
|
|
<a name="l00097"></a>00097 <span class="keyword">enum</span> SceModulePrivilegeLevel {
|
|
<a name="l00099"></a>00099 SCE_MODULE_USER = 0x0000,
|
|
<a name="l00101"></a>00101 SCE_MODULE_MS = 0x0200,
|
|
<a name="l00103"></a>00103 SCE_MODULE_USB_WLAN = 0x0400,
|
|
<a name="l00105"></a>00105 SCE_MODULE_APP = 0x0600,
|
|
<a name="l00107"></a>00107 SCE_MODULE_VSH = 0x0800,
|
|
<a name="l00109"></a>00109 SCE_MODULE_KERNEL = 0x1000,
|
|
<a name="l00111"></a>00111 SCE_MODULE_KIRK_MEMLMD_LIB = 0x2000,
|
|
<a name="l00113"></a>00113 SCE_MODULE_KIRK_SEMAPHORE_LIB = 0x4000,
|
|
<a name="l00114"></a>00114 };
|
|
<a name="l00115"></a>00115
|
|
<a name="l00116"></a>00116 <span class="preprocessor">#define SCE_MODINFO_SECTION_NAME ".rodata.sceModuleInfo"</span>
|
|
<a name="l00117"></a>00117 <span class="preprocessor"></span>
|
|
<a name="l00119"></a>00119 <span class="preprocessor">#define SDK_VERSION 0x06060010</span>
|
|
<a name="l00120"></a>00120 <span class="preprocessor"></span><span class="preprocessor">#define SCE_SDK_VERSION(ver) const int module_sdk_version = ver</span>
|
|
<a name="l00121"></a>00121 <span class="preprocessor"></span>
|
|
<a name="l00122"></a>00122 <span class="preprocessor">#define SCE_MODULE_BOOTSTART(name) int module_start(int arglen, void *argp) __attribute__((alias(name))); \</span>
|
|
<a name="l00123"></a>00123 <span class="preprocessor"> int module_bootstart(int arglen, void *argp) __attribute__((alias(name)))</span>
|
|
<a name="l00124"></a>00124 <span class="preprocessor"></span>
|
|
<a name="l00125"></a>00125 <span class="preprocessor">#define SCE_MODULE_REBOOT_BEFORE(name) int module_reboot_before(void) __attribute__((alias(name)))</span>
|
|
<a name="l00126"></a>00126 <span class="preprocessor"></span><span class="preprocessor">#define SCE_MODULE_REBOOT_PHASE(name) int module_reboot_phase(void) __attribute__((alias(name)))</span>
|
|
<a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#define SCE_MODULE_STOP(name) int module_stop(void) __attribute__((alias(name)))</span>
|
|
<a name="l00128"></a>00128 <span class="preprocessor"></span>
|
|
<a name="l00129"></a>00129 <span class="preprocessor">#define SCE_MODULE_INFO(name, attributes, majorVersion, minorVersion) \</span>
|
|
<a name="l00130"></a>00130 <span class="preprocessor"> __asm__ ( \</span>
|
|
<a name="l00131"></a>00131 <span class="preprocessor"> " .set push\n" \</span>
|
|
<a name="l00132"></a>00132 <span class="preprocessor"> " .section .lib.ent.top, \"a\", @progbits\n" \</span>
|
|
<a name="l00133"></a>00133 <span class="preprocessor"> " .align 2\n" \</span>
|
|
<a name="l00134"></a>00134 <span class="preprocessor"> " .word 0\n" \</span>
|
|
<a name="l00135"></a>00135 <span class="preprocessor"> "__lib_ent_top:\n" \</span>
|
|
<a name="l00136"></a>00136 <span class="preprocessor"> " .section .lib.ent.btm, \"a\", @progbits\n" \</span>
|
|
<a name="l00137"></a>00137 <span class="preprocessor"> " .align 2\n" \</span>
|
|
<a name="l00138"></a>00138 <span class="preprocessor"> "__lib_ent_bottom:\n" \</span>
|
|
<a name="l00139"></a>00139 <span class="preprocessor"> " .word 0\n" \</span>
|
|
<a name="l00140"></a>00140 <span class="preprocessor"> " .section .lib.stub.top, \"a\", @progbits\n" \</span>
|
|
<a name="l00141"></a>00141 <span class="preprocessor"> " .align 2\n" \</span>
|
|
<a name="l00142"></a>00142 <span class="preprocessor"> " .word 0\n" \</span>
|
|
<a name="l00143"></a>00143 <span class="preprocessor"> "__lib_stub_top:\n" \</span>
|
|
<a name="l00144"></a>00144 <span class="preprocessor"> " .section .lib.stub.btm, \"a\", @progbits\n" \</span>
|
|
<a name="l00145"></a>00145 <span class="preprocessor"> " .align 2\n" \</span>
|
|
<a name="l00146"></a>00146 <span class="preprocessor"> "__lib_stub_bottom:\n" \</span>
|
|
<a name="l00147"></a>00147 <span class="preprocessor"> " .word 0\n" \</span>
|
|
<a name="l00148"></a>00148 <span class="preprocessor"> " .set pop\n" \</span>
|
|
<a name="l00149"></a>00149 <span class="preprocessor"> " .text\n" \</span>
|
|
<a name="l00150"></a>00150 <span class="preprocessor"> ); \</span>
|
|
<a name="l00151"></a>00151 <span class="preprocessor"> extern char __lib_ent_top[], __lib_ent_bottom[]; \</span>
|
|
<a name="l00152"></a>00152 <span class="preprocessor"> extern char __lib_stub_top[], __lib_stub_bottom[]; \</span>
|
|
<a name="l00153"></a>00153 <span class="preprocessor"> const SceModuleInfo module_info \</span>
|
|
<a name="l00154"></a>00154 <span class="preprocessor"> __attribute__((section(SCE_MODINFO_SECTION_NAME), \</span>
|
|
<a name="l00155"></a>00155 <span class="preprocessor"> aligned(16), unused)) = { \</span>
|
|
<a name="l00156"></a>00156 <span class="preprocessor"> attributes, { minorVersion, majorVersion }, name, 0, _gp, \</span>
|
|
<a name="l00157"></a>00157 <span class="preprocessor"> __lib_ent_top, __lib_ent_bottom, \</span>
|
|
<a name="l00158"></a>00158 <span class="preprocessor"> __lib_stub_top, __lib_stub_bottom \</span>
|
|
<a name="l00159"></a>00159 <span class="preprocessor"> }</span>
|
|
<a name="l00160"></a>00160 <span class="preprocessor"></span>
|
|
<a name="l00161"></a>00161 <span class="preprocessor">#define SCE_MODULE_START_THREAD_PARAMETER(numParams, initPriority, stackSize, attr) \</span>
|
|
<a name="l00162"></a>00162 <span class="preprocessor"> const SceModuleEntryThread module_start_thread_parameter = { numParams, initPriority, stackSize, attr };</span>
|
|
<a name="l00163"></a>00163 <span class="preprocessor"></span>
|
|
<a name="l00164"></a>00164 <span class="preprocessor">#define SCE_MODULE_STOP_THREAD_PARAMETER(numParams, initPriority, stackSize, attr) \</span>
|
|
<a name="l00165"></a>00165 <span class="preprocessor"> const SceModuleEntryThread module_stop_thread_parameter = { numParams, initPriority, stackSize, attr };</span>
|
|
<a name="l00166"></a>00166 <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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </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 Sun May 24 2015 20:06:21 for uOFW by  <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>
|