Difference between revisions of "Upgrading Embedded Xinu for the Multi-Core Raspberry Pi 3"

From REU@MU
Jump to: navigation, search
Line 63: Line 63:
  
 
*Got a bare metal program to run on our Raspberry Pi 3
 
*Got a bare metal program to run on our Raspberry Pi 3
*:- Turned on an LED light using GPIO pin 16 on our Pi
+
*:- Using C programming: Turned on an LED light using GPIO pin 16 on our Pi
 +
*:- Reprocessed the C code into ARM64 Assembly code, and used it to turn on an LED using the same pins as before. This proved that the boot process was indeed reaching the ARM64 Assembly code, but it  Performed additional testing to pinpoint where our program was reaching:
 +
<table align="center" bgcolor="#fffced" border=1>
 +
<tr>
 +
<td>'''Tested the LED for:'''</td>
 +
<td>'''Did it reach?'''</td>
 +
</tr>
 +
 
 +
<tr>
 +
<td>our C code</td>
 +
<td>No</td>
 +
</tr>
 +
 
 +
<tr>
 +
<td>our ARM64 Assembly code</td>
 +
<td>Yes</td>
 +
</tr>
 +
</table>

Revision as of 15:23, 5 June 2017

Researchers: Tom Lazar, Patrick J. McGee, Rade Latinovich and Priya Bansal.

Mentor: Dr. Dennis Brylow.

Background && Motivation

The Embedded Xinu infrastructure is a simple operating system designed to introduce students to many low level computing concepts, including Driver Creation, Exception and Interrupt Handling, and much more. Many universities have created Xinu Labs, classrooms running Xinu on multiple embedded devices (either Raspberry Pis or Linksys Routers). Marquette University uses one such Xinu Lab to teach its Operating Systems course.

Using information obtained from past studies, we expand on the current Xinu infrastructure. One of the main goals of this project is to modify Xinu to run on new multi-core Raspberry Pi 3s while still maintaining support for previous platforms. Another goal of this project is to create structures within Xinu which effectively and efficiently use multiple cores.

Milestones

In order to begin porting Xinu onto the new architecture of the Raspberry Pi 3, we first needed to understand the fundamental differences between the Pi 3 and its simpler predecessor, the Pi 1 (which currently runs Xinu in Marquette's Systems Lab). Here is a table of distinctions between the two:

RPi 1 (Model B) RPi 3
CPU ARM 1176JZF-S ARM Cortex-A53
Architecture ARMv6 (32-bit) ARMv8 (64-bit)
Cores One Four
Registers 16 32
RAM 512MB 1GB
SoC BCM2835 BCM2837

Unfortunately, the documentation for the Raspberry Pi 3's System on Chip is sparse. However, deeper digging yielded more knowledge on how past Raspberry Pi systems have worked. With such information, it is safe to infer that the Pi 3's SoC is most likely similar to that of its predecessors. Below is a diagram of the Pi's boot order:

Rasp pi 3 boot order(2).png


It is also essential to understand how the Pi compiles its kernel:

Compilation diagram pi3(2).png


  • Got a bare metal program to run on our Raspberry Pi 3
    - Using C programming: Turned on an LED light using GPIO pin 16 on our Pi
    - Reprocessed the C code into ARM64 Assembly code, and used it to turn on an LED using the same pins as before. This proved that the boot process was indeed reaching the ARM64 Assembly code, but it Performed additional testing to pinpoint where our program was reaching:
Tested the LED for: Did it reach?
our C code No
our ARM64 Assembly code Yes