Upload
others
View
19
Download
0
Embed Size (px)
Citation preview
XinuPi: Porting a Lightweight EducationalOperating System to the Raspberry Pi
Eric Biggers1 Farzeen Harunani2 Tyler Much2
Dr. Dennis Brylow2
1Macalester College
2Marquette University
October 3, 2013
Outline
Overview of Embedded Xinu and Raspberry Pi
Goals and purpose of porting Embedded Xinu to theRaspberry Pi
Challenges, hardware, and technical details
Summary and future work
Overview of Embedded Xinu and the Raspberry Pi
Embedded Xinu
Small, simple framework forteaching embedded operatingsystem design
Nexos project (WESE 2008)
Xest (WESE 2010)
Figure : WRT54GL: One platformEmbedded Xinu currently runs on
Raspberry Pi
Inexpensive single-boardcomputer
Intended for educational use
Figure : Raspberry Pi Model B(Cost: $35)
Goals and Purpose
Create functional Raspberry Pi port of Embedded Xinu tofacilitate hands-on operating systems and embedded softwarecurriculum
Write documentation and educational modules
Why Embedded Xinu? Why Raspberry Pi?
Code written “forstudents by students”
Demonstrated educationalsuccess (WCAE ’07,SIGCSE ’08, SPLASH’10, SIGCSE ’11)
Inexpensive
Rich set of peripherals
Popular (1 million+ sold)
Strong community
Integration of embedded systems concepts throughoutcurriculum
Concepts covered before the actual embedded systems course:
Preemptive multitaskingProgramming in assembly languageHardware interruptsResource-constrained programmingDirect hardware communicationRemote target software developmentCross-architecture developmentPacket construction and transmission over real networks
Marquette University’s embedded systems course focuses onmore advanced concepts with a variety of platforms
Overview of Raspberry Pi Hardware
BCM2835 SoCCPU (ARM1176JZF-S)GPU (Broadcom VideoCore)Memory (256MB or 512MB)Various memory-mapped peripherals
ARM1176JZF-S CPU
ARM memory GPU memory . . . Peripherals memory . . .
0x0 0x08000000 0x10000000 0x20000000
Physical memory
. . . System Timer . . . Interrupt Controller . . . Mailboxes . . . PL011 UART . . . USB Controller . . .
Figure : Logical view of system from ARM CPU
Interrupt Controller (for CPU)
Allows enabling and disabling specific IRQ lines
IRQ line Device1 System Timer (1)3 System Timer (3)9 USB Controller
55 PCM sound57 PL011 UART62 SD card
Pending0
+0x00
Pending1
+0x04
Pending2
+0x08
FIQControl
+0x0c
Enable1
+0x10
Enable2
+0x14
Enable0
+0x18
Disable1
+0x1C
Disable2
+0x20
Disable0
+0x24
Figure : BCM2835 interrupt controller (for CPU) registers
System Timer
64-bit 1 MHz free-running counter
Four independent interrupts: one used by XinuPi, tworeserved by GPU
CS
+0x00
CLO
+0x04
CHI
+0x08
C0
+0x0c
C1
+0x10
C2
+0x14
C3
+0x18
Figure : BCM2835 system timer registers
USB (Universal Serial Bus) support
Raspberry Pi relies on USB to attach keyboards, mice, andeven the built-in Ethernet controller
Raspberry Pi has nonstandard, undocumented USB HostController (made by Synopsys Inc.)
Basic USB 2.0 support essentially complete
Code is several thousand lines due to high complexity of USB,but still a fraction of Linux code size
Ethernet support
Raspberry Pi Model B has integrated USB Ethernet Adapter(SMSC LAN9512)
Device is not documented, so we had to gleam hardwaredetails from the Linux driver
Our driver for this is about 1/4 the size of the correspondingLinux driver
Operation: Packets are sent and received via USB bulktransfers
SMSC LAN9512
USB
USB Host Controller
Memory
CPU
Network
Graphics support
BCM2835 includes integrated VideoCore GPUCPU and GPU initialize communication via hardware-based“mailbox” system, then share configurable depth RGBA linearframebuffer in memoryGPU is very powerful but not well documentedFramebuffer console and turtle-graphics application
Summary
Goal: Port Embedded Xinu toRaspberry Pi
Promising and viable platform foroperating systems and embeddedsoftware education
Completed work Future work
Preemptive multitasking
Basic USB support
Networking support
Network bootloader
Basic graphics support
Partial documentation
Lesson plans
Classroom trials beginningSpring 2014
Improved documentation
Additional drivers (USBkeyboard, sound, SDcard)
Acknowledgments
Marquette University MSCS REU Program
National Science Foundation (funding from grantCNS-REU-1063041)
Raspberry Pi Foundation (for designing the Raspberry Pi)