MIPS体系结构透视(英文影印版)(第2版)
基本信息
- 原书名: See MIPS Run, Second Edition
- 原出版社: Elsevier
内容简介回到顶部↑
第2版不仅对第1版进行了彻底的更新,而且还将应用广泛的risc系统结构mips与开源操作系统linux结合在了一起。本书的第一部分从mips设计原理开始,进而阐述了mips指令集和程序员资源。书中还以mips32/mips64标准为基准,对其他体系结构进行了比较。.
与第1版相比,第2版的显著变化是封面图片——小企鹅坐在驾驶员的位置上,本书以此作为研究来自linux内核的真正的低层操作系统的实例,并且展示linux (包括单处理器和smp) 如何构建于mips体系结构所提供的基础之上。本书从操作系统的底层 (中断、内存调度) 开始,进而描述更高级的linux/mips应用代码如何载入到内存、连接到库并运行。..
●清晰地阐述了linux如何在硬件上运行。
●提供了完整的、更新的和简单易用的mips指令集指南。
●本版保留了第1版可读性好的写作风格,凝聚了作者在基于mips体系结构的系统设计方面20多年的经验。...
与第1版相比,第2版的显著变化是封面图片——小企鹅坐在驾驶员的位置上,本书以此作为研究来自linux内核的真正的低层操作系统的实例,并且展示linux (包括单处理器和smp) 如何构建于mips体系结构所提供的基础之上。本书从操作系统的底层 (中断、内存调度) 开始,进而描述更高级的linux/mips应用代码如何载入到内存、连接到库并运行。..
●清晰地阐述了linux如何在硬件上运行。
●提供了完整的、更新的和简单易用的mips指令集指南。
●本版保留了第1版可读性好的写作风格,凝聚了作者在基于mips体系结构的系统设计方面20多年的经验。...
作译者回到顶部↑
本书提供作译者介绍
Dominic Sweetman 是一名有经验的硬件系统、CPU、网络和操作系统设计者和开发者,他的丰富经验来自于低层编码、操作系统开发、局域网、分布式系统。他是Whitechapel Workstations的创立者之一,并在1988年创建了一家MIPS咨询公司——Algorithmics。
.. << 查看详细
.. << 查看详细
目录回到顶部↑
chapter 1: riscs and mips.
1.1 pipelines
1.2 the mips five-stage pipeline
1.3 risc and cisc
1.4 great mips chips of the past and present
1.5 mips compared with cisc architectures
chapter 2: mips architecture
2.1 a flavor of mips assembly language
2.2 registers
2.3 integer multiply unit and registers
2.4 loading and storing: addressing modes
2.5 data types in memory and registers
2.6 synthesized instructions in assembly language
2.7 mips i to mips64 isas: 64-bit (and other) extensions
2.8 basic address space
2.9 pipeline visibility
chapter 3: coprocessor 0: mips processor control
3.1 cpu control instructions
3.2 what registers are relevant when?
3.3 cpu control registers and their encoding
1.1 pipelines
1.2 the mips five-stage pipeline
1.3 risc and cisc
1.4 great mips chips of the past and present
1.5 mips compared with cisc architectures
chapter 2: mips architecture
2.1 a flavor of mips assembly language
2.2 registers
2.3 integer multiply unit and registers
2.4 loading and storing: addressing modes
2.5 data types in memory and registers
2.6 synthesized instructions in assembly language
2.7 mips i to mips64 isas: 64-bit (and other) extensions
2.8 basic address space
2.9 pipeline visibility
chapter 3: coprocessor 0: mips processor control
3.1 cpu control instructions
3.2 what registers are relevant when?
3.3 cpu control registers and their encoding
前言回到顶部↑
This book is about MIPS, the cult hit from the mid- 1980s' crop of RISC CPU designs. These days MIPS is not the highest-volume 32-bit architecture, but it is in a comfortable second place. Where it wins, hands down, is its range of applications. A piece of equipment built around a MIPS CPU might have cost you $35 for a wireless router orhundreds of thousands of dollars for an SGI supercomputer (though with SGI's insolvency, those have now reached the end 0fthe line). Between those extremes are Sony and Nintendo games machines,many Cisco routers, TV set-top boxes, laser printers, and so on. .
The first edition of this book has sold close to 10,000 English copies over the years and has been translated into Chinese. I'm pleased and surprised; I didn't know there were so many MIPS programmers out there.
This second edition is See MIPS Run... Linux. The first edition struggled to ,motivate some features of the MIPS architecture, because they don't make Sense unless you can see how they help out inside an OS kernel. But now a lot of you have some sense of how Linux works, and I can quote its source code;more importantly, I can refer to it knowing that those of you who get interested can read the source code and find out how it's really done.
So this is a book about the MIPS architecture, but the last three chapters stroll through the Linux kernel and application-programming system to cast light on what those weird features do. I hope Linux experts will forgive my relative ignorance of Linux details, but the chance to go for a description of real OS running on a real architecture was too good to pass up.
MIPS is a RISC: a useful acronym, well applied to the common features of a number of computer architectures invented in the 1980s, to realize efficient pipelined implementation. The acronym CISC is vaguer. I'll use it in a narrow sense, for the kind of features found in x86 and other pre-1982 architectures,designed with microcoded implementations in mind.
Some of you may be up in arms: He's confusing implementation with architecture! But while computer architecture is supposed to be a contract with the
programmer about what programs will run correctly, it's also an engineering design in its own right. A computer architecture is designed to make for good CPUs. As chip design becomes more sophisticated, the trade-offs change.
This book is for programmers, and that's the test we've used to decide what gets included--if a programmer might see it, or is likely to be interested, it's here. That means we don't get to discuss, for example, the strange system interfaces with which MIPS has tortured two generations of hardware design engineers. And your operating system may hide many of the details we talk about here; there is many an excellent programmer who thinks that C is quite low level enough, portability a blessing, and detailed knowledge of the architecture irrelevant. But sometimes you do need to get down to the nuts and bolts——and human beings are born curious as to how bits of the world work.
A result of this orientation is that we'll tend to be rather informal when describing things that may not be familiar to a software engineer--particularly the inner workings of the CPU--but we'll get much more terse and technical when we're dealing with the stuff programmers have met before, such as registers, instructions, and how data is stored in memory.
We'll assume some familiarity and comfort with the C language. Much of the reference material in the book uses C fragments as a way of compressing operation descriptions, particularly in the chapters on the details of the instruction set and assembly language.
Some parts of the book are targeted at readers who've seen some assembly language: the ingenuity and peculiarity of the MIPS architecture shows up best from that viewpoint. But if assembly is a closed book to you, that's probably not a disaster.
This book aims to tell you everything you need to know about progranmming generic MIPS CPUs. More precisely, it describes the architecture as it's defined by MIPS Technologies' MIPS32 and MIPS64——specifically, the second release of those specifications from 2003. We'll shorten that to "MIPS32/64."But this is not just a reference manual: To keep an architecture in your head means coming to understand it in the round. I also hope the book will interest students of programming (at college or enrolled in the school of life) who want to understand a modern CPU architecture all the way through.
Ifyou plan to read this book straight through from front to back, you will expect to find a progression from overview to detail, and you won't be disappointed. But you'll also find some progression through history; the first time we talk about a concept we'll usually focus on its first version. Hennessy and Patterson call this "learning through evolution," and what's good enough for them is certainly good enough for me.
We start in Chapter 1 with some history and background, and set MIPS in context by discussing the technological concerns and ideas that were uppermost in the minds of its inventors. Then in Chapter 2 we discuss the characteristics of the MIPS machine language that follow from their approach.
To help you see the big picture, we leave out the details of processor control until Chapter 3, which introduces the ugly but eminently practical system that allows MIPS CPUs to deal with their caches, exceptions and startup, and memory management. Those last three topics, respectively, become the subjects of Chapters 4 through 6.
The MIPS architecture has been careful to separate out the part of the instruction set that deals with floating-point numbers. That separation allows MIPS CPUs to be built with various levels of floating-point support, from none at all through partial implementations to somewhere near the state of the art.So we have also separated out the floating-point functions, and we keep them back until Chapter 7.
Up to this point, the chapters follow a reasonable sequence for getting to know MIPS. The following chapters change gear and are more like reference manuals or example-based tutorials. ..
In Chapter 8, we go through the whole machine instruction set; the intention is to be precise but much more terse than the standard MIPS reference works--we cover in 10 pages what takes a hundred in other sources.1 Chapter 9 is a brief introduction to reading and writing assembly, and falls far short of an assembly programming manual.
Chapter 10 is a checklist with helpful hints for those of you who have to port software between another CPU and a MIPS CPU. The longest section tackles the troublesome problem of endianness in CPUs, software, and systems.
Chapter 11 is a bare-bones summary of the software conventions (register use, argument passing, etc.) necessary to produce interworking software with different toolkits. Chapter 12 introduces the debug and profiling features standardized for MIPS CPUs.
The first edition of this book has sold close to 10,000 English copies over the years and has been translated into Chinese. I'm pleased and surprised; I didn't know there were so many MIPS programmers out there.
This second edition is See MIPS Run... Linux. The first edition struggled to ,motivate some features of the MIPS architecture, because they don't make Sense unless you can see how they help out inside an OS kernel. But now a lot of you have some sense of how Linux works, and I can quote its source code;more importantly, I can refer to it knowing that those of you who get interested can read the source code and find out how it's really done.
So this is a book about the MIPS architecture, but the last three chapters stroll through the Linux kernel and application-programming system to cast light on what those weird features do. I hope Linux experts will forgive my relative ignorance of Linux details, but the chance to go for a description of real OS running on a real architecture was too good to pass up.
MIPS is a RISC: a useful acronym, well applied to the common features of a number of computer architectures invented in the 1980s, to realize efficient pipelined implementation. The acronym CISC is vaguer. I'll use it in a narrow sense, for the kind of features found in x86 and other pre-1982 architectures,designed with microcoded implementations in mind.
Some of you may be up in arms: He's confusing implementation with architecture! But while computer architecture is supposed to be a contract with the
programmer about what programs will run correctly, it's also an engineering design in its own right. A computer architecture is designed to make for good CPUs. As chip design becomes more sophisticated, the trade-offs change.
This book is for programmers, and that's the test we've used to decide what gets included--if a programmer might see it, or is likely to be interested, it's here. That means we don't get to discuss, for example, the strange system interfaces with which MIPS has tortured two generations of hardware design engineers. And your operating system may hide many of the details we talk about here; there is many an excellent programmer who thinks that C is quite low level enough, portability a blessing, and detailed knowledge of the architecture irrelevant. But sometimes you do need to get down to the nuts and bolts——and human beings are born curious as to how bits of the world work.
A result of this orientation is that we'll tend to be rather informal when describing things that may not be familiar to a software engineer--particularly the inner workings of the CPU--but we'll get much more terse and technical when we're dealing with the stuff programmers have met before, such as registers, instructions, and how data is stored in memory.
We'll assume some familiarity and comfort with the C language. Much of the reference material in the book uses C fragments as a way of compressing operation descriptions, particularly in the chapters on the details of the instruction set and assembly language.
Some parts of the book are targeted at readers who've seen some assembly language: the ingenuity and peculiarity of the MIPS architecture shows up best from that viewpoint. But if assembly is a closed book to you, that's probably not a disaster.
This book aims to tell you everything you need to know about progranmming generic MIPS CPUs. More precisely, it describes the architecture as it's defined by MIPS Technologies' MIPS32 and MIPS64——specifically, the second release of those specifications from 2003. We'll shorten that to "MIPS32/64."But this is not just a reference manual: To keep an architecture in your head means coming to understand it in the round. I also hope the book will interest students of programming (at college or enrolled in the school of life) who want to understand a modern CPU architecture all the way through.
Ifyou plan to read this book straight through from front to back, you will expect to find a progression from overview to detail, and you won't be disappointed. But you'll also find some progression through history; the first time we talk about a concept we'll usually focus on its first version. Hennessy and Patterson call this "learning through evolution," and what's good enough for them is certainly good enough for me.
We start in Chapter 1 with some history and background, and set MIPS in context by discussing the technological concerns and ideas that were uppermost in the minds of its inventors. Then in Chapter 2 we discuss the characteristics of the MIPS machine language that follow from their approach.
To help you see the big picture, we leave out the details of processor control until Chapter 3, which introduces the ugly but eminently practical system that allows MIPS CPUs to deal with their caches, exceptions and startup, and memory management. Those last three topics, respectively, become the subjects of Chapters 4 through 6.
The MIPS architecture has been careful to separate out the part of the instruction set that deals with floating-point numbers. That separation allows MIPS CPUs to be built with various levels of floating-point support, from none at all through partial implementations to somewhere near the state of the art.So we have also separated out the floating-point functions, and we keep them back until Chapter 7.
Up to this point, the chapters follow a reasonable sequence for getting to know MIPS. The following chapters change gear and are more like reference manuals or example-based tutorials. ..
In Chapter 8, we go through the whole machine instruction set; the intention is to be precise but much more terse than the standard MIPS reference works--we cover in 10 pages what takes a hundred in other sources.1 Chapter 9 is a brief introduction to reading and writing assembly, and falls far short of an assembly programming manual.
Chapter 10 is a checklist with helpful hints for those of you who have to port software between another CPU and a MIPS CPU. The longest section tackles the troublesome problem of endianness in CPUs, software, and systems.
Chapter 11 is a bare-bones summary of the software conventions (register use, argument passing, etc.) necessary to produce interworking software with different toolkits. Chapter 12 introduces the debug and profiling features standardized for MIPS CPUs.
序言回到顶部↑
The MIPS architecture was born in the early 1980s from the work done by John Hennessy and his students at Stanford University. They were exploring the architectural concept of RISC (Reduced Instruction Set Computing), which theorized that relatively simple instructions, combined with excellent compilers and hardware that used pipelining to execute the instructions, could produce a faster processor with less die area. The concept was so successful that MIPS Computer Systems was formed in 1984 to commercialize the MIPS architecture. .
Over the course of the next 14 years, the MIPS architecture evolved in a number of ways and its implementations were used very successfully in workstation and server systems. Over that time, the architecture andits implementations were enhanced to support 64-bit addressing and operations, support for complex memory-protected operating systems such as UNIX, and very high performance floating point. Also in that period, MIPS Computer Systems was acquired by Silicon Graphics and MIPS processors became the standard for Silicon Graphics computer systems. With 64-bit processors, high-performance floating point, and the Silicon Graphics heritage, MIPS processors became the solution of choice in high-volume gaming consoles.
In 1998, MIPS Technologies emerged from Silicon Graphics as a standalone company focused entirely on intellectual property for embedded markets.As a result, the pace of architecture development has increased to address the unique needs of these markets: high-performance computation, code compression, geometry processing for graphics, security, signal processing, and multithreading. Each architecture development has been matched by Processor cote implementations of the architecture, making MIPS-based processors the standard for high-performance, low-power applications. ..
The MIPS legacy in complex systems such as workstations and servers directly benefits today's embedded systems, which have, themselves, become very complex. A typical embedded system is composed of multiple processing dements, high-performance memory, and one or more operating systems.
When compared with other embedded architectures, which are just now learning what is required to build a complex system, the MIPS architecture provides a proven base on which to implement such systems.
In many ways, the first edition of See MIPS Run was a ground-breaking book on the MIPS architecture and its implementations. While other books covered similar material, See MIPS Run focused on what the programmer needed to understand of the architecture and the software environment in order to effectively program a MIPS chip.
Increasing complexity of embedded systems has been matched by enhancements to the MIPS architecture to address the needs of such systems. The second edition of this book is required reading for any current developer of MIPS-based embedded systems. It adds significant new material, including the architectural standardization of the MIPS32 and MIPS64 architectures,brand new application-specific extensions such as multithreading, and a very nice treatment of the implementation of the popular Linux operating system on the MIPS architecture. Short of the MIPS architecture specifications, the second edition of See MIPS Run is the most current description of the state of the art of the architecture and is, bar none, the most readable.
I hope that you will find this as worthwhile and as entertaining to read as I did. ...
Michael Uhler,
Chief Technology Officer, MIPS Technologies, Inc.
Mountain View, CA
May 2006
Over the course of the next 14 years, the MIPS architecture evolved in a number of ways and its implementations were used very successfully in workstation and server systems. Over that time, the architecture andits implementations were enhanced to support 64-bit addressing and operations, support for complex memory-protected operating systems such as UNIX, and very high performance floating point. Also in that period, MIPS Computer Systems was acquired by Silicon Graphics and MIPS processors became the standard for Silicon Graphics computer systems. With 64-bit processors, high-performance floating point, and the Silicon Graphics heritage, MIPS processors became the solution of choice in high-volume gaming consoles.
In 1998, MIPS Technologies emerged from Silicon Graphics as a standalone company focused entirely on intellectual property for embedded markets.As a result, the pace of architecture development has increased to address the unique needs of these markets: high-performance computation, code compression, geometry processing for graphics, security, signal processing, and multithreading. Each architecture development has been matched by Processor cote implementations of the architecture, making MIPS-based processors the standard for high-performance, low-power applications. ..
The MIPS legacy in complex systems such as workstations and servers directly benefits today's embedded systems, which have, themselves, become very complex. A typical embedded system is composed of multiple processing dements, high-performance memory, and one or more operating systems.
When compared with other embedded architectures, which are just now learning what is required to build a complex system, the MIPS architecture provides a proven base on which to implement such systems.
In many ways, the first edition of See MIPS Run was a ground-breaking book on the MIPS architecture and its implementations. While other books covered similar material, See MIPS Run focused on what the programmer needed to understand of the architecture and the software environment in order to effectively program a MIPS chip.
Increasing complexity of embedded systems has been matched by enhancements to the MIPS architecture to address the needs of such systems. The second edition of this book is required reading for any current developer of MIPS-based embedded systems. It adds significant new material, including the architectural standardization of the MIPS32 and MIPS64 architectures,brand new application-specific extensions such as multithreading, and a very nice treatment of the implementation of the popular Linux operating system on the MIPS architecture. Short of the MIPS architecture specifications, the second edition of See MIPS Run is the most current description of the state of the art of the architecture and is, bar none, the most readable.
I hope that you will find this as worthwhile and as entertaining to read as I did. ...
Michael Uhler,
Chief Technology Officer, MIPS Technologies, Inc.
Mountain View, CA
May 2006
评论交流
共有19人开贴评论 30人参与评论 17人参与打分 查看
评价等级:





发表于:2009-3-13 21:26:00
比第一版好多了 因为是以MIPS32/64标准来讲的 不会再像mips2、mip3。。那样乱七八糟了 mips虽然是risc 但是其混乱程度跟x86有得一拼 何况文档还不咋地 到了mips32/64才算好多了。
这本书还有一些问题:
1.2节的标题叫"The MIPS Five-Stage Pipeline",要知道不是所有的mips都是5级流水线的,作者虽然提了一下,但是还是容易让人误会。还不如明确地说用5级流水线举个例子,把这节的标题还有图的标题改改
再就是后面虽然有讲汇编编程,但也就是一个简介而已,在网上怎么都找不到一个很规范的汇编编程,零零散散的。真正要上手编程指望它还是有难度的。
后面还有几章讲得比较零散 不过还比较有用 适合新手看 在实际动手中还是学得最快的
这本书还有一些问题:
1.2节的标题叫"The MIPS Five-Stage Pipeline",要知道不是所有的mips都是5级流水线的,作者虽然提了一下,但是还是容易让人误会。还不如明确地说用5级流水线举个例子,把这节的标题还有图的标题改改
再就是后面虽然有讲汇编编程,但也就是一个简介而已,在网上怎么都找不到一个很规范的汇编编程,零零散散的。真正要上手编程指望它还是有难度的。
后面还有几章讲得比较零散 不过还比较有用 适合新手看 在实际动手中还是学得最快的
| 我要写评论 |
| 查看所有评论交流(共19条) |


点击看大图




加载中...
