See MIPS Run (The Morgan Kaufmann Series in Computer Architecture and Design)
This second edition is not only a thorough update of the first edition, it is also a marriage of the best-known RISC architecture--MIPS--with the best-known open-source OS--Linux. The first part of the book begins with MIPS design principles and then describes the MIPS instruction set and programmers' resources. It uses the MIPS32 standard as a baseline (the 1st edition used the R3000) from which to compare all other versions of the architecture and assumes that MIPS64 is the main option. The second part is a significant change from the first edition. It provides concrete examples of operating system low level code, by using Linux as the example operating system. It describes how Linux is built on the foundations the MIPS hardware provides and summarizes the Linux application environment, describing the libraries, kernel device-drivers and CPU-specific code. It then digs deep into application code and library support, protection and memory management, interrupts in the Linux kernel and multiprocessor Linux.
Sweetman has revised his best-selling MIPS bible for MIPS programmers, embedded systems designers, developers and programmers, who need an in-depth understanding of the MIPS architecture and specific guidance for writing software for MIPS-based systems, which are increasingly Linux-based.
* Completely new material offers the best explanation available on how Linux runs on real hardware.
* Provides a complete, updated and easy-to-use guide to the MIPS instruction set using the MIPS32 standard as the baseline architecture with the MIPS64 as the main option.
* Retains the same engaging writing style that made the first edition so readable, reflecting the authors 20+ years experience in designing systems based on the MIPS architecture.
Why Read This Book
You should read this book if you need a deep, hands-on understanding of the MIPS instruction set, its privileged architecture (CP0/TLB/MMU), and how a real OS (Linux) maps onto that hardware. It gives concrete examples, assembly snippets, and kernel-level explanations that bridge CPU design and low-level firmware/OS work.
Who Will Benefit
Embedded/firmware engineers and system programmers who work with or study RISC ISAs and need to port, debug, or optimize Linux and low-level code on MIPS-based systems.
Level: Advanced — Prerequisites: Comfort with C and low-level programming, basic computer architecture (registers, pipelining), assembly language familiarity, and introductory operating-systems concepts.
Key Takeaways
- Explain the design principles and variants of the MIPS ISA, including MIPS32 and MIPS64
- Read and write MIPS assembly and understand ABI/calling conventions used by toolchains
- Diagnose exception, interrupt, CP0 and TLB/MMU behaviors and map them to OS mechanisms
- Trace the Linux boot and kernel integration on MIPS hardware and understand platform glue
- Apply cross-toolchain workflows (GCC/binutils/GDB) for building, loading, and debugging MIPS images
- Analyze performance considerations such as pipeline hazards and instruction scheduling on MIPS cores
Topics Covered
- Introduction and history of MIPS
- MIPS design principles and RISC concepts
- MIPS instruction set overview (MIPS32/MIPS64 baseline)
- Registers, addressing modes, and calling conventions
- Assembly language and toolchain usage
- Pipeline, hazards, and performance considerations
- Privileged architecture: CP0, exceptions, interrupts
- Memory management: TLB, MMU, and virtual memory
- Binary formats, linking, and ABI details
- Booting Linux on MIPS: board support and boot loaders
- Linux kernel porting and low-level kernel interactions
- System calls, device handling, and the user-space environment
- Appendices: assemblers, simulators, and reference material
Languages, Platforms & Tools
How It Compares
Covers similar ground to the MIPS-centered material found in Patterson & Hennessy's 'Computer Organization and Design' but is far more focused on MIPS variants and Linux integration; for deeper OS internals, pair it with 'Understanding the Linux Kernel'.













