Monday 1:40 p.m.–2:25 p.m.
Networking without an OS
Josh Triplett
- Audience level:
- Novice
- Category:
- Embedded Systems
Description
Abstract
We ported Python to run directly on hardware and firmware, without an operating system, as part of the BIOS Implementation Test Suite (BITS) project (biosbits.org). Despite the low-level environment, we try to write as little C as possible, implementing most of BITS in Python itself. We added network functionality, both client (supporting urllib2) and server (supporting BaseHTTPServer), written in Python itself with only a few lines of C glue. This includes a Python implementation of the _socket and select modules, compatible with CPython's C implementation.
Our network implementation makes use of EFI firmware calls, including asynchronous callbacks. We show how to handle these callbacks safely in Python without breaking Python's concurrency model.
As a demonstration of the networking functionality, we'll show a web client running on bare metal to download new test code and upload test results, and a web server on bare metal serving up firmware information.