<?xml version='1.0' encoding='iso-8859-1' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.4.7">
  <compounddef id="vmm__memory_8c" kind="file">
    <compoundname>vmm_memory.c</compoundname>
    <includes refid="vmm_8h" local="no">vmm/vmm.h</includes>
    <includes refid="io_8h" local="no">sys/io.h</includes>
    <includes refid="kpanic_8h" local="no">ubixos/kpanic.h</includes>
    <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes>
    <includes refid="kmalloc_8h" local="no">lib/kmalloc.h</includes>
    <includes refid="vitals_8h" local="no">ubixos/vitals.h</includes>
    <includes refid="spinlock_8h" local="no">ubixos/spinlock.h</includes>
    <includes refid="assert_8h" local="no">assert.h</includes>
    <incdepgraph>
      <node id="6242">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
      </node>
      <node id="6244">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="6249">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
        <childnode refid="6250" relation="include">
        </childnode>
        <childnode refid="6251" relation="include">
        </childnode>
        <childnode refid="6254" relation="include">
        </childnode>
        <childnode refid="6242" relation="include">
        </childnode>
      </node>
      <node id="6257">
        <label>ubixos/spinlock.h</label>
        <link refid="spinlock_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
      </node>
      <node id="6247">
        <label>ubixos/vitals.h</label>
        <link refid="vitals_8h"/>
        <childnode refid="6248" relation="include">
        </childnode>
        <childnode refid="6256" relation="include">
        </childnode>
      </node>
      <node id="6238">
        <label>ubixos/types.h</label>
        <link refid="types_8h"/>
        <childnode refid="6239" relation="include">
        </childnode>
      </node>
      <node id="6239">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="6237">
        <label>vmm/paging.h</label>
        <link refid="paging_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
        <childnode refid="6240" relation="include">
        </childnode>
        <childnode refid="6242" relation="include">
        </childnode>
      </node>
      <node id="6255">
        <label>ubixos/time.h</label>
        <link refid="time_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
        <childnode refid="6243" relation="include">
        </childnode>
      </node>
      <node id="6251">
        <label>vfs/file.h</label>
        <link refid="file_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
        <childnode refid="6252" relation="include">
        </childnode>
        <childnode refid="6253" relation="include">
        </childnode>
      </node>
      <node id="6254">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
      </node>
      <node id="6246">
        <label>lib/kmalloc.h</label>
        <link refid="kmalloc_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
      </node>
      <node id="6236">
        <label>vmm/vmm.h</label>
        <link refid="vmm_8h"/>
        <childnode refid="6237" relation="include">
        </childnode>
        <childnode refid="6238" relation="include">
        </childnode>
      </node>
      <node id="6256">
        <label>vfs/vfs.h</label>
        <link refid="vfs_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
        <childnode refid="6251" relation="include">
        </childnode>
        <childnode refid="6253" relation="include">
        </childnode>
        <childnode refid="6240" relation="include">
        </childnode>
        <childnode refid="6242" relation="include">
        </childnode>
      </node>
      <node id="6253">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
      </node>
      <node id="6245">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
      </node>
      <node id="6258">
        <label>assert.h</label>
        <link refid="assert_8h"/>
      </node>
      <node id="6248">
        <label>ubixos/ubthread.h</label>
        <link refid="ubthread_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
        <childnode refid="6249" relation="include">
        </childnode>
        <childnode refid="6255" relation="include">
        </childnode>
      </node>
      <node id="6252">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
      </node>
      <node id="6240">
        <label>sys/sysproto.h</label>
        <link refid="sysproto_8h"/>
        <childnode refid="6241" relation="include">
        </childnode>
        <childnode refid="6242" relation="include">
        </childnode>
      </node>
      <node id="6235">
        <label>src/sys/vmm/vmm_memory.c</label>
        <link refid="vmm_memory.c"/>
        <childnode refid="6236" relation="include">
        </childnode>
        <childnode refid="6243" relation="include">
        </childnode>
        <childnode refid="6244" relation="include">
        </childnode>
        <childnode refid="6245" relation="include">
        </childnode>
        <childnode refid="6246" relation="include">
        </childnode>
        <childnode refid="6247" relation="include">
        </childnode>
        <childnode refid="6257" relation="include">
        </childnode>
        <childnode refid="6258" relation="include">
        </childnode>
      </node>
      <node id="6241">
        <label>sys/signal.h</label>
        <link refid="signal_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
      </node>
      <node id="6250">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="6238" relation="include">
        </childnode>
      </node>
      <node id="6243">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="vmm__memory_8c_1362d462b3a1e19b5e0ef95e1839dbf11" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int adjustCowCounter</definition>
        <argsstring>(uInt32 baseAddr, int adjustment)</argsstring>
        <name>adjustCowCounter</name>
        <param>
          <type><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref></type>
          <declname>baseAddr</declname>
        </param>
        <param>
          <type>int</type>
          <declname>adjustment</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" line="266" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" bodystart="266" bodyend="283"/>
        <references refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" compoundref="assert_8h" startline="64">assert</references>
        <references refid="structmMap_12fb919d9c0a2653979ed667d59a395cb" compoundref="vmm_8h" startline="46">mMap::cowCounter</references>
        <references refid="structvitalsStruct_11f45a0348eac13344950507efaf565f8" compoundref="vitals_8h" startline="44">vitalsStruct::freePages</references>
        <references refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" compoundref="vmm__memory_8c" startline="39">freePages</references>
        <references refid="vmm_8h_1b75ffaa83e1dc903d97c411c84dfec0f" compoundref="vmm_8h" startline="36">memAvail</references>
        <references refid="structmMap_1d72d5f52b2195f98e60aa61ed52ae9b1" compoundref="vmm_8h" startline="45">mMap::pid</references>
        <references refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" compoundref="spinlock_8c" startline="56" endline="62">spinLock</references>
        <references refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" compoundref="spinlock_8c" startline="37" endline="46">spinUnlock</references>
        <references refid="structmMap_1cce32b3022c0d0fbed2760ecc118f664" compoundref="vmm_8h" startline="43">mMap::status</references>
        <references refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" compoundref="timer_8S" startline="35">systemVitals</references>
        <references refid="vmm__memory_8c_1c13b9a55ec869479ab26ad9d949e6f85" compoundref="vmm__memory_8c" startline="41">vmmCowSpinLock</references>
        <references refid="vmm_8h_1e6c443b60824c02f199f51cf4a14e9f4" compoundref="vmm_8h" startline="38">vmmID</references>
        <references refid="vmm_8h_189e87741958ee81f1811075b25af058a" compoundref="vmm__memory_8c" startline="45">vmmMemoryMap</references>
        <referencedby refid="vmm__memory_8c_1e90be267d851fed04d4d9b1c6c10454a" compoundref="vmm__memory_8c" startline="228" endline="252">freePage</referencedby>
        <referencedby refid="pagefault_8c_138aaad80f8ef516de9fe963e677fe273" compoundref="pagefault_8c" startline="53" endline="131">vmm_pageFault</referencedby>
        <referencedby refid="copyvirtualspace_8c_12d305244a54b4bb8c56698eca1b4c82c" compoundref="copyvirtualspace_8c" startline="53" endline="206">vmmCopyVirtualSpace</referencedby>
        <referencedby refid="vmm__memory_8c_1a24b696e386ef97dfe88b9b434c671c6" compoundref="vmm__memory_8c" startline="296" endline="332">vmmFreeProcessPages</referencedby>
      </memberdef>
      <memberdef kind="function" id="vmm__memory_8c_11a89fbc2f80ca828332c5ef31801faa3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int countMemory</definition>
        <argsstring>()</argsstring>
        <name>countMemory</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" line="104" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" bodystart="104" bodyend="174"/>
        <references refid="ap-boot_8S_155b794ab80e3855b3bd9c5e48621624f" compoundref="ap-boot_8S" startline="6">cr0</references>
        <references refid="io_8h_177b934268de1b3ecdcf3f275413b3108" compoundref="io_8c" startline="39" endline="47">inportByte</references>
        <references refid="io_8h_18acc1a06073db2e7b92ffbd00fbd0cf1" compoundref="io_8c" startline="73" endline="79">outportByte</references>
        <referencedby refid="vmm__memory_8c_10926a4c7f70e387891f6124a48258b64" compoundref="vmm__memory_8c" startline="57" endline="93">vmmMemMapInit</referencedby>
      </memberdef>
      <memberdef kind="function" id="vmm__memory_8c_1e90be267d851fed04d4d9b1c6c10454a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int freePage</definition>
        <argsstring>(uInt32 pageAddr)</argsstring>
        <name>freePage</name>
        <param>
          <type><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref></type>
          <declname>pageAddr</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" line="228" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" bodystart="228" bodyend="252"/>
        <references refid="vmm_8h_1362d462b3a1e19b5e0ef95e1839dbf11" compoundref="vmm__memory_8c" startline="266" endline="283">adjustCowCounter</references>
        <references refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" compoundref="assert_8h" startline="64">assert</references>
        <references refid="structmMap_12fb919d9c0a2653979ed667d59a395cb" compoundref="vmm_8h" startline="46">mMap::cowCounter</references>
        <references refid="structvitalsStruct_11f45a0348eac13344950507efaf565f8" compoundref="vitals_8h" startline="44">vitalsStruct::freePages</references>
        <references refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" compoundref="vmm__memory_8c" startline="39">freePages</references>
        <references refid="vmm_8h_1b75ffaa83e1dc903d97c411c84dfec0f" compoundref="vmm_8h" startline="36">memAvail</references>
        <references refid="structmMap_1d72d5f52b2195f98e60aa61ed52ae9b1" compoundref="vmm_8h" startline="45">mMap::pid</references>
        <references refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" compoundref="spinlock_8c" startline="56" endline="62">spinLock</references>
        <references refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" compoundref="spinlock_8c" startline="37" endline="46">spinUnlock</references>
        <references refid="structmMap_1cce32b3022c0d0fbed2760ecc118f664" compoundref="vmm_8h" startline="43">mMap::status</references>
        <references refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" compoundref="timer_8S" startline="35">systemVitals</references>
        <references refid="vmm_8h_189e87741958ee81f1811075b25af058a" compoundref="vmm__memory_8c" startline="45">vmmMemoryMap</references>
        <references refid="vmm__memory_8c_1ee00a539cbe4cc341553ee44f318157a" compoundref="vmm__memory_8c" startline="40">vmmSpinLock</references>
        <referencedby refid="paging_8c_1f055cfbfef9c5d8dd82aa83829a06117" compoundref="paging_8c" startline="160" endline="241">vmm_remapPage</referencedby>
      </memberdef>
      <memberdef kind="function" id="vmm__memory_8c_11be09ae74f7f41cd765042a0a7411c49" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref></type>
        <definition>uInt32 vmmFindFreePage</definition>
        <argsstring>(pidType pid)</argsstring>
        <name>vmmFindFreePage</name>
        <param>
          <type><ref refid="types_8h_1e438ba74394b14d7b24b6df3b3b8c252" kindref="member">pidType</ref></type>
          <declname>pid</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" line="186" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" bodystart="186" bodyend="216"/>
        <references refid="structvitalsStruct_11f45a0348eac13344950507efaf565f8" compoundref="vitals_8h" startline="44">vitalsStruct::freePages</references>
        <references refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" compoundref="vmm__memory_8c" startline="39">freePages</references>
        <references refid="kpanic_8h_1db9a182aa071791a306163d50d653deb" compoundref="kpanic_8c" startline="42" endline="60">kpanic</references>
        <references refid="vmm_8h_1b75ffaa83e1dc903d97c411c84dfec0f" compoundref="vmm_8h" startline="36">memAvail</references>
        <references refid="vmm_8h_141dc1abc6436bd66a4269de8ab471181" compoundref="vmm_8h" startline="37">memNotavail</references>
        <references refid="vmm_8h_12b0091bdc36e32af3daf9cfcaa7c04e1" compoundref="vmm__memory_8c" startline="44">numPages</references>
        <references refid="structmMap_1d72d5f52b2195f98e60aa61ed52ae9b1" compoundref="vmm_8h" startline="45">mMap::pid</references>
        <references refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" compoundref="spinlock_8c" startline="56" endline="62">spinLock</references>
        <references refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" compoundref="spinlock_8c" startline="37" endline="46">spinUnlock</references>
        <references refid="fdc_8c_1e2746d1bf47d4f690105d083b966fa82" compoundref="fdc_8c" startline="54">status</references>
        <references refid="kmalloc_8h_181d09bc848b49133401b3efeeb65f1af" compoundref="kmalloc_8h" startline="39">sysID</references>
        <references refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" compoundref="timer_8S" startline="35">systemVitals</references>
        <references refid="vmm_8h_189e87741958ee81f1811075b25af058a" compoundref="vmm__memory_8c" startline="45">vmmMemoryMap</references>
        <references refid="vmm__memory_8c_1ee00a539cbe4cc341553ee44f318157a" compoundref="vmm__memory_8c" startline="40">vmmSpinLock</references>
        <referencedby refid="elf_8c_1f11ec9e50bcff723428b0c911a177fd0" compoundref="elf_8c" startline="111" endline="185">elf_loadfile</referencedby>
        <referencedby refid="exec_8c_1f80d4412d42ed1b5bf9a1b9774230f33" compoundref="exec_8c" startline="143" endline="323">execFile</referencedby>
        <referencedby refid="kmod_8c_192b68dbf95bf5d651555a4c02ee1a74b" compoundref="kmod_8c" startline="75" endline="211">kmod_load</referencedby>
        <referencedby refid="ld_8c_1b0622e93915d1824df770950e425875f" compoundref="ld_8c" startline="42" endline="176">ldEnable</referencedby>
        <referencedby refid="paging_8c_16cdf3466734f2da5e258c9844d536295" compoundref="paging_8c" startline="478" endline="514">obreak</referencedby>
        <referencedby refid="exec_8c_1094c23346b6d226a03866a54b755ed64" compoundref="exec_8c" startline="552" endline="716">sys_exec</referencedby>
        <referencedby refid="exec_8c_1219681612352232186a0f568457d851d" compoundref="exec_8c" startline="334" endline="546">sysExec</referencedby>
        <referencedby refid="paging_8c_1541f0b43826a40b9e978f5479080bb0e" compoundref="paging_8c" startline="401" endline="451">vmm_getFreeMallocPage</referencedby>
        <referencedby refid="pagefault_8c_138aaad80f8ef516de9fe963e677fe273" compoundref="pagefault_8c" startline="53" endline="131">vmm_pageFault</referencedby>
        <referencedby refid="paging_8c_1f47a45e3f0802f5aac053808127aaaf1" compoundref="paging_8c" startline="59" endline="147">vmm_pagingInit</referencedby>
        <referencedby refid="paging_8c_1f055cfbfef9c5d8dd82aa83829a06117" compoundref="paging_8c" startline="160" endline="241">vmm_remapPage</referencedby>
        <referencedby refid="paging_8c_130a38035243b9dfb285b3793788126be" compoundref="paging_8c" startline="253" endline="301">vmmGetFreeKernelPage</referencedby>
        <referencedby refid="getfreepage_8c_197b73a5761e664ab5c0c24382971a2e6" compoundref="getfreepage_8c" startline="48" endline="77">vmmGetFreePage</referencedby>
        <referencedby refid="getfreevirtualpage_8c_1fbc8bd5fa45d60baf5e8b5c47bf3f3b6" compoundref="getfreevirtualpage_8c" startline="47" endline="159">vmmGetFreeVirtualPage</referencedby>
      </memberdef>
      <memberdef kind="function" id="vmm__memory_8c_1a24b696e386ef97dfe88b9b434c671c6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void vmmFreeProcessPages</definition>
        <argsstring>(pidType pid)</argsstring>
        <name>vmmFreeProcessPages</name>
        <param>
          <type><ref refid="types_8h_1e438ba74394b14d7b24b6df3b3b8c252" kindref="member">pidType</ref></type>
          <declname>pid</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" line="296" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" bodystart="296" bodyend="332"/>
        <references refid="vmm_8h_1362d462b3a1e19b5e0ef95e1839dbf11" compoundref="vmm__memory_8c" startline="266" endline="283">adjustCowCounter</references>
        <references refid="structmMap_12fb919d9c0a2653979ed667d59a395cb" compoundref="vmm_8h" startline="46">mMap::cowCounter</references>
        <references refid="structvitalsStruct_11f45a0348eac13344950507efaf565f8" compoundref="vitals_8h" startline="44">vitalsStruct::freePages</references>
        <references refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" compoundref="vmm__memory_8c" startline="39">freePages</references>
        <references refid="vmm_8h_1b75ffaa83e1dc903d97c411c84dfec0f" compoundref="vmm_8h" startline="36">memAvail</references>
        <references refid="vmm_8h_12b0091bdc36e32af3daf9cfcaa7c04e1" compoundref="vmm__memory_8c" startline="44">numPages</references>
        <references refid="paging_8h_157d743cb60fe478f6720c42315e7e813" compoundref="paging_8h" startline="46">PAGE_COW</references>
        <references refid="paging_8h_1b80d68a13753e40b0df8e0dc0c4af870" compoundref="paging_8h" startline="42">pageEntries</references>
        <references refid="paging_8h_1aab3609eb02bd28ded8d1ea0512da979" compoundref="paging_8h" startline="44">parentPageDirAddr</references>
        <references refid="structmMap_1d72d5f52b2195f98e60aa61ed52ae9b1" compoundref="vmm_8h" startline="45">mMap::pid</references>
        <references refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" compoundref="spinlock_8c" startline="56" endline="62">spinLock</references>
        <references refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" compoundref="spinlock_8c" startline="37" endline="46">spinUnlock</references>
        <references refid="fdc_8c_1e2746d1bf47d4f690105d083b966fa82" compoundref="fdc_8c" startline="54">status</references>
        <references refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" compoundref="timer_8S" startline="35">systemVitals</references>
        <references refid="paging_8h_1a432d41840ad8a583a7e6af86feece4f" compoundref="paging_8h" startline="43">tablesBaseAddress</references>
        <references refid="vmm_8h_1e6c443b60824c02f199f51cf4a14e9f4" compoundref="vmm_8h" startline="38">vmmID</references>
        <references refid="vmm_8h_189e87741958ee81f1811075b25af058a" compoundref="vmm__memory_8c" startline="45">vmmMemoryMap</references>
        <references refid="vmm__memory_8c_1ee00a539cbe4cc341553ee44f318157a" compoundref="vmm__memory_8c" startline="40">vmmSpinLock</references>
        <references refid="ap-boot_8S_1f78b91f02427adef14bb8b28aa93baa5" compoundref="ap-boot_8S" startline="52">x1000</references>
        <referencedby refid="systemtask_8c_1c7cc6a806237f8657fcdce169319fd7f" compoundref="systemtask_8c" startline="48" endline="118">systemTask</referencedby>
      </memberdef>
      <memberdef kind="function" id="vmm__memory_8c_10926a4c7f70e387891f6124a48258b64" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int vmmMemMapInit</definition>
        <argsstring>()</argsstring>
        <name>vmmMemMapInit</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" line="57" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" bodystart="57" bodyend="93"/>
        <references refid="vmm_8h_11a89fbc2f80ca828332c5ef31801faa3" compoundref="vmm__memory_8c" startline="104" endline="174">countMemory</references>
        <references refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" compoundref="vmm__memory_8c" startline="39">freePages</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="vmm_8h_1b75ffaa83e1dc903d97c411c84dfec0f" compoundref="vmm_8h" startline="36">memAvail</references>
        <references refid="vmm_8h_141dc1abc6436bd66a4269de8ab471181" compoundref="vmm_8h" startline="37">memNotavail</references>
        <references refid="vmm_8h_12b0091bdc36e32af3daf9cfcaa7c04e1" compoundref="vmm__memory_8c" startline="44">numPages</references>
        <references refid="structmMap_1c8d077d6fec5b5f9a63f01f044444f2b" compoundref="vmm_8h" startline="42">mMap::pageAddr</references>
        <references refid="structmMap_1d72d5f52b2195f98e60aa61ed52ae9b1" compoundref="vmm_8h" startline="45">mMap::pid</references>
        <references refid="fdc_8c_1e2746d1bf47d4f690105d083b966fa82" compoundref="fdc_8c" startline="54">status</references>
        <references refid="structmMap_1cce32b3022c0d0fbed2760ecc118f664" compoundref="vmm_8h" startline="43">mMap::status</references>
        <references refid="vmm_8h_1e6c443b60824c02f199f51cf4a14e9f4" compoundref="vmm_8h" startline="38">vmmID</references>
        <references refid="vmm_8h_189e87741958ee81f1811075b25af058a" compoundref="vmm__memory_8c" startline="45">vmmMemoryMap</references>
        <references refid="ap-boot_8S_1f78b91f02427adef14bb8b28aa93baa5" compoundref="ap-boot_8S" startline="52">x1000</references>
        <referencedby refid="vmm__init_8c_1ac183f585641487a954ca46c0d7bde31" compoundref="vmm__init_8c" startline="41" endline="49">vmm_init</referencedby>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" prot="public" static="yes" mutable="no">
        <type><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref></type>
        <definition>uInt32 freePages</definition>
        <argsstring></argsstring>
        <name>freePages</name>
        <initializer> 0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" line="39" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" bodystart="39" bodyend="-1"/>
        <referencedby refid="vmm__memory_8c_1362d462b3a1e19b5e0ef95e1839dbf11" compoundref="vmm__memory_8c" startline="266" endline="283">adjustCowCounter</referencedby>
        <referencedby refid="vmm__memory_8c_1e90be267d851fed04d4d9b1c6c10454a" compoundref="vmm__memory_8c" startline="228" endline="252">freePage</referencedby>
        <referencedby refid="vmm__memory_8c_11be09ae74f7f41cd765042a0a7411c49" compoundref="vmm__memory_8c" startline="186" endline="216">vmmFindFreePage</referencedby>
        <referencedby refid="vmm__memory_8c_1a24b696e386ef97dfe88b9b434c671c6" compoundref="vmm__memory_8c" startline="296" endline="332">vmmFreeProcessPages</referencedby>
        <referencedby refid="vmm__memory_8c_10926a4c7f70e387891f6124a48258b64" compoundref="vmm__memory_8c" startline="57" endline="93">vmmMemMapInit</referencedby>
      </memberdef>
      <memberdef kind="variable" id="vmm__memory_8c_12b0091bdc36e32af3daf9cfcaa7c04e1" prot="public" static="no" mutable="no">
        <type>int</type>
        <definition>int numPages</definition>
        <argsstring></argsstring>
        <name>numPages</name>
        <initializer> 0x0</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" line="44" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" bodystart="44" bodyend="-1"/>
        <referencedby refid="paging_8c_1f47a45e3f0802f5aac053808127aaaf1" compoundref="paging_8c" startline="59" endline="147">vmm_pagingInit</referencedby>
        <referencedby refid="vmm__memory_8c_11be09ae74f7f41cd765042a0a7411c49" compoundref="vmm__memory_8c" startline="186" endline="216">vmmFindFreePage</referencedby>
        <referencedby refid="vmm__memory_8c_1a24b696e386ef97dfe88b9b434c671c6" compoundref="vmm__memory_8c" startline="296" endline="332">vmmFreeProcessPages</referencedby>
        <referencedby refid="vmm__memory_8c_10926a4c7f70e387891f6124a48258b64" compoundref="vmm__memory_8c" startline="57" endline="93">vmmMemMapInit</referencedby>
      </memberdef>
      <memberdef kind="variable" id="vmm__memory_8c_1c13b9a55ec869479ab26ad9d949e6f85" prot="public" static="yes" mutable="no">
        <type><ref refid="spinlock_8h_1a240e9404b4ede1e0d714610080d1176" kindref="member">spinLock_t</ref></type>
        <definition>spinLock_t vmmCowSpinLock</definition>
        <argsstring></argsstring>
        <name>vmmCowSpinLock</name>
        <initializer> SPIN_LOCK_INITIALIZER</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" line="41" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" bodystart="41" bodyend="-1"/>
        <referencedby refid="vmm__memory_8c_1362d462b3a1e19b5e0ef95e1839dbf11" compoundref="vmm__memory_8c" startline="266" endline="283">adjustCowCounter</referencedby>
      </memberdef>
      <memberdef kind="variable" id="vmm__memory_8c_189e87741958ee81f1811075b25af058a" prot="public" static="no" mutable="no">
        <type><ref refid="structmMap" kindref="compound">mMap</ref> *</type>
        <definition>mMap* vmmMemoryMap</definition>
        <argsstring></argsstring>
        <name>vmmMemoryMap</name>
        <initializer> (<ref refid="structmMap" kindref="compound">mMap</ref> *) 0x101000</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" line="45" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" bodystart="45" bodyend="-1"/>
        <referencedby refid="vmm__memory_8c_1362d462b3a1e19b5e0ef95e1839dbf11" compoundref="vmm__memory_8c" startline="266" endline="283">adjustCowCounter</referencedby>
        <referencedby refid="vmm__memory_8c_1e90be267d851fed04d4d9b1c6c10454a" compoundref="vmm__memory_8c" startline="228" endline="252">freePage</referencedby>
        <referencedby refid="main_8c_1a099bb67b4698f94150184a0ee8ccffb" compoundref="main_8c" startline="97" endline="152">kmain</referencedby>
        <referencedby refid="paging_8c_1f47a45e3f0802f5aac053808127aaaf1" compoundref="paging_8c" startline="59" endline="147">vmm_pagingInit</referencedby>
        <referencedby refid="vmm__memory_8c_11be09ae74f7f41cd765042a0a7411c49" compoundref="vmm__memory_8c" startline="186" endline="216">vmmFindFreePage</referencedby>
        <referencedby refid="vmm__memory_8c_1a24b696e386ef97dfe88b9b434c671c6" compoundref="vmm__memory_8c" startline="296" endline="332">vmmFreeProcessPages</referencedby>
        <referencedby refid="vmm__memory_8c_10926a4c7f70e387891f6124a48258b64" compoundref="vmm__memory_8c" startline="57" endline="93">vmmMemMapInit</referencedby>
      </memberdef>
      <memberdef kind="variable" id="vmm__memory_8c_1ee00a539cbe4cc341553ee44f318157a" prot="public" static="yes" mutable="no">
        <type><ref refid="spinlock_8h_1a240e9404b4ede1e0d714610080d1176" kindref="member">spinLock_t</ref></type>
        <definition>spinLock_t vmmSpinLock</definition>
        <argsstring></argsstring>
        <name>vmmSpinLock</name>
        <initializer> SPIN_LOCK_INITIALIZER</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" line="40" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c" bodystart="40" bodyend="-1"/>
        <referencedby refid="vmm__memory_8c_1e90be267d851fed04d4d9b1c6c10454a" compoundref="vmm__memory_8c" startline="228" endline="252">freePage</referencedby>
        <referencedby refid="vmm__memory_8c_11be09ae74f7f41cd765042a0a7411c49" compoundref="vmm__memory_8c" startline="186" endline="216">vmmFindFreePage</referencedby>
        <referencedby refid="vmm__memory_8c_1a24b696e386ef97dfe88b9b434c671c6" compoundref="vmm__memory_8c" startline="296" endline="332">vmmFreeProcessPages</referencedby>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*****************************************************************************************</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>Copyright<sp/>(c)<sp/>2002-2004<sp/>The<sp/>UbixOS<sp/>Project</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"></highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,<sp/>are</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>permitted<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="7"><highlight class="comment"></highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.<sp/><sp/>Redistributions<sp/>in<sp/>binary</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of<sp/>conditions,<sp/>the<sp/>following</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or<sp/>other<sp/>materials<sp/>provided</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>with<sp/>the<sp/>distribution.<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>contributors<sp/>may<sp/>be<sp/>used<sp/>to<sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>without<sp/>specific<sp/>prior<sp/>written<sp/>permission.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"></highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>COPYRIGHT<sp/>HOLDERS<sp/>AND<sp/>CONTRIBUTORS<sp/>&quot;AS<sp/>IS&quot;<sp/>AND<sp/>ANY</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>EXPRESS<sp/>OR<sp/>IMPLIED<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="25"><highlight class="comment"></highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>$Id: vmm__memory_8c.xml 88 2016-01-12 00:11:29Z reddawg $</highlight></codeline>
<codeline lineno="27"><highlight class="comment"></highlight></codeline>
<codeline lineno="28"><highlight class="comment">*****************************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="vmm_8h" kindref="compound">vmm/vmm.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="io_8h" kindref="compound">sys/io.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kpanic_8h" kindref="compound">ubixos/kpanic.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kprintf_8h" kindref="compound">lib/kprintf.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kmalloc_8h" kindref="compound">lib/kmalloc.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="vitals_8h" kindref="compound">ubixos/vitals.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="spinlock_8h" kindref="compound">ubixos/spinlock.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="assert_8h" kindref="compound">assert.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<codeline lineno="39" refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" kindref="member">freePages</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="40" refid="vmm__memory_8c_1ee00a539cbe4cc341553ee44f318157a" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="spinlock_8h_1a240e9404b4ede1e0d714610080d1176" kindref="member">spinLock_t</ref><sp/><ref refid="vmm__memory_8c_1ee00a539cbe4cc341553ee44f318157a" kindref="member">vmmSpinLock</ref><sp/><sp/><sp/><sp/>=<sp/><ref refid="spinlock_8h_10fe85a4f3642683148b25916d6c5eafd" kindref="member">SPIN_LOCK_INITIALIZER</ref>;</highlight></codeline>
<codeline lineno="41" refid="vmm__memory_8c_1c13b9a55ec869479ab26ad9d949e6f85" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="spinlock_8h_1a240e9404b4ede1e0d714610080d1176" kindref="member">spinLock_t</ref><sp/><ref refid="vmm__memory_8c_1c13b9a55ec869479ab26ad9d949e6f85" kindref="member">vmmCowSpinLock</ref><sp/>=<sp/><ref refid="spinlock_8h_10fe85a4f3642683148b25916d6c5eafd" kindref="member">SPIN_LOCK_INITIALIZER</ref>;</highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44" refid="vmm__memory_8c_12b0091bdc36e32af3daf9cfcaa7c04e1" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vmm_8h_12b0091bdc36e32af3daf9cfcaa7c04e1" kindref="member">numPages</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="45" refid="vmm__memory_8c_189e87741958ee81f1811075b25af058a" refkind="member"><highlight class="normal"><ref refid="structmMap" kindref="compound">mMap</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref><sp/>=<sp/>(<ref refid="structmMap" kindref="compound">mMap</ref><sp/>*)<sp/>0x101000;</highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="49"><highlight class="comment"></highlight></codeline>
<codeline lineno="50"><highlight class="comment"><sp/>Function:<sp/>void<sp/>vmmMemMapInit();</highlight></codeline>
<codeline lineno="51"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Function<sp/>Initializes<sp/>The<sp/>Memory<sp/>Map<sp/>For<sp/>the<sp/>System</highlight></codeline>
<codeline lineno="52"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="53"><highlight class="comment"></highlight></codeline>
<codeline lineno="54"><highlight class="comment"><sp/><sp/>02/20/2004<sp/>-<sp/>Made<sp/>It<sp/>Report<sp/>Real<sp/>And<sp/>Available<sp/>Memory</highlight></codeline>
<codeline lineno="55"><highlight class="comment"></highlight></codeline>
<codeline lineno="56"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="57" refid="vmm__memory_8c_10926a4c7f70e387891f6124a48258b64" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="vmm_8h_10926a4c7f70e387891f6124a48258b64" kindref="member">vmmMemMapInit</ref>()<sp/>{</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>memStart<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Count<sp/>System<sp/>Memory<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><ref refid="vmm_8h_12b0091bdc36e32af3daf9cfcaa7c04e1" kindref="member">numPages</ref><sp/>=<sp/><ref refid="vmm_8h_11a89fbc2f80ca828332c5ef31801faa3" kindref="member">countMemory</ref>();</highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>Memory<sp/>Map<sp/>To<sp/>Point<sp/>To<sp/>First<sp/>Physical<sp/>Page<sp/>That<sp/>We<sp/>Will<sp/>Use<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref><sp/>=<sp/>(<ref refid="structmMap" kindref="compound">mMap</ref><sp/>*)<sp/>0x101000;</highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Initialize<sp/>Map<sp/>Make<sp/>All<sp/>Pages<sp/>Not<sp/>Available<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0x0;<sp/>i<sp/>&lt;<sp/><ref refid="vmm_8h_12b0091bdc36e32af3daf9cfcaa7c04e1" kindref="member">numPages</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].cowCounter<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].<ref refid="structmMap_1cce32b3022c0d0fbed2760ecc118f664" kindref="member">status</ref><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="vmm_8h_141dc1abc6436bd66a4269de8ab471181" kindref="member">memNotavail</ref>;</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].<ref refid="structmMap_1d72d5f52b2195f98e60aa61ed52ae9b1" kindref="member">pid</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="vmm_8h_1e6c443b60824c02f199f51cf4a14e9f4" kindref="member">vmmID</ref>;</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].<ref refid="structmMap_1c8d077d6fec5b5f9a63f01f044444f2b" kindref="member">pageAddr</ref><sp/><sp/><sp/>=<sp/>i<sp/>*<sp/>4096;</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="74"><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Calculate<sp/>Start<sp/>Of<sp/>Free<sp/>Memory<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/>memStart<sp/><sp/>=<sp/>(0x101000<sp/>/<sp/>0x1000);</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/>memStart<sp/>+=<sp/>(((</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="structmMap" kindref="compound">mMap</ref>)<sp/>*<sp/>numPages)<sp/>+<sp/>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="structmMap" kindref="compound">mMap</ref>)<sp/>-<sp/>1))<sp/>/<sp/>0<ref refid="ap-boot_8S_1f78b91f02427adef14bb8b28aa93baa5" kindref="member">x1000</ref>);</highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Initialize<sp/>All<sp/>Free<sp/>Pages<sp/>To<sp/>Available<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[(0x100000<sp/>/<sp/>0x1000)].<ref refid="fdc_8c_1e2746d1bf47d4f690105d083b966fa82" kindref="member">status</ref><sp/>=<sp/><ref refid="vmm_8h_1b75ffaa83e1dc903d97c411c84dfec0f" kindref="member">memAvail</ref>;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><ref refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" kindref="member">freePages</ref>++;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>memStart;<sp/>i<sp/>&lt;<sp/>numPages;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].<ref refid="fdc_8c_1e2746d1bf47d4f690105d083b966fa82" kindref="member">status</ref><sp/>=<sp/><ref refid="vmm_8h_1b75ffaa83e1dc903d97c411c84dfec0f" kindref="member">memAvail</ref>;</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/>freePages++;</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="86"><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Print<sp/>Out<sp/>Amount<sp/>Of<sp/>Memory<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Real<sp/>Memory:<sp/><sp/><sp/><sp/><sp/><sp/>%iKB\n&quot;</highlight><highlight class="normal">,<sp/>numPages<sp/>*<sp/>4);</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;Available<sp/>Memory:<sp/>%iKB\n&quot;</highlight><highlight class="normal">,<sp/>freePages<sp/>*<sp/>4);</highlight></codeline>
<codeline lineno="90"><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="94"><highlight class="normal"></highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="96"><highlight class="comment"></highlight></codeline>
<codeline lineno="97"><highlight class="comment"><sp/>Function:<sp/>int<sp/>countMemory();</highlight></codeline>
<codeline lineno="98"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Function<sp/>Counts<sp/>The<sp/>Systems<sp/>Physical<sp/>Memory</highlight></codeline>
<codeline lineno="99"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="100"><highlight class="comment"></highlight></codeline>
<codeline lineno="101"><highlight class="comment"><sp/><sp/>02/20/2004<sp/>-<sp/>Inspect<sp/>For<sp/>Quality<sp/>And<sp/>Approved</highlight></codeline>
<codeline lineno="102"><highlight class="comment"></highlight></codeline>
<codeline lineno="103"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="104" refid="vmm__memory_8c_11a89fbc2f80ca828332c5ef31801faa3" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="vmm_8h_11a89fbc2f80ca828332c5ef31801faa3" kindref="member">countMemory</ref>()<sp/>{</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">register</highlight><highlight class="normal"><sp/><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>*mem<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><sp/><sp/><sp/>memCount<sp/>=<sp/>-1,<sp/>tempMemory<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">short</highlight><highlight class="normal"><sp/><sp/><sp/>memKb<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/><sp/><sp/><sp/>irq1State,<sp/>irq2State;</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="ap-boot_8S_155b794ab80e3855b3bd9c5e48621624f" kindref="member">cr0</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="110"><highlight class="normal"></highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="112"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Save<sp/>The<sp/>States<sp/>Of<sp/>Both<sp/>IRQ<sp/>1<sp/>And<sp/>2<sp/>So<sp/>We<sp/>Can<sp/>Turn<sp/>Them<sp/>Off<sp/>And<sp/>Restore</highlight></codeline>
<codeline lineno="113"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Them<sp/>Later</highlight></codeline>
<codeline lineno="114"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/>irq1State<sp/>=<sp/><ref refid="io_8h_177b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(0x21);</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/>irq2State<sp/>=<sp/><ref refid="io_8h_177b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(0xA1);</highlight></codeline>
<codeline lineno="117"><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Turn<sp/>Off<sp/>IRQ<sp/>1<sp/>And<sp/>2<sp/>To<sp/>Prevent<sp/>Chances<sp/>Of<sp/>Faults<sp/>While<sp/>Examining<sp/>Memory<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><ref refid="io_8h_18acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x21,<sp/>0xFF);</highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/><ref refid="io_8h_18acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0xA1,<sp/>0xFF);</highlight></codeline>
<codeline lineno="121"><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Save<sp/>The<sp/>State<sp/>Of<sp/>Register<sp/>CR0<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">asm</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">volatile</highlight><highlight class="normal"><sp/>(</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;movl<sp/>%%cr0,<sp/>%%ebx\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;=a&quot;</highlight><highlight class="normal"><sp/>(cr0)</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/>:</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;ebx&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/>);</highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">asm</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">volatile</highlight><highlight class="normal"><sp/>(</highlight><highlight class="stringliteral">&quot;wbinvd&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">asm</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">volatile</highlight><highlight class="normal"><sp/>(</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;movl<sp/>%%ebx,<sp/>%%cr0\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/>:</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;a&quot;</highlight><highlight class="normal"><sp/>(cr0<sp/>|<sp/>0x00000001<sp/>|<sp/>0x40000000<sp/>|<sp/>0x20000000)</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;ebx&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/>);</highlight></codeline>
<codeline lineno="137"><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(memKb<sp/>&lt;<sp/>4096<sp/>&amp;&amp;<sp/>memCount<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/>memKb++;</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(memCount<sp/>==<sp/>-1)</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>memCount<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/>memCount<sp/>+=<sp/>1024<sp/>*<sp/>1024;</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/>mem<sp/>=<sp/>(<ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>*)memCount;</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/>tempMemory<sp/>=<sp/>*mem;</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/>*mem<sp/>=<sp/>0x55AA55AA;</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">asm</highlight><highlight class="normal">(</highlight><highlight class="stringliteral">&quot;&quot;</highlight><highlight class="normal">:<sp/>:<sp/>:</highlight><highlight class="stringliteral">&quot;memory&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(*mem<sp/>!=<sp/>0x55AA55AA)<sp/>{</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>memCount<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*mem<sp/>=<sp/>0xAA55AA55;</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">asm</highlight><highlight class="normal">(</highlight><highlight class="stringliteral">&quot;&quot;</highlight><highlight class="normal">:<sp/>:<sp/>:</highlight><highlight class="stringliteral">&quot;memory&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(*mem<sp/>!=<sp/>0xAA55AA55)<sp/>{</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>memCount<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">asm</highlight><highlight class="normal">(</highlight><highlight class="stringliteral">&quot;&quot;</highlight><highlight class="normal">:<sp/>:<sp/>:</highlight><highlight class="stringliteral">&quot;memory&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/>*mem<sp/>=<sp/>tempMemory;</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="160"><highlight class="normal"></highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">asm</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">volatile</highlight><highlight class="normal"><sp/>(</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;movl<sp/>%%ebx,<sp/>%%cr0\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/>:</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;a&quot;</highlight><highlight class="normal"><sp/>(cr0)</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="stringliteral">&quot;ebx&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/>);</highlight></codeline>
<codeline lineno="167"><highlight class="normal"></highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Restore<sp/>States<sp/>For<sp/>Both<sp/>IRQ<sp/>1<sp/>And<sp/>2<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/><ref refid="io_8h_18acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x21,<sp/>irq1State);</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><ref refid="io_8h_18acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0xA1,<sp/>irq2State);</highlight></codeline>
<codeline lineno="171"><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>Amount<sp/>Of<sp/>Memory<sp/>In<sp/>Pages<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>((memKb<sp/>*<sp/>1024<sp/>*<sp/>1024)<sp/>/<sp/>4096);</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="175"><highlight class="normal"></highlight></codeline>
<codeline lineno="176"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="177"><highlight class="comment"></highlight></codeline>
<codeline lineno="178"><highlight class="comment"><sp/>Function:<sp/>uInt32<sp/>vmmFindFreePage(pid_t<sp/>pid);</highlight></codeline>
<codeline lineno="179"><highlight class="comment"></highlight></codeline>
<codeline lineno="180"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Returns<sp/>A<sp/>Free<sp/><sp/>Physical<sp/>Page<sp/>Address<sp/>Then<sp/>Marks<sp/>It</highlight></codeline>
<codeline lineno="181"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Not<sp/>Available<sp/>As<sp/>Well<sp/>As<sp/>Setting<sp/>The<sp/>PID<sp/>To<sp/>The<sp/>Proccess</highlight></codeline>
<codeline lineno="182"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Allocating<sp/>This<sp/>Page</highlight></codeline>
<codeline lineno="183"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="184"><highlight class="comment"></highlight></codeline>
<codeline lineno="185"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="186" refid="vmm__memory_8c_11be09ae74f7f41cd765042a0a7411c49" refkind="member"><highlight class="normal"><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/><ref refid="vmm_8h_1976cf3919bf7c77c868021ec9374593b" kindref="member">vmmFindFreePage</ref>(<ref refid="types_8h_1e438ba74394b14d7b24b6df3b3b8c252" kindref="member">pidType</ref><sp/>pid)<sp/>{</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="188"><highlight class="normal"></highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Lets<sp/>Look<sp/>For<sp/>A<sp/>Free<sp/>Page<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="190"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(pid<sp/>&lt;<sp/><ref refid="kmalloc_8h_181d09bc848b49133401b3efeeb65f1af" kindref="member">sysID</ref>)</highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kpanic_8h_1db9a182aa071791a306163d50d653deb" kindref="member">kpanic</ref>(</highlight><highlight class="stringliteral">&quot;Error:<sp/>invalid<sp/>PID<sp/>%i\n&quot;</highlight><highlight class="normal">,pid);</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><ref refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" kindref="member">spinLock</ref>(&amp;<ref refid="vmm__memory_8c_1ee00a539cbe4cc341553ee44f318157a" kindref="member">vmmSpinLock</ref>);</highlight></codeline>
<codeline lineno="194"><highlight class="normal"></highlight></codeline>
<codeline lineno="195"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;=<sp/><ref refid="vmm_8h_12b0091bdc36e32af3daf9cfcaa7c04e1" kindref="member">numPages</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="196"><highlight class="normal"></highlight></codeline>
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="198"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>If<sp/>We<sp/>Found<sp/>A<sp/>Free<sp/>Page<sp/>Set<sp/>It<sp/>To<sp/>Not<sp/>Available<sp/>After<sp/>That<sp/>Set<sp/>Its<sp/>Own</highlight></codeline>
<codeline lineno="199"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>And<sp/>Return<sp/>The<sp/>Address</highlight></codeline>
<codeline lineno="200"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].<ref refid="fdc_8c_1e2746d1bf47d4f690105d083b966fa82" kindref="member">status</ref><sp/>==<sp/><ref refid="vmm_8h_1b75ffaa83e1dc903d97c411c84dfec0f" kindref="member">memAvail</ref>)<sp/>&amp;&amp;<sp/>(<ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].cowCounter<sp/>==<sp/>0))<sp/>{</highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].<ref refid="fdc_8c_1e2746d1bf47d4f690105d083b966fa82" kindref="member">status</ref><sp/>=<sp/><ref refid="vmm_8h_141dc1abc6436bd66a4269de8ab471181" kindref="member">memNotavail</ref>;</highlight></codeline>
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].<ref refid="structmMap_1d72d5f52b2195f98e60aa61ed52ae9b1" kindref="member">pid</ref><sp/>=<sp/>pid;</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" kindref="member">freePages</ref>--;</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" kindref="member">systemVitals</ref>)</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" kindref="member">systemVitals</ref>-&gt;<ref refid="structvitalsStruct_11f45a0348eac13344950507efaf565f8" kindref="member">freePages</ref><sp/>=<sp/><ref refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" kindref="member">freePages</ref>;</highlight></codeline>
<codeline lineno="207"><highlight class="normal"></highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" kindref="member">spinUnlock</ref>(&amp;<ref refid="vmm__memory_8c_1ee00a539cbe4cc341553ee44f318157a" kindref="member">vmmSpinLock</ref>);</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(<ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].pageAddr);</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="212"><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>No<sp/>Free<sp/>Memory<sp/>Is<sp/>Found<sp/>Return<sp/>NULL<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><ref refid="kpanic_8h_1db9a182aa071791a306163d50d653deb" kindref="member">kpanic</ref>(</highlight><highlight class="stringliteral">&quot;Out<sp/>Of<sp/>Memory!!!!&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0x0);</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="217"><highlight class="normal"></highlight></codeline>
<codeline lineno="218"><highlight class="normal"></highlight></codeline>
<codeline lineno="219"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="220"><highlight class="comment"></highlight></codeline>
<codeline lineno="221"><highlight class="comment"><sp/>Function:<sp/>int<sp/>freePage(uInt32<sp/>pageAddr);</highlight></codeline>
<codeline lineno="222"><highlight class="comment"></highlight></codeline>
<codeline lineno="223"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Function<sp/>Marks<sp/>The<sp/>Page<sp/>As<sp/>Free</highlight></codeline>
<codeline lineno="224"><highlight class="comment"></highlight></codeline>
<codeline lineno="225"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="226"><highlight class="comment"></highlight></codeline>
<codeline lineno="227"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="228" refid="vmm__memory_8c_1e90be267d851fed04d4d9b1c6c10454a" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="vmm_8h_1e90be267d851fed04d4d9b1c6c10454a" kindref="member">freePage</ref>(<ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>pageAddr)<sp/>{</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>pageIndex<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>((pageAddr<sp/>&amp;<sp/>0xFFF)<sp/>==<sp/>0x0);</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><ref refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" kindref="member">spinLock</ref>(&amp;<ref refid="vmm__memory_8c_1ee00a539cbe4cc341553ee44f318157a" kindref="member">vmmSpinLock</ref>);</highlight></codeline>
<codeline lineno="232"><highlight class="normal"></highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Find<sp/>The<sp/>Page<sp/>Index<sp/>To<sp/>The<sp/>Memory<sp/>Map<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/>pageIndex<sp/>=<sp/>(pageAddr<sp/>/<sp/>4096);</highlight></codeline>
<codeline lineno="235"><highlight class="normal"></highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Check<sp/>If<sp/>Page<sp/>COW<sp/>Is<sp/>Greater<sp/>Then<sp/>0<sp/>If<sp/>It<sp/>Is<sp/>Dec<sp/>It<sp/>If<sp/>Not<sp/>Free<sp/>It<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[pageIndex].cowCounter<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>Page<sp/>As<sp/>Avail<sp/>So<sp/>It<sp/>Can<sp/>Be<sp/>Used<sp/>Again<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[pageIndex].<ref refid="structmMap_1cce32b3022c0d0fbed2760ecc118f664" kindref="member">status</ref><sp/>=<sp/><ref refid="vmm_8h_1b75ffaa83e1dc903d97c411c84dfec0f" kindref="member">memAvail</ref>;</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[pageIndex].<ref refid="structmMap_12fb919d9c0a2653979ed667d59a395cb" kindref="member">cowCounter</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[pageIndex].<ref refid="structmMap_1d72d5f52b2195f98e60aa61ed52ae9b1" kindref="member">pid</ref><sp/>=<sp/>-2;</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" kindref="member">freePages</ref>++;</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" kindref="member">systemVitals</ref>-&gt;<ref refid="structvitalsStruct_11f45a0348eac13344950507efaf565f8" kindref="member">freePages</ref><sp/>=<sp/><ref refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" kindref="member">freePages</ref>;</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Adjust<sp/>The<sp/>COW<sp/>Counter<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_1362d462b3a1e19b5e0ef95e1839dbf11" kindref="member">adjustCowCounter</ref>(((<ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref>)<sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[pageIndex].pageAddr),<sp/>-1);</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><ref refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" kindref="member">spinUnlock</ref>(&amp;<ref refid="vmm__memory_8c_1ee00a539cbe4cc341553ee44f318157a" kindref="member">vmmSpinLock</ref>);</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="253"><highlight class="normal"></highlight></codeline>
<codeline lineno="254"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="255"><highlight class="comment"></highlight></codeline>
<codeline lineno="256"><highlight class="comment"><sp/>Function:<sp/>int<sp/>adjustCowCounter(uInt32<sp/>baseAddr,int<sp/>adjustment);</highlight></codeline>
<codeline lineno="257"><highlight class="comment"></highlight></codeline>
<codeline lineno="258"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Adjust<sp/>The<sp/>COW<sp/>Counter<sp/>For<sp/>Page<sp/>At<sp/>baseAddr<sp/>It<sp/>Will</highlight></codeline>
<codeline lineno="259"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Error<sp/>If<sp/>The<sp/>Count<sp/>Goes<sp/>Below<sp/>0</highlight></codeline>
<codeline lineno="260"><highlight class="comment"></highlight></codeline>
<codeline lineno="261"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="262"><highlight class="comment"></highlight></codeline>
<codeline lineno="263"><highlight class="comment"><sp/><sp/>08/01/02<sp/>-<sp/>I<sp/>Think<sp/>If<sp/>Counter<sp/>Gets<sp/>To<sp/>0<sp/>I<sp/>Should<sp/>Free<sp/>The<sp/>Page</highlight></codeline>
<codeline lineno="264"><highlight class="comment"></highlight></codeline>
<codeline lineno="265"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="266" refid="vmm__memory_8c_1362d462b3a1e19b5e0ef95e1839dbf11" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="vmm_8h_1362d462b3a1e19b5e0ef95e1839dbf11" kindref="member">adjustCowCounter</ref>(<ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>baseAddr,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>adjustment)<sp/>{</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>vmmMemoryMapIndex<sp/>=<sp/>(baseAddr<sp/>/<sp/>4096);</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>((baseAddr<sp/>&amp;<sp/>0xFFF)<sp/>==<sp/>0x0);</highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/><ref refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" kindref="member">spinLock</ref>(&amp;<ref refid="vmm__memory_8c_1c13b9a55ec869479ab26ad9d949e6f85" kindref="member">vmmCowSpinLock</ref>);</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Adjust<sp/>COW<sp/>Counter<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[vmmMemoryMapIndex].<ref refid="structmMap_12fb919d9c0a2653979ed667d59a395cb" kindref="member">cowCounter</ref><sp/>+=<sp/>adjustment;</highlight></codeline>
<codeline lineno="272"><highlight class="normal"></highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[vmmMemoryMapIndex].cowCounter<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[vmmMemoryMapIndex].<ref refid="structmMap_12fb919d9c0a2653979ed667d59a395cb" kindref="member">cowCounter</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[vmmMemoryMapIndex].<ref refid="structmMap_1d72d5f52b2195f98e60aa61ed52ae9b1" kindref="member">pid</ref><sp/>=<sp/><ref refid="vmm_8h_1e6c443b60824c02f199f51cf4a14e9f4" kindref="member">vmmID</ref>;</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[vmmMemoryMapIndex].<ref refid="structmMap_1cce32b3022c0d0fbed2760ecc118f664" kindref="member">status</ref><sp/>=<sp/><ref refid="vmm_8h_1b75ffaa83e1dc903d97c411c84dfec0f" kindref="member">memAvail</ref>;</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" kindref="member">freePages</ref>++;</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" kindref="member">systemVitals</ref>-&gt;<ref refid="structvitalsStruct_11f45a0348eac13344950507efaf565f8" kindref="member">freePages</ref><sp/>=<sp/><ref refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" kindref="member">freePages</ref>;</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><ref refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" kindref="member">spinUnlock</ref>(&amp;<ref refid="vmm__memory_8c_1c13b9a55ec869479ab26ad9d949e6f85" kindref="member">vmmCowSpinLock</ref>);</highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="284"><highlight class="normal"></highlight></codeline>
<codeline lineno="285"><highlight class="normal"></highlight><highlight class="comment">/************************************************************************</highlight></codeline>
<codeline lineno="286"><highlight class="comment"></highlight></codeline>
<codeline lineno="287"><highlight class="comment"><sp/>Function:<sp/>void<sp/>vmmFreeProcessPages(pid_t<sp/>pid);</highlight></codeline>
<codeline lineno="288"><highlight class="comment"></highlight></codeline>
<codeline lineno="289"><highlight class="comment"><sp/>Description:<sp/>This<sp/>Function<sp/>Will<sp/>Free<sp/>Up<sp/>Memory<sp/>For<sp/>The<sp/>Exiting<sp/>Process</highlight></codeline>
<codeline lineno="290"><highlight class="comment"></highlight></codeline>
<codeline lineno="291"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="292"><highlight class="comment"></highlight></codeline>
<codeline lineno="293"><highlight class="comment"><sp/><sp/>08/04/02<sp/>-<sp/>Added<sp/>Checking<sp/>For<sp/>COW<sp/>Pages<sp/>First</highlight></codeline>
<codeline lineno="294"><highlight class="comment"></highlight></codeline>
<codeline lineno="295"><highlight class="comment">************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="296" refid="vmm__memory_8c_1a24b696e386ef97dfe88b9b434c671c6" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="vmm_8h_1a24b696e386ef97dfe88b9b434c671c6" kindref="member">vmmFreeProcessPages</ref>(<ref refid="types_8h_1e438ba74394b14d7b24b6df3b3b8c252" kindref="member">pidType</ref><sp/>pid)<sp/>{</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=0,x=0;</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>*tmpPageTable<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/><ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>*tmpPageDir<sp/><sp/><sp/>=<sp/>(<ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>*)<ref refid="paging_8h_1aab3609eb02bd28ded8d1ea0512da979" kindref="member">parentPageDirAddr</ref>;</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><ref refid="spinlock_8h_12cd9a4502680fb8e7f0fe6b029e558b1" kindref="member">spinLock</ref>(&amp;<ref refid="vmm__memory_8c_1ee00a539cbe4cc341553ee44f318157a" kindref="member">vmmSpinLock</ref>);</highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Check<sp/>Page<sp/>Directory<sp/>For<sp/>An<sp/>Avail<sp/>Page<sp/>Table<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;i&lt;=0x300;i++)<sp/>{</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmpPageDir[i]<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>Up<sp/>Page<sp/>Table<sp/>Pointer<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmpPageTable<sp/>=<sp/>(<ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref><sp/>*)(<ref refid="paging_8h_1a432d41840ad8a583a7e6af86feece4f" kindref="member">tablesBaseAddress</ref><sp/>+<sp/>(i<sp/>*<sp/>0<ref refid="ap-boot_8S_1f78b91f02427adef14bb8b28aa93baa5" kindref="member">x1000</ref>));</highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Check<sp/>The<sp/>Page<sp/>Table<sp/>For<sp/>COW<sp/>Pages<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(x=0;x&lt;<ref refid="paging_8h_1b80d68a13753e40b0df8e0dc0c4af870" kindref="member">pageEntries</ref>;x++)<sp/>{</highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>The<sp/>Page<sp/>Is<sp/>COW<sp/>Adjust<sp/>COW<sp/>Counter<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(((<ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref>)tmpPageTable[x]<sp/>&amp;<sp/><ref refid="paging_8h_157d743cb60fe478f6720c42315e7e813" kindref="member">PAGE_COW</ref>)<sp/>==<sp/>PAGE_COW)<sp/>{</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vmm_8h_1362d462b3a1e19b5e0ef95e1839dbf11" kindref="member">adjustCowCounter</ref>(((uInt32)tmpPageTable[x]<sp/>&amp;<sp/>0xFFFFF000),-1);</highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="315"><highlight class="normal"></highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Loop<sp/>Through<sp/>Pages<sp/>To<sp/>Find<sp/>Pages<sp/>Owned<sp/>By<sp/>Process<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;i&lt;<ref refid="vmm_8h_12b0091bdc36e32af3daf9cfcaa7c04e1" kindref="member">numPages</ref>;i++)<sp/>{</highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].pid<sp/>==<sp/>pid)<sp/>{</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Check<sp/>To<sp/>See<sp/>If<sp/>The<sp/>cowCounter<sp/>Is<sp/>Zero<sp/>If<sp/>So<sp/>We<sp/>Can<sp/>Ree<sp/>It<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].cowCounter<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].<ref refid="fdc_8c_1e2746d1bf47d4f690105d083b966fa82" kindref="member">status</ref><sp/>=<sp/><ref refid="vmm_8h_1b75ffaa83e1dc903d97c411c84dfec0f" kindref="member">memAvail</ref>;</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].<ref refid="structmMap_12fb919d9c0a2653979ed667d59a395cb" kindref="member">cowCounter</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vmm_8h_189e87741958ee81f1811075b25af058a" kindref="member">vmmMemoryMap</ref>[i].<ref refid="structmMap_1d72d5f52b2195f98e60aa61ed52ae9b1" kindref="member">pid</ref><sp/>=<sp/><ref refid="vmm_8h_1e6c443b60824c02f199f51cf4a14e9f4" kindref="member">vmmID</ref>;</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" kindref="member">freePages</ref>++;</highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="vitals_8h_167aae71be472453526fc1a0bfbf80280" kindref="member">systemVitals</ref>-&gt;<ref refid="structvitalsStruct_11f45a0348eac13344950507efaf565f8" kindref="member">freePages</ref><sp/>=<sp/><ref refid="vmm__memory_8c_10e1198ffc77f9177e36e61b72daf3cdc" kindref="member">freePages</ref>;</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="329"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/><ref refid="spinlock_8h_1dd996cbbb3b9826dd9c8cf02b66a4c65" kindref="member">spinUnlock</ref>(&amp;vmmSpinLock);</highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="333"><highlight class="normal"></highlight></codeline>
<codeline lineno="334"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="335"><highlight class="comment"><sp/>$Log: vmm__memory_8c.xml,v $
<codeline lineno="335"><highlight class="comment"><sp/>Revision 1.6  2006/12/19 14:12:54  reddawg
<codeline lineno="335"><highlight class="comment"><sp/>rtld-elf almost workign
<codeline lineno="335"><highlight class="comment"><sp/></highlight></codeline>
<codeline lineno="336"><highlight class="comment"><sp/>Revision<sp/>1.1<sp/><sp/>2006/12/01<sp/>18:46:19<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="337"><highlight class="comment"><sp/>renaming<sp/>files</highlight></codeline>
<codeline lineno="338"><highlight class="comment"></highlight></codeline>
<codeline lineno="339"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2006/12/01<sp/>05:12:35<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="340"><highlight class="comment"><sp/>We&apos;re<sp/>almost<sp/>there...<sp/>:)</highlight></codeline>
<codeline lineno="341"><highlight class="comment"></highlight></codeline>
<codeline lineno="342"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2006/06/01<sp/>12:46:13<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="343"><highlight class="comment"><sp/>ubix2</highlight></codeline>
<codeline lineno="344"><highlight class="comment"></highlight></codeline>
<codeline lineno="345"><highlight class="comment"><sp/>Revision<sp/>1.5<sp/><sp/>2006/06/01<sp/>12:42:09<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="346"><highlight class="comment"><sp/>Getting<sp/>back<sp/>to<sp/>the<sp/>basics</highlight></codeline>
<codeline lineno="347"><highlight class="comment"></highlight></codeline>
<codeline lineno="348"><highlight class="comment"><sp/>Revision<sp/>1.4<sp/><sp/>2006/06/01<sp/>04:15:32<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="349"><highlight class="comment"><sp/>Woot</highlight></codeline>
<codeline lineno="350"><highlight class="comment"></highlight></codeline>
<codeline lineno="351"><highlight class="comment"><sp/>Revision<sp/>1.3<sp/><sp/>2006/06/01<sp/>03:58:33<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="352"><highlight class="comment"><sp/>wondering<sp/>about<sp/>this<sp/>stuff<sp/>here</highlight></codeline>
<codeline lineno="353"><highlight class="comment"></highlight></codeline>
<codeline lineno="354"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2005/10/12<sp/>00:13:38<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="355"><highlight class="comment"><sp/>Removed</highlight></codeline>
<codeline lineno="356"><highlight class="comment"></highlight></codeline>
<codeline lineno="357"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2005/09/26<sp/>17:24:51<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="358"><highlight class="comment"><sp/>no<sp/>message</highlight></codeline>
<codeline lineno="359"><highlight class="comment"></highlight></codeline>
<codeline lineno="360"><highlight class="comment"><sp/>Revision<sp/>1.15<sp/><sp/>2004/09/11<sp/>23:39:31<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="361"><highlight class="comment"><sp/>ok<sp/>time<sp/>for<sp/>bed</highlight></codeline>
<codeline lineno="362"><highlight class="comment"></highlight></codeline>
<codeline lineno="363"><highlight class="comment"><sp/>Revision<sp/>1.14<sp/><sp/>2004/09/11<sp/>16:39:19<sp/><sp/>apwillia</highlight></codeline>
<codeline lineno="364"><highlight class="comment"><sp/>Fix<sp/>order<sp/>in<sp/>adjustCowCounter<sp/>to<sp/>prevent<sp/>potential<sp/>race<sp/>condition</highlight></codeline>
<codeline lineno="365"><highlight class="comment"></highlight></codeline>
<codeline lineno="366"><highlight class="comment"><sp/>Revision<sp/>1.13<sp/><sp/>2004/08/14<sp/>11:23:03<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="367"><highlight class="comment"><sp/>Changes</highlight></codeline>
<codeline lineno="368"><highlight class="comment"></highlight></codeline>
<codeline lineno="369"><highlight class="comment"><sp/>Revision<sp/>1.12<sp/><sp/>2004/08/01<sp/>20:51:33<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="370"><highlight class="comment"><sp/>adjustCowCounter:<sp/>we<sp/>no<sp/>longer<sp/>need<sp/>to<sp/>debug<sp/>unhandled<sp/>adjustments<sp/>they<sp/>are<sp/>normal<sp/>situations<sp/>now</highlight></codeline>
<codeline lineno="371"><highlight class="comment"></highlight></codeline>
<codeline lineno="372"><highlight class="comment"><sp/>Revision<sp/>1.11<sp/><sp/>2004/07/28<sp/>00:17:05<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="373"><highlight class="comment"><sp/>Major:</highlight></codeline>
<codeline lineno="374"><highlight class="comment"><sp/><sp/><sp/>Disconnected<sp/>page<sp/>0x0<sp/>from<sp/>the<sp/>system...<sp/>Unfortunately<sp/>this<sp/>broke<sp/>many<sp/>things</highlight></codeline>
<codeline lineno="375"><highlight class="comment"><sp/><sp/><sp/>all<sp/>of<sp/>which<sp/>have<sp/>been<sp/>fixed.<sp/>This<sp/>was<sp/>good<sp/>because<sp/>nothing<sp/>deferences<sp/>NULL</highlight></codeline>
<codeline lineno="376"><highlight class="comment"><sp/><sp/><sp/>any<sp/>more.</highlight></codeline>
<codeline lineno="377"><highlight class="comment"></highlight></codeline>
<codeline lineno="378"><highlight class="comment"><sp/>Things<sp/>affected:</highlight></codeline>
<codeline lineno="379"><highlight class="comment"><sp/><sp/><sp/>malloc,kmalloc,getfreepage,getfreevirtualpage,pagefault,fork,exec,ld,ld.so,exec,file</highlight></codeline>
<codeline lineno="380"><highlight class="comment"></highlight></codeline>
<codeline lineno="381"><highlight class="comment"><sp/>Revision<sp/>1.10<sp/><sp/>2004/07/26<sp/>19:15:49<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="382"><highlight class="comment"><sp/>test<sp/>code,<sp/>fixes<sp/>and<sp/>the<sp/>like</highlight></codeline>
<codeline lineno="383"><highlight class="comment"></highlight></codeline>
<codeline lineno="384"><highlight class="comment"><sp/>Revision<sp/>1.9<sp/><sp/>2004/07/24<sp/>23:04:44<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="385"><highlight class="comment"><sp/>Changes...<sp/>mark<sp/>let<sp/>me<sp/>know<sp/>if<sp/>you<sp/>fault<sp/>at<sp/>pid<sp/>185<sp/>when<sp/>you<sp/>type<sp/>stress</highlight></codeline>
<codeline lineno="386"><highlight class="comment"></highlight></codeline>
<codeline lineno="387"><highlight class="comment"><sp/>Revision<sp/>1.8<sp/><sp/>2004/07/24<sp/>17:47:28<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="388"><highlight class="comment"><sp/>vmm_pageFault:<sp/>deadlock<sp/>resolved<sp/>thanks<sp/>to<sp/>a<sp/>propper<sp/>solution<sp/>suggested<sp/>by<sp/>geist</highlight></codeline>
<codeline lineno="389"><highlight class="comment"></highlight></codeline>
<codeline lineno="390"><highlight class="comment"><sp/>Revision<sp/>1.7<sp/><sp/>2004/07/19<sp/>02:04:32<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="391"><highlight class="comment"><sp/>memory.c:<sp/>added<sp/>spinlocks<sp/>to<sp/>vmmFindFreePage<sp/>and<sp/>vmmFreePage<sp/>to<sp/>prevent<sp/>two<sp/>tasks<sp/>from<sp/>possibly<sp/>allocating<sp/>the<sp/>same<sp/>page</highlight></codeline>
<codeline lineno="392"><highlight class="comment"></highlight></codeline>
<codeline lineno="393"><highlight class="comment"><sp/>Revision<sp/>1.6<sp/><sp/>2004/06/14<sp/>12:20:54<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="394"><highlight class="comment"><sp/>notes:<sp/>many<sp/>bugs<sp/>repaired<sp/>and<sp/>ld<sp/>works<sp/>100%<sp/>now.</highlight></codeline>
<codeline lineno="395"><highlight class="comment"></highlight></codeline>
<codeline lineno="396"><highlight class="comment"><sp/>Revision<sp/>1.5<sp/><sp/>2004/05/21<sp/>15:34:23<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="397"><highlight class="comment"><sp/>Fixed<sp/>a<sp/>couple<sp/>of<sp/>typo</highlight></codeline>
<codeline lineno="398"><highlight class="comment"></highlight></codeline>
<codeline lineno="399"><highlight class="comment"><sp/>Revision<sp/>1.4<sp/><sp/>2004/05/21<sp/>14:50:10<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="400"><highlight class="comment"><sp/>Cleaned<sp/>up</highlight></codeline>
<codeline lineno="401"><highlight class="comment"></highlight></codeline>
<codeline lineno="402"><highlight class="comment"><sp/>Revision<sp/>1.3<sp/><sp/>2004/05/19<sp/>17:28:28<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="403"><highlight class="comment"><sp/>Added<sp/>the<sp/>correct<sp/>endTask<sp/>Procedure</highlight></codeline>
<codeline lineno="404"><highlight class="comment"></highlight></codeline>
<codeline lineno="405"><highlight class="comment"><sp/>Revision<sp/>1.2<sp/><sp/>2004/04/30<sp/>14:16:04<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="406"><highlight class="comment"><sp/>Fixed<sp/>all<sp/>the<sp/>datatypes<sp/>to<sp/>be<sp/>consistant<sp/>uInt8,uInt16,uInt32,Int8,Int16,Int32</highlight></codeline>
<codeline lineno="407"><highlight class="comment"></highlight></codeline>
<codeline lineno="408"><highlight class="comment"><sp/>Revision<sp/>1.1.1.1<sp/><sp/>2004/04/15<sp/>12:06:52<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="409"><highlight class="comment"><sp/>UbixOS<sp/>v1.0</highlight></codeline>
<codeline lineno="410"><highlight class="comment"></highlight></codeline>
<codeline lineno="411"><highlight class="comment"><sp/>Revision<sp/>1.27<sp/><sp/>2004/04/13<sp/>16:36:34<sp/><sp/>reddawg</highlight></codeline>
<codeline lineno="412"><highlight class="comment"><sp/>Changed<sp/>our<sp/>copyright,<sp/>it<sp/>is<sp/>all<sp/>now<sp/>under<sp/>a<sp/>BSD-Style<sp/>license</highlight></codeline>
<codeline lineno="413"><highlight class="comment"></highlight></codeline>
<codeline lineno="414"><highlight class="comment"></highlight></codeline>
<codeline lineno="415"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="416"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/usr/home/reddawg/source/ubix2/src/sys/vmm/vmm_memory.c"/>
  </compounddef>
</doxygen>
