wut/memorymap_8h_source.html
2018-07-26 20:52:03 +10:00

100 lines
19 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"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wut: include/coreinit/memorymap.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">wut
&#160;<span id="projectnumber">1.0.0-alpha</span>
</div>
<div id="projectbrief">Wii U Toolchain</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</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>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_5050f3de292bd66075be80c4b119f1df.html">coreinit</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">memorymap.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="memorymap_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="wut_8h.html">wut.h</a>&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="group__coreinit__memorymap.html#gaec8c3a45030e5489b84183ad8b50f4be"> 15</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="group__coreinit__memorymap.html#gaec8c3a45030e5489b84183ad8b50f4be">OSMemoryMapMode</a></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;{</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4beafef3e905c898e0efa6f54842219031b0"> 17</a></span>&#160; <a class="code" href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4beafef3e905c898e0efa6f54842219031b0">OS_MAP_MEMORY_INVALID</a> = 0,</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4bea13e1f29de202bdefcfe541d503031deb"> 18</a></span>&#160; <a class="code" href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4bea13e1f29de202bdefcfe541d503031deb">OS_MAP_MEMORY_READ_ONLY</a> = 1,</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4bea8632fb7090c908832e2a8deb9e49cd5c"> 19</a></span>&#160; <a class="code" href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4bea8632fb7090c908832e2a8deb9e49cd5c">OS_MAP_MEMORY_READ_WRITE</a> = 2,</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4beacba765e89dabbd816314a279ce098261"> 20</a></span>&#160; <a class="code" href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4beacba765e89dabbd816314a279ce098261">OS_MAP_MEMORY_FREE</a> = 3,</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4bea3922558ab63460f63390ec53199cba03"> 21</a></span>&#160; <a class="code" href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4bea3922558ab63460f63390ec53199cba03">OS_MAP_MEMORY_ALLOCATED</a> = 4,</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;} <a class="code" href="group__coreinit__memorymap.html#gaec8c3a45030e5489b84183ad8b50f4be">OSMemoryMapMode</a>;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="group__coreinit__memorymap.html#ga93b338792824e9803dea3a24ddf7afab"> 24</a></span>&#160;<span class="preprocessor">#define OS_PAGE_SIZE (128 * 1024)</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;uint32_t</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<a class="code" href="group__coreinit__memorymap.html#ga5de23bca9392d8b438861f2ceac173ed">OSEffectiveToPhysical</a>(uint32_t virtualAddress);</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;uint32_t</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<a class="code" href="group__coreinit__memorymap.html#gac9bcf8f9245f0f1e7446f1cafa49698d">OSAllocVirtAddr</a>(uint32_t virtualAddress,</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; uint32_t size,</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; uint32_t align);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;<a class="code" href="wut__types_8h.html#a975dbe9e4396bf9e0064ce01827fa372">BOOL</a></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<a class="code" href="group__coreinit__memorymap.html#gad2f52f8705e306378d875acad0ad0b4d">OSFreeVirtAddr</a>(uint32_t virtualAddress,</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; uint32_t size);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;<a class="code" href="group__coreinit__memorymap.html#gaec8c3a45030e5489b84183ad8b50f4be">OSMemoryMapMode</a></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;<a class="code" href="group__coreinit__memorymap.html#ga38fa261e773bd708f2f02e6e6a6454fb">OSQueryVirtAddr</a>(uint32_t virtualAddress);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;<a class="code" href="wut__types_8h.html#a975dbe9e4396bf9e0064ce01827fa372">BOOL</a></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;<a class="code" href="group__coreinit__memorymap.html#ga7fb12e8bad1c58fe5e19448abde8c979">OSMapMemory</a>(uint32_t virtualAddress,</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; uint32_t physicalAddress,</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; uint32_t size,</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <a class="code" href="group__coreinit__memorymap.html#gaec8c3a45030e5489b84183ad8b50f4be">OSMemoryMapMode</a> mode);</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;<a class="code" href="wut__types_8h.html#a975dbe9e4396bf9e0064ce01827fa372">BOOL</a></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;<a class="code" href="group__coreinit__memorymap.html#ga4fcc6ab7f6031feb27b52ff88ad42fe9">OSUnmapMemory</a>(uint32_t virtualAddress,</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; uint32_t size);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;<a class="code" href="group__coreinit__memorymap.html#ga22e71a472f3db380efda352a2c84c826">OSGetMapVirtAddrRange</a>(uint32_t *outVirtualAddress,</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; uint32_t *outSize);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;<a class="code" href="group__coreinit__memorymap.html#ga1bfa089c8d2c869aa2dc824b688f14f4">OSGetAvailPhysAddrRange</a>(uint32_t *outPhysicalAddress,</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; uint32_t *outSize);</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;<span class="keywordtype">void</span></div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;<a class="code" href="group__coreinit__memorymap.html#ga27856f3b01004398f43f111eceef6c83">OSGetDataPhysAddrRange</a>(uint32_t *outPhysicalAddress,</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; uint32_t *outSize);</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160;}</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="group__coreinit__memorymap_html_ggaec8c3a45030e5489b84183ad8b50f4bea13e1f29de202bdefcfe541d503031deb"><div class="ttname"><a href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4bea13e1f29de202bdefcfe541d503031deb">OS_MAP_MEMORY_READ_ONLY</a></div><div class="ttdef"><b>Definition:</b> <a href="memorymap_8h_source.html#l00018">memorymap.h:18</a></div></div>
<div class="ttc" id="group__coreinit__memorymap_html_ggaec8c3a45030e5489b84183ad8b50f4bea3922558ab63460f63390ec53199cba03"><div class="ttname"><a href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4bea3922558ab63460f63390ec53199cba03">OS_MAP_MEMORY_ALLOCATED</a></div><div class="ttdef"><b>Definition:</b> <a href="memorymap_8h_source.html#l00021">memorymap.h:21</a></div></div>
<div class="ttc" id="group__coreinit__memorymap_html_gaec8c3a45030e5489b84183ad8b50f4be"><div class="ttname"><a href="group__coreinit__memorymap.html#gaec8c3a45030e5489b84183ad8b50f4be">OSMemoryMapMode</a></div><div class="ttdeci">OSMemoryMapMode</div><div class="ttdef"><b>Definition:</b> <a href="memorymap_8h_source.html#l00015">memorymap.h:15</a></div></div>
<div class="ttc" id="group__coreinit__memorymap_html_ga4fcc6ab7f6031feb27b52ff88ad42fe9"><div class="ttname"><a href="group__coreinit__memorymap.html#ga4fcc6ab7f6031feb27b52ff88ad42fe9">OSUnmapMemory</a></div><div class="ttdeci">BOOL OSUnmapMemory(uint32_t virtualAddress, uint32_t size)</div><div class="ttdoc">Unmaps previously mapped memory. </div></div>
<div class="ttc" id="group__coreinit__memorymap_html_ga7fb12e8bad1c58fe5e19448abde8c979"><div class="ttname"><a href="group__coreinit__memorymap.html#ga7fb12e8bad1c58fe5e19448abde8c979">OSMapMemory</a></div><div class="ttdeci">BOOL OSMapMemory(uint32_t virtualAddress, uint32_t physicalAddress, uint32_t size, OSMemoryMapMode mode)</div><div class="ttdoc">Maps a physical address to a virtual address, with a given size and set of permissions. </div></div>
<div class="ttc" id="group__coreinit__memorymap_html_ggaec8c3a45030e5489b84183ad8b50f4beacba765e89dabbd816314a279ce098261"><div class="ttname"><a href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4beacba765e89dabbd816314a279ce098261">OS_MAP_MEMORY_FREE</a></div><div class="ttdef"><b>Definition:</b> <a href="memorymap_8h_source.html#l00020">memorymap.h:20</a></div></div>
<div class="ttc" id="group__coreinit__memorymap_html_gac9bcf8f9245f0f1e7446f1cafa49698d"><div class="ttname"><a href="group__coreinit__memorymap.html#gac9bcf8f9245f0f1e7446f1cafa49698d">OSAllocVirtAddr</a></div><div class="ttdeci">uint32_t OSAllocVirtAddr(uint32_t virtualAddress, uint32_t size, uint32_t align)</div><div class="ttdoc">Allocates virtual address range for later mapping. </div></div>
<div class="ttc" id="wut_8h_html"><div class="ttname"><a href="wut_8h.html">wut.h</a></div></div>
<div class="ttc" id="group__coreinit__memorymap_html_ggaec8c3a45030e5489b84183ad8b50f4bea8632fb7090c908832e2a8deb9e49cd5c"><div class="ttname"><a href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4bea8632fb7090c908832e2a8deb9e49cd5c">OS_MAP_MEMORY_READ_WRITE</a></div><div class="ttdef"><b>Definition:</b> <a href="memorymap_8h_source.html#l00019">memorymap.h:19</a></div></div>
<div class="ttc" id="group__coreinit__memorymap_html_ga22e71a472f3db380efda352a2c84c826"><div class="ttname"><a href="group__coreinit__memorymap.html#ga22e71a472f3db380efda352a2c84c826">OSGetMapVirtAddrRange</a></div><div class="ttdeci">void OSGetMapVirtAddrRange(uint32_t *outVirtualAddress, uint32_t *outSize)</div><div class="ttdoc">Gets the range of virtual addresses available for mapping. </div></div>
<div class="ttc" id="group__coreinit__memorymap_html_ga38fa261e773bd708f2f02e6e6a6454fb"><div class="ttname"><a href="group__coreinit__memorymap.html#ga38fa261e773bd708f2f02e6e6a6454fb">OSQueryVirtAddr</a></div><div class="ttdeci">OSMemoryMapMode OSQueryVirtAddr(uint32_t virtualAddress)</div><div class="ttdoc">Determines the status of the given virtual memory address - mapped read-write or read-only, free, allocated or invalid. </div></div>
<div class="ttc" id="group__coreinit__memorymap_html_ggaec8c3a45030e5489b84183ad8b50f4beafef3e905c898e0efa6f54842219031b0"><div class="ttname"><a href="group__coreinit__memorymap.html#ggaec8c3a45030e5489b84183ad8b50f4beafef3e905c898e0efa6f54842219031b0">OS_MAP_MEMORY_INVALID</a></div><div class="ttdef"><b>Definition:</b> <a href="memorymap_8h_source.html#l00017">memorymap.h:17</a></div></div>
<div class="ttc" id="wut__types_8h_html_a975dbe9e4396bf9e0064ce01827fa372"><div class="ttname"><a href="wut__types_8h.html#a975dbe9e4396bf9e0064ce01827fa372">BOOL</a></div><div class="ttdeci">int32_t BOOL</div><div class="ttdef"><b>Definition:</b> <a href="wut__types_8h_source.html#l00004">wut_types.h:4</a></div></div>
<div class="ttc" id="group__coreinit__memorymap_html_ga27856f3b01004398f43f111eceef6c83"><div class="ttname"><a href="group__coreinit__memorymap.html#ga27856f3b01004398f43f111eceef6c83">OSGetDataPhysAddrRange</a></div><div class="ttdeci">void OSGetDataPhysAddrRange(uint32_t *outPhysicalAddress, uint32_t *outSize)</div><div class="ttdoc">Gets the range of physical memory used for the application&amp;#39;s data. </div></div>
<div class="ttc" id="group__coreinit__memorymap_html_ga1bfa089c8d2c869aa2dc824b688f14f4"><div class="ttname"><a href="group__coreinit__memorymap.html#ga1bfa089c8d2c869aa2dc824b688f14f4">OSGetAvailPhysAddrRange</a></div><div class="ttdeci">void OSGetAvailPhysAddrRange(uint32_t *outPhysicalAddress, uint32_t *outSize)</div><div class="ttdoc">Gets the range of available physical memory (not reserved for app code or data). </div></div>
<div class="ttc" id="group__coreinit__memorymap_html_gad2f52f8705e306378d875acad0ad0b4d"><div class="ttname"><a href="group__coreinit__memorymap.html#gad2f52f8705e306378d875acad0ad0b4d">OSFreeVirtAddr</a></div><div class="ttdeci">BOOL OSFreeVirtAddr(uint32_t virtualAddress, uint32_t size)</div><div class="ttdoc">Frees a previously allocated virtual address range back to the system. </div></div>
<div class="ttc" id="group__coreinit__memorymap_html_ga5de23bca9392d8b438861f2ceac173ed"><div class="ttname"><a href="group__coreinit__memorymap.html#ga5de23bca9392d8b438861f2ceac173ed">OSEffectiveToPhysical</a></div><div class="ttdeci">uint32_t OSEffectiveToPhysical(uint32_t virtualAddress)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>