<!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"> <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.16"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>UbixOS: include/vmm/paging.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="../../navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../resize.js"></script> <script type="text/javascript" src="../../navtreedata.js"></script> <script type="text/javascript" src="../../navtree.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</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">UbixOS  <span id="projectnumber">2.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.16 --> <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&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('../../',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('d4/df4/paging_8h_source.html','../../');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">paging.h</div> </div> </div><!--header--> <div class="contents"> <a href="../../d4/df4/paging_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> <span class="comment">/*-</span></div> <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2002-2018 The UbixOS Project.</span></div> <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * All rights reserved.</span></div> <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div> <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * This was developed by Christopher W. Olsen for the UbixOS Project.</span></div> <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> *</span></div> <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * Redistribution and use in source and binary forms, with or without modification, are permitted</span></div> <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * provided that the following conditions are met:</span></div> <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> *</span></div> <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * 1) Redistributions of source code must retain the above copyright notice, this list of</span></div> <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * conditions, the following disclaimer and the list of authors.</span></div> <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * 2) Redistributions in binary form must reproduce the above copyright notice, this list of</span></div> <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * conditions, the following disclaimer and the list of authors in the documentation and/or</span></div> <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * other materials provided with the distribution.</span></div> <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * 3) Neither the name of the UbixOS Project nor the names of its contributors may be used to</span></div> <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * endorse or promote products derived from this software without specific prior written</span></div> <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * permission.</span></div> <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> *</span></div> <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED</span></div> <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS</span></div> <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS</span></div> <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></div> <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,</span></div> <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div> <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT</span></div> <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div> <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> */</span></div> <div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  </div> <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#ifndef _VMM_PAGING_H_</span></div> <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#define _VMM_PAGING_H_</span></div> <div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  </div> <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include <<a class="code" href="../../d0/d27/include_2sys_2types_8h.html">sys/types.h</a>></span></div> <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include <<a class="code" href="../../d3/d7e/sysproto__posix_8h.html">sys/sysproto_posix.h</a>></span></div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include <<a class="code" href="../../db/dd5/thread_8h.html">sys/thread.h</a>></span></div> <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  </div> <div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a850d80ca2291d26b40dc6b25c419f81a"> 36</a></span> <span class="preprocessor">#define PAGE_SHIFT 12 // Page Shift</span></div> <div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a7d467c1d283fdfa1f2081ba1e0d01b6e"> 37</a></span> <span class="preprocessor">#define PAGE_SIZE 0x1000 // Page Size</span></div> <div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#ae4aa620ce57c7c3171b916de2c5f09f2"> 38</a></span> <span class="preprocessor">#define PAGE_MASK (PAGE_SIZE-1) // Page Mask</span></div> <div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  </div> <div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#ac96f9536624cb5d2e7634f37fa919c4c"> 40</a></span> <span class="preprocessor">#define PD_INDEX(v_addr) (v_addr >> 22) // Calc Page Directory Index</span></div> <div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a51c93610d4e70b5449692328dbbe2928"> 41</a></span> <span class="preprocessor">#define PD_OFFSET(v_addr) (v_addr >> 0xA) // Calc Page Directory OFfset</span></div> <div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a2c6e29890bb0209384b6d012db48e2f7"> 42</a></span> <span class="preprocessor">#define PT_INDEX(v_addr) ((v_addr >> 12) & 0x03FF) // Calc Page Table Offset</span></div> <div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#ac1a62d9f7ed5a48f8f710cf006dbc77c"> 43</a></span> <span class="preprocessor">#define PD_BASE_ADDR2 ((PAGE_SIZE << 0xA) + VMM_KERN_START) // Find Out What This Was For</span></div> <div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div> <div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a1b0f37794d3da1a86f1df77e503ed98f"> 45</a></span> <span class="preprocessor">#define PD_BASE_ADDR 0xC0400000 // Page Directory Addressable Base Address</span></div> <div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a8d42a9a09d9dea53cab3044f51482acc"> 46</a></span> <span class="preprocessor">#define PT_BASE_ADDR 0xC0000000 // Page Table Addressable Base Address</span></div> <div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  </div> <div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a91bd4c1c49996222f571b2f53ca00dc4"> 48</a></span> <span class="preprocessor">#define PD_ENTRIES (PAGE_SIZE/4) //Return Page Directory Entries</span></div> <div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#adc9776583e54abf06ae7b99f1f3036a6"> 49</a></span> <span class="preprocessor">#define PT_ENTRIES (PAGE_SIZE/4) //Return Page Table Entries</span></div> <div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  </div> <div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a4ede4e8b3e149ef94678acdae7de0e18"> 51</a></span> <span class="preprocessor">#define VM_THRD 0 // Thread</span></div> <div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a59a518704bf2f0b56603476bcb1eebbf"> 52</a></span> <span class="preprocessor">#define VM_TASK 1 // Task</span></div> <div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  </div> <div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment">// Page Flags</span></div> <div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a122dfc414a40e260fd35dbe9743db26f"> 55</a></span> <span class="preprocessor">#define PAGE_PRESENT 0x00000001</span></div> <div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a559697780e34fd09ba6a2e909f0fe1df"> 56</a></span> <span class="preprocessor">#define PAGE_WRITE 0x00000002</span></div> <div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a2d0253527ea5080d6befe0ee3bde473f"> 57</a></span> <span class="preprocessor">#define PAGE_USER 0x00000004</span></div> <div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#ab392709908a0587bc194c5fe3300237a"> 58</a></span> <span class="preprocessor">#define PAGE_WRITE_THROUGH 0x00000008</span></div> <div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a8d7496f2eb17d3f70143c00c99140e97"> 59</a></span> <span class="preprocessor">#define PAGE_CACHE_DISABLED 0x00000010</span></div> <div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#add0f255a15cf72f5b47251d19092c41d"> 60</a></span> <span class="preprocessor">#define PAGE_ACCESSED 0x00000020</span></div> <div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a0b65338140b4aab20aae2708677df343"> 61</a></span> <span class="preprocessor">#define PAGE_DIRTY 0x00000040</span></div> <div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a0d99c75e51b448fcb97266da4815c63f"> 62</a></span> <span class="preprocessor">#define PAGE_GLOBAL 0x00000080</span></div> <div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#ae583257f64c7549d122d6757c6d51728"> 63</a></span> <span class="preprocessor">#define PAGE_ 0x00000100</span></div> <div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a57d743cb60fe478f6720c42315e7e813"> 64</a></span> <span class="preprocessor">#define PAGE_COW 0x00000200</span></div> <div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a1532db17068ba8d409b8ffe066414af2"> 65</a></span> <span class="preprocessor">#define PAGE_STACK 0x00000400</span></div> <div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a41b733e23eb5b22e1df907b87d6b3996"> 66</a></span> <span class="preprocessor">#define PAGE_WIRED 0x00000800</span></div> <div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  </div> <div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#af0fff7a38cd2c7a32d580787423b94ea"> 68</a></span> <span class="preprocessor">#define PAGE_DEFAULT (PAGE_PRESENT|PAGE_WRITE|PAGE_USER)</span></div> <div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a8b838cda4f0bc79ab8d07eb19dd35420"> 69</a></span> <span class="preprocessor">#define KERNEL_PAGE_DEFAULT (PAGE_PRESENT|PAGE_WRITE)</span></div> <div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  </div> <div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#abd636a9b61ad98f4fc23b1f4a9210d78"> 71</a></span> <span class="preprocessor">#define trunc_page(x) ((x) & ~PAGE_MASK)</span></div> <div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a2702263fcf2b3b026cb26c6d895cb0ee"> 72</a></span> <span class="preprocessor">#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK)</span></div> <div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  </div> <div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a071caea8a82a06e754daca63317d3c07"> 74</a></span> <span class="preprocessor">#define ctob(x) ((x)<<PAGE_SHIFT)</span></div> <div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="../../d4/df4/paging_8h.html#a0851ee42f36c8a00e9eafe739c8ffaaa"> 75</a></span> <span class="preprocessor">#define btoc(x) (((vm_offset_t)(x)+PAGE_MASK)>>PAGE_SHIFT)</span></div> <div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  </div> <div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/df4/paging_8h.html#a917d614e699949c52741b429219ea456">vmmClearVirtualPage</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a> pageAddr);</div> <div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  </div> <div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="keywordtype">void</span> *<a class="code" href="../../d4/df4/paging_8h.html#a715dad65aea26aaf149284fd2432eff9">vmm_mapFromTask</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#ae438ba74394b14d7b24b6df3b3b8c252">pidType</a>, <span class="keywordtype">void</span> *, <a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a>);</div> <div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="keywordtype">void</span> *<a class="code" href="../../d4/df4/paging_8h.html#a5de86e63abae0b406ff4a286b44b109e">vmm_copyVirtualSpace</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#ae438ba74394b14d7b24b6df3b3b8c252">pidType</a>);</div> <div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="keywordtype">void</span> *<a class="code" href="../../d4/df4/paging_8h.html#a7035c695cbbae5799ecc1f9bcab7dd48">vmm_getFreePage</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#ae438ba74394b14d7b24b6df3b3b8c252">pidType</a>);</div> <div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="keywordtype">void</span> *<a class="code" href="../../d4/df4/paging_8h.html#a3615feeeee9f4038cd1070372ccba22e">vmm_getFreeKernelPage</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#ae438ba74394b14d7b24b6df3b3b8c252">pidType</a> pid, <a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a281b4b5562236420969a830503b0ba19">uint16_t</a> count);</div> <div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="keywordtype">void</span> *<a class="code" href="../../d4/df4/paging_8h.html#acd6d1b9b2687749ddd73542f7897696e">vmm_createVirtualSpace</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#ae438ba74394b14d7b24b6df3b3b8c252">pidType</a>);</div> <div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="keywordtype">void</span> *<a class="code" href="../../d4/df4/paging_8h.html#ac5fa0688dfb2237da626a34ad6b36a92">vmm_getFreeVirtualPage</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#ae438ba74394b14d7b24b6df3b3b8c252">pidType</a>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>);</div> <div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  </div> <div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a> <a class="code" href="../../d4/df4/paging_8h.html#a5522eccf81d4630537620209651be16e">vmm_getPhysicalAddr</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a>);</div> <div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a> <a class="code" href="../../d4/df4/paging_8h.html#a17fca9c83854e88d2ca3c0ef8ec687dc">vmm_getRealAddr</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a>);</div> <div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/df4/paging_8h.html#ab060cb62a6dd6d22f63757d72c27c335">vmm_setPageAttributes</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a>, <a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a281b4b5562236420969a830503b0ba19">uint16_t</a>);</div> <div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/df4/paging_8h.html#adea68f248df43bddee62a09d945304b0">vmm_remapPage</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a>, <a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a>, <a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a281b4b5562236420969a830503b0ba19">uint16_t</a>, <a class="code" href="../../d0/d27/include_2sys_2types_8h.html#ae438ba74394b14d7b24b6df3b3b8c252">pidType</a>, <span class="keywordtype">int</span> haveLock);</div> <div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/df4/paging_8h.html#af47a45e3f0802f5aac053808127aaaf1">vmm_pagingInit</a>();</div> <div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">void</span> *<a class="code" href="../../d4/df4/paging_8h.html#a6d09af2e4df8a7165caa4c4b1895e87c">vmm_getFreeMallocPage</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a281b4b5562236420969a830503b0ba19">uint16_t</a> count);</div> <div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment">//void vmm_pageFault( uint32_t, uint32_t, uint32_t );</span></div> <div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/df4/paging_8h.html#aa1e1475b5bc5c935c2dfc9907c95bf96">vmm_pageFault</a>(<span class="keyword">struct</span> <a class="code" href="../../df/d05/structtrapframe.html">trapframe</a> *, <a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a>);</div> <div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/df4/paging_8h.html#a15b43ccb21abdb9e0a41acb82b260a99">_vmm_pageFault</a>();</div> <div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/df4/paging_8h.html#a0d45ce836c8a731beef7b3fd972d16fd">mmap</a>(<span class="keyword">struct</span> <a class="code" href="../../d3/dc5/structthread.html">thread</a> *, <span class="keyword">struct</span> <a class="code" href="../../dc/d11/structsys__mmap__args.html">sys_mmap_args</a> *);</div> <div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/df4/paging_8h.html#a8d8ba1d847eb4dbeb26a3c1077ab1981">obreak</a>(<span class="keyword">struct</span> <a class="code" href="../../d3/dc5/structthread.html">thread</a> *, <span class="keyword">struct</span> <a class="code" href="../../d6/d23/structobreak__args.html">obreak_args</a> *);</div> <div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/df4/paging_8h.html#a3b8f1043eab8384fb5b4be1a4a4245ce">munmap</a>(<span class="keyword">struct</span> <a class="code" href="../../d3/dc5/structthread.html">thread</a> *, <span class="keyword">struct</span> <a class="code" href="../../d2/d19/structsys__munmap__args.html">sys_munmap_args</a> *);</div> <div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  </div> <div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/df4/paging_8h.html#adf104ab2196331b538186550cb7ada3e">vmm_cleanVirtualSpace</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a>);</div> <div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="keywordtype">void</span> *<a class="code" href="../../d4/df4/paging_8h.html#ac5fa0688dfb2237da626a34ad6b36a92">vmm_getFreeVirtualPage</a>(<a class="code" href="../../d0/d27/include_2sys_2types_8h.html#ae438ba74394b14d7b24b6df3b3b8c252">pidType</a> pid, <span class="keywordtype">int</span> count, <span class="keywordtype">int</span> type);</div> <div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  </div> <div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="keyword">extern</span> <a class="code" href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a> *<a class="code" href="../../d4/df4/paging_8h.html#a7c58070dedac2ee9e1c73d8c8206b923">kernelPageDirectory</a>;</div> <div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  </div> <div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="preprocessor">#endif</span></div> </div><!-- fragment --></div><!-- contents --> </div><!-- doc-content --> <div class="ttc" id="apaging_8h_html_adf104ab2196331b538186550cb7ada3e"><div class="ttname"><a href="../../d4/df4/paging_8h.html#adf104ab2196331b538186550cb7ada3e">vmm_cleanVirtualSpace</a></div><div class="ttdeci">int vmm_cleanVirtualSpace(uint32_t)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d38/paging_8c_source.html#l00587">paging.c:587</a></div></div> <div class="ttc" id="apaging_8h_html_acd6d1b9b2687749ddd73542f7897696e"><div class="ttname"><a href="../../d4/df4/paging_8h.html#acd6d1b9b2687749ddd73542f7897696e">vmm_createVirtualSpace</a></div><div class="ttdeci">void * vmm_createVirtualSpace(pidType)</div><div class="ttdef"><b>Definition:</b> <a href="../../da/da5/createvirtualspace_8c_source.html#l00053">createvirtualspace.c:53</a></div></div> <div class="ttc" id="asysproto__posix_8h_html"><div class="ttname"><a href="../../d3/d7e/sysproto__posix_8h.html">sysproto_posix.h</a></div></div> <div class="ttc" id="astructthread_html"><div class="ttname"><a href="../../d3/dc5/structthread.html">thread</a></div><div class="ttdef"><b>Definition:</b> <a href="../../db/dd5/thread_8h_source.html#l00040">thread.h:40</a></div></div> <div class="ttc" id="apaging_8h_html_a5522eccf81d4630537620209651be16e"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a5522eccf81d4630537620209651be16e">vmm_getPhysicalAddr</a></div><div class="ttdeci">uint32_t vmm_getPhysicalAddr(uint32_t)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d7e/getphysicaladdr_8c_source.html#l00038">getphysicaladdr.c:38</a></div></div> <div class="ttc" id="ainclude_2sys_2types_8h_html"><div class="ttname"><a href="../../d0/d27/include_2sys_2types_8h.html">types.h</a></div></div> <div class="ttc" id="apaging_8h_html_af47a45e3f0802f5aac053808127aaaf1"><div class="ttname"><a href="../../d4/df4/paging_8h.html#af47a45e3f0802f5aac053808127aaaf1">vmm_pagingInit</a></div><div class="ttdeci">int vmm_pagingInit()</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d38/paging_8c_source.html#l00058">paging.c:58</a></div></div> <div class="ttc" id="ainclude_2sys_2types_8h_html_a281b4b5562236420969a830503b0ba19"><div class="ttname"><a href="../../d0/d27/include_2sys_2types_8h.html#a281b4b5562236420969a830503b0ba19">uint16_t</a></div><div class="ttdeci">__uint16_t uint16_t</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d27/include_2sys_2types_8h_source.html#l00045">types.h:45</a></div></div> <div class="ttc" id="apaging_8h_html_ac5fa0688dfb2237da626a34ad6b36a92"><div class="ttname"><a href="../../d4/df4/paging_8h.html#ac5fa0688dfb2237da626a34ad6b36a92">vmm_getFreeVirtualPage</a></div><div class="ttdeci">void * vmm_getFreeVirtualPage(pidType, int, int)</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/de7/getfreevirtualpage_8c_source.html#l00047">getfreevirtualpage.c:47</a></div></div> <div class="ttc" id="apaging_8h_html_ab060cb62a6dd6d22f63757d72c27c335"><div class="ttname"><a href="../../d4/df4/paging_8h.html#ab060cb62a6dd6d22f63757d72c27c335">vmm_setPageAttributes</a></div><div class="ttdeci">int vmm_setPageAttributes(uint32_t, uint16_t)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/df4/setpageattributes_8c_source.html#l00039">setpageattributes.c:39</a></div></div> <div class="ttc" id="apaging_8h_html_aa1e1475b5bc5c935c2dfc9907c95bf96"><div class="ttname"><a href="../../d4/df4/paging_8h.html#aa1e1475b5bc5c935c2dfc9907c95bf96">vmm_pageFault</a></div><div class="ttdeci">void vmm_pageFault(struct trapframe *, uint32_t)</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/d48/pagefault_8c_source.html#l00053">pagefault.c:53</a></div></div> <div class="ttc" id="apaging_8h_html_a7c58070dedac2ee9e1c73d8c8206b923"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a7c58070dedac2ee9e1c73d8c8206b923">kernelPageDirectory</a></div><div class="ttdeci">uint32_t * kernelPageDirectory</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d38/paging_8c_source.html#l00041">paging.c:41</a></div></div> <div class="ttc" id="apaging_8h_html_a917d614e699949c52741b429219ea456"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a917d614e699949c52741b429219ea456">vmmClearVirtualPage</a></div><div class="ttdeci">int vmmClearVirtualPage(uint32_t pageAddr)</div></div> <div class="ttc" id="apaging_8h_html_a0d45ce836c8a731beef7b3fd972d16fd"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a0d45ce836c8a731beef7b3fd972d16fd">mmap</a></div><div class="ttdeci">int mmap(struct thread *, struct sys_mmap_args *)</div></div> <div class="ttc" id="apaging_8h_html_a17fca9c83854e88d2ca3c0ef8ec687dc"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a17fca9c83854e88d2ca3c0ef8ec687dc">vmm_getRealAddr</a></div><div class="ttdeci">uint32_t vmm_getRealAddr(uint32_t)</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d7e/getphysicaladdr_8c_source.html#l00056">getphysicaladdr.c:56</a></div></div> <div class="ttc" id="apaging_8h_html_adea68f248df43bddee62a09d945304b0"><div class="ttname"><a href="../../d4/df4/paging_8h.html#adea68f248df43bddee62a09d945304b0">vmm_remapPage</a></div><div class="ttdeci">int vmm_remapPage(uint32_t, uint32_t, uint16_t, pidType, int haveLock)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d38/paging_8c_source.html#l00199">paging.c:199</a></div></div> <div class="ttc" id="ainclude_2sys_2types_8h_html_a0238af00180b6d9278fa1c6aa790fdf4"><div class="ttname"><a href="../../d0/d27/include_2sys_2types_8h.html#a0238af00180b6d9278fa1c6aa790fdf4">uint32_t</a></div><div class="ttdeci">__uint32_t uint32_t</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d27/include_2sys_2types_8h_source.html#l00046">types.h:46</a></div></div> <div class="ttc" id="astructtrapframe_html"><div class="ttname"><a href="../../df/d05/structtrapframe.html">trapframe</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d0b/trap_8h_source.html#l00034">trap.h:34</a></div></div> <div class="ttc" id="astructobreak__args_html"><div class="ttname"><a href="../../d6/d23/structobreak__args.html">obreak_args</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d7e/sysproto__posix_8h_source.html#l00417">sysproto_posix.h:417</a></div></div> <div class="ttc" id="apaging_8h_html_a8d8ba1d847eb4dbeb26a3c1077ab1981"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a8d8ba1d847eb4dbeb26a3c1077ab1981">obreak</a></div><div class="ttdeci">int obreak(struct thread *, struct obreak_args *)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d38/paging_8c_source.html#l00546">paging.c:546</a></div></div> <div class="ttc" id="ainclude_2sys_2types_8h_html_ae438ba74394b14d7b24b6df3b3b8c252"><div class="ttname"><a href="../../d0/d27/include_2sys_2types_8h.html#ae438ba74394b14d7b24b6df3b3b8c252">pidType</a></div><div class="ttdeci">int pidType</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d27/include_2sys_2types_8h_source.html#l00075">types.h:75</a></div></div> <div class="ttc" id="apaging_8h_html_a5de86e63abae0b406ff4a286b44b109e"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a5de86e63abae0b406ff4a286b44b109e">vmm_copyVirtualSpace</a></div><div class="ttdeci">void * vmm_copyVirtualSpace(pidType)</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/de9/copyvirtualspace_8c_source.html#l00051">copyvirtualspace.c:51</a></div></div> <div class="ttc" id="apaging_8h_html_a6d09af2e4df8a7165caa4c4b1895e87c"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a6d09af2e4df8a7165caa4c4b1895e87c">vmm_getFreeMallocPage</a></div><div class="ttdeci">void * vmm_getFreeMallocPage(uint16_t count)</div></div> <div class="ttc" id="apaging_8h_html_a7035c695cbbae5799ecc1f9bcab7dd48"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a7035c695cbbae5799ecc1f9bcab7dd48">vmm_getFreePage</a></div><div class="ttdeci">void * vmm_getFreePage(pidType)</div><div class="ttdef"><b>Definition:</b> <a href="../../d9/dfc/getfreepage_8c_source.html#l00045">getfreepage.c:45</a></div></div> <div class="ttc" id="astructsys__mmap__args_html"><div class="ttname"><a href="../../dc/d11/structsys__mmap__args.html">sys_mmap_args</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d7e/sysproto__posix_8h_source.html#l00378">sysproto_posix.h:378</a></div></div> <div class="ttc" id="apaging_8h_html_a15b43ccb21abdb9e0a41acb82b260a99"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a15b43ccb21abdb9e0a41acb82b260a99">_vmm_pageFault</a></div><div class="ttdeci">void _vmm_pageFault()</div></div> <div class="ttc" id="apaging_8h_html_a3615feeeee9f4038cd1070372ccba22e"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a3615feeeee9f4038cd1070372ccba22e">vmm_getFreeKernelPage</a></div><div class="ttdeci">void * vmm_getFreeKernelPage(pidType pid, uint16_t count)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d38/paging_8c_source.html#l00291">paging.c:291</a></div></div> <div class="ttc" id="apaging_8h_html_a3b8f1043eab8384fb5b4be1a4a4245ce"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a3b8f1043eab8384fb5b4be1a4a4245ce">munmap</a></div><div class="ttdeci">int munmap(struct thread *, struct sys_munmap_args *)</div></div> <div class="ttc" id="apaging_8h_html_a715dad65aea26aaf149284fd2432eff9"><div class="ttname"><a href="../../d4/df4/paging_8h.html#a715dad65aea26aaf149284fd2432eff9">vmm_mapFromTask</a></div><div class="ttdeci">void * vmm_mapFromTask(pidType, void *, uint32_t)</div><div class="ttdef"><b>Definition:</b> <a href="../../de/d38/paging_8c_source.html#l00372">paging.c:372</a></div></div> <div class="ttc" id="athread_8h_html"><div class="ttname"><a href="../../db/dd5/thread_8h.html">thread.h</a></div></div> <div class="ttc" id="astructsys__munmap__args_html"><div class="ttname"><a href="../../d2/d19/structsys__munmap__args.html">sys_munmap_args</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d7e/sysproto__posix_8h_source.html#l00439">sysproto_posix.h:439</a></div></div> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_6a23e0c8efeec49103e0d9a5ae349a59.html">vmm</a></li><li class="navelem"><a class="el" href="../../d4/df4/paging_8h.html">paging.h</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.16 </li> </ul> </div> </body> </html>