- C Books
- The C Programming Language (2nd edition) Kernighan, Ritchie, awesome and useful book on C programming, written by the guys who invented it.
- Advanced Programming in the UNIX Environment (2nd Edition) Stevens, Rago, the absolute bible on C programming in the Unix environment
- Expert C Programming Peter Van der Linden, a great book on advanced C programming
- C Links
- QEMU - A fast and popular x86 platform and CPU
x86 Assembly Language
- PC Assembly Language, Paul A. Carter, November 2003. (MIT copy)
Intel 80386 Programmer's Reference Manual, 1987
(MIT copy - PDF)
(MIT copy - HTML)
Much shorter than the full current Intel Architecture manuals below, but describes all processor features used in 6.828.
- IA-32 Intel Architecture Software Developer's Manuals, Intel, 2007. Mit copies:
- Multiprocessor references:
- AMD64 Architecture Programmer's Manual.
Covers both the "classic" 32-bit x86 architecture and the new 64-bit extensions supported by the latest AMD and Intel processors.
- Writing inline assembly language with GCC:
- Loading x86 executables in the ELF format:
- Tool Interface Standard (TIS)
Executable and Linking Format (ELF).
The definitive standard for the ELF format.
- Tool Interface Standard (TIS) Executable and Linking Format (ELF).
PC Hardware Programming
- General PC architecture information
- General BIOS and PC bootstrap
- VGA display - kern/console.c
- Keyboard and Mouse - kern/console.c
- 8253/8254 Programmable Interval Timer (PIT) - inc/timerreg.h
- 8259/8259A Programmable Interrupt Controller (PIC)
- 8259A Programmable Interrupt Controller, Intel, December 1988.
- Real-Time Clock (RTC) - kern/kclock.*
- 16550 UART Serial Port - kern/console.c
- PC16550D Universal Asynchronous Receiver/Transmitter with FIFOs, National Semiconductor, 1995.
- Technical Data on 16550, Byterunner Technologies.
- Interfacing the Serial / RS232 Port, Craig Peacock, August 2001.
- IEEE 1284 Parallel Port - kern/console.c
- IDE hard drive controller - fs/ide.c
- AT Attachment with Packet Interface - 6 (working draft), ANSI, December 2001.
- Programming Interface for Bus Master IDE Controller, Brad Hosler, Intel, May 1994.
- The Guide to ATA/ATAPI documentation, Constantine Sapuntzakis, January 2002.
- Sound cards
(not supported in 6.828 kernel,
but you're welcome to do it as a challenge problem!)
- Sound Blaster Series Hardware Programming Guide, Creative Technology, 1996.
- 8237A High Performance Programmable DMA Controller, Intel, September 1993.
- Sound Blaster 16 Programming Document, Ethan Brodsky, June 1997.
- Sound Programming, Inverse Reality.
- E100 Network Interface Card
- Some Linux kernel programming rules, extracted from my
experiences hacking the Linux kernel and finding bugs in it.
- Never call a blocking function (e.g. a function that may call sched()) with interrupt disabled or spin_lock held, or you risk deadlock. A typical mistake is to assume kmalloc() never blocks; it can. You need the GFP_ATOMIC flag for a non-blocking kmalloc().
- Never directly dereference a user-provided pointer in kernel; use "paranoid" functions (e.g. copy_from_user) to access them instead.
- Memory allocation can fail, so you must carefully check the returns of *alloc() functions against NULL.
- Don't simply call panic() for trivial errors, because panic() panics your entire kernel! A particular bad thing to do is to panic() whenever kmalloc() returns NULL.
- When you return from a function due to an error (e.g. kmalloc() returns NULL), don't forget to release resources (e.g. spin_lock, allocated memory) you've acquired.
- Building the Linux kernel
- Debugging the Linux kernel
- Understanding the Linux kernel
- More about Linux
- Linux News
- Android source code cross-reference. It's very useful for quickly finding the right place in the source code where a function is defined or used. It cross-references both the user-space code and the kernel code, so remember to navigate to the right version of the kernel before search.
- Instructions for setting up your Android emulator environment for the class.
- Downloading the Android
SDK. To run the emulator, you do not need the entire SDK. Just
download the "SDK Tools Only" distribution for your platform and
then install the appropriate Android platform version and device
image using the included
- How to build an Android kernel. From the Android Open Source Project (AOSP).
- Android Emulator command line reference.