<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://xinu.cs.mu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ebiggers</id>
	<title>Embedded Xinu - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://xinu.cs.mu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ebiggers"/>
	<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php/Special:Contributions/Ebiggers"/>
	<updated>2026-06-15T14:32:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Coding_style&amp;diff=4108</id>
		<title>Coding style</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Coding_style&amp;diff=4108"/>
		<updated>2013-09-12T03:21:38Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created page as redirect to Kernel Normal Form&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Kernel Normal Form]]&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Mipsel-qemu&amp;diff=4107</id>
		<title>Mipsel-qemu</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Mipsel-qemu&amp;diff=4107"/>
		<updated>2013-09-12T02:59:53Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Say &amp;quot;virtual environment&amp;quot;, not &amp;quot;emulation environment&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Embedded Xinu]] has been ported to the MIPSel virtual environment provided by [http://wiki.qemu.org/Main_Page QEMU].  This provides an easy way to run a basic Embedded Xinu environment on a RISC architecture without devoting &amp;quot;real&amp;quot; hardware.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
[[Build Xinu|Compile Embedded Xinu]] with &amp;lt;code&amp;gt;PLATFORM=mipsel-qemu&amp;lt;/code&amp;gt;.  This will produce the file &amp;lt;code&amp;gt;xinu.boot&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;compile/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
 &lt;br /&gt;
 qemu-system-mipsel -M mips -m 16M -kernel xinu.boot -nographic&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
The mipsel-qemu platform does not yet support networking.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Qemu&amp;diff=4106</id>
		<title>Qemu</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Qemu&amp;diff=4106"/>
		<updated>2013-09-12T02:59:38Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Say &amp;quot;virtual environment&amp;quot;, not &amp;quot;emulation environment&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Embedded Xinu]] has been ported to the following virtual environments provided by [http://wiki.qemu.org/Main_Page QEMU]:&lt;br /&gt;
&lt;br /&gt;
* [[mipsel-qemu]] (Little-endian MIPS)&lt;br /&gt;
&lt;br /&gt;
These platforms provide an easy way to run Embedded Xinu without devoting real hardware.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Mipsel-qemu&amp;diff=4105</id>
		<title>Mipsel-qemu</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Mipsel-qemu&amp;diff=4105"/>
		<updated>2013-09-12T02:58:02Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: mipsel-qemu, not qemu-mipsel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Embedded Xinu]] has been ported to the MIPSel emulation environment provided by [http://wiki.qemu.org/Main_Page QEMU].  This provides an easy way to run a basic Embedded Xinu environment on a RISC architecture without devoting &amp;quot;real&amp;quot; hardware.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
[[Build Xinu|Compile Embedded Xinu]] with &amp;lt;code&amp;gt;PLATFORM=mipsel-qemu&amp;lt;/code&amp;gt;.  This will produce the file &amp;lt;code&amp;gt;xinu.boot&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;compile/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
 &lt;br /&gt;
 qemu-system-mipsel -M mips -m 16M -kernel xinu.boot -nographic&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
The mipsel-qemu platform does not yet support networking.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=List_of_supported_platforms&amp;diff=4104</id>
		<title>List of supported platforms</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=List_of_supported_platforms&amp;diff=4104"/>
		<updated>2013-09-12T02:57:11Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: mipsel-qemu, not qemu-mipsel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
This page lists the platforms currently supported by the Embedded Xinu operating system (or at least in development).&lt;br /&gt;
&lt;br /&gt;
== Supported Platforms ==&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!width=&amp;quot;18%&amp;quot;|Platform&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|Status&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|[[WRT54GL|Linksys WRT54GL]] [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&amp;amp;childpagename=US%2FLayout&amp;amp;cid=1133202177241&amp;amp;pagename=Linksys%2FCommon%2FVisitorWrapper]&lt;br /&gt;
|Supported&lt;br /&gt;
|This is our primary development platform, on which Xinu has been tested thoroughly.&lt;br /&gt;
|-&lt;br /&gt;
|[[WRT54G|Linksys WRT54G]] v8 [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&amp;amp;childpagename=US%2FLayout&amp;amp;cid=1149562300349&amp;amp;pagename=Linksys%2FCommon%2FVisitorWrapper] &lt;br /&gt;
|Supported&lt;br /&gt;
|Tested and running at the Embedded Xinu Lab.&lt;br /&gt;
|-&lt;br /&gt;
|[[WRT54G|Linksys WRT54G]] v4 [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&amp;amp;childpagename=US%2FLayout&amp;amp;cid=1149562300349&amp;amp;pagename=Linksys%2FCommon%2FVisitorWrapper]&lt;br /&gt;
|Probably Supported&lt;br /&gt;
|The v4 is apparently the version on which WRT54GL is based, and so although the Embedded Xinu Lab has not explicitly tested it, it probably works.&lt;br /&gt;
|-&lt;br /&gt;
|[[WRT350N|Linksys WRT350N]] [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&amp;amp;childpagename=US%2FLayout&amp;amp;cid=1162354643512&amp;amp;pagename=Linksys%2FCommon%2FVisitorWrapper]&lt;br /&gt;
|Under Development&lt;br /&gt;
|Currently the synchronous [[UART Driver]] works.&lt;br /&gt;
|-&lt;br /&gt;
|[[WRT160NL|Linksys WRT160NL]] [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&amp;amp;childpagename=US%2FLayout&amp;amp;cid=1149562300349&amp;amp;pagename=Linksys%2FCommon%2FVisitorWrapper]&lt;br /&gt;
|Supported&lt;br /&gt;
|Newer model of router.  Full O/S teaching core functioning, including wired network interface.&lt;br /&gt;
|-&lt;br /&gt;
|[[mipsel-qemu]] [http://www.qemu.org/]&lt;br /&gt;
|Supported&lt;br /&gt;
|Full O/S teaching core functioning, network support in progress.&lt;br /&gt;
|-&lt;br /&gt;
|[[Raspberry Pi]] [http://www.raspberrypi.org]&lt;br /&gt;
|Under Development&lt;br /&gt;
|Core operating system including wired networking is functional.  Some new features are still being worked on, and the full documentation (e.g. for a laboratory setup) hasn't been completed yet.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Qemu&amp;diff=4103</id>
		<title>Qemu</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Qemu&amp;diff=4103"/>
		<updated>2013-09-12T02:56:34Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: mipsel-qemu, not qemu-mipsel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Embedded Xinu]] has been ported to the following emulation environments provided by [http://wiki.qemu.org/Main_Page QEMU]:&lt;br /&gt;
&lt;br /&gt;
* [[mipsel-qemu]] (Little-endian MIPS)&lt;br /&gt;
&lt;br /&gt;
These platforms provide an easy way to run Embedded Xinu without devoting real hardware.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Qemu-mipsel&amp;diff=4102</id>
		<title>Qemu-mipsel</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Qemu-mipsel&amp;diff=4102"/>
		<updated>2013-09-12T02:56:07Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Redirect to mipsel-qemu (platform name used in code)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[mipsel-qemu]]&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Mipsel-qemu&amp;diff=4101</id>
		<title>Mipsel-qemu</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Mipsel-qemu&amp;diff=4101"/>
		<updated>2013-09-12T02:55:31Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Embedded Xinu]] has been ported to the MIPSel emulation environment provided by [http://wiki.qemu.org/Main_Page QEMU].  This provides an easy way to run a basic Embedded Xinu environment on a RISC architecture without devoting &amp;quot;real&amp;quot; hardware.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
[[Build Xinu|Compile Embedded Xinu]] with &amp;lt;code&amp;gt;PLATFORM=qemu-mipsel&amp;lt;/code&amp;gt;.  This will produce the file &amp;lt;code&amp;gt;xinu.boot&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;compile/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
 &lt;br /&gt;
 qemu-system-mipsel -M mips -m 16M -kernel xinu.boot -nographic&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
The qemu-mipsel platform does not yet support networking.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Main_Page&amp;diff=4100</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Main_Page&amp;diff=4100"/>
		<updated>2013-09-12T02:55:01Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Link to mipsel-qemu&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Embedded Xinu''' is an ongoing research and implementation project in the area of Operating Systems and Embedded Systems.  Its original goal was to re-implement and port the [[Xinu|Xinu Operating System]] to several embedded MIPS platforms, such as the Linksys [[WRT54GL]] router.  Since then, Embedded Xinu has been ported to other platforms, such as the [[mipsel-qemu|QEMU MIPSel virtual environment]] and the [[Raspberry Pi]]; see the [[list of supported platforms]].  Although Embedded Xinu is still being developed and ported to new platforms, a laboratory environment and curriculum materials are already in use for courses in Operating Systems, Hardware Systems, Embedded Systems, Networking, and Compilers at Marquette University and other colleges/universities.&lt;br /&gt;
&lt;br /&gt;
The Embedded Xinu project was conceived and is supervised by [http://www.mscs.mu.edu/~brylow/ Dr. Dennis Brylow] and is being conducted by both graduate and undergraduate students in the [[Systems Laboratory]] in the [http://www.mscs.mu.edu/ Math, Statistics, &amp;amp; Computer Science] department of [http://www.mu.edu/ Marquette University] in Milwaukee, Wisconsin.  The first major phase of work on Embedded Xinu began in the Summer of 2006.&lt;br /&gt;
&lt;br /&gt;
Our project partners include [http://www.cse.buffalo.edu/~bina/ Dr. Bina Ramamurthy] at University of Buffalo (with whom we shared an [http://www.nsf.gov/pubs/2009/nsf09529/nsf09529.html NSF CCLI] grant), [http://cs.olemiss.edu/~ruth/wiki/doku.php Dr. Paul Ruth] at University of Mississippi, and [http://www.cs.purdue.edu/people/comer Dr. Doug Comer] (father of Xinu) at Purdue University.&lt;br /&gt;
&lt;br /&gt;
== Teaching With Embedded Xinu ==&lt;br /&gt;
&lt;br /&gt;
* For curriculum guidance on adopting or adapting Embedded Xinu for undergraduate coursework, see [[Teaching With Xinu]].&lt;br /&gt;
* Workshops have been held regarding teaching with Embedded Xinu.  For example, the [http://www.cs.olemiss.edu/acmse2010/pdf/xinu.pdf Teaching With Embedded Xinu Workshop] at [http://www.cs.olemiss.edu/acmse2010/Home.htm ACMSE 2010] in Oxford, Mississippi (Ole Miss campus) shared ready-made curriculum resources that have been used successfully to teach hardware systems, operating systems, realtime/embedded systems, networking, and compilers with the Embedded Xinu platform at several colleges/universities.&lt;br /&gt;
&lt;br /&gt;
== Building an Embedded Xinu Laboratory ==&lt;br /&gt;
&lt;br /&gt;
In this section we are developing instructions so that other groups can benefit from the work we are doing.  These guides can be followed more or less in order to create a relatively inexpensive platform for a custom operating system.  As our work develops further, there will be more Xinu-specific information.&lt;br /&gt;
&lt;br /&gt;
# Obtain a [[List of supported platforms|supported platform]].&lt;br /&gt;
# [[HOWTO:Modify the Linksys hardware|Modify the Linksys hardware]] or [[HOWTO:Modify the ASUS hardware|Modify the ASUS hardware]]&lt;br /&gt;
# [[HOWTO:Connect to a modified router|Connect to a modified router]]&lt;br /&gt;
# [[HOWTO:Build Xinu|Build Xinu]]&lt;br /&gt;
# [[HOWTO:Deploy Xinu|Deploy Xinu]]&lt;br /&gt;
# (Optional) [[HOWTO:Build Backend Pool|Build a pool of backends]]&lt;br /&gt;
# (Recommended) [[HOWTO:Backup your router|Backup your router's factory configuration]]&lt;br /&gt;
&lt;br /&gt;
== Other Embedded Xinu Information ==&lt;br /&gt;
&lt;br /&gt;
* MIPS [[processor]]&lt;br /&gt;
* Main [[memory]]&lt;br /&gt;
* [[Exception and Interrupt Handling]]&lt;br /&gt;
* [[UART driver]]&lt;br /&gt;
* [[TTY driver]]&lt;br /&gt;
* [[Switch driver]]&lt;br /&gt;
* [[Networking]]&lt;br /&gt;
* [[Flash memory]]&lt;br /&gt;
* [[Flashing firmware]]&lt;br /&gt;
* [[EJTAG|Enhanced Joint Test Action Group]] debugger&lt;br /&gt;
* [[Standard library]]&lt;br /&gt;
* [[XinuPhone]] Internet telephony&lt;br /&gt;
* [[Router Recovery]] aka &amp;quot;Debricking&amp;quot;&lt;br /&gt;
* [[Development]]&lt;br /&gt;
* [[Contributors]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;small&amp;gt;The Xinu Lab is brought to you in part by [[XMMS|M&amp;amp;M's]].&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
--&amp;gt;__NOTOC__&amp;lt;!-- Disable &amp;quot;Contents&amp;quot; box from showing --&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;__NOEDITSECTION__&amp;lt;!-- Disable [edit] from appearing --&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Qemu-mipsel&amp;diff=4099</id>
		<title>Qemu-mipsel</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Qemu-mipsel&amp;diff=4099"/>
		<updated>2013-09-12T02:52:59Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Wikify&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Embedded Xinu]] has been ported to the MIPSel emulation environment provided by [http://wiki.qemu.org/Main_Page QEMU].  This provides an easy way to run a basic Embedded Xinu environment on a RISC architecture without devoting &amp;quot;real&amp;quot; hardware.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
[[Build Xinu|Compile Embedded Xinu]] with &amp;lt;code&amp;gt;PLATFORM=qemu-mipsel&amp;lt;/code&amp;gt;.  This will produce the file &amp;lt;code&amp;gt;xinu.boot&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;compile/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
 &lt;br /&gt;
 qemu-system-mipsel -M mips -m 16M -kernel xinu.boot -nographic&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
The qemu-mipsel platform does not yet support networking.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=List_of_supported_platforms&amp;diff=4098</id>
		<title>List of supported platforms</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=List_of_supported_platforms&amp;diff=4098"/>
		<updated>2013-09-12T02:52:33Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Link to qemu-mipsel, not qemu&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
This page lists the platforms currently supported by the Embedded Xinu operating system (or at least in development).&lt;br /&gt;
&lt;br /&gt;
== Supported Platforms ==&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!width=&amp;quot;18%&amp;quot;|Platform&lt;br /&gt;
!width=&amp;quot;15%&amp;quot;|Status&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|[[WRT54GL|Linksys WRT54GL]] [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&amp;amp;childpagename=US%2FLayout&amp;amp;cid=1133202177241&amp;amp;pagename=Linksys%2FCommon%2FVisitorWrapper]&lt;br /&gt;
|Supported&lt;br /&gt;
|This is our primary development platform, on which Xinu has been tested thoroughly.&lt;br /&gt;
|-&lt;br /&gt;
|[[WRT54G|Linksys WRT54G]] v8 [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&amp;amp;childpagename=US%2FLayout&amp;amp;cid=1149562300349&amp;amp;pagename=Linksys%2FCommon%2FVisitorWrapper] &lt;br /&gt;
|Supported&lt;br /&gt;
|Tested and running at the Embedded Xinu Lab.&lt;br /&gt;
|-&lt;br /&gt;
|[[WRT54G|Linksys WRT54G]] v4 [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&amp;amp;childpagename=US%2FLayout&amp;amp;cid=1149562300349&amp;amp;pagename=Linksys%2FCommon%2FVisitorWrapper]&lt;br /&gt;
|Probably Supported&lt;br /&gt;
|The v4 is apparently the version on which WRT54GL is based, and so although the Embedded Xinu Lab has not explicitly tested it, it probably works.&lt;br /&gt;
|-&lt;br /&gt;
|[[WRT350N|Linksys WRT350N]] [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&amp;amp;childpagename=US%2FLayout&amp;amp;cid=1162354643512&amp;amp;pagename=Linksys%2FCommon%2FVisitorWrapper]&lt;br /&gt;
|Under Development&lt;br /&gt;
|Currently the synchronous [[UART Driver]] works.&lt;br /&gt;
|-&lt;br /&gt;
|[[WRT160NL|Linksys WRT160NL]] [http://www.linksys.com/servlet/Satellite?c=L_Product_C2&amp;amp;childpagename=US%2FLayout&amp;amp;cid=1149562300349&amp;amp;pagename=Linksys%2FCommon%2FVisitorWrapper]&lt;br /&gt;
|Supported&lt;br /&gt;
|Newer model of router.  Full O/S teaching core functioning, including wired network interface.&lt;br /&gt;
|-&lt;br /&gt;
|[[Qemu-mipsel]] [http://www.qemu.org/]&lt;br /&gt;
|Supported&lt;br /&gt;
|Full O/S teaching core functioning, network support in progress.&lt;br /&gt;
|-&lt;br /&gt;
|[[Raspberry Pi]] [http://www.raspberrypi.org]&lt;br /&gt;
|Under Development&lt;br /&gt;
|Core operating system including wired networking is functional.  Some new features are still being worked on, and the full documentation (e.g. for a laboratory setup) hasn't been completed yet.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Qemu&amp;diff=4097</id>
		<title>Qemu</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Qemu&amp;diff=4097"/>
		<updated>2013-09-12T02:51:52Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Embedded Xinu]] has been ported to the following emulation environments provided by [http://wiki.qemu.org/Main_Page QEMU]:&lt;br /&gt;
&lt;br /&gt;
* [[qemu-mipsel]] (Little-endian MIPS)&lt;br /&gt;
&lt;br /&gt;
These platforms provide an easy way to run Embedded Xinu without devoting real hardware.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Qemu-mipsel&amp;diff=4096</id>
		<title>Qemu-mipsel</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Qemu-mipsel&amp;diff=4096"/>
		<updated>2013-09-12T02:50:10Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created page with content from Qemu&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Embedded Xinu has been ported to the MIPSel emulation environment provided by [http://wiki.qemu.org/Main_Page QEMU].  This provides an easy way to run a basic Embedded Xinu environment on a RISC architecture without devoting &amp;quot;real&amp;quot; hardware.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
[[Build Xinu|Compile Embedded Xinu]] with &amp;lt;code&amp;gt;PLATFORM=qemu-mipsel&amp;lt;/code&amp;gt;.  This will produce the file &amp;lt;code&amp;gt;xinu.boot&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;compile/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
 &lt;br /&gt;
 qemu-system-mipsel -M mips -m 16M -kernel xinu.boot -nographic&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
The qemu-mipsel platform does not yet support networking.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Qemu&amp;diff=4095</id>
		<title>Qemu</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Qemu&amp;diff=4095"/>
		<updated>2013-09-12T02:49:04Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Embedded Xinu has been ported to the MIPSel emulation environment provided by [http://wiki.qemu.org/Main_Page QEMU].  This provides an easy way to run a basic Embedded Xinu environment on a RISC architecture without devoting &amp;quot;real&amp;quot; hardware.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
[[Build Xinu|Compile Embedded Xinu]] with &amp;lt;code&amp;gt;PLATFORM=qemu-mipsel&amp;lt;/code&amp;gt;.  This will produce the file &amp;lt;code&amp;gt;xinu.boot&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;compile/&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
 &lt;br /&gt;
 qemu-system-mipsel -M mips -m 16M -kernel xinu.boot -nographic&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
The qemu-mipsel platform does not yet support networking.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Networking&amp;diff=4094</id>
		<title>Networking</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Networking&amp;diff=4094"/>
		<updated>2013-09-12T02:41:51Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Link to TFTP and DHCP pages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= XINU Networking Features =&lt;br /&gt;
* [[TCP]]&lt;br /&gt;
* [[UDP]]&lt;br /&gt;
* [[ARP]]&lt;br /&gt;
* [[Routing]]&lt;br /&gt;
* [[ICMP]]&lt;br /&gt;
* [[TFTP client]] (development version only)&lt;br /&gt;
* [[DHCP client]] (development version only)&lt;br /&gt;
&lt;br /&gt;
= Design = &lt;br /&gt;
The new network stack design does not have a NET device. The read and write device function paradigm does not map well to the network stack. TCP, UDP, and RAW sockets do not read from a network device, rather a network receive thread calls a chain of receive functions to process the packet at each layer in the network stack. A write function does not work well for sending a packet since the final destination of the packet is not known until the IP and/or ARP layers. The write device function assumes the thread calling write knows exactly which device to which the data should be written. A table of netif structures (separate from devtab, the table of devices) is still maintained to store configuration and accounting information for each underlying device (ETH, etc.) with which the network stack is receiving and sending packets.&lt;br /&gt;
&lt;br /&gt;
A network interface is setup using the netUp command. An underlying device, IP address, mask, and gateway must be provided when calling netUp. DHCP functions as a separate process which runs before and netUp is called; DHCP interacts directly with the underlying device (ETH, etc.) without using the network stack.&lt;br /&gt;
&lt;br /&gt;
Network receive threads continually read incoming packets from an underlying device. Each network interface has one or more network receive threads running. The netRecv function includes an infinite loop which reads a packet from the underlying device and calls ipRecv or arpRecv depending on the type of the packet. The packet is read into a buffer declared as a local variable within the netRecv function. At the IP layer ipRecv calls tcpRecv, udpRecv, rawRecv, or passes the packet to a routing thread. No sending of packets should ever occur under a network receive thread. For protocols in which an incoming packet may generate the need to send a reply packet, the protocol must have a separate thread for sending. For example, if an incoming TCP packet contains data which needs to be acknowledge, and tcpRecv should set a flag or send a message to a TCP monitor thread which will proceed to send the acknowledgement.&lt;br /&gt;
&lt;br /&gt;
A global buffer pool is allocated for storing outgoing packets. One pool exists for use by all network interfaces. When sending a packet, the sending function (ex. tcpSend) obtains a buffer from the pool, calls the appropriate lower-level send function (ex. ipSend), and, after the function returns, returns the buffer to the pool.&lt;br /&gt;
&lt;br /&gt;
The network stack is designed to treat the Xinu backend as both a router and a multi-homed host. Packets received on any of a backend's network interfaces may be destined for the backend or may need to be routed to another network destination. The network layer (IP layer) determines how to handle incoming packets. In the function ipRecv, the destination of an IP packet is compared against the IP address and broadcast address for every active network interface. If the destination address of the IP packet matches the IP address of the interface on which it was received or the IP address of any other network interface, the packet is passed to the appropriate transport layer receive function (udpRecv, tcpRecv, etc.). IP packets whose destination does not match with one of the active network interfaces are passed to the routing module of the network stack, i.e. the function rteRecv is called. In rteRecv the packet is copied into a buffer from the global buffer pool and placed on a queue for a routing thread to process. Currently, the network stack does not use a selective drop algorithm when the router is overloaded; once the queue of packets to route is full, all subsequent packets which require routing are dropped. A routing thread processes each packet on the routing queue. If no route is known, the packet is dropped; otherwise the TTL is decrement, the checksum is recalculated and the netSend function is called. Packets being sent from the transport layer (udpSend, tcpSend, etc) are not passed to the routing thread. The transport layer calls ipSend which performs a route table lookup, sets up the IP packet header and calls netSend.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network Graphic ==&lt;br /&gt;
* [[Media:XINUNetStack-Screen.jpeg]]&lt;br /&gt;
* [[Media:XINUNetStack-Print.jpeg]]&lt;br /&gt;
* [[Media:XINUNetStack.pdf]]&lt;br /&gt;
[[File:XINUNetStack-Screen.jpeg|border|500px]]&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=TFTP&amp;diff=4093</id>
		<title>TFTP</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=TFTP&amp;diff=4093"/>
		<updated>2013-09-12T02:38:32Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Adjust external link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''TFTP''' ('''Trivial File Transfer Protocol''') support has been added to [[Embedded Xinu]].  Currently, only client support--- that is, downloading files with TFTP Get requests--- is supported.  The code is located in {{SourceFile|network/tftp/}}.  The API includes the header {{SourceFile|include/tftp.h}} declaring &amp;lt;code&amp;gt;tftpGet()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tftpGetIntoBuffer()&amp;lt;/code&amp;gt;.  See the API documentation for more information.&lt;br /&gt;
&lt;br /&gt;
Note that this page refers specifically to the TFTP client support built into [[Embedded Xinu]], which is completely separate from the TFTP support included in [[CFE]], which is third-party firmware.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://tools.ietf.org/html/rfc1350 RFC 1350: The TFTP Protocol (Revision 2)]&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=DHCP_client&amp;diff=4092</id>
		<title>DHCP client</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=DHCP_client&amp;diff=4092"/>
		<updated>2013-09-12T02:37:30Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created page as redirect to DHCP&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[DHCP]]&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=DHCP&amp;diff=4091</id>
		<title>DHCP</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=DHCP&amp;diff=4091"/>
		<updated>2013-09-12T02:37:10Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''DHCP''' ('''Dynamic Host Configuration Protocol''') support has been added to Embedded Xinu. Currently, only IPv4 client support--- that is, acquiring IPv4 address information--- is supported. The code is located in {{SourceFile|network/dhcpc/}}. The API includes the header {{SourceFile|include/dhcpc.h}} declaring &amp;lt;code&amp;gt;dhcpClient()&amp;lt;/code&amp;gt;. See the API documentation for more information.&lt;br /&gt;
&lt;br /&gt;
Note that this page refers specifically to the DHCP client support built into Embedded Xinu, which is completely separate from the DHCP support included in CFE, which is third-party firmware.&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.ietf.org/rfc/rfc2131.txt RFC 2131: Dynamic Host Configuration Protocol]&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=TFTP&amp;diff=4090</id>
		<title>TFTP</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=TFTP&amp;diff=4090"/>
		<updated>2013-09-12T02:33:35Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''TFTP''' ('''Trivial File Transfer Protocol''') support has been added to [[Embedded Xinu]].  Currently, only client support--- that is, downloading files with TFTP Get requests--- is supported.  The code is located in {{SourceFile|network/tftp/}}.  The API includes the header {{SourceFile|include/tftp.h}} declaring &amp;lt;code&amp;gt;tftpGet()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tftpGetIntoBuffer()&amp;lt;/code&amp;gt;.  See the API documentation for more information.&lt;br /&gt;
&lt;br /&gt;
Note that this page refers specifically to the TFTP client support built into [[Embedded Xinu]], which is completely separate from the TFTP support included in [[CFE]], which is third-party firmware.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* http://tools.ietf.org/html/rfc1350&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=TFTP_client&amp;diff=4089</id>
		<title>TFTP client</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=TFTP_client&amp;diff=4089"/>
		<updated>2013-09-12T02:31:22Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created page as redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[TFTP]]&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=TFTP&amp;diff=4088</id>
		<title>TFTP</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=TFTP&amp;diff=4088"/>
		<updated>2013-09-12T02:30:57Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''TFTP''' ('''Trivial File Transfer Protocol''') support has been added to Embedded Xinu.  Currently, only client support--- that is, downloading files with TFTP Get requests--- is supported.  The code is located in {{SourceFile|network/tftp/}}.  The external interface includes the header {{SourceFile|include/tftp.h}} declaring &amp;lt;code&amp;gt;tftpGet()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tftpGetIntoBuffer()&amp;lt;/code&amp;gt;.  See the API documentation for more information.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* http://tools.ietf.org/html/rfc1350&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Main_Page&amp;diff=4087</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Main_Page&amp;diff=4087"/>
		<updated>2013-09-12T02:20:11Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Add link to contributors page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Embedded Xinu''' is an ongoing research and implementation project in the area of Operating Systems and Embedded Systems.  Its original goal was to re-implement and port the [[Xinu|Xinu Operating System]] to several embedded MIPS platforms, such as the Linksys [[WRT54GL]] router.  Since then, Embedded Xinu has been ported to other platforms, such as the QEMU-MIPSel virtual machine and the [[Raspberry Pi]]; see the [[list of supported platforms]].  Although Embedded Xinu is still being developed and ported to new platforms, a laboratory environment and curriculum materials are already in use for courses in Operating Systems, Hardware Systems, Embedded Systems, Networking, and Compilers at Marquette University and other colleges/universities.&lt;br /&gt;
&lt;br /&gt;
The Embedded Xinu project was conceived and is supervised by [http://www.mscs.mu.edu/~brylow/ Dr. Dennis Brylow] and is being conducted by both graduate and undergraduate students in the [[Systems Laboratory]] in the [http://www.mscs.mu.edu/ Math, Statistics, &amp;amp; Computer Science] department of [http://www.mu.edu/ Marquette University] in Milwaukee, Wisconsin.  The first major phase of work on Embedded Xinu began in the Summer of 2006.&lt;br /&gt;
&lt;br /&gt;
Our project partners include [http://www.cse.buffalo.edu/~bina/ Dr. Bina Ramamurthy] at University of Buffalo (with whom we shared an [http://www.nsf.gov/pubs/2009/nsf09529/nsf09529.html NSF CCLI] grant), [http://cs.olemiss.edu/~ruth/wiki/doku.php Dr. Paul Ruth] at University of Mississippi, and [http://www.cs.purdue.edu/people/comer Dr. Doug Comer] (father of Xinu) at Purdue University.&lt;br /&gt;
&lt;br /&gt;
== Teaching With Embedded Xinu ==&lt;br /&gt;
&lt;br /&gt;
* For curriculum guidance on adopting or adapting Embedded Xinu for undergraduate coursework, see [[Teaching With Xinu]].&lt;br /&gt;
* Workshops have been held regarding teaching with Embedded Xinu.  For example, the [http://www.cs.olemiss.edu/acmse2010/pdf/xinu.pdf Teaching With Embedded Xinu Workshop] at [http://www.cs.olemiss.edu/acmse2010/Home.htm ACMSE 2010] in Oxford, Mississippi (Ole Miss campus) shared ready-made curriculum resources that have been used successfully to teach hardware systems, operating systems, realtime/embedded systems, networking, and compilers with the Embedded Xinu platform at several colleges/universities.&lt;br /&gt;
&lt;br /&gt;
== Building an Embedded Xinu Laboratory ==&lt;br /&gt;
&lt;br /&gt;
In this section we are developing instructions so that other groups can benefit from the work we are doing.  These guides can be followed more or less in order to create a relatively inexpensive platform for a custom operating system.  As our work develops further, there will be more Xinu-specific information.&lt;br /&gt;
&lt;br /&gt;
# Obtain a [[List of supported platforms|supported platform]].&lt;br /&gt;
# [[HOWTO:Modify the Linksys hardware|Modify the Linksys hardware]] or [[HOWTO:Modify the ASUS hardware|Modify the ASUS hardware]]&lt;br /&gt;
# [[HOWTO:Connect to a modified router|Connect to a modified router]]&lt;br /&gt;
# [[HOWTO:Build Xinu|Build Xinu]]&lt;br /&gt;
# [[HOWTO:Deploy Xinu|Deploy Xinu]]&lt;br /&gt;
# (Optional) [[HOWTO:Build Backend Pool|Build a pool of backends]]&lt;br /&gt;
# (Recommended) [[HOWTO:Backup your router|Backup your router's factory configuration]]&lt;br /&gt;
&lt;br /&gt;
== Other Embedded Xinu Information ==&lt;br /&gt;
&lt;br /&gt;
* MIPS [[processor]]&lt;br /&gt;
* Main [[memory]]&lt;br /&gt;
* [[Exception and Interrupt Handling]]&lt;br /&gt;
* [[UART driver]]&lt;br /&gt;
* [[TTY driver]]&lt;br /&gt;
* [[Switch driver]]&lt;br /&gt;
* [[Networking]]&lt;br /&gt;
* [[Flash memory]]&lt;br /&gt;
* [[Flashing firmware]]&lt;br /&gt;
* [[EJTAG|Enhanced Joint Test Action Group]] debugger&lt;br /&gt;
* [[Standard library]]&lt;br /&gt;
* [[XinuPhone]] Internet telephony&lt;br /&gt;
* [[Router Recovery]] aka &amp;quot;Debricking&amp;quot;&lt;br /&gt;
* [[Development]]&lt;br /&gt;
* [[Contributors]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;small&amp;gt;The Xinu Lab is brought to you in part by [[XMMS|M&amp;amp;M's]].&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
--&amp;gt;__NOTOC__&amp;lt;!-- Disable &amp;quot;Contents&amp;quot; box from showing --&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;__NOEDITSECTION__&amp;lt;!-- Disable [edit] from appearing --&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Embedded_Xinu&amp;diff=4086</id>
		<title>Embedded Xinu</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Embedded_Xinu&amp;diff=4086"/>
		<updated>2013-09-12T02:19:09Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Redirect to main page; no need to have &amp;quot;Embedded Xinu&amp;quot; page in wiki that is itself about Embedded Xinu (IMO)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Main Page]]&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Contributors&amp;diff=4085</id>
		<title>Contributors</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Contributors&amp;diff=4085"/>
		<updated>2013-09-12T02:18:28Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created page (originally from &amp;quot;Embedded Xinu&amp;quot;)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The following people are some of the contributors to [[Embedded Xinu]]:&lt;br /&gt;
&lt;br /&gt;
* Dennis Brylow&lt;br /&gt;
* Paul Hinze&lt;br /&gt;
* Michael Schultz&lt;br /&gt;
* Justin Rawson&lt;br /&gt;
* Steve Luppi&lt;br /&gt;
* Anthony Stassi&lt;br /&gt;
* Mohammad &amp;quot;Meraj&amp;quot; Molla&lt;br /&gt;
* Aaron Gember&lt;br /&gt;
* Justin Picotte&lt;br /&gt;
* Adam Koehler&lt;br /&gt;
* Tyler Much&lt;br /&gt;
* Farzeen Harunani&lt;br /&gt;
* Eric Biggers&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Xinupi&amp;diff=4084</id>
		<title>Xinupi</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Xinupi&amp;diff=4084"/>
		<updated>2013-09-12T02:13:27Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Redirect to XinuPi, not Raspberry Pi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[XinuPi]]&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=XinuPi&amp;diff=4083</id>
		<title>XinuPi</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=XinuPi&amp;diff=4083"/>
		<updated>2013-09-12T02:08:00Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''XinuPi''' is the port of [[Embedded Xinu]] to the [[Raspberry Pi]].  XinuPi provides a simple, lightweight operating system for the Raspberry Pi that contains several orders of magnitude fewer lines of code than the Linux-based software stacks that normally run on the device.  Its purpose is to provide an inexpensive, convenient platform for various areas of computer science education at a University level, including operating systems, embedded systems, networking, and programming languages.  Another goal of XinuPi is to document some of the Raspberry Pi's hardware that has, until this point, been poorly documented or even undocumented.  This includes the documentation on this Wiki as well as the XinuPi source code and the documentation generated from comments in it.&lt;br /&gt;
&lt;br /&gt;
== Acquiring hardware ==&lt;br /&gt;
&lt;br /&gt;
See [[Raspberry Pi]] for information about the hardware itself.&lt;br /&gt;
&lt;br /&gt;
== Downloading and compiling ==&lt;br /&gt;
&lt;br /&gt;
XinuPi is currently only available in source code form and only in the [[git|Embedded Xinu git repository]].  To obtain the code, install [http://git-scm.com/ git] and run:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/xinu-os/xinu&lt;br /&gt;
 cd xinu&lt;br /&gt;
&lt;br /&gt;
Note that this in fact the code for &amp;quot;Embedded Xinu&amp;quot; and not for &amp;quot;XinuPi&amp;quot; specifically.  That is, the Raspberry Pi is one of several platforms that Embedded Xinu supports (and builds targeting it are referred to as &amp;quot;XinuPi&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
To compile XinuPi, run:&lt;br /&gt;
&lt;br /&gt;
 make -C compile PLATFORM=arm-rpi&lt;br /&gt;
&lt;br /&gt;
PLATFORM=arm-rpi is necessary to instruct the build system to target the Raspberry Pi.  Additional arguments can be passed to ''make'', such as the COMPILER_ROOT to specify the location of a GCC compiler targeting ARM (defaults to &amp;quot;arm-none-eabi-&amp;quot;, meaning that no explicit setting is needed if &amp;quot;arm-none-eabi-gcc&amp;quot; and the corresponding binutils are already on the shell $PATH).  See {{SourceFile|compile/README.compiling}} for more details; for example, details about cross compilers.&lt;br /&gt;
&lt;br /&gt;
The compilation process produces a file &amp;quot;compile/xinu.boot&amp;quot;, which can be copied to &amp;quot;kernel.img&amp;quot; on the SD card of a Raspberry Pi to run it (see [[Raspberry Pi#Booting]]).&lt;br /&gt;
&lt;br /&gt;
XinuPi is licensed under a BSD-style license; see the copyright information in the source distribution for more details.&lt;br /&gt;
&lt;br /&gt;
== Features and implementation ==&lt;br /&gt;
&lt;br /&gt;
* The core of XinuPi provides a preemptive multitasking operating system for the Raspberry Pi.  See [[Preemptive multitasking (ARM)]] for more details about how Embedded Xinu implements preemptive multitasking on ARM-based platforms such as the Raspberry Pi; this includes information about thread creation and context switching.  Also see [[BCM2835 System Timer]] for the timer on the Raspberry Pi that XinuPi uses to implement preemptive multitasking.&lt;br /&gt;
* Interrupt handling on the Raspberry Pi, required for the timer interrupt as well as many other devices, is described in [[Interrupt handling (Raspberry Pi)]].&lt;br /&gt;
* USB support was added to Embedded Xinu partly because of its important role in the Raspberry Pi, including to attach the Ethernet Controller on the Raspberry Pi Model B.  See [[USB]] for general information about USB, or [[Synopsys DesignWare High-Speed USB 2.0 On-The-Go Controller]] for information specifically about the USB controller the Raspberry Pi provides.&lt;br /&gt;
* See [[SMSC LAN9512]] for information about the built-in USB Ethernet Adapter on the Raspberry Pi Model B, and XinuPi's driver for it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;TODO:  sound, graphics, keyboard support&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Preemptive_Multitasking_(ARM)&amp;diff=4082</id>
		<title>Preemptive Multitasking (ARM)</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Preemptive_Multitasking_(ARM)&amp;diff=4082"/>
		<updated>2013-09-12T02:01:09Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents how [[Embedded Xinu]] implements [[Preemptive multitasking|preemptive multitasking]] on [http://en.wikipedia.org/wiki/ARM_Architecture ARM-architecture] platforms that it has been ported to, such as the [[Raspberry Pi]].&lt;br /&gt;
&lt;br /&gt;
== Thread context  ==&lt;br /&gt;
&lt;br /&gt;
The format and size of the [[Preemptive_multitasking#Multiple_threads|thread context]] used for ARM ports of Embedded Xinu rests on two factors:  the registers available on the ARM architecture, and the standard ARM calling convention&amp;lt;ref&amp;gt;http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* ARM processors have 16 &amp;quot;general-purpose&amp;quot; registers numbered r0-r15, as well as the Current Program Status Register (cpsr).  However, despite being considered &amp;quot;general-purpose&amp;quot; registers, r13-r15 actually have special purposes; namely, r13 is used as the stack pointer (sp), r14 is used as the link register (lr), and r15 is used as the program counter (pc).&lt;br /&gt;
&lt;br /&gt;
* The standard ARM calling convention specifies which registers are callee-save (r4-r11, r13-r14) and which are caller-save (r0-r3, r11), as well as how arguments are passed to procedures (up to four arguments in r0-r3; additional arguments spill onto stack).&lt;br /&gt;
&lt;br /&gt;
The thread context we chose is 15 words long and is the following:&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
The ARM version of &amp;lt;code&amp;gt;ctxsw()&amp;lt;/code&amp;gt; is implemented in {{SourceFile|system/arch/arm/ctxsw.S}} and contains a detailed explanation that will not be replicated here.&lt;br /&gt;
&lt;br /&gt;
== Preemption ==&lt;br /&gt;
&lt;br /&gt;
The means of generating a timer interrupt for [[Preemptive_multitasking#Preemption|preemption]] is not standard to the ARM architecture; instead, software must make use of a board-specific or chip-specific device such as the [[BCM2835 System Timer]].&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Preemptive_multitasking&amp;diff=4081</id>
		<title>Preemptive multitasking</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Preemptive_multitasking&amp;diff=4081"/>
		<updated>2013-09-12T01:57:15Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Like virtually all modern operating systems, [[Embedded Xinu]] supports '''preemptive multitasking''', which makes it appear that multiple threads are executing at the same time on the same processor.  Support for preemptive multitasking consists of support for multiple threads combined with a preemption mechanism.&lt;br /&gt;
&lt;br /&gt;
== Multiple threads  ==&lt;br /&gt;
&lt;br /&gt;
Embedded Xinu supports multiple threads, but only one can execute at a time.  A '''thread context''' refers to the saved state of a thread, primarily CPU registers.  Embedded Xinu platforms must implement two functions to allow creating new threads and switching between threads using their thread contexts:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;arch_setup_stack()&amp;lt;/code&amp;gt;, which is responsible for setting up the stack of a new thread to include an initial thread context and procedure arguments.  This routine is typically implemented in C.  It is called internally by &amp;lt;code&amp;gt;create()&amp;lt;/code&amp;gt;, located in {{SourceFile|system/create.c}}.  For an example, see {{SourceFile|system/arch/mips/arch_setup_stack.c}}.&lt;br /&gt;
* &amp;lt;code&amp;gt;ctxsw()&amp;lt;/code&amp;gt;, which is responsible for switching between threads.  More specifically, this routine must save the thread context of the current thread and restore the thread context of the new thread.  This routine is always implemented in assembly language.  For an example, see {{SourceFile|system/arch/mips/ctxsw.S}}.&lt;br /&gt;
&lt;br /&gt;
Since different CPU architectures use different registers and calling conventions,&lt;br /&gt;
the size and format of a thread context varies depending on the CPU architecture.&lt;br /&gt;
Note that since thread contexts are created in both &amp;lt;code&amp;gt;arch_setup_stack()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ctxsw()&amp;lt;/code&amp;gt;, these two routines must create contexts that are compatible, at least to the extent that &amp;lt;code&amp;gt;ctxsw()&amp;lt;/code&amp;gt; can either start a new thread or resume an existing thread.&lt;br /&gt;
&lt;br /&gt;
Other articles describe this in more detail for specific architectures:&lt;br /&gt;
&lt;br /&gt;
* [[Preemptive multitasking (ARM)]]&lt;br /&gt;
* [[Preemptive multitasking (MIPS)]]&lt;br /&gt;
&lt;br /&gt;
== Preemption ==&lt;br /&gt;
&lt;br /&gt;
Preemption occurs when the timer interrupt occurs and Embedded Xinu attempts to reschedule the currently executing thread, which results in a call to &amp;lt;code&amp;gt;ctxsw()&amp;lt;/code&amp;gt;, described above, that may switch to a different thread context.  (We say ''may'' because the code is written such that &amp;lt;code&amp;gt;ctxsw()&amp;lt;/code&amp;gt; is called when the same thread is rescheduled to itself, in which case &amp;lt;code&amp;gt;ctxsw()&amp;lt;/code&amp;gt; restores the saved context immediately and is a no-op.)  The means of generating a timer interrupt is platform-dependent and may even differ among platforms that share the same CPU architecture.  For an example, see [[BCM2835 System Timer]], which is used in the [[Raspberry Pi]], an ARM-based platform.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=USB&amp;diff=4080</id>
		<title>USB</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=USB&amp;diff=4080"/>
		<updated>2013-09-12T01:53:35Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''USB (Universal Serial Bus)''' is a standard for connecting devices to a computer system.  It supports an immense range of devices, including (but not limited to) keyboards, mice, flash drives, microphones, and network adapters.&lt;br /&gt;
&lt;br /&gt;
Although USB is ubiquitous in modern computer systems, even in some &amp;quot;embedded&amp;quot; devices, it is very challenging to implement software support for USB.  This is primarily a result of the high complexity of USB, which arises from several factors, including support for virtually any arbitrary device, support for dynamic device attachment and detachment, backwards compatibility with multiple versions of the USB specification, and multiple supported speeds and transfer types.  The USB 2.0 specification is 650 pages long, yet only covers a fraction of the information needed to implement, from scratch, a USB software stack and a driver controlling a specific USB device.&lt;br /&gt;
&lt;br /&gt;
Due to the high complexity of USB, this article cannot fully explain USB, nor can it even fully explain Embedded Xinu's implementation of USB.  Instead, it gives an overview of USB in the context of Embedded Xinu's implementation.  For full details about USB, the reader will inevitably need to read the USB specification itself, as well as other relevant specifications and webpages.  For full details specifically about Embedded Xinu's implementation, the reader will inevitably need to read the source code.&lt;br /&gt;
&lt;br /&gt;
== Bus Topology ==&lt;br /&gt;
&lt;br /&gt;
Fundamentally, USB is just a way to connect devices to a computer system.  A USB bus accomplishes this by arranging devices in a tree.  Each node of the tree is a '''USB device'''.  There are two fundamental types of USB devices: '''hubs''' and '''functions'''.  USB hubs can have &amp;quot;child&amp;quot; devices in the tree, while functions cannot.  Hubs can be &amp;quot;children&amp;quot; of other hubs, up to a depth of 7 levels.&lt;br /&gt;
&lt;br /&gt;
The root node of the tree is the '''root hub''', and every USB bus has one (although it may be faked by the Host Controller Driver, described later).&lt;br /&gt;
&lt;br /&gt;
A USB hub provides a fixed number of attachment points for additional devices called '''ports'''.  A USB port may be either completely internal or exposed to the &amp;quot;outside&amp;quot; as a place to plug in a USB cable.  From the user's point of view there is certainly a difference between these two manifestations of a USB port, but from the software's point of view there is no difference.  On a similar note, it is also possible that a single physical package, which a naive user might refer to as a &amp;quot;USB device&amp;quot;, actually contains an integrated USB hub onto which one or more USB devices (as defined above) are attached.  Such physical packages are referred to as '''compound devices'''.  An example of a compound device is one of Apple's USB keyboards that provides a USB port to attach a mouse.&lt;br /&gt;
&lt;br /&gt;
Since USB is a dynamic bus, USB devices can be attached or detached from the USB at any arbitrary time.  Detaching a hub implies detaching all child devices.&lt;br /&gt;
&lt;br /&gt;
For its part, Embedded Xinu's USB implementation fully supports the dynamic tree topology of a USB bus.&lt;br /&gt;
&lt;br /&gt;
== Devices ==&lt;br /&gt;
&lt;br /&gt;
Due to the generality of USB a USB device that is not a hub can be virtually anything at all.  This is made possible in part by a highly nested design:&lt;br /&gt;
&lt;br /&gt;
* A USB device has one or more '''configurations'''.&lt;br /&gt;
* A configuration has one or more '''interfaces'''.&lt;br /&gt;
* An interface has one or more '''alternate settings'''.&lt;br /&gt;
* An alternate setting has one or more '''endpoints'''.&lt;br /&gt;
&lt;br /&gt;
Every device, configuration, interface, and endpoint has a corresponding '''descriptor''' that can be read by the USB software to retrieve information about the described entity in a standard format.&lt;br /&gt;
&lt;br /&gt;
Although this format allows for highly complex devices, most devices are relatively simple and have just one configuration.  Furthermore, common devices only have one interface.  In fact, as of this writing, Embedded Xinu's USB subsystem aims to support the common case only; it therefore always sets the device to its first listed configuration, then attempts to bind a device driver to the entire device rather than examining individual interfaces to see if they need separate &amp;quot;interface drivers&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Host Controllers ==&lt;br /&gt;
&lt;br /&gt;
USB is a polled bus, so all transfers over the USB are initiated by the '''host'''.  The term &amp;quot;host&amp;quot; in this context means the USB software as well as the USB Host Controller, which is the hardware responsible for actually sending and receiving data over the USB and maintaining the root hub. This is actually one of the trickier parts of USB.  Since the USB specification itself does not standardize the exact division of tasks between software and hardware, it's often not clear who is responsible when the specification says &amp;quot;host&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The essential thing to know is that the place where the USB software directly meets the USB hardware is in the USB Host Controller Driver, which operates the USB Host Controller.  Some USB Host Controllers present standard interfaces (such as UHCI, OHCI, or EHCI--- all defined in specifications separate from the USB specification itself) to software.  Others do not present a standard interface, but instead have vendor-provided documentation and/or a vendor-provided driver; an example of this is the [[Synopsys DesignWare High-Speed USB 2.0 On-The-Go Controller]] used on the [[Raspberry Pi]].  Obviously, a standard interface is highly preferred when independently implementing a Host Controller Driver.&lt;br /&gt;
&lt;br /&gt;
== Transfers ==&lt;br /&gt;
&lt;br /&gt;
To communicate with USB devices, the host sends and receives data over the USB using USB transfers.  A USB transfer occurs to or from a particular endpoint on a particular device.  Every endpoint is associated with a specific type of USB transfer, which can be one of the following:&lt;br /&gt;
&lt;br /&gt;
* '''Control''' transfers.  These are typically used for device configuration.  There are two main unique features of these transfers.  First, a special packet called SETUP is always sent over the USB before the actual data of the control transfer, and software needs to specify the contents of this packet. Second, every device has an endpoint over which control transfers in either direction can be made, and this endpoint is never explicitly listed in the endpoint descriptors.&lt;br /&gt;
* '''Interrupt''' transfers.  These are used for time-bounded transmission of small quantities of data (e.g. data from a keyboard or mouse).&lt;br /&gt;
* '''Bulk''' transfers.  These are used for reliable (with error detection) transmission of large quantities of data with no particular time guarantees (e.g. reading and writing data on mass storage devices).&lt;br /&gt;
* '''Isochronous''' transfers.  These are used for regular transmission of data with no error detecting (e.g. video capture).&lt;br /&gt;
&lt;br /&gt;
Embedded Xinu currently supports control, interrupt, and bulk transfers.  Isochronous transfers have not yet been tested.  Although currently functional, interrupt transfers may require some more work to guarantee, in all cases, the time-bounded transmission required by the USB specification.&lt;br /&gt;
&lt;br /&gt;
== Speeds ==&lt;br /&gt;
&lt;br /&gt;
USB supports multiple transfer speeds:&lt;br /&gt;
&lt;br /&gt;
* 1.5 Mbit/s (Low Speed) (USB 1+)&lt;br /&gt;
* 12  Mbit/s (Full Speed) (USB 1+)&lt;br /&gt;
* 480  Mbit/s (High Speed) (USB 2.0+)&lt;br /&gt;
* 5000  Mbit/s (Super Speed) (USB 3.0+)&lt;br /&gt;
&lt;br /&gt;
Yes, Full Speed is in fact the second lowest speed.  Well I think we all know that 12 Mbit/s ought to be enough for anyone.  But anyway, due to the need to maintain backwards compatibility with legacy devices, the USB software (mainly the host controller driver) unfortunately needs to take into account transfer speeds.  At minimum, it must be aware that transfers to or from devices attached at Low Speed or Full Speed are performed as a series of '''split transactions''', which allow Low Speed or Full Speed transfers to occur without significantly slowing down the portion of the USB bus operating at a higher speed.&lt;br /&gt;
&lt;br /&gt;
As of this writing, Embedded Xinu's USB subsystem supports USB 2.0, so it supports devices operating at Low Speed, Full Speed, or High Speed.  USB 3.0 Super Speed is not supported.&lt;br /&gt;
&lt;br /&gt;
== Software Architecture ==&lt;br /&gt;
&lt;br /&gt;
Now that some general information about USB has been presented, it should be easier to understand the basic design of a USB software stack.  The description that follows is certainly not the only way to organize the code, but it is the way that is used in most operating systems and makes the most sense based on how USB was designed.  In terms of Embedded Xinu, perhaps the main question is why USB devices and/or the USB controller do not show up as device(s) in 'devtab' like other Embedded Xinu devices.  The reasons are that USB is a dynamic bus, so it cannot be described by a static table, and also because the highly nested structure of USB devices, as well as multiple supported transfer types, is too complicated for the simple &amp;quot;read() and write() from a device&amp;quot; paradigm.&lt;br /&gt;
&lt;br /&gt;
* The '''USB Host Controller Driver''' is responsible for actually sending and receiving data over the USB by making use of the platform-dependent host controller hardware.  The purpose of this driver is to isolate differences in USB host controllers from all other code dealing with USB.  In Embedded Xinu, USB Host Controller Drivers must implement the interface declared in {{SourceFile|include/usb_hcdi.h}}.  However, as of this writing, there is only one Host USB Controller Driver implemented and it controls the [[Synopsys DesignWare High-Speed USB 2.0 On-The-Go Controller]] used on the [[Raspberry Pi]]).&lt;br /&gt;
* The '''USB Core Driver''' is responsible for maintaining the USB device model, including the tree structure, and providing a framework in which USB device drivers can be written.  It provides many convenience functions that simplify USB device driver development over using the Host Controller Driver directly; this can be viewed as an attempt to isolate the platform-dependent Host Controller Driver as much as possible.  It also handles configuration that is common to all USB devices, such as setting a device configuration and address, and reading descriptors.  In Embedded Xinu, the USB Core Driver can be found in {{SourceFile|device/usb/usbcore.c}}.&lt;br /&gt;
* '''USB device drivers''' are responsible for controlling specific USB devices.  Since USB is a dynamic bus, USB device drivers are bound to actual USB devices at runtime with the help of USB Core Driver.  A very important USB device driver that must always be implemented in any USB software stack is the '''USB hub driver''', which is responsible for monitoring the status of a USB hub and reporting to the USB Core Driver when devices have been attached or detached.  Embedded Xinu's USB hub driver can be found in {{SourceFile|device/usb/usbhub.c}}.  Other USB device drivers can be found in {{SourceFile|device/}}; e.g. {{SourceFile|device/smsc9512/}}.&lt;br /&gt;
&lt;br /&gt;
Note: more complete (and complicated) USB software stacks, such as Linux's, also support '''USB interface drivers''', which are associated with USB interfaces rather than USB devices.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
&lt;br /&gt;
* USB 2.0 Specification.  [http://www.usb.org/developers/docs/].&lt;br /&gt;
* USB 3.1 Specification.  [http://www.usb.org/developers/docs/].&lt;br /&gt;
* Embedded Xinu USB 2.0 subsystem.  (device/usb).&lt;br /&gt;
* Embedded Xinu USB device drivers.  (Example:  {{SourceFile|device/smsc9512}}).&lt;br /&gt;
* Embedded Xinu USB host controller drivers. (Example: {{SourceFile|system/platforms/arm-rpi/usb_dwc_hcd.c}}).&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Synopsys_DesignWare_High-Speed_USB_2.0_On-The-Go_Controller&amp;diff=4079</id>
		<title>Synopsys DesignWare High-Speed USB 2.0 On-The-Go Controller</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Synopsys_DesignWare_High-Speed_USB_2.0_On-The-Go_Controller&amp;diff=4079"/>
		<updated>2013-09-12T01:50:24Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''Synopsys DesignWare High-Speed USB 2.0 On-The-Go Controller''' is the [[USB]] controller used on the [[Raspberry Pi]].  This hardware is notorious for having no official documentation available to end users&amp;lt;ref&amp;gt;http://www.raspberrypi.org/phpBB3/viewtopic.php?f=72&amp;amp;t=27695&amp;lt;/ref&amp;gt; and for having an extremely complicated, poorly written Linux driver.  According to Greg Kroah-Hartman, the maintainer of Linux's USB subsystem&amp;lt;ref&amp;gt;http://lxr.linux.no/linux/MAINTAINERS&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;quot; ... it's just a really bad USB controller chip, combined with a&lt;br /&gt;
sad way to hook it up to the processor, combined with with a truly&lt;br /&gt;
horrible driver make for the fact that USB works at all on this board a&lt;br /&gt;
total miracle.&amp;quot;&amp;lt;ref&amp;gt;http://lists.infradead.org/pipermail/linux-rpi-kernel/2012-September/000214.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page attempts to explain this hardware in the context of the USB Host Controller Driver we wrote for it as part of the project to port Embedded Xinu to the Raspberry Pi.  Unfortunately, it is not intended to ''fully'' document the hardware, since Embedded Xinu's driver is a relatively simple, stripped-down driver that does not support many features of the Linux driver.&lt;br /&gt;
&lt;br /&gt;
== Overview of Embedded Xinu's driver ==&lt;br /&gt;
&lt;br /&gt;
As mentioned, there is no documentation available for this USB Controller; therefore, it obviously was difficult to implement a driver for it.  Since there was no other option, we had to gleam the relevant hardware details from other drivers, mainly the Linux driver&amp;lt;ref&amp;gt;See drivers/usb/host/dwc_otg/ in Raspberry Pi ports of Linux.&amp;lt;/ref&amp;gt;, but also other drivers written for the controller, such as the CSUD driver&amp;lt;ref&amp;gt;https://github.com/Chadderz121/csud&amp;lt;/ref&amp;gt; and the Plan 9 driver&amp;lt;ref&amp;gt;See 9/bcm/usbdwc.c in the Plan 9 sources&amp;lt;/ref&amp;gt;.  Our code, however, is a new implementation that is intended to be simple and well-documented, and appropriate (to the extent possible for USB and for this hardware) to include in a simple educational operating system.&lt;br /&gt;
&lt;br /&gt;
Embedded Xinu's driver supports control, interrupt, and bulk transfers.  As a Host Controller Driver, it implements the interface declared in {{SourceFile|include/usb_hcdi.h}}.  For simplicity, Embedded Xinu's driver '''does not''' support some features of the Linux driver, including but not limited to the following:&lt;br /&gt;
&lt;br /&gt;
* Device mode.  The &amp;quot;On-The-Go&amp;quot; portion of the hardware's name means it supports the [https://en.wikipedia.org/wiki/USB_On-The-Go|USB On-The-Go protocol], which is an extension to the main USB specification that allows the USB hardware to operate in either &amp;quot;host&amp;quot; or &amp;quot;device&amp;quot; mode.  However, in our driver we are only concerned with host mode.&lt;br /&gt;
* Isochronous transfers&lt;br /&gt;
* Support for instantiations of the silicon other than the one used on the Raspberry Pi&lt;br /&gt;
* Advanced transaction scheduling that takes into account special properties of periodic transfers&lt;br /&gt;
* Various module parameters to configure the driver&lt;br /&gt;
* Power management, including suspend and hibernation&lt;br /&gt;
* Slave or Descriptor DMA modes&lt;br /&gt;
&lt;br /&gt;
== More details ==&lt;br /&gt;
&lt;br /&gt;
More details about the device and the registers may eventually be added here.  For now, see the source code ({{SourceFile|system/platforms/arm-rpi/usb_dwc_hcd.c}} and {{SourceFile|system/platforms/arm-rpi/usb_dwc_regs.h}}), which is intended to be easy to read and well documented.  There is obviously a limit to how &amp;quot;easy to read&amp;quot; it can be, though, since [[USB]] itself is very complicated.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=BCM2835_System_Timer&amp;diff=4078</id>
		<title>BCM2835 System Timer</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=BCM2835_System_Timer&amp;diff=4078"/>
		<updated>2013-09-12T01:48:52Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''BCM2835 System Timer''' is a memory-mapped peripheral available on the [[BCM2835|BCM2835 System-on-a-Chip]] used in the [[Raspberry Pi]].  It features a 64-bit free-running counter that runs at 1 MHz and four separate &amp;quot;output compare registers&amp;quot; that can be used to schedule interrupts.  However, two output compare registers are already used by the VideoCore GPU, leaving only two available for the ARM CPU to use.&lt;br /&gt;
&lt;br /&gt;
== Hardware details ==&lt;br /&gt;
&lt;br /&gt;
The interface to the BCM2835 System Timer is a set of 32-bit memory-mapped registers beginning at physical address 0x20003000.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| +0x00 || CS || System Timer Control and Status&lt;br /&gt;
|-&lt;br /&gt;
| +0x04 || CLO || System Timer Counter Lower 32 bits&lt;br /&gt;
|-&lt;br /&gt;
| +0x08 || CHI || System Timer Counter Upper 32 bits&lt;br /&gt;
|- style=&amp;quot;background: gray&amp;quot;&lt;br /&gt;
| +0x0C || C0 || System Timer Compare 0; corresponds to IRQ line 0.&lt;br /&gt;
|-&lt;br /&gt;
| +0x10 || C1 || System Timer Compare 1; corresponds to IRQ line 1.&lt;br /&gt;
|- style=&amp;quot;background: gray&amp;quot;&lt;br /&gt;
| +0x14 || C2 || System Timer Compare 2; corresponds to IRQ line 2.&lt;br /&gt;
|-&lt;br /&gt;
| +0x18 || C3 || System Timer Compare 3; corresponds to IRQ line 3.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
CLO and CHI form a 64-bit free-running counter, which increases by itself at a rate of 1 MHz, that software can read to get the current number of timer ticks.  There are, however, two caveats:&lt;br /&gt;
&lt;br /&gt;
* Appropriate [[BCM2835 Memory Barriers|memory barriers]] should be inserted to guarantee that read data is not re-ordered with that from a different peripheral.&lt;br /&gt;
* Reading CLO can be done in a single 32-bit access.  However, we are not currently aware of a way to read CLO and CHI together atomically.  To work around this when the full 64-bit time is desired, software can read CHI, then CLO, then read CHI and retry if CHI changed.&lt;br /&gt;
&lt;br /&gt;
To schedule an interrupt using the System Timer, software can write the value of CLO at which an interrupt will be generated into one of the System Timer Compare registers.  However, the CPU actually only use C1 and C3, since C0 and C2 are used by the GPU.  Also, to actually receive the scheduled interrupt, the software must have previously enabled the corresponding IRQ line using the [[BCM2835 Interrupt Controller]].  To clear the interrupt, software must write 1 to the bit in CS that has the index the same as that of the System Timer Compare register.  That is, to clear an interrupt set in C1, software must write 0x20 to CS, and to clear an interrupt set in C3, software must write 0x80 to CS.&lt;br /&gt;
&lt;br /&gt;
== Use in Embedded Xinu ==&lt;br /&gt;
&lt;br /&gt;
In the [[Raspberry Pi]] port of [[Embedded Xinu]], or [[XinuPi]], the BCM2835 System Timer is used to implement [[Preemptive_Multitasking_(ARM)|preemptive multitasking]] and keep the system time.  The code can be found in {{SourceFile|system/platforms/arm-rpi/timer.c}} and is fairly simple, as it only needs to implement &amp;lt;code&amp;gt;clkcount()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;clkupdate()&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=BCM2835_Interrupt_Controller&amp;diff=4077</id>
		<title>BCM2835 Interrupt Controller</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=BCM2835_Interrupt_Controller&amp;diff=4077"/>
		<updated>2013-09-12T01:47:14Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Refer to XinuPi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''BCM2835 Interrupt Controller''' is a memory-mapped peripheral available on the [[BCM2835|BCM2835 System-on-a-Chip]] used in the [[Raspberry Pi]].  It allows software to enable or disable  specific IRQs (interrupt requests).  Each IRQ usually corresponds to some sort of device available on the chip.&lt;br /&gt;
&lt;br /&gt;
== Hardware Details ==&lt;br /&gt;
&lt;br /&gt;
It is important to understand that on the BCM2835, some IRQs are shared between the ARM CPU and VideoCore GPU.  This interrupt controller controls ''both'' these shared IRQs as well as a few ARM-specific IRQs, and the layout of the registers reflects this separation.  Some of the shared IRQs are already enabled by the GPU and therefore should not be enabled.  However, this interrupt controller is only used by the ARM to control which interrupts actually get routed to the ARM; the GPU most likely has its own interrupt controller.&lt;br /&gt;
&lt;br /&gt;
The BCM2835 Interrupt Controller is a memory-mapped peripheral available at physical memory address 0x2000B000.  The following table describes the registers, each of which is 32 bits.  '''Note that the offsets start at 0x200, not 0.  We do this for consistency with Broadcom's documentation.  To be completely clear, IRQ_basic_pending is located at physical memory address 0x2000B200.'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ BCM2835 Interrupt Controller registers&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x200 || IRQ_basic_pending || Bitmask of pending ARM-specific IRQs, as well as additional bits (not currently used by Embedded Xinu) to accelerate interrupt handling.&lt;br /&gt;
|-&lt;br /&gt;
| 0x204 || IRQ_pending_1 || Bitmask of pending shared IRQs 0-31&lt;br /&gt;
|-&lt;br /&gt;
| 0x208 || IRQ_pending_2 || Bitmask of pending shared IRQs 32-63&lt;br /&gt;
|-&lt;br /&gt;
| 0x20C || FIQ_control || TODO&lt;br /&gt;
|-&lt;br /&gt;
| 0x210 || Enable_IRQs_1 || Write 1 to the corresponding bit(s) to enable one or more shared IRQs in the range 0-31&lt;br /&gt;
|-&lt;br /&gt;
| 0x214 || Enable_IRQs_2 || Write 1 to the corresponding bit(s) to enable one or more shared IRQs in the range 32-63&lt;br /&gt;
|-&lt;br /&gt;
| 0x218 || Enable_Basic_IRQs || Write 1 to the corresponding bit(s) to enable one or more ARM-specific IRQs&lt;br /&gt;
|-&lt;br /&gt;
| 0x21C || Disable_IRQs_1 || Write 1 to the corresponding bit(s) to disable one or more shared IRQs in the range 0-31&lt;br /&gt;
|-&lt;br /&gt;
| 0x220 || Disable_IRQs_2 || Write 1 to the corresponding bit(s) to disable one or more shared IRQs in the range 32-63&lt;br /&gt;
|-&lt;br /&gt;
| 0x224 || Disable_Basic_IRQs || Write 1 to the corresponding bit(s) to disable one or more ARM-specific IRQs&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For this interrupt controller to actually be of any use, the mapping of IRQs to devices must be known.  The following table is an ''incomplete'' list that documents the IRQs we have tested in our work with Embedded Xinu.  The full list can be found [https://github.com/raspberrypi/linux/blob/rpi-3.6.y/arch/arm/mach-bcm2708/include/mach/platform.h declared in a Linux header].  Below we use the numbering scheme used by both Embedded Xinu and Linux, where the shared IRQs are numbered 0-63, and ARM-specific IRQs are numbered starting at 64.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Incomplete list of BCM2835 IRQs.&lt;br /&gt;
|-&lt;br /&gt;
! IRQ !! Device !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| System Timer Compare Register 0&lt;br /&gt;
| Do ''not'' enable this IRQ; it's already used by the GPU.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| System Timer Compare Register 1&lt;br /&gt;
| See [[BCM2835 System Timer]].&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| System Timer Compare Register 2&lt;br /&gt;
| Do ''not'' enable this IRQ; it's already used by the GPU.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| System Timer Compare Register 3&lt;br /&gt;
| See [[BCM2835 System Timer]].&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| USB Controller&lt;br /&gt;
| This is the ''only'' USB IRQ because all communication with USB devices happens through the USB Controller.  See [[Synopsys DesignWare High-Speed USB 2.0 On-The-Go Controller]].&lt;br /&gt;
|-&lt;br /&gt;
| 55&lt;br /&gt;
| PCM Audio&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 57&lt;br /&gt;
| PL011 UART&lt;br /&gt;
| See [[PL011 UART]].&lt;br /&gt;
|-&lt;br /&gt;
| 62&lt;br /&gt;
| SD Host Controller&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Software cannot &amp;quot;clear&amp;quot; interrupts using the interrupt controller.  Instead, interrupts must be cleared in a device-specific way.&lt;br /&gt;
* Although some shared interrupts appear in the IRQ_Basic_Pending register as well as in the IRQ_Pending_1 or IRQ_Pending_2 registers, they cannot be enabled or disabled in Enable_Basic_IRQs or Disable_Basic_IRQs.&lt;br /&gt;
&lt;br /&gt;
== Use in Embedded Xinu ==&lt;br /&gt;
&lt;br /&gt;
Embedded Xinu (that, is [[XinuPi]]) uses the BCM2835 Interrupt Controller to implement &amp;lt;code&amp;gt;enable_irq()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;disable_irq()&amp;lt;/code&amp;gt;.  The code is in {{SourceFile|system/platforms/arm-rpi/dispatch.c}}.  These functions simply are passed the number of the IRQ to enable or disable.  Shared IRQs are numbered 0-63, while ARM-specific IRQs (currently not actually used) are numbered starting at 64.  Also in this file you will find &amp;lt;code&amp;gt;dispatch()&amp;lt;/code&amp;gt;, which is called from the assembly language IRQ handler in {{SourceFile|system/arch/arm/irq_handler.S}} to handle an interrupt.  The point of &amp;lt;code&amp;gt;dispatch()&amp;lt;/code&amp;gt; is to figure out which number IRQs are actually pending, then call the registered interrupt handler for each.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf BCM2835 ARM Peripherals datasheet by Broadcom].  The interrupt controller is documented in Section 7 (p. 109-118).  Compared to some of the Raspberry Pi hardware, this is one of the better documented components.  Beware, though, that Broadcom's docs don't mention some of the important IRQ numbers, such as 0-3 (System Timer) and 9 (USB Controller).&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=BCM2835_Interrupt_Controller&amp;diff=4076</id>
		<title>BCM2835 Interrupt Controller</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=BCM2835_Interrupt_Controller&amp;diff=4076"/>
		<updated>2013-09-12T01:46:23Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Use SourceFile template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''BCM2835 Interrupt Controller''' is a memory-mapped peripheral available on the [[BCM2835|BCM2835 System-on-a-Chip]] used in the [[Raspberry Pi]].  It allows software to enable or disable  specific IRQs (interrupt requests).  Each IRQ usually corresponds to some sort of device available on the chip.&lt;br /&gt;
&lt;br /&gt;
== Hardware Details ==&lt;br /&gt;
&lt;br /&gt;
It is important to understand that on the BCM2835, some IRQs are shared between the ARM CPU and VideoCore GPU.  This interrupt controller controls ''both'' these shared IRQs as well as a few ARM-specific IRQs, and the layout of the registers reflects this separation.  Some of the shared IRQs are already enabled by the GPU and therefore should not be enabled.  However, this interrupt controller is only used by the ARM to control which interrupts actually get routed to the ARM; the GPU most likely has its own interrupt controller.&lt;br /&gt;
&lt;br /&gt;
The BCM2835 Interrupt Controller is a memory-mapped peripheral available at physical memory address 0x2000B000.  The following table describes the registers, each of which is 32 bits.  '''Note that the offsets start at 0x200, not 0.  We do this for consistency with Broadcom's documentation.  To be completely clear, IRQ_basic_pending is located at physical memory address 0x2000B200.'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ BCM2835 Interrupt Controller registers&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x200 || IRQ_basic_pending || Bitmask of pending ARM-specific IRQs, as well as additional bits (not currently used by Embedded Xinu) to accelerate interrupt handling.&lt;br /&gt;
|-&lt;br /&gt;
| 0x204 || IRQ_pending_1 || Bitmask of pending shared IRQs 0-31&lt;br /&gt;
|-&lt;br /&gt;
| 0x208 || IRQ_pending_2 || Bitmask of pending shared IRQs 32-63&lt;br /&gt;
|-&lt;br /&gt;
| 0x20C || FIQ_control || TODO&lt;br /&gt;
|-&lt;br /&gt;
| 0x210 || Enable_IRQs_1 || Write 1 to the corresponding bit(s) to enable one or more shared IRQs in the range 0-31&lt;br /&gt;
|-&lt;br /&gt;
| 0x214 || Enable_IRQs_2 || Write 1 to the corresponding bit(s) to enable one or more shared IRQs in the range 32-63&lt;br /&gt;
|-&lt;br /&gt;
| 0x218 || Enable_Basic_IRQs || Write 1 to the corresponding bit(s) to enable one or more ARM-specific IRQs&lt;br /&gt;
|-&lt;br /&gt;
| 0x21C || Disable_IRQs_1 || Write 1 to the corresponding bit(s) to disable one or more shared IRQs in the range 0-31&lt;br /&gt;
|-&lt;br /&gt;
| 0x220 || Disable_IRQs_2 || Write 1 to the corresponding bit(s) to disable one or more shared IRQs in the range 32-63&lt;br /&gt;
|-&lt;br /&gt;
| 0x224 || Disable_Basic_IRQs || Write 1 to the corresponding bit(s) to disable one or more ARM-specific IRQs&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For this interrupt controller to actually be of any use, the mapping of IRQs to devices must be known.  The following table is an ''incomplete'' list that documents the IRQs we have tested in our work with Embedded Xinu.  The full list can be found [https://github.com/raspberrypi/linux/blob/rpi-3.6.y/arch/arm/mach-bcm2708/include/mach/platform.h declared in a Linux header].  Below we use the numbering scheme used by both Embedded Xinu and Linux, where the shared IRQs are numbered 0-63, and ARM-specific IRQs are numbered starting at 64.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Incomplete list of BCM2835 IRQs.&lt;br /&gt;
|-&lt;br /&gt;
! IRQ !! Device !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| System Timer Compare Register 0&lt;br /&gt;
| Do ''not'' enable this IRQ; it's already used by the GPU.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| System Timer Compare Register 1&lt;br /&gt;
| See [[BCM2835 System Timer]].&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| System Timer Compare Register 2&lt;br /&gt;
| Do ''not'' enable this IRQ; it's already used by the GPU.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| System Timer Compare Register 3&lt;br /&gt;
| See [[BCM2835 System Timer]].&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| USB Controller&lt;br /&gt;
| This is the ''only'' USB IRQ because all communication with USB devices happens through the USB Controller.  See [[Synopsys DesignWare High-Speed USB 2.0 On-The-Go Controller]].&lt;br /&gt;
|-&lt;br /&gt;
| 55&lt;br /&gt;
| PCM Audio&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 57&lt;br /&gt;
| PL011 UART&lt;br /&gt;
| See [[PL011 UART]].&lt;br /&gt;
|-&lt;br /&gt;
| 62&lt;br /&gt;
| SD Host Controller&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
&lt;br /&gt;
* Software cannot &amp;quot;clear&amp;quot; interrupts using the interrupt controller.  Instead, interrupts must be cleared in a device-specific way.&lt;br /&gt;
* Although some shared interrupts appear in the IRQ_Basic_Pending register as well as in the IRQ_Pending_1 or IRQ_Pending_2 registers, they cannot be enabled or disabled in Enable_Basic_IRQs or Disable_Basic_IRQs.&lt;br /&gt;
&lt;br /&gt;
== Use in Embedded Xinu ==&lt;br /&gt;
&lt;br /&gt;
Embedded Xinu uses the BCM2835 Interrupt Controller to implement &amp;lt;code&amp;gt;enable_irq()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;disable_irq()&amp;lt;/code&amp;gt;.  The code is in {{SourceFile|system/platforms/arm-rpi/dispatch.c}}.  These functions simply are passed the number of the IRQ to enable or disable.  Shared IRQs are numbered 0-63, while ARM-specific IRQs (currently not actually used) are numbered starting at 64.  Also in this file you will find &amp;lt;code&amp;gt;dispatch()&amp;lt;/code&amp;gt;, which is called from the assembly language IRQ handler in {{SourceFile|system/arch/arm/irq_handler.S}} to handle an interrupt.  The point of &amp;lt;code&amp;gt;dispatch()&amp;lt;/code&amp;gt; is to figure out which number IRQs are actually pending, then call the registered interrupt handler for each.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf BCM2835 ARM Peripherals datasheet by Broadcom].  The interrupt controller is documented in Section 7 (p. 109-118).  Compared to some of the Raspberry Pi hardware, this is one of the better documented components.  Beware, though, that Broadcom's docs don't mention some of the important IRQ numbers, such as 0-3 (System Timer) and 9 (USB Controller).&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Interrupt_handling_(ARM)&amp;diff=4075</id>
		<title>Interrupt handling (ARM)</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Interrupt_handling_(ARM)&amp;diff=4075"/>
		<updated>2013-09-12T01:44:06Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Use SourceFile template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page provides an overview of how [[Embedded Xinu]] performs interrupt handling on [http://en.wikipedia.org/wiki/ARM_architecture ARM architectures].  This only concerns ARM-specific details; in particular it must be understood that the actual meaning prescribed to interrupts is determined using a board-specific mechanism, such as the [[BCM2835 Interrupt Controller]] on the [[Raspberry Pi]].  Furthermore, note that the ARM architecture and its exception/interrupt handling mechanisms are well documented by ARM Ltd., especially in various versions of the ''ARM Architecture Reference Manual''&amp;lt;ref&amp;gt;http://infocenter.arm.com/help/index.jsp&amp;lt;/ref&amp;gt;.  This page is only intended to give an overview of relevant details in the context of Embedded Xinu.&lt;br /&gt;
&lt;br /&gt;
== IRQs and FIQs ==&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
ARM processors define two types of &amp;quot;interrupts&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
* '''IRQs''' (Interrupt Requests).  These are the &amp;quot;normal&amp;quot; type of interrupt.&lt;br /&gt;
* '''FIQs''' (Fast Interrupt Requests).  These are an feature that software can optionally use to increase the speed and/or priority of interrupts from a specific source.  For simplicity, Embedded Xinu does '''not''' use FIQs.  However, FIQs could be useful for those looking to design real-time and embedded software on top of or instead of the base Embedded Xinu kernel.&lt;br /&gt;
&lt;br /&gt;
Both IRQs and FIQs are examples of '''exceptions''' supported by the ARM.  Beware that the term &amp;quot;IRQ&amp;quot; is often used generically, whereas here it specifically refers to the ARM-architecture IRQ exception.&lt;br /&gt;
&lt;br /&gt;
=== Receiving an IRQ or FIQ ===&lt;br /&gt;
&lt;br /&gt;
When the ARM receives an IRQ, it will enter a special '''IRQ mode''' and, by default, begin execution at physical memory address &amp;lt;code&amp;gt;0x18&amp;lt;/code&amp;gt;.  Similarly, when the ARM receives a FIQ, it will enter a special '''FIQ mode''' and, by default, begin execution at physical memory address &amp;lt;code&amp;gt;0x1C&amp;lt;/code&amp;gt;.  Before enabling IRQs or FIQs, software is expected to copy ARM instructions to the appropriate address.  In the case of IRQs, there is only room for one ARM instruction, so it needs to be a branch instruction to a place where the full handler is stored.  In Embedded Xinu, these special &amp;quot;glue&amp;quot; instructions, or '''exception vectors''', are set in {{SourceFile|loader/platforms/arm-rpi/start.S}}.  The &amp;quot;full&amp;quot; IRQ handler is located in {{SourceFile|system/arch/arm/irq_handler.S}}.&lt;br /&gt;
&lt;br /&gt;
=== Banked registers ===&lt;br /&gt;
&lt;br /&gt;
In IRQ mode and FIQ modes, some registers are '''banked''', meaning that their contents are dependent on the current processor mode.  The advantage of such registers is that their original values do not need to be explicitly saved by the interrupt handling code.  FIQ mode banks more registers than IRQ mode, but both IRQ mode and FIQ mode bank the stack pointer (sp), which essentially means that each mode can use its own stack.  However, for simplicity and consistency with other CPU architectures, Embedded Xinu does '''not''' use this capability.  Instead, the interrupt handling code immediately switches the processor from IRQ mode to &amp;quot;System&amp;quot; mode, which is the mode in which Embedded Xinu normally operates the ARM CPU.  This means that the interrupt handling code uses the stack of the currently executing thread, so perhaps the main disadvantage of this approach is that it increases the stack size required by each thread.&lt;br /&gt;
&lt;br /&gt;
== Managing interrupts ==&lt;br /&gt;
&lt;br /&gt;
The ARM responds to IRQs and FIQs if and only if bits 7 and 6, respectively, of the Current Program Status Register (&amp;lt;code&amp;gt;cpsr&amp;lt;/code&amp;gt;) are 0.  By default (after reset) these bits are both 1, so software must initially set them to 0 to enable IRQs and FIQs.  Similarly, software can set them to 1 if it needs to disable IRQs and FIQs.  However, software does not necessarily need to explicitly manipulate these bits because an alternate instruction named &amp;lt;code&amp;gt;cps&amp;lt;/code&amp;gt; (Change Program State) is available that can handle changing these bits, as well as changing processor modes.&lt;br /&gt;
&lt;br /&gt;
Below we explain the &amp;lt;code&amp;gt;enable()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;disable()&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;restore()&amp;lt;/code&amp;gt; functions used by Embedded Xinu to manage interrupts.  These are all implemented in the ARM assembly language file {{SourceFile|system/arch/arm/intutils.S}}.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;enable()&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;enable()&amp;lt;/code&amp;gt; allows the processor to receive IRQ exceptions.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
enable:&lt;br /&gt;
	cpsie i&lt;br /&gt;
	mov pc, lr&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;enable()&amp;lt;/code&amp;gt; executes the &amp;lt;code&amp;gt;cpsie&amp;lt;/code&amp;gt; (&amp;quot;Change Program State Interrupt Enable&amp;quot;) instruction to enable IRQs.  (Recall that FIQs are not used by Embedded Xinu.)  It then overwrites the program counter (&amp;lt;code&amp;gt;pc&amp;lt;/code&amp;gt;) with the link register (&amp;lt;code&amp;gt;lr&amp;lt;/code&amp;gt;) to return from the function.  Note that since the second instruction is merely overhead of a function call, &amp;lt;code&amp;gt;enable()&amp;lt;/code&amp;gt; could instead be efficiently implemented as an inline function containing inline assembly.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;disable()&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;disable()&amp;lt;/code&amp;gt; blocks IRQ exceptions and returns a value that can be passed to &amp;lt;code&amp;gt;restore()&amp;lt;/code&amp;gt; to restore the previous state.  The previous state may be either IRQs disabled or IRQs enabled.  Note that an IRQ exception received during a region of code where interrupts are &amp;lt;code&amp;gt;disable()&amp;lt;/code&amp;gt;d is not lost; instead, it remains pending until IRQs are re-enabled.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
disable:&lt;br /&gt;
	mrs r0, cpsr&lt;br /&gt;
	cpsid i&lt;br /&gt;
	mov pc, lr&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;disable()&amp;lt;/code&amp;gt; copies the &amp;lt;code&amp;gt;cpsr&amp;lt;/code&amp;gt; (Current Program Status Register) into &amp;lt;code&amp;gt;r0&amp;lt;/code&amp;gt;, which as per the ARM calling convention&amp;lt;ref&amp;gt;http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf&amp;lt;/ref&amp;gt; is the return value of the function.  Therefore, the &amp;lt;code&amp;gt;cpsr&amp;lt;/code&amp;gt; is treated as the value that can be passed to &amp;lt;code&amp;gt;restore()&amp;lt;/code&amp;gt; to restore the previous interrupt state.  The code then executes the &amp;lt;code&amp;gt;cpsid&amp;lt;/code&amp;gt; (Change Program State Interrupt Disable) instruction to actually disable the IRQ exception.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;restore()&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;restore()&amp;lt;/code&amp;gt; restores the IRQ exceptions disabled/enabled state to the state before a previous call to &amp;lt;code&amp;gt;disable()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
restore:&lt;br /&gt;
	msr cpsr_c, r0&lt;br /&gt;
	mov pc, lr&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As per the ARM calling convention&amp;lt;ref&amp;gt;http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf&amp;lt;/ref&amp;gt;, the argument to &amp;lt;code&amp;gt;restore()&amp;lt;/code&amp;gt; (the previous state value--- in the code this is often stored in a variable named &amp;lt;code&amp;gt;im&amp;lt;/code&amp;gt;, for &amp;quot;interrupt mask&amp;quot;) is passed in &amp;lt;code&amp;gt;r0&amp;lt;/code&amp;gt;.  &amp;lt;code&amp;gt;r0&amp;lt;/code&amp;gt; is then copied to the &amp;lt;code&amp;gt;cpsr&amp;lt;/code&amp;gt; (Current Program Status Register), which is the opposite of what &amp;lt;code&amp;gt;disable()&amp;lt;/code&amp;gt; does.  &amp;lt;code&amp;gt;restore()&amp;lt;/code&amp;gt; then overwrites the program counter with the link register to return from the function.  Note that since the second instruction is merely overhead of a function call, &amp;lt;code&amp;gt;restore()&amp;lt;/code&amp;gt; could instead be efficiently implemented as an inline function containing inline assembly.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
&lt;br /&gt;
As mentioned in the introduction, this page deals with ARM-architecture details only and therefore does not provide a full explanation of interrupt handling on any specific platform, which typically requires the use of some interrupt controller to actually assign meaning to IRQ exceptions.&lt;br /&gt;
&lt;br /&gt;
* The interrupt controller on the [[Raspberry Pi]] is the [[BCM2835 Interrupt Controller]].&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Template:SourceFile&amp;diff=4074</id>
		<title>Template:SourceFile</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Template:SourceFile&amp;diff=4074"/>
		<updated>2013-09-12T01:41:23Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created template&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://github.com/xinu-os/xinu/tree/master/{{{1}}} {{{1}}}]&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Git&amp;diff=4073</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Git&amp;diff=4073"/>
		<updated>2013-09-12T01:36:27Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Embedded Xinu previously used a [[Subversion]] repository, but in 2013 switched to [http://git-scm.com/ git] as the preferred method of development.&lt;br /&gt;
&lt;br /&gt;
The official public repository is hosted on Github.  To get the code, install git and run:&lt;br /&gt;
&lt;br /&gt;
 git clone &amp;lt;nowiki&amp;gt;https://github.com/xinu-os/xinu&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will generate the directory &amp;lt;code&amp;gt;xinu/&amp;lt;/code&amp;gt; containing a local copy of the repository.  Note that this is a standalone repository that can be used without Internet access to the Github repository. This constitutes a difference from Subversion, which is more centralized.&lt;br /&gt;
&lt;br /&gt;
Git is documented extensively in many locations, for example in the [http://git-scm.com/book &amp;quot;Pro Git&amp;quot; book].  But briefly, a very basic workflow is to modify files, use &amp;lt;code&amp;gt;git add&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;git commit&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;git commit -a&amp;lt;/code&amp;gt; to commit the changes to the repository, then use &amp;lt;code&amp;gt;git push&amp;lt;/code&amp;gt; to push changes to a remote repository.&lt;br /&gt;
&lt;br /&gt;
Branches in git are fast and easy to use, so please develop experimental features in their own branches.  Code pushed to the &amp;quot;master&amp;quot; branch should not be broken.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=XinuPi&amp;diff=4072</id>
		<title>XinuPi</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=XinuPi&amp;diff=4072"/>
		<updated>2013-09-11T22:48:30Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Fix broken link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''XinuPi''' is the port of [[Embedded Xinu]] to the [[Raspberry Pi]].  XinuPi provides a simple, lightweight operating system for the Raspberry Pi that contains several orders of magnitude fewer lines of code than the Linux-based software stacks that normally run on the device.  Its purpose is to provide an inexpensive, convenient platform for various areas of computer science education at a University level, including operating systems, embedded systems, networking, and programming languages.  Another goal of XinuPi is to document some of the Raspberry Pi's hardware that has, until this point, been poorly documented or even undocumented.  This includes the documentation on this Wiki as well as the XinuPi source code and the documentation generated from comments in it.&lt;br /&gt;
&lt;br /&gt;
== Acquiring hardware ==&lt;br /&gt;
&lt;br /&gt;
See [[Raspberry Pi]] for information about the hardware itself.&lt;br /&gt;
&lt;br /&gt;
== Downloading and compiling ==&lt;br /&gt;
&lt;br /&gt;
XinuPi is currently only available in source code form and only in the [[git|Embedded Xinu git repository]].  To obtain the code, install [http://git-scm.com/ git] and run:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/xinu-os/xinu&lt;br /&gt;
 cd xinu&lt;br /&gt;
&lt;br /&gt;
Note that this in fact the code for &amp;quot;Embedded Xinu&amp;quot; and not for &amp;quot;XinuPi&amp;quot; specifically.  That is, the Raspberry Pi is one of several platforms that Embedded Xinu supports (and builds targeting it are referred to as &amp;quot;XinuPi&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
To compile XinuPi, run:&lt;br /&gt;
&lt;br /&gt;
 make -C compile PLATFORM=arm-rpi&lt;br /&gt;
&lt;br /&gt;
PLATFORM=arm-rpi is necessary to instruct the build system to target the Raspberry Pi.  Additional arguments can be passed to ''make'', such as the COMPILER_ROOT to specify the location of a GCC compiler targeting ARM (defaults to &amp;quot;arm-none-eabi-&amp;quot;, meaning that no explicit setting is needed if &amp;quot;arm-none-eabi-gcc&amp;quot; and the corresponding binutils are already on the shell $PATH).  See compile/README.compiling for more details; for example, details about cross compilers.&lt;br /&gt;
&lt;br /&gt;
The compilation process produces a file &amp;quot;compile/xinu.boot&amp;quot;, which can be copied to &amp;quot;kernel.img&amp;quot; on the SD card of a Raspberry Pi to run it (see [[Raspberry Pi#Booting]]).&lt;br /&gt;
&lt;br /&gt;
XinuPi is licensed under a BSD-style license; see the copyright information in the source distribution for more details.&lt;br /&gt;
&lt;br /&gt;
== Features and implementation ==&lt;br /&gt;
&lt;br /&gt;
* The core of XinuPi provides a preemptive multitasking operating system for the Raspberry Pi.  See [[Preemptive multitasking (ARM)]] for more details about how Embedded Xinu implements preemptive multitasking on ARM-based platforms such as the Raspberry Pi; this includes information about thread creation and context switching.  Also see [[BCM2835 System Timer]] for the timer on the Raspberry Pi that XinuPi uses to implement preemptive multitasking.&lt;br /&gt;
* Interrupt handling on the Raspberry Pi, required for the timer interrupt as well as many other devices, is described in [[Interrupt handling (Raspberry Pi)]].&lt;br /&gt;
* USB support was added to Embedded Xinu partly because of its important role in the Raspberry Pi, including to attach the Ethernet Controller on the Raspberry Pi Model B.  See [[USB]] for general information about USB, or [[Synopsys DesignWare High-Speed USB 2.0 On-The-Go Controller]] for information specifically about the USB controller the Raspberry Pi provides.&lt;br /&gt;
* See [[SMSC LAN9512]] for information about the built-in USB Ethernet Adapter on the Raspberry Pi Model B, and XinuPi's driver for it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;TODO:  sound, graphics, keyboard support&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Xinu&amp;diff=4071</id>
		<title>Xinu</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Xinu&amp;diff=4071"/>
		<updated>2013-09-11T22:45:40Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Bold words; make Embedded Xinu goals more accurate&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Xinu''' ('''&amp;quot;Xinu is not unix&amp;quot;''') is a small, academic operating system to teach the concepts of operating systems to students.  Developed at Purdue University by Dr. Douglas E. Comer in the early 1980s for the LSI-11 platform, it has now been ported to a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
'''Embedded Xinu''' is an update of this project which attempts to modernize the code base and port the system to modern architectures such as MIPS, while keeping the original goals of teaching operating system concepts to students.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Main_Page&amp;diff=4070</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Main_Page&amp;diff=4070"/>
		<updated>2013-09-11T22:40:52Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Be more specific in intro&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Embedded Xinu''' is an ongoing research and implementation project in the area of Operating Systems and Embedded Systems.  Its original goal was to re-implement and port the [[Xinu|Xinu Operating System]] to several embedded MIPS platforms, such as the Linksys [[WRT54GL]] router.  Since then, Embedded Xinu has been ported to other platforms, such as the QEMU-MIPSel virtual machine and the [[Raspberry Pi]]; see the [[list of supported platforms]].  Although Embedded Xinu is still being developed and ported to new platforms, a laboratory environment and curriculum materials are already in use for courses in Operating Systems, Hardware Systems, Embedded Systems, Networking, and Compilers at Marquette University and other colleges/universities.&lt;br /&gt;
&lt;br /&gt;
The Embedded Xinu project was conceived and is supervised by [http://www.mscs.mu.edu/~brylow/ Dr. Dennis Brylow] and is being conducted by both graduate and undergraduate students in the [[Systems Laboratory]] in the [http://www.mscs.mu.edu/ Math, Statistics, &amp;amp; Computer Science] department of [http://www.mu.edu/ Marquette University] in Milwaukee, Wisconsin.  The first major phase of work on Embedded Xinu began in the Summer of 2006.&lt;br /&gt;
&lt;br /&gt;
Our project partners include [http://www.cse.buffalo.edu/~bina/ Dr. Bina Ramamurthy] at University of Buffalo (with whom we shared an [http://www.nsf.gov/pubs/2009/nsf09529/nsf09529.html NSF CCLI] grant), [http://cs.olemiss.edu/~ruth/wiki/doku.php Dr. Paul Ruth] at University of Mississippi, and [http://www.cs.purdue.edu/people/comer Dr. Doug Comer] (father of Xinu) at Purdue University.&lt;br /&gt;
&lt;br /&gt;
== Teaching With Embedded Xinu ==&lt;br /&gt;
&lt;br /&gt;
* For curriculum guidance on adopting or adapting Embedded Xinu for undergraduate coursework, see [[Teaching With Xinu]].&lt;br /&gt;
* Workshops have been held regarding teaching with Embedded Xinu.  For example, the [http://www.cs.olemiss.edu/acmse2010/pdf/xinu.pdf Teaching With Embedded Xinu Workshop] at [http://www.cs.olemiss.edu/acmse2010/Home.htm ACMSE 2010] in Oxford, Mississippi (Ole Miss campus) shared ready-made curriculum resources that have been used successfully to teach hardware systems, operating systems, realtime/embedded systems, networking, and compilers with the Embedded Xinu platform at several colleges/universities.&lt;br /&gt;
&lt;br /&gt;
== Building an Embedded Xinu Laboratory ==&lt;br /&gt;
&lt;br /&gt;
In this section we are developing instructions so that other groups can benefit from the work we are doing.  These guides can be followed more or less in order to create a relatively inexpensive platform for a custom operating system.  As our work develops further, there will be more Xinu-specific information.&lt;br /&gt;
&lt;br /&gt;
# Obtain a [[List of supported platforms|supported platform]].&lt;br /&gt;
# [[HOWTO:Modify the Linksys hardware|Modify the Linksys hardware]] or [[HOWTO:Modify the ASUS hardware|Modify the ASUS hardware]]&lt;br /&gt;
# [[HOWTO:Connect to a modified router|Connect to a modified router]]&lt;br /&gt;
# [[HOWTO:Build Xinu|Build Xinu]]&lt;br /&gt;
# [[HOWTO:Deploy Xinu|Deploy Xinu]]&lt;br /&gt;
# (Optional) [[HOWTO:Build Backend Pool|Build a pool of backends]]&lt;br /&gt;
# (Recommended) [[HOWTO:Backup your router|Backup your router's factory configuration]]&lt;br /&gt;
&lt;br /&gt;
== Other Embedded Xinu Information ==&lt;br /&gt;
&lt;br /&gt;
* MIPS [[processor]]&lt;br /&gt;
* Main [[memory]]&lt;br /&gt;
* [[Exception and Interrupt Handling]]&lt;br /&gt;
* [[UART driver]]&lt;br /&gt;
* [[TTY driver]]&lt;br /&gt;
* [[Switch driver]]&lt;br /&gt;
* [[Networking]]&lt;br /&gt;
* [[Flash memory]]&lt;br /&gt;
* [[Flashing firmware]]&lt;br /&gt;
* [[EJTAG|Enhanced Joint Test Action Group]] debugger&lt;br /&gt;
* [[Standard library]]&lt;br /&gt;
* [[XinuPhone]] Internet telephony&lt;br /&gt;
* [[Router Recovery]] aka &amp;quot;Debricking&amp;quot;&lt;br /&gt;
* [[Development]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;small&amp;gt;The Xinu Lab is brought to you in part by [[XMMS|M&amp;amp;M's]].&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
--&amp;gt;__NOTOC__&amp;lt;!-- Disable &amp;quot;Contents&amp;quot; box from showing --&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;__NOEDITSECTION__&amp;lt;!-- Disable [edit] from appearing --&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Main_Page&amp;diff=4069</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Main_Page&amp;diff=4069"/>
		<updated>2013-09-11T22:39:52Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Don't have ugly red link on main page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Embedded Xinu''' is an ongoing research and implementation project in the area of Operating Systems and Embedded Systems.  Its original goal was to re-implement and port the [[Xinu|Xinu Operating System]] to several embedded MIPS platforms, such as the Linksys [[WRT54GL]] router.  Since then, Embedded Xinu has been ported to other platforms, such as the QEMU-MIPSel virtual machine and the [[Raspberry Pi]]; see the [[list of supported platforms]].  Although Embedded Xinu is still being developed and ported to new platforms, a laboratory environment and curriculum materials are already in use for courses in Operating Systems, Hardware Systems, Embedded Systems, Networking, and Compilers at Marquette University and other locations.&lt;br /&gt;
&lt;br /&gt;
The Embedded Xinu project was conceived and is supervised by [http://www.mscs.mu.edu/~brylow/ Dr. Dennis Brylow] and is being conducted by both graduate and undergraduate students in the [[Systems Laboratory]] in the [http://www.mscs.mu.edu/ Math, Statistics, &amp;amp; Computer Science] department of [http://www.mu.edu/ Marquette University] in Milwaukee, Wisconsin.  The first major phase of work on Embedded Xinu began in the Summer of 2006.&lt;br /&gt;
&lt;br /&gt;
Our project partners include [http://www.cse.buffalo.edu/~bina/ Dr. Bina Ramamurthy] at University of Buffalo (with whom we shared an [http://www.nsf.gov/pubs/2009/nsf09529/nsf09529.html NSF CCLI] grant), [http://cs.olemiss.edu/~ruth/wiki/doku.php Dr. Paul Ruth] at University of Mississippi, and [http://www.cs.purdue.edu/people/comer Dr. Doug Comer] (father of Xinu) at Purdue University.&lt;br /&gt;
&lt;br /&gt;
== Teaching With Embedded Xinu ==&lt;br /&gt;
&lt;br /&gt;
* For curriculum guidance on adopting or adapting Embedded Xinu for undergraduate coursework, see [[Teaching With Xinu]].&lt;br /&gt;
* Workshops have been held regarding teaching with Embedded Xinu.  For example, the [http://www.cs.olemiss.edu/acmse2010/pdf/xinu.pdf Teaching With Embedded Xinu Workshop] at [http://www.cs.olemiss.edu/acmse2010/Home.htm ACMSE 2010] in Oxford, Mississippi (Ole Miss campus) shared ready-made curriculum resources that have been used successfully to teach hardware systems, operating systems, realtime/embedded systems, networking, and compilers with the Embedded Xinu platform at several colleges/universities.&lt;br /&gt;
&lt;br /&gt;
== Building an Embedded Xinu Laboratory ==&lt;br /&gt;
&lt;br /&gt;
In this section we are developing instructions so that other groups can benefit from the work we are doing.  These guides can be followed more or less in order to create a relatively inexpensive platform for a custom operating system.  As our work develops further, there will be more Xinu-specific information.&lt;br /&gt;
&lt;br /&gt;
# Obtain a [[List of supported platforms|supported platform]].&lt;br /&gt;
# [[HOWTO:Modify the Linksys hardware|Modify the Linksys hardware]] or [[HOWTO:Modify the ASUS hardware|Modify the ASUS hardware]]&lt;br /&gt;
# [[HOWTO:Connect to a modified router|Connect to a modified router]]&lt;br /&gt;
# [[HOWTO:Build Xinu|Build Xinu]]&lt;br /&gt;
# [[HOWTO:Deploy Xinu|Deploy Xinu]]&lt;br /&gt;
# (Optional) [[HOWTO:Build Backend Pool|Build a pool of backends]]&lt;br /&gt;
# (Recommended) [[HOWTO:Backup your router|Backup your router's factory configuration]]&lt;br /&gt;
&lt;br /&gt;
== Other Embedded Xinu Information ==&lt;br /&gt;
&lt;br /&gt;
* MIPS [[processor]]&lt;br /&gt;
* Main [[memory]]&lt;br /&gt;
* [[Exception and Interrupt Handling]]&lt;br /&gt;
* [[UART driver]]&lt;br /&gt;
* [[TTY driver]]&lt;br /&gt;
* [[Switch driver]]&lt;br /&gt;
* [[Networking]]&lt;br /&gt;
* [[Flash memory]]&lt;br /&gt;
* [[Flashing firmware]]&lt;br /&gt;
* [[EJTAG|Enhanced Joint Test Action Group]] debugger&lt;br /&gt;
* [[Standard library]]&lt;br /&gt;
* [[XinuPhone]] Internet telephony&lt;br /&gt;
* [[Router Recovery]] aka &amp;quot;Debricking&amp;quot;&lt;br /&gt;
* [[Development]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;lt;small&amp;gt;&amp;lt;small&amp;gt;The Xinu Lab is brought to you in part by [[XMMS|M&amp;amp;M's]].&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
--&amp;gt;__NOTOC__&amp;lt;!-- Disable &amp;quot;Contents&amp;quot; box from showing --&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;__NOEDITSECTION__&amp;lt;!-- Disable [edit] from appearing --&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=XinuPi&amp;diff=4068</id>
		<title>XinuPi</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=XinuPi&amp;diff=4068"/>
		<updated>2013-09-11T22:38:41Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: /* Downloading and compiling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''XinuPi''' is the port of [[Embedded Xinu]] to the [[Raspberry Pi]].  XinuPi provides a simple, lightweight operating system for the Raspberry Pi that contains several orders of magnitude fewer lines of code than the Linux-based software stacks that normally run on the device.  Its purpose is to provide an inexpensive, convenient platform for various areas of computer science education at a University level, including operating systems, embedded systems, networking, and programming languages.  Another goal of XinuPi is to document some of the Raspberry Pi's hardware that has, until this point, been poorly documented or even undocumented.  This includes the documentation on this Wiki as well as the XinuPi source code and the documentation generated from comments in it.&lt;br /&gt;
&lt;br /&gt;
== Acquiring hardware ==&lt;br /&gt;
&lt;br /&gt;
See [[Raspberry Pi]] for information about the hardware itself.&lt;br /&gt;
&lt;br /&gt;
== Downloading and compiling ==&lt;br /&gt;
&lt;br /&gt;
XinuPi is currently only available in source code form and only in the [[git|Embedded Xinu git repository]].  To obtain the code, install [http://git-scm.com/ git] and run:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/xinu-os/xinu&lt;br /&gt;
 cd xinu&lt;br /&gt;
&lt;br /&gt;
Note that this in fact the code for &amp;quot;Embedded Xinu&amp;quot; and not for &amp;quot;XinuPi&amp;quot; specifically.  That is, the Raspberry Pi is one of several platforms that Embedded Xinu supports (and builds targeting it are referred to as &amp;quot;XinuPi&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
To compile XinuPi, run:&lt;br /&gt;
&lt;br /&gt;
 make -C compile PLATFORM=arm-rpi&lt;br /&gt;
&lt;br /&gt;
PLATFORM=arm-rpi is necessary to instruct the build system to target the Raspberry Pi.  Additional arguments can be passed to ''make'', such as the COMPILER_ROOT to specify the location of a GCC compiler targeting ARM (defaults to &amp;quot;arm-none-eabi-&amp;quot;, meaning that no explicit setting is needed if &amp;quot;arm-none-eabi-gcc&amp;quot; and the corresponding binutils are already on the shell $PATH).  See compile/README.compiling for more details; for example, details about cross compilers.&lt;br /&gt;
&lt;br /&gt;
The compilation process produces a file &amp;quot;compile/xinu.boot&amp;quot;, which can be copied to &amp;quot;kernel.img&amp;quot; on the SD card of a Raspberry Pi to run it (see [[#Booting]]).&lt;br /&gt;
&lt;br /&gt;
XinuPi is licensed under a BSD-style license; see the copyright information in the source distribution for more details.&lt;br /&gt;
&lt;br /&gt;
== Features and implementation ==&lt;br /&gt;
&lt;br /&gt;
* The core of XinuPi provides a preemptive multitasking operating system for the Raspberry Pi.  See [[Preemptive multitasking (ARM)]] for more details about how Embedded Xinu implements preemptive multitasking on ARM-based platforms such as the Raspberry Pi; this includes information about thread creation and context switching.  Also see [[BCM2835 System Timer]] for the timer on the Raspberry Pi that XinuPi uses to implement preemptive multitasking.&lt;br /&gt;
* Interrupt handling on the Raspberry Pi, required for the timer interrupt as well as many other devices, is described in [[Interrupt handling (Raspberry Pi)]].&lt;br /&gt;
* USB support was added to Embedded Xinu partly because of its important role in the Raspberry Pi, including to attach the Ethernet Controller on the Raspberry Pi Model B.  See [[USB]] for general information about USB, or [[Synopsys DesignWare High-Speed USB 2.0 On-The-Go Controller]] for information specifically about the USB controller the Raspberry Pi provides.&lt;br /&gt;
* See [[SMSC LAN9512]] for information about the built-in USB Ethernet Adapter on the Raspberry Pi Model B, and XinuPi's driver for it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;TODO:  sound, graphics, keyboard support&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Raspberry_Pi&amp;diff=4067</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Raspberry_Pi&amp;diff=4067"/>
		<updated>2013-09-11T22:37:33Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:RaspberryPi.jpg|200px|right|thumb|A freshly unpacked Raspberry Pi with additional SDHC card.]]&lt;br /&gt;
The '''Raspberry Pi''' is an inexpensive credit-card sized computer designed for educational use.  This page provides information about the Raspberry Pi in the context of those looking to run [[XinuPi]] on it.  Readers unfamiliar with the Raspberry Pi are advised to also see other sources such as the [http://www.raspberrypi.org/ Raspberry Pi foundation's website].&lt;br /&gt;
&lt;br /&gt;
== Acquiring the hardware ==&lt;br /&gt;
&lt;br /&gt;
=== Model A vs. Model B ===&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi Model A costs $25, whereas the Raspberry Pi Model B costs $35.  We generally recommend the Model B because it includes an Ethernet port and 2 USB ports, as opposed to the Model A which merely has 1 USB port.  Also, currently the Model B has more memory (512 MiB) than the Model A (256 MiB), but since [[XinuPi]] is very lightweight and only uses a small amount of the available memory, the difference in memory is mostly irrelevant.&lt;br /&gt;
&lt;br /&gt;
=== Hardware accessories ===&lt;br /&gt;
&lt;br /&gt;
One way the cost of the Raspberry Pi was kept down was increasing modularity.  A consequence of this is that a Raspberry Pi board by itself is useless until at least two additional components have been added:&lt;br /&gt;
&lt;br /&gt;
* SD card.  To boot, the Raspberry Pi requires an appropriately formatted SD card containing certain boot files as well as the operating system or kernel to run.  Note: as of this writing, [[XinuPi]] has no SD card driver; therefore, when running [[XinuPi]] the SD card is only used for booting.  Useful tip:  Since the SD card can easily be removed, it is trivial to have different SD cards and swap them out when needed.  This trick can be used to easily use the same Raspberry Pis for different purposes.&lt;br /&gt;
* Power source.  The Raspberry Pi requires 700 mA at 5V, delivered either through the microUSB port or through the GPIO pins.  For the microUSB port, most cell phone chargers should work.  For the GPIO pins, a useful trick is that a USB to TTL Serial converter, such as [http://www.adafruit.com/products/954 this one], can double as a power source  as well as a serial connection to the Raspberry Pi over which the console runs.  We have primarily used the latter method while developing [[XinuPi]].&lt;br /&gt;
&lt;br /&gt;
Other useful hardware and accessories include the following:&lt;br /&gt;
&lt;br /&gt;
* Serial cable for text input/output to/from the Raspberry Pi, such as [http://www.adafruit.com/products/954 this one].  This is very important for [[XinuPi]] because this is its primary way to interact with a human.  Furthermore, as noted above, such a serial cable can double as a power source.  However, eventually a keyboard-and-monitor setup will be supported as well, providing an alternative to a serial cable when human interaction with the system is desired.&lt;br /&gt;
* Monitor or TV to display graphics output from the Raspberry Pi.  While important for Linux, this is less important for [[XinuPi]], which is primarily intended to produce text output over a serial connection as described above.  However, [[XinuPi]] does support a framebuffer console and a turtle graphics application for those interested.&lt;br /&gt;
* [[USB]] devices can be plugged in and recognized, but the device driver support for specific devices is extremely limited at this point.  Support for USB keyboards as an input method is in development.&lt;br /&gt;
* Ethernet cable to take advantage of the networking support.&lt;br /&gt;
* Case to enclose the Raspberry Pi in.  This protects the board and adds aesthetic value; otherwise it has no purpose.&lt;br /&gt;
&lt;br /&gt;
[[File:Raspberry Pi in case with USB and Ethernet cables.jpg|thumb|Raspberry Pi Model B in a case with USB and Ethernet cables attached.]]&lt;br /&gt;
[[File:RaspberryPi in case with Ethernet cable.jpg|thumb|Another shot of a Raspberry Pi Model B in a case.]]&lt;br /&gt;
&lt;br /&gt;
== Booting ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi can only boot from its SD card, not from any external devices, and it requires several files in order to do so.  Several boot files, which are not distributed with [[XinuPi]], must be placed in the root directory of a FAT-formatted partition of the SD card.&lt;br /&gt;
&lt;br /&gt;
The following binary blobs (created by Broadcom, but freely distributable, at least when using them on Raspberry Pis) must exist:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;bootcode.bin&amp;quot; is a first-stage bootloader.  [[https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin Download link]].&lt;br /&gt;
* &amp;quot;loader.bin&amp;quot; is a second-stage bootloader.  Apparently, this file is no longer required.&lt;br /&gt;
* &amp;quot;start.elf&amp;quot; is the GPU firmware.[[https://github.com/raspberrypi/firmware/raw/master/boot/start.elf Download link]].&lt;br /&gt;
&lt;br /&gt;
The following text files are optional:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;config.txt&amp;quot; is parsed by the GPU firmware and is used to set various hardware parameters.  [[XinuPi]] runs fine with the default parameters, so &amp;quot;config.txt&amp;quot; need not exist.&lt;br /&gt;
* &amp;quot;cmdline.txt&amp;quot; is used to pass a command line to the Linux kernel.  This file need not exist for the [[XinuPi]] kernel, which does not take command line parameters.&lt;br /&gt;
&lt;br /&gt;
Finally, the actual kernel:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;kernel.img&amp;quot; must exist and is loaded as raw data at physical memory address 0x8000 by the GPU firmware.  The ARM begins execution at the very first instruction in this loaded image.  &amp;quot;kernel.img&amp;quot; can be a [[XinuPi]] kernel (rename &amp;quot;xinu.boot&amp;quot; to &amp;quot;kernel.img&amp;quot;), a Linux kernel, or other bare-metal code such as the &amp;quot;raspbootin&amp;quot; bootloader.  &amp;quot;raspbootin&amp;quot; has been helpful in developing [[XinuPi]]; see [https://github.com/mrvn/raspbootin/blob/master/README.md its documentation] for more information.&lt;br /&gt;
&lt;br /&gt;
There are a couple ways you can actually achieve the final result of a properly set up SD card:&lt;br /&gt;
&lt;br /&gt;
* Follow the installation instructions for a Linux distribution supported on the Raspberry Pi, such as Raspbian or Arch Linux ARM.  This will leave the appropriate boot files.  To switch to [[XinuPi]], simply replace &amp;quot;kernel.img&amp;quot; on the FAT partition with &amp;quot;xinu.boot&amp;quot;.  (Perhaps rename &amp;quot;kernel.img&amp;quot; to &amp;quot;linux.img&amp;quot; to save a backup first.)&lt;br /&gt;
* Manually partition the SD card and create a FAT filesystem, then copy the boot files to the filesystem.  The binary blobs can be downloaded using the links provided above.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Raspberry_Pi&amp;diff=4066</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Raspberry_Pi&amp;diff=4066"/>
		<updated>2013-09-11T22:35:25Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Wikify&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:RaspberryPi.jpg|200px|right|thumb|A freshly unpacked Raspberry Pi with additional SDHC card.]]&lt;br /&gt;
The '''Raspberry Pi''' is an inexpensive credit-card sized computer designed for educational use.  This page provides information about the Raspberry Pi in the context of those looking to run [[XinuPi]] on it.  Readers unfamiliar with the Raspberry Pi are advised to also see other sources such as the [http://www.raspberrypi.org/ Raspberry Pi foundation's website].&lt;br /&gt;
&lt;br /&gt;
== Acquiring the hardware ==&lt;br /&gt;
&lt;br /&gt;
=== Model A vs. Model B ===&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi Model A costs $25, whereas the Raspberry Pi Model B costs $35.  We generally recommend the Model B because it includes an Ethernet port and 2 USB ports, as opposed to the Model A which merely has 1 USB port.  Also, currently the Model B has more memory (512 MiB) than the Model A (256 MiB), but since Embedded Xinu is very lightweight and only uses a small amount of the available memory, the difference in memory is mostly irrelevant.&lt;br /&gt;
&lt;br /&gt;
=== Hardware accessories ===&lt;br /&gt;
&lt;br /&gt;
One way the cost of the Raspberry Pi was kept down was increasing modularity.  A consequence of this is that a Raspberry Pi board by itself is useless until at least two additional components have been added:&lt;br /&gt;
&lt;br /&gt;
* SD card.  To boot, the Raspberry Pi requires an appropriately formatted SD card containing certain boot files as well as the operating system or kernel to run.  Note: as of this writing, Embedded Xinu has no SD card driver; therefore, when running Embedded Xinu the SD card is only used for booting.  Useful tip:  Since the SD card can easily be removed, it is trivial to have different SD cards and swap them out when needed.  This trick can be used to easily use the same Raspberry Pis for different purposes.&lt;br /&gt;
* Power source.  The Raspberry Pi requires 700 mA at 5V, delivered either through the microUSB port or through the GPIO pins.  For the microUSB port, most cell phone chargers should work.  For the GPIO pins, a useful trick is that a USB to TTL Serial converter, such as [http://www.adafruit.com/products/954 this one], can double as a power source  as well as a serial connection to the Raspberry Pi over which the console runs.  We have primarily used the latter method while developing [[XinuPi]].&lt;br /&gt;
&lt;br /&gt;
Other useful hardware and accessories include the following:&lt;br /&gt;
&lt;br /&gt;
* Serial cable for text input/output to/from the Raspberry Pi, such as [http://www.adafruit.com/products/954 this one].  This is very important for [[XinuPi]] because this is its primary way to interact with a human.  Furthermore, as noted above, such a serial cable can double as a power source.  However, eventually a keyboard-and-monitor setup will be supported as well, providing an alternative to a serial cable when human interaction with the system is desired.&lt;br /&gt;
* Monitor or TV to display graphics output from the Raspberry Pi.  While important for Linux, this is less important for [[XinuPi]], which is primarily intended to produce text output over a serial connection as described above.  However, [[XinuPi]] does support a framebuffer console and a turtle graphics application for those interested.&lt;br /&gt;
* [[USB]] devices can be plugged in and recognized, but the device driver support for specific devices is extremely limited at this point.  Support for USB keyboards as an input method is in development.&lt;br /&gt;
* Ethernet cable to take advantage of the networking support.&lt;br /&gt;
* Case to enclose the Raspberry Pi in.  This protects the board and adds aesthetic value; otherwise it has no purpose.&lt;br /&gt;
&lt;br /&gt;
[[File:Raspberry Pi in case with USB and Ethernet cables.jpg|thumb|Raspberry Pi Model B in a case with USB and Ethernet cables attached.]]&lt;br /&gt;
[[File:RaspberryPi in case with Ethernet cable.jpg|thumb|Another shot of a Raspberry Pi Model B in a case.]]&lt;br /&gt;
&lt;br /&gt;
== Booting ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi can only boot from its SD card, not from any external devices, and it requires several files in order to do so.  Several boot files, which are not distributed with [[XinuPi]], must be placed in the root directory of a FAT-formatted partition of the SD card.&lt;br /&gt;
&lt;br /&gt;
The following binary blobs (created by Broadcom, but freely distributable, at least when using them on Raspberry Pis) must exist:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;bootcode.bin&amp;quot; is a first-stage bootloader.  [[https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin Download link]].&lt;br /&gt;
* &amp;quot;loader.bin&amp;quot; is a second-stage bootloader.  Apparently, this file is no longer required.&lt;br /&gt;
* &amp;quot;start.elf&amp;quot; is the GPU firmware.[[https://github.com/raspberrypi/firmware/raw/master/boot/start.elf Download link]].&lt;br /&gt;
&lt;br /&gt;
The following text files are optional:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;config.txt&amp;quot; is parsed by the GPU firmware and is used to set various hardware parameters.  [[XinuPi]] runs fine with the default parameters, so &amp;quot;config.txt&amp;quot; need not exist.&lt;br /&gt;
* &amp;quot;cmdline.txt&amp;quot; is used to pass a command line to the Linux kernel.  This file need not exist for the [[XinuPi]] kernel, which does not take command line parameters.&lt;br /&gt;
&lt;br /&gt;
Finally, the actual kernel:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;kernel.img&amp;quot; must exist and is loaded as raw data at physical memory address 0x8000 by the GPU firmware.  The ARM begins execution at the very first instruction in this loaded image.  &amp;quot;kernel.img&amp;quot; can be a [[XinuPi]] kernel (rename &amp;quot;xinu.boot&amp;quot; to &amp;quot;kernel.img&amp;quot;), a Linux kernel, or other bare-metal code such as the &amp;quot;raspbootin&amp;quot; bootloader.  &amp;quot;raspbootin&amp;quot; has been helpful in developing [[XinuPi]]; see [https://github.com/mrvn/raspbootin/blob/master/README.md its documentation] for more information.&lt;br /&gt;
&lt;br /&gt;
There are a couple ways you can actually achieve the final result of a properly set up SD card:&lt;br /&gt;
&lt;br /&gt;
* Follow the installation instructions for a Linux distribution supported on the Raspberry Pi, such as Raspbian or Arch Linux ARM.  This will leave the appropriate boot files.  To switch to [[XinuPi]], simply replace &amp;quot;kernel.img&amp;quot; on the FAT partition with &amp;quot;xinu.boot&amp;quot;.  (Perhaps rename &amp;quot;kernel.img&amp;quot; to &amp;quot;linux.img&amp;quot; to save a backup first.)&lt;br /&gt;
* Manually partition the SD card and create a FAT filesystem, then copy the boot files to the filesystem.  The binary blobs can be downloaded using the links provided above.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=XinuPi&amp;diff=4065</id>
		<title>XinuPi</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=XinuPi&amp;diff=4065"/>
		<updated>2013-09-11T22:34:00Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created page with content from &amp;quot;Raspberry Pi&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''XinuPi''' is the port of [[Embedded Xinu]] to the [[Raspberry Pi]].  XinuPi provides a simple, lightweight operating system for the Raspberry Pi that contains several orders of magnitude fewer lines of code than the Linux-based software stacks that normally run on the device.  Its purpose is to provide an inexpensive, convenient platform for various areas of computer science education at a University level, including operating systems, embedded systems, networking, and programming languages.  Another goal of XinuPi is to document some of the Raspberry Pi's hardware that has, until this point, been poorly documented or even undocumented.  This includes the documentation on this Wiki as well as the XinuPi source code and the documentation generated from comments in it.&lt;br /&gt;
&lt;br /&gt;
== Acquiring hardware ==&lt;br /&gt;
&lt;br /&gt;
See [[Raspberry Pi]] for information about the hardware itself.&lt;br /&gt;
&lt;br /&gt;
== Downloading and compiling ==&lt;br /&gt;
&lt;br /&gt;
XinuPi is currently only available in source code form and only in the [http://github.com/xinu-os/xinu Embedded Xinu git repository].  To obtain the code, install [http://git-scm.com/ git] and run:&lt;br /&gt;
&lt;br /&gt;
 git clone https://github.com/xinu-os/xinu&lt;br /&gt;
 cd xinu&lt;br /&gt;
&lt;br /&gt;
Note that this in fact the code for &amp;quot;Embedded Xinu&amp;quot; and not for &amp;quot;XinuPi&amp;quot; specifically.  That is, the Raspberry Pi is one of several platforms that Embedded Xinu supports (and builds targeting it are referred to as &amp;quot;XinuPi&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
To compile XinuPi, run:&lt;br /&gt;
&lt;br /&gt;
 make -C compile PLATFORM=arm-rpi&lt;br /&gt;
&lt;br /&gt;
PLATFORM=arm-rpi is necessary to instruct the build system to target the Raspberry Pi.  Additional arguments can be passed to ''make'', such as the COMPILER_ROOT to specify the location of a GCC compiler targeting ARM (defaults to &amp;quot;arm-none-eabi-&amp;quot;, meaning that no explicit setting is needed if &amp;quot;arm-none-eabi-gcc&amp;quot; and the corresponding binutils are already on the shell $PATH).  See compile/README.compiling for more details; for example, details about cross compilers.&lt;br /&gt;
&lt;br /&gt;
The compilation process produces a file &amp;quot;compile/xinu.boot&amp;quot;, which can be copied to &amp;quot;kernel.img&amp;quot; on the SD card of a Raspberry Pi to run it (see [[#Booting]]).&lt;br /&gt;
&lt;br /&gt;
XinuPi is licensed under a BSD-style license; see the copyright information in the source distribution for more details.&lt;br /&gt;
&lt;br /&gt;
== Features and implementation ==&lt;br /&gt;
&lt;br /&gt;
* The core of XinuPi provides a preemptive multitasking operating system for the Raspberry Pi.  See [[Preemptive multitasking (ARM)]] for more details about how Embedded Xinu implements preemptive multitasking on ARM-based platforms such as the Raspberry Pi; this includes information about thread creation and context switching.  Also see [[BCM2835 System Timer]] for the timer on the Raspberry Pi that XinuPi uses to implement preemptive multitasking.&lt;br /&gt;
* Interrupt handling on the Raspberry Pi, required for the timer interrupt as well as many other devices, is described in [[Interrupt handling (Raspberry Pi)]].&lt;br /&gt;
* USB support was added to Embedded Xinu partly because of its important role in the Raspberry Pi, including to attach the Ethernet Controller on the Raspberry Pi Model B.  See [[USB]] for general information about USB, or [[Synopsys DesignWare High-Speed USB 2.0 On-The-Go Controller]] for information specifically about the USB controller the Raspberry Pi provides.&lt;br /&gt;
* See [[SMSC LAN9512]] for information about the built-in USB Ethernet Adapter on the Raspberry Pi Model B, and XinuPi's driver for it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;TODO:  sound, graphics, keyboard support&amp;lt;/span&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Raspberry_Pi&amp;diff=4064</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Raspberry_Pi&amp;diff=4064"/>
		<updated>2013-09-11T22:33:35Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Moving XinuPi info to external page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:RaspberryPi.jpg|200px|right|thumb|A freshly unpacked Raspberry Pi with additional SDHC card.]]&lt;br /&gt;
The '''Raspberry Pi''' is an inexpensive credit-card sized computer designed for educational use.  This page provides information about the Raspberry Pi in the context of those looking to run [[XinuPi]] on it.  Readers unfamiliar with the Raspberry Pi are advised to also see other sources such as the [http://www.raspberrypi.org/ Raspberry Pi foundation's website].&lt;br /&gt;
&lt;br /&gt;
== Acquiring the hardware ==&lt;br /&gt;
&lt;br /&gt;
=== Model A vs. Model B ===&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi Model A costs $25, whereas the Raspberry Pi Model B costs $35.  We generally recommend the Model B because it includes an Ethernet port and 2 USB ports, as opposed to the Model A which merely has 1 USB port.  Also, currently the Model B has more memory (512 MiB) than the Model A (256 MiB), but since Embedded Xinu is very lightweight and only uses a small amount of the available memory, the difference in memory is mostly irrelevant.&lt;br /&gt;
&lt;br /&gt;
=== Hardware accessories ===&lt;br /&gt;
&lt;br /&gt;
One way the cost of the Raspberry Pi was kept down was increasing modularity.  A consequence of this is that a Raspberry Pi board by itself is useless until at least two additional components have been added:&lt;br /&gt;
&lt;br /&gt;
* SD card.  To boot, the Raspberry Pi requires an appropriately formatted SD card containing certain boot files as well as the operating system or kernel to run.  Note: as of this writing, Embedded Xinu has no SD card driver; therefore, when running Embedded Xinu the SD card is only used for booting.  Useful tip:  Since the SD card can easily be removed, it is trivial to have different SD cards and swap them out when needed.  This trick can be used to easily use the same Raspberry Pis for different purposes.&lt;br /&gt;
* Power source.  The Raspberry Pi requires 700 mA at 5V, delivered either through the microUSB port or through the GPIO pins.  For the microUSB port, most cell phone chargers should work.  For the GPIO pins, a useful trick is that a USB to TTL Serial converter, such as [http://www.adafruit.com/products/954 this one], can double as a power source  as well as a serial connection to the Raspberry Pi over which the console runs.  We have primarily used the latter method while developing XinuPi.&lt;br /&gt;
&lt;br /&gt;
Other useful hardware and accessories include the following:&lt;br /&gt;
&lt;br /&gt;
* Serial cable for text input/output to/from the Raspberry Pi, such as [http://www.adafruit.com/products/954 this one].  This is very important for XinuPi because this is its primary way to interact with a human.  Furthermore, as noted above, such a serial cable can double as a power source.  However, eventually a keyboard-and-monitor setup will be supported as well, providing an alternative to a serial cable when human interaction with the system is desired.&lt;br /&gt;
* Monitor or TV to display graphics output from the Raspberry Pi.  While important for Linux, this is less important for XinuPi, which is primarily intended to produce text output over a serial connection as described above.  However, XinuPi does support a framebuffer console and a turtle graphics application for those interested.&lt;br /&gt;
* USB devices can be plugged in and recognized, but the device driver support for specific devices is extremely limited at this point.  Support for USB keyboards as an input method is in development.&lt;br /&gt;
* Ethernet cable to take advantage of the networking support.&lt;br /&gt;
* Case to enclose the Raspberry Pi in.  This protects the board and adds aesthetic value; otherwise it has no purpose.&lt;br /&gt;
&lt;br /&gt;
[[File:Raspberry Pi in case with USB and Ethernet cables.jpg|thumb|Raspberry Pi Model B in a case with USB and Ethernet cables attached.]]&lt;br /&gt;
[[File:RaspberryPi in case with Ethernet cable.jpg|thumb|Another shot of a Raspberry Pi Model B in a case.]]&lt;br /&gt;
&lt;br /&gt;
== Booting ==&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi can only boot from its SD card, not from any external devices, and it requires several files in order to do so.  Several boot files, which are not distributed with XinuPi, must be placed in the root directory of a FAT-formatted partition of the SD card.&lt;br /&gt;
&lt;br /&gt;
The following binary blobs (created by Broadcom, but freely distributable, at least when using them on Raspberry Pis) must exist:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;bootcode.bin&amp;quot; is a first-stage bootloader.  [[https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin Download link]].&lt;br /&gt;
* &amp;quot;loader.bin&amp;quot; is a second-stage bootloader.  Apparently, this file is no longer required.&lt;br /&gt;
* &amp;quot;start.elf&amp;quot; is the GPU firmware.[[https://github.com/raspberrypi/firmware/raw/master/boot/start.elf Download link]].&lt;br /&gt;
&lt;br /&gt;
The following text files are optional:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;config.txt&amp;quot; is parsed by the GPU firmware and is used to set various hardware parameters.  XinuPi runs fine with the default parameters, so &amp;quot;config.txt&amp;quot; need not exist.&lt;br /&gt;
* &amp;quot;cmdline.txt&amp;quot; is used to pass a command line to the Linux kernel.  This file need not exist for the XinuPi kernel, which does not take command line parameters.&lt;br /&gt;
&lt;br /&gt;
Finally, the actual kernel:&lt;br /&gt;
&lt;br /&gt;
* &amp;quot;kernel.img&amp;quot; must exist and is loaded as raw data at physical memory address 0x8000 by the GPU firmware.  The ARM begins execution at the very first instruction in this loaded image.  &amp;quot;kernel.img&amp;quot; can be a XinuPi kernel (rename &amp;quot;xinu.boot&amp;quot; to &amp;quot;kernel.img&amp;quot;), a Linux kernel, or other bare-metal code such as the &amp;quot;raspbootin&amp;quot; bootloader.  &amp;quot;raspbootin&amp;quot; has been helpful in developing XinuPi; see [https://github.com/mrvn/raspbootin/blob/master/README.md its documentation] for more information.&lt;br /&gt;
&lt;br /&gt;
There are a couple ways you can actually achieve the final result of a properly set up SD card:&lt;br /&gt;
&lt;br /&gt;
* Follow the installation instructions for a Linux distribution supported on the Raspberry Pi, such as Raspbian or Arch Linux ARM.  This will leave the appropriate boot files.  To switch to XinuPi, simply replace &amp;quot;kernel.img&amp;quot; on the FAT partition with &amp;quot;xinu.boot&amp;quot;.  (Perhaps rename &amp;quot;kernel.img&amp;quot; to &amp;quot;linux.img&amp;quot; to save a backup first.)&lt;br /&gt;
* Manually partition the SD card and create a FAT filesystem, then copy the boot files to the filesystem.  The binary blobs can be downloaded using the links provided above.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Netaa&amp;diff=4063</id>
		<title>Netaa</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Netaa&amp;diff=4063"/>
		<updated>2013-09-11T22:23:20Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Historical}}&lt;br /&gt;
&lt;br /&gt;
=Team Members=&lt;br /&gt;
''(All emails are @mu.edu)''&lt;br /&gt;
*Aaron Gember: aaron.gember, (414) 550-5820&lt;br /&gt;
*Adam Koehler: adam.koehler&lt;br /&gt;
*Brian Smith: brian.smith&lt;br /&gt;
*Cathy Vuong: catherine.vuong&lt;br /&gt;
*Kyle Jackson: kyle.jackson&lt;br /&gt;
*Tim Blattner: timothy.blattner&lt;br /&gt;
&lt;br /&gt;
Team email list:&lt;br /&gt;
agember-es{at}mscs{dot}mu{dot}edu&lt;br /&gt;
&lt;br /&gt;
=Documentation=&lt;br /&gt;
[[Image:Netaa_network_daemons_plan.pdf]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Netaa_network_send_plan.pdf]]&lt;br /&gt;
&lt;br /&gt;
=Timeline=&lt;br /&gt;
===Thursday, February 14: Meeting===&lt;br /&gt;
*6pm in Cudahy 310&lt;br /&gt;
&lt;br /&gt;
*Adam, Tim, and Kyle are researching ICMP.  Aaron, Brian, and Cathy are researching ARP.  &lt;br /&gt;
*Extra shell commands will be assigned at next meeting.&lt;br /&gt;
&lt;br /&gt;
===Monday, February 18: ICMP Subgroup Meeting===&lt;br /&gt;
*3:45pm in Cudahy 310&lt;br /&gt;
*Meeting before class to go over questions or concerns on implementation.&lt;br /&gt;
&lt;br /&gt;
===Thursday, February 21: Meeting===&lt;br /&gt;
*6pm in Cudahy 310&lt;br /&gt;
*Meeting to ensure progress and to assign the remaining pieces of the project.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;strike&amp;gt;Wednesday, February 27&amp;lt;/strike&amp;gt; Sunday, March 2: Part 1 Deadline===&lt;br /&gt;
*ARP (Address Resolution Protocol) '''[completed February 29, 2008]'''&lt;br /&gt;
**&amp;lt;strike&amp;gt;send&amp;lt;/strike&amp;gt; [completed February 28, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;receive&amp;lt;/strike&amp;gt; [completed February 22, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;receiveDaemon&amp;lt;/strike&amp;gt; [completed February 27, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;arpTimer - cache timeout&amp;lt;/strike&amp;gt; [completed February 29, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;shell command (arp)&amp;lt;/strike&amp;gt; [completed February 28, 2008]&lt;br /&gt;
*ICMP (Internet Control Message Protocol) '''[completed February 28, 2008]'''&lt;br /&gt;
**&amp;lt;strike&amp;gt;echo request&amp;lt;/strike&amp;gt; [completed February 22, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;echo reply&amp;lt;/strike&amp;gt; [completed February 28, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;daemon&amp;lt;/strike&amp;gt; [completed February 22, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;shell command (ping)&amp;lt;/strike&amp;gt; [completed February 27, 2008]&lt;br /&gt;
*Shell commands '''[completed February 28, 2008]'''&lt;br /&gt;
**&amp;lt;strike&amp;gt;snoop (packet sniffer)&amp;lt;/strike&amp;gt; [completed February 26, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;ethstat&amp;lt;/strike&amp;gt; [completed February 28, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;guesswho&amp;lt;/strike&amp;gt; [completed February 23, 2008]&lt;br /&gt;
*Other '''[completed February 27, 2008]'''&lt;br /&gt;
**&amp;lt;strike&amp;gt;netSend&amp;lt;/strike&amp;gt; [completed February 26, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;chkSum&amp;lt;/strike&amp;gt; [completed February 27, 2008]&lt;br /&gt;
&lt;br /&gt;
===Monday, March 3: Project Team Meeting===&lt;br /&gt;
*Discuss part two of the project, all team members should read up on all parts of the second stage before the meeting occurs.&lt;br /&gt;
&lt;br /&gt;
===Wednesday, April 2: Part 2 Deadline [completed April 2, 2008]=== &lt;br /&gt;
*&amp;lt;strike&amp;gt;DHCP (Dynamic Host Configuration Protocol)&amp;lt;/strike&amp;gt; -- Aaron &amp;amp; Cathy [completed April 1, 2008]&lt;br /&gt;
**[http://tools.ietf.org/html/rfc2131 RFC]&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol Wikipedia Page]&lt;br /&gt;
*&amp;lt;strike&amp;gt;Traceroute&amp;lt;/strike&amp;gt; -- Adam &amp;amp; Kyle [completed April 2, 2008]&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol ICMP Wiki Page]&lt;br /&gt;
**[http://en.wikipedia.org/wiki/Traceroute Wikipedia Page]&lt;br /&gt;
**&amp;lt;strike&amp;gt;Request&amp;lt;/strike&amp;gt; [completed April 2, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;Reply&amp;lt;/strike&amp;gt; [completed March 26, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;Shell command&amp;lt;/strike&amp;gt;&lt;br /&gt;
*&amp;lt;strike&amp;gt;Rdate -- Tim &amp;amp; Brian &amp;lt;/strike&amp;gt; [completed April 3, 2008]&lt;br /&gt;
**[http://www.faqs.org/rfcs/rfc868.html Time Protocol]&lt;br /&gt;
**[http://www.linuxcommand.org/man_pages/rdate1.html man page]&lt;br /&gt;
*&amp;lt;strike&amp;gt;UDP&amp;lt;/strike&amp;gt; -- Aaron &amp;amp; Adam [completed March 28, 2008]&lt;br /&gt;
**[http://www.faqs.org/rfcs/rfc768.html UDP RFC]&lt;br /&gt;
**&amp;lt;strike&amp;gt;UDP Daemon&amp;lt;/strike&amp;gt;  [completed March 24, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;UDP ports device&amp;lt;/strike&amp;gt; [completed March 28, 2008]&lt;br /&gt;
**&amp;lt;strike&amp;gt;Shell command udpstat&amp;lt;/strike&amp;gt; [completed March 24, 2008]&lt;br /&gt;
&lt;br /&gt;
===Monday, May 5: TCP Deadline===&lt;br /&gt;
*Research&lt;br /&gt;
**[http://www.faqs.org/rfcs/rfc793.html TCP RFC]&lt;br /&gt;
**[[Image:TCPIP_State_Transition_Diagram.pdf]]&lt;br /&gt;
===Future Development===&lt;br /&gt;
*X11&lt;br /&gt;
**[http://en.wikipedia.org/wiki/X11 Wikipedia]&lt;br /&gt;
**[http://en.wikipedia.org/wiki/X11 Wikipedia]&lt;br /&gt;
**[http://toastytech.com/guis/remotex11.html Other implementation]&lt;br /&gt;
**[http://proquest.safaribooksonline.com/0789723727 Book: X Window Programming from Scratch by J. Robert Brown]&lt;br /&gt;
**[http://www.faqs.org/rfcs/rfc1013.html X11 RFC]&lt;br /&gt;
**[http://www.x.org/wiki/ X.org]&lt;br /&gt;
&lt;br /&gt;
=Cautions=&lt;br /&gt;
#Be aware of critical sections, you may need to disable and restore interrupts.&lt;br /&gt;
&lt;br /&gt;
=Known Bugs=&lt;br /&gt;
#Sporadically receive PDE errors, running etherClose seems to fix things.&lt;br /&gt;
#Memory fragmentation occurs when packets are received and processed.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Development&amp;diff=4062</id>
		<title>Development</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Development&amp;diff=4062"/>
		<updated>2013-09-11T22:18:23Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Remove link to redundant / obsolete page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Information about Embedded Xinu development:&lt;br /&gt;
&lt;br /&gt;
* [[Repo|Repository]]&lt;br /&gt;
* [[Build System|Build system]]&lt;br /&gt;
* [[KNF|Coding style]]&lt;br /&gt;
* [[Development tasks|TODO list]]&lt;br /&gt;
* [[Components|Modular/componental design]]&lt;br /&gt;
* [[Crosscompiler|Building/downloading and using cross compilers]]&lt;br /&gt;
* [[Trace|Debugging statements / Tracing]]&lt;br /&gt;
* [[List of supported platforms|Current platforms]]&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Development_tasks&amp;diff=4060</id>
		<title>Development tasks</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Development_tasks&amp;diff=4060"/>
		<updated>2013-09-11T22:14:00Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Update page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page catalogs tasks for the [[Embedded Xinu]] project.  Feel free to add new tasks and change existing tasks as you see fit.&lt;br /&gt;
&lt;br /&gt;
== Pending ==&lt;br /&gt;
&lt;br /&gt;
=== Active ===&lt;br /&gt;
&lt;br /&gt;
* USB HID (e.g. keyboard) support&lt;br /&gt;
* SD card support&lt;br /&gt;
* File System/[[Flash driver|Flash disk driver]]/TTY disk driver&lt;br /&gt;
* [[EJTAG]] interface for debugging, on platforms supporting it&lt;br /&gt;
* Improvements to testsuite (Internal/External Testing and Completion)&lt;br /&gt;
* Memory protection (on some platforms)&lt;br /&gt;
&lt;br /&gt;
== Future ==&lt;br /&gt;
&lt;br /&gt;
=== Software ===&lt;br /&gt;
* Wireless networking&lt;br /&gt;
* Robo-switch&lt;br /&gt;
* Watchdog timer&lt;br /&gt;
&lt;br /&gt;
=== Hardware ===&lt;br /&gt;
* External sensors&lt;br /&gt;
* Poke around [[WRT54G]] and [[WRT350N]]&lt;br /&gt;
&lt;br /&gt;
=== Meta ===&lt;br /&gt;
* Windows port of xinu-console tools&lt;br /&gt;
* Rebooter daemon&lt;br /&gt;
&lt;br /&gt;
== Completed ==&lt;br /&gt;
&lt;br /&gt;
=== Fall 2005 ===&lt;br /&gt;
* Complete port of ancient-XINU (Pentium) to modern processor (PPC)&lt;br /&gt;
&lt;br /&gt;
=== Summer 2006 ===&lt;br /&gt;
* Hardware modifications for WRT54GLs&lt;br /&gt;
* Communicate over serial port (MIPS)&lt;br /&gt;
* Write loader for MIPS port&lt;br /&gt;
&lt;br /&gt;
=== Fall 2006 ===&lt;br /&gt;
* Complete port of PPC-XINU to MIPS-XINU&lt;br /&gt;
* Interrupt subsystem&lt;br /&gt;
&lt;br /&gt;
=== Spring 2007 ===&lt;br /&gt;
* Initial asynchronous UART driver (TTY driver)&lt;br /&gt;
* Initial file system (via the second TTY)&lt;br /&gt;
&lt;br /&gt;
=== Summer 2007 ===&lt;br /&gt;
* Basic [[Shell]] (port from x86)&lt;br /&gt;
* Improvements to the [[UART Driver]] and [[TTY Driver]]&lt;br /&gt;
* Code Audits&lt;br /&gt;
** Including the startup process, [[UART Driver]], [[TTY Driver]], [[Standard library|libxc]], Interprocess Communication (now mailboxes), memory, interrupts, and other important XINU subsystems&lt;br /&gt;
* Hardware modifications for EJTAG port&lt;br /&gt;
** Successfully wrote Flash memory via [[EJTAG]] interface&lt;br /&gt;
&lt;br /&gt;
=== Fall 2007 - Spring 2013 ===&lt;br /&gt;
* No one bothered to update this page, apparently.&lt;br /&gt;
&lt;br /&gt;
=== Summer 2013 ===&lt;br /&gt;
* Ported to Raspberry Pi&lt;br /&gt;
* Rewrote C library&lt;br /&gt;
* Added USB support&lt;br /&gt;
* Added TFTP and DHCP clients&lt;br /&gt;
* Reduced code duplication&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Subversion&amp;diff=4059</id>
		<title>Subversion</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Subversion&amp;diff=4059"/>
		<updated>2013-09-11T22:00:33Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Marked page as historical (due to switch to git)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Historical}}&lt;br /&gt;
&lt;br /&gt;
A [http://acm.mscs.mu.edu/wiki/Subversion general use guide] is now available on the [http://acm.mscs.mu.edu/ Student ACM Wiki].  Also there is a posting of commands in the Cudahy 310 Computer Lab.&lt;br /&gt;
&lt;br /&gt;
Xinu specific information about the repository is available in the [[trac:Subversion|trac wiki]].&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
	<entry>
		<id>https://xinu.cs.mu.edu/index.php?title=Git&amp;diff=4058</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://xinu.cs.mu.edu/index.php?title=Git&amp;diff=4058"/>
		<updated>2013-09-11T21:57:07Z</updated>

		<summary type="html">&lt;p&gt;Ebiggers: Created page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Embedded Xinu previously used a [[Subversion]] repository, but in 2013 switched to [http://git-scm.com/ git] as the preferred method of development.&lt;br /&gt;
&lt;br /&gt;
The official public repository is hosted on Github.  To get the code, install git and run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
git clone https://github.com/xinu-os/xinu&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will generate the directory &amp;quot;xinu&amp;quot; containing a local copy of the repository.  Note that this is a standalone repository that can be used without access to the Github repository. This constitutes a difference from Subversion, which is more centralized.&lt;br /&gt;
&lt;br /&gt;
Git is documented extensively in many locations, for example in the [http://git-scm.com/book &amp;quot;Pro Git&amp;quot; book].  But in one sentence, a very basic workflow is to modify files, use &amp;quot;git add&amp;quot; and &amp;quot;git commit&amp;quot; or &amp;quot;git commit -a&amp;quot; to commit the changes to the repository, then use &amp;quot;git push&amp;quot; to push changes to a remote repository.&lt;br /&gt;
&lt;br /&gt;
Branches in git are fast and easy to use, so please develop experimental features in their own branches.  Code pushed to the &amp;quot;master&amp;quot; branch should not be broken.&lt;/div&gt;</summary>
		<author><name>Ebiggers</name></author>
		
	</entry>
</feed>