几种Intel CPU架构的区别

去年刚来公司是看到各种Intel的CPU架构的缩写,当时还挺迷糊的,当时其实就总结一下,而现在写KVM的东西时偶尔也提到这些术语,所以这里就再简单将Intel的几个CPU架构术语展示和解释一下吧。

(1)x86 (IA-32,i386,x86-32,x32)
x86是指基于Intel公司在1978年发布的8086的一系列32位处理器架构。x86命令的由来是,因为Intel早期的一系列处理器代号都以"86"为结尾,如:8086, 80186, 80286, 80386, 80486;“x86”这个术语也是在i386时代开始流行起来的。当时以i386为代表的Intel处理器成为了PC时代的处理器的代名词,以至于现在很多32为处理器上的一些软件仍然采用i386作为表示它是在Intel/AMD的32位处理器的上运行。Intel的i386、i486等都是完全向后兼容的,甚至兼容最初的8086处理器,理论上来说,在8086处理器上编译的程序,放到今天的在Intel处理器上运行的32bit的操作系统上仍然可以运行。主要是Intel、AMD(包括AVI)、Citrix等公司在生产x86架构的处理器。
其中IA是Intel Architecture的缩写,i386中的"i"应该是值Intel。
物理地址大小为32位,可寻址的内存为4GB;而有PAE(Physical Address Extension)技术的支持,物理地址可达到36位,支持最大64GB的内存寻址。(不论是否开启PAE,32位的x86处理器的虚拟地址仍然为32位,所以单个进程仍然最多可以使用4GB的内存。)

(2)x86-64 (Intel64/AMD64,IA-32e,EM64T,x64)
x86-64是指与以前x86-32兼容的Intel的64位处理器架构。其实,它也是叫“AMD64”,因为最初是AMD公司设计和生产的,后来Intel公司也加入到这个行列且迅速成为x86-64平台的最大玩家。由于与32位的x86完全兼容,所以在Intel 32bit处理器上能正常运行的程序,理论上来说,在x86-64平台上也是可以完全正常运行的。主要有Intel和AMD两大公司生产x86-64架构的处理器,x86-64也是目前服务器、台式机、笔记本市场中的最普及的处理器架构。
IA32-e: extension for IA32.
EM64T: extended memory 64 technology.
x64(包括上一个的x32),一般是在微软的产品(如:Windows、Office)等中这么来称呼Intel的64位处理器(或x32值Intel 32位处理器)。
x86-64最大支持52位的物理地址(而目前,AMD有48位的,Intel有36位、40位、46位等等规格的物理地址大小),支持物理内存可达到256TB(以目前最多的48位计算)。它的虚拟地址大小是最大是64位,就目前的设计和实现而言,目前Intel和AMD只使用了其中的低48位。

(3)IA-64 (Itanium,安腾)
Intel的安腾处理器架构,与x86、x86-64架构完全不兼容,它主要是面向高性能计算设计的处理架构。它最初是由HP公司研发的,后来Intel与HP联合研发安腾处理器。目前,Intel对安腾的支持也非常的少的,现在还有HP公司坚持着做一些IA-64的研发。Microsoft、Redhat等著名的操作系统厂商都曾经研发过支持Itanium处理器的操作系统,不过,就目前的形势来看,安腾的处境非常不妙,对它的支持会越来越少,之后几年后将会淡出历史舞台。

另外,"x86"有时也指上面(1)和(2)两种,包括32位的x86-32和64位的x86-64;与8086/i386等兼容的处理器架构有时被统称为x86架构。

update:今天(2013-03-04)看了Intel SDM 3A-B中第4章Paging,再说一下关于Intel x86架构下的分页的页面大小:
1. IA-32 (32bit, no PAE) 支持4KB和4MB的分页。
2. IA-32 (with PAE) 支持4KB和2MB的分页。
3. IA-32e 支持4KB、2MB和1GB的分页(只有较新的处理器才支持1GB页)。
IA-32e paging may map linear addresses to 4-KByte pages, 2-MByte pages, or 1-GByte pages.

参考文献:
http://en.wikipedia.org/wiki/X86
http://en.wikipedia.org/wiki/Physical_Address_Extension
http://en.wikipedia.org/wiki/X86-64
http://en.wikipedia.org/wiki/IA64

master

Stay hungry, stay foolish.

6 Comments

  1. 你竟给我扯淡.

    物理地址大小为32位,可寻址的内存为4GB;而有PAE(Physical Address Extension)技术的支持,物理地址可达到36位,支持最大64GB的内存寻址。(不论是否开启PAE,32位的x86处理器的虚拟地址仍然为32位,所以单个进程仍然最多可以使用4GB的内存。)

    在有PAE的电脑早就可以访问36位的地址线, 可以访问到64G的物理内存.. 拜托你好好看看书....不要误导人家!

    • 大哥,你在32bit x86电脑上有一个进程使用超过4GB的内存?你确定是PAE提供的能力? 我是说PAE让系统寻址可以达到64GB,但单个进程一定是最多4GB地址空间。我没误导别人吧?
      x86 processor hardware-architecture is augmented with additional address lines used to select the additional memory, so physical address size increases from 32 bits to 36 bits. This, theoretically, increases maximum physical memory size from 4 GB to 64 GB - although the actual amount increased depends on the OS. The 32-bit size of the virtual address is not changed, so regular application software continues to use instructions with 32-bit addresses and (in a flat memory model) is limited to 4 gigabytes of virtual address space. The operating system uses page tables to map this 4-GB address space into the 64 GB of physical memory. The mapping is typically applied differently for each process. In this way, the extra memory is useful even though no single regular application can access it all simultaneously.
      For 32-bit application software which needs access to more than 4 GB of RAM, operating systems may provide some special mechanisms in addition to the regular PAE support. On Windows this mechanism is called Address Windowing Extensions.
      from: http://en.wikipedia.org/wiki/Physical_Address_Extension

      Microsof的一篇文章中也提到“PAE does not change the amount of virtual address space available to a process. Each process running in 32-bit Windows is still limited to a 4 GB virtual address space.~~~~ AWE does not require PAE or 4GT but is often used together with PAE to allocate more than 4 GB of physical memory from a single 32-bit process.“
      见:http://msdn.microsoft.com/en-us/library/windows/desktop/aa366796%28v=vs.85%29.aspx

      另外,还可以参考stackoverflow上面的如下讨论吧。
      http://stackoverflow.com/questions/8373944/how-does-pae-physical-address-extension-enable-an-address-space-larger-than-4g

  2. Joen同学还搞不清楚虚拟地址与物理地址的区别,先补一补基础吧。。。

发表评论

邮箱地址不会被公开。 必填项已用*标注

*