wut/codegen_8h_source.html

146 lines
15 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>wut: /home/runner/work/wut/wut/include/coreinit/codegen.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 id="projectrow">
<td id="projectalign">
<div id="projectname">wut<span id="projectnumber">&#160;v1.9.1</span>
</div>
<div id="projectbrief">Wii U Toolchain</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<!-- 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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</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">codegen.h</div></div>
</div><!--header-->
<div class="contents">
<a href="codegen_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include &lt;<a class="code" href="wut_8h.html">wut.h</a>&gt;</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="foldopen" id="foldopen00034" data-start="{" data-end="};">
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="group__coreinit__codegen.html#ga71a49a79e47963f81655cc0381c9658f"> 34</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code hl_enumeration" href="group__coreinit__codegen.html#ga71a49a79e47963f81655cc0381c9658f">OSCodegenSecMode</a></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span>{</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="group__coreinit__codegen.html#gga71a49a79e47963f81655cc0381c9658fa283eddc240c8b49af5568b91c5f35c73"> 37</a></span> <a class="code hl_enumvalue" href="group__coreinit__codegen.html#gga71a49a79e47963f81655cc0381c9658fa283eddc240c8b49af5568b91c5f35c73">CODEGEN_RW_</a> = 0,</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="group__coreinit__codegen.html#gga71a49a79e47963f81655cc0381c9658facafba395111808a76182dd9c74d5545e"> 39</a></span> <a class="code hl_enumvalue" href="group__coreinit__codegen.html#gga71a49a79e47963f81655cc0381c9658facafba395111808a76182dd9c74d5545e">CODEGEN_R_X</a> = 1,</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="group__coreinit__codegen.html#ga44ea1e92974661e06fccbf783a2b5453"> 40</a></span>} <a class="code hl_enumeration" href="group__coreinit__codegen.html#ga71a49a79e47963f81655cc0381c9658f">OSCodegenSecMode</a>;</div>
</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="keywordtype">void</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="group__coreinit__codegen.html#gaba8e02bb92e19de34cea242eeee5e327"> 57</a></span><a class="code hl_function" href="group__coreinit__codegen.html#gaba8e02bb92e19de34cea242eeee5e327">OSGetCodegenVirtAddrRange</a>(<span class="keywordtype">void</span> **outVirtualAddress,</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> uint32_t *outSize);</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>uint32_t</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="group__coreinit__codegen.html#gad621a18bf8f5173658f8cc8717d2495a"> 72</a></span><a class="code hl_function" href="group__coreinit__codegen.html#gad621a18bf8f5173658f8cc8717d2495a">OSGetCodegenCore</a>();</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span>uint32_t</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"><a class="line" href="group__coreinit__codegen.html#gaf23cfcb6c33a574b7c88946e1fd3d942"> 75</a></span><a class="code hl_function" href="group__coreinit__codegen.html#gaf23cfcb6c33a574b7c88946e1fd3d942">OSGetCodegenMode</a>();</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><a class="code hl_typedef" href="wut__types_8h.html#a975dbe9e4396bf9e0064ce01827fa372">BOOL</a></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"><a class="line" href="group__coreinit__codegen.html#ga3d4d83b25c330418afe3293147b5ff58"> 89</a></span><a class="code hl_function" href="group__coreinit__codegen.html#ga3d4d83b25c330418afe3293147b5ff58">OSSwitchSecCodeGenMode</a>(<a class="code hl_enumeration" href="group__coreinit__codegen.html#ga71a49a79e47963f81655cc0381c9658f">OSCodegenSecMode</a> mode);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="comment">//TODO: online docs imply this returns true if codegen is *enabled*, though the</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="comment">//name would imply it gets rw/rx status.</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span>uint32_t</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="group__coreinit__codegen.html#ga3a951fec2cd23ca91ca56fc646f34b6b"> 94</a></span><a class="code hl_function" href="group__coreinit__codegen.html#ga3a951fec2cd23ca91ca56fc646f34b6b">OSGetSecCodeGenMode</a>();</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><a class="code hl_typedef" href="wut__types_8h.html#a975dbe9e4396bf9e0064ce01827fa372">BOOL</a></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"><a class="line" href="group__coreinit__codegen.html#ga348ef2b95998b4ad0b171db8f13884e5"> 123</a></span><a class="code hl_function" href="group__coreinit__codegen.html#ga348ef2b95998b4ad0b171db8f13884e5">OSCodegenCopy</a>(<span class="keywordtype">void</span> *dst,</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordtype">void</span> *src,</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordtype">size_t</span> size);</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span>}</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
<div class="ttc" id="agroup__coreinit__codegen_html_ga348ef2b95998b4ad0b171db8f13884e5"><div class="ttname"><a href="group__coreinit__codegen.html#ga348ef2b95998b4ad0b171db8f13884e5">OSCodegenCopy</a></div><div class="ttdeci">BOOL OSCodegenCopy(void *dst, void *src, size_t size)</div><div class="ttdoc">Copies data from normal memory into the codegen area, leaving the area in CODEGEN_R_X mode.</div></div>
<div class="ttc" id="agroup__coreinit__codegen_html_ga3a951fec2cd23ca91ca56fc646f34b6b"><div class="ttname"><a href="group__coreinit__codegen.html#ga3a951fec2cd23ca91ca56fc646f34b6b">OSGetSecCodeGenMode</a></div><div class="ttdeci">uint32_t OSGetSecCodeGenMode()</div></div>
<div class="ttc" id="agroup__coreinit__codegen_html_ga3d4d83b25c330418afe3293147b5ff58"><div class="ttname"><a href="group__coreinit__codegen.html#ga3d4d83b25c330418afe3293147b5ff58">OSSwitchSecCodeGenMode</a></div><div class="ttdeci">BOOL OSSwitchSecCodeGenMode(OSCodegenSecMode mode)</div><div class="ttdoc">Switches the permissions on the codegen memory area.</div></div>
<div class="ttc" id="agroup__coreinit__codegen_html_ga71a49a79e47963f81655cc0381c9658f"><div class="ttname"><a href="group__coreinit__codegen.html#ga71a49a79e47963f81655cc0381c9658f">OSCodegenSecMode</a></div><div class="ttdeci">OSCodegenSecMode</div><div class="ttdoc">The memory permissions for the codegen area.</div><div class="ttdef"><b>Definition</b> <a href="codegen_8h_source.html#l00034">codegen.h:35</a></div></div>
<div class="ttc" id="agroup__coreinit__codegen_html_gaba8e02bb92e19de34cea242eeee5e327"><div class="ttname"><a href="group__coreinit__codegen.html#gaba8e02bb92e19de34cea242eeee5e327">OSGetCodegenVirtAddrRange</a></div><div class="ttdeci">void OSGetCodegenVirtAddrRange(void **outVirtualAddress, uint32_t *outSize)</div><div class="ttdoc">Gets the location and size of codegen memory, if available.</div></div>
<div class="ttc" id="agroup__coreinit__codegen_html_gad621a18bf8f5173658f8cc8717d2495a"><div class="ttname"><a href="group__coreinit__codegen.html#gad621a18bf8f5173658f8cc8717d2495a">OSGetCodegenCore</a></div><div class="ttdeci">uint32_t OSGetCodegenCore()</div><div class="ttdoc">Gets the CPU core that's allowed to use codegen.</div></div>
<div class="ttc" id="agroup__coreinit__codegen_html_gaf23cfcb6c33a574b7c88946e1fd3d942"><div class="ttname"><a href="group__coreinit__codegen.html#gaf23cfcb6c33a574b7c88946e1fd3d942">OSGetCodegenMode</a></div><div class="ttdeci">uint32_t OSGetCodegenMode()</div></div>
<div class="ttc" id="agroup__coreinit__codegen_html_gga71a49a79e47963f81655cc0381c9658fa283eddc240c8b49af5568b91c5f35c73"><div class="ttname"><a href="group__coreinit__codegen.html#gga71a49a79e47963f81655cc0381c9658fa283eddc240c8b49af5568b91c5f35c73">CODEGEN_RW_</a></div><div class="ttdeci">@ CODEGEN_RW_</div><div class="ttdoc">The area can be read or written to, but not executed.</div><div class="ttdef"><b>Definition</b> <a href="codegen_8h_source.html#l00037">codegen.h:37</a></div></div>
<div class="ttc" id="agroup__coreinit__codegen_html_gga71a49a79e47963f81655cc0381c9658facafba395111808a76182dd9c74d5545e"><div class="ttname"><a href="group__coreinit__codegen.html#gga71a49a79e47963f81655cc0381c9658facafba395111808a76182dd9c74d5545e">CODEGEN_R_X</a></div><div class="ttdeci">@ CODEGEN_R_X</div><div class="ttdoc">The area can be read or executed, but not written to.</div><div class="ttdef"><b>Definition</b> <a href="codegen_8h_source.html#l00039">codegen.h:39</a></div></div>
<div class="ttc" id="awut_8h_html"><div class="ttname"><a href="wut_8h.html">wut.h</a></div></div>
<div class="ttc" id="awut__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#l00007">wut_types.h:7</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>