About me

我的照片
目前就职于杭州某电子商务公司,工作兴趣包括高并发分布式架构,JVM性能优化等方面。

2012年2月9日星期四

翻译:主板芯片以及地址映射

原作者:Gustavo Duarte
原标题:Motherboard Chipsets and the Memory Map


I’m going to write a few posts about computer internals with the goal of explaining how modern kernels work. I hope to make them useful to enthusiasts and programmers who are interested in this stuff but don’t have experience with it. The focus is on Linux, Windows, and Intel processors. Internals are a hobby for me, I have written a fair bit of kernel-mode code but haven’t done so in a while. This first post describes the layout of modern Intel-based motherboards, how the CPU accesses memory and the system memory map.
我准备写一个系列文章,来解释现代操作系统内核是如何工作的。希望对这块内容感兴趣却没有多少经验的爱好者和程序员有所帮助。文章的焦点是Linux,Windows和Intel处理器。我喜欢了解内幕,我曾经写过一些内核态的代码,但没做过多久。该系列第一篇文章描述了基于Intel处理器的主板布局,CPU如何访问地址,以及主板对地址的映射。


To start off let’s take a look at how an Intel computer is wired up nowadays. The diagram below shows the main components in a motherboard and dubious color taste:
最开始,我们来看看目前基于Intel处理器的计算机,下图显示了主板内的主要组成部分:
现代的主板,北桥芯片和南桥芯片构成芯片组。

As you look at this, the crucial thing to keep in mind is that the CPU doesn’t really know anything about what it’s connected to. It talks to the outside world through its pins but it doesn’t care what that outside world is. It might be a motherboard in a computer but it could be a toaster, network router, brain implant, or CPU test bench. There are three main ways by which the CPU and the outside communicate: memory address space, I/O address space, and interrupts. We only worry about motherboards and memory for now.
要记住的最重要的事情是,CPU并不知道跟它相连的是什么东西。CPU通过管脚(pin)与外界交谈,但是它对外面的世界并不了解:可能是计算机主板,但也可能是一个烤面包机,网络路由器,一个植入大脑的芯片,或是CPU测试台。CPU通过三种主要方式与外界通信:存储地址,IO地址和中断。现在我们只关注主板和存储地址。


In a motherboard the CPU’s gateway to the world is the front-side bus connecting it to the northbridge. Whenever the CPU needs to read or write memory it does so via this bus. It uses some pins to transmit the physical memory address it wants to write or read, while other pins send the value to be written or receive the value being read. An Intel Core 2 QX6600 has 33 pins to transmit the physical memory address (so there are 233 choices of memory locations) and 64 pins to send or receive data (so data is transmitted in a 64-bit data path, or 8-byte chunks). This allows the CPU to physically address 64 gigabytes of memory (233 locations * 8 bytes) although most chipsets only handle up to 8 gigs of RAM.
前端总线作为CPU的门卫与北桥芯片相连。任何时候,CPU需要读或写存储器,都要经过前端总线。CPU使用一些管线传输物理地址,另外一些管线用来写出数据或读入数据。Intel Core 2 QX6600处理器有33根地址管线(因此共有233个地址),和64根数据管线。



没有评论:

发表评论