The 3GB-not-4GB RAM problem
翻译:李凯
文章出处:Microsoft Corp. U.S.A.
Problem statement:
I just bought a system with 4GB of physical RAM in it. The BIOS posts 4GB, but Windows tells me that I have anywhere from 2.75 - 3.5GB of RAM. Where is the rest of my RAM?
问题描述:计算机拥有4G物理内存,bios显示4G,但是WINDOWS 操作系统显示只有 2.75 - 3.5GB 的内存容量,剩下的不见了??
Summary:
If you are running 32-bit Windows, you must live with it. You will not ever see all 4GB of RAM you've paid for.
操作系统运行在32位系统之上,你就有可能出现上述情况,你不可能看到完整的4GB内存。
If you are running 64-bit Windows, you may have to live with it. Depending on your motherboard's chipset, your system may support memory remapping. If so, you will be able to use all 4GB of RAM.
如果你运行在64位WINDOWS操作系统上,那你有可能实现4G的内存使用, ,这依赖于你的主板芯片,你的操作系统应该支持内存重映射机制,
如果是这样,那你就能完整的使用4g内存了。
Detailed:
Due to an architectural decision made long ago, if you have 4GB of physical RAM installed, Windows is only able to report a portion of
the physical 4GB of RAM (ranges from ~2.75GB to 3.5GB depending on the devices installed, motherboard's chipset & BIOS).
This behavior is due to "memory mapped IO reservations". Those reservations overlay the physical address space and mask out those physical addresses so that they cannot be used for working memory. This is independent of the OS running on the machine.
Significant chunks of address space below 4GB (the highest address accessible via 32-bit) get reserved for use by system hardware:
• BIOS – including ACPI and legacy video support
BIOS 包含高级电源管理接口和遗留的视频支持
• PCI bus including bridges etc.
• PCI Express support will reserve at least 256MB, up to 768MB depending on graphics card installed memory
将被保留最少256MB的内存来支持PCI-E的设备,或则到达768MB ,这依赖你的显卡的显存。
What this means is a typical system may see between ~256MB and 1GB of address space below 4GB reserved for hardware use that the OS cannot access. Intel chipset specs are pretty good at explaining what address ranges gets reserved by default and in some cases call out that 1.5GB is always reserved and thus inaccessible to Windows.
When looking at memory in systems (be it desktop or notebook) there are three questions to ask that will tell you the maximum amount of memory your O/S will be able to use:
1. What O/S Edition have you installed?
操作系统安装的版本 32位最大寻址能力在4G,不能支持超过4G的内存寻址
64位的操作系统能够使用到 8GB 至128GB的内存。
a. 32-bit Windows is limited to a maximum of 4GB and cannot see any pages above 4GB.
b. 64-bit Windows can use between 8GB and 128GB depending on SKU.
2. What address range can your processor actually access?
a. Typically that’ll be 40-bit addressing today for x64 (Intel EM64T/AMD64), but older processors may be limited to 36-bit or even 32-bit
典型的,64位扩展指令集的系统将寻址到40位的地址,(32+8),但是老的cpu寻址上线在36或则是32位
3. Can your system’s chipset map memory above 4GB?
a. Mobile chipsets on sale today cannot (but that may change with time)
现在市面上卖的移动芯片将不能很好的支持这种特性(但是不久将被改变)
b. Newer workstations (which use chipsets developed for single or multi-proc servers) usually can.
更新的工作站通常能支持这种特性。
Windows can remap memory from below 4GB to above 4GB and use it there, however, that relies on the three points above:
Windows 操作系统能够重映射低于或则是高于4GB的内存地址,然后他以来如下三点:
1. Can Windows access memory above 4GB?
a. 32-bit – NO 32位系统不支持
b. 64-bit – Maybe (due to chipset limitations) 64位系统可能支持(依赖芯片的限制因素)
2. Can your processor access memory above 4GB?
a. If it’s recent then it might, and if it’s either AMD64 or EM64T it’s almost certain
如果你的CPU是比较新的,或则如果是支持 AMD64 或则EM64T 指令系统,那将基本确定能够支持。
3. Does your chipset allow pages to be remapped above 4GB?
a. Probably not – and that’s what’s catching people who install 64-bit Vista to work around point 1 – they find they still cannot see above 4GB
或许不,哪怕你既然安装了64位版本的VISTA,那也不能支持4G的内存。
In some cases, OEMs may be able to tweak their BIOS to reserve less memory for platform use, but we’re not talking a huge difference (ie, 100’s of MBs).
In the end a 32-bit OS and/or application can only, ever, handle 4GB of memory at a time, the AWE stuff just swaps chunks of memory in and out of that 4GB space, thus fooling the application and OS into using more space than it can “see”.
Physical Address Extension (PAE), extends the physical address space to 36-bits if your HW supports this. For most operations, the processor execution units will only see 32-bit addresses, the MMU will take care of the translation to 36bit addresses. No swapping here, only page translations (which are used regardless of PAE being on or not), this is a fundamental feature of any virtual memory operating system.
物理地址扩展到36位的线性地址,如果你的硬件支持这个特性,在大多数操作系统上,只是使用32位的指令地址,内存管理单元MMU,将
32位的地址扩展成36位的地址,在这里不需要SWAPPING,只有当操作系统页面转换,这些特性主要在含有虚拟内存的操作系统上。
The OS and apps only see 32-bit addresses because the registers are limited to 32-bits (hence the “32-bit” architecture
操作系统应用程序只能寻址到32位的地址,这是应为,CPU内部寄存器都是32位的。
nomenclature). These are linear addresses which are extended to 36-bits in the translation to physical addresses, but they never
show up in registers since there’s no room. It’s all internal until the address lines coming out of the chip are toggled. Thus my comment above about “if your H/W supports this (PAE)". I’m not going into how that works…
So, the OS can happily handle up to 64 GB of memory for 32-bit PAE-able systems.
Hope this helps explain the whole, ‘Why can’t I see 4 Gig of RAM in my system?” thing…
BTW – This does not change for Vista either…
SYMPTOMS
For example, the System Information dialog box may report 3,120 megabytes (MB) of system memory on a computer that has 4 GB of memory installed (4,096 MB).
Note You can access the System Information dialog box in the following ways:
- Click Start, type System in the Search box, and then click System under Programs.
- Double-click System in Control Panel.
- Click Start, right-click Computer, and then click Properties.
- Click Show more details in the Windows Vista Welcome Center window.
For more information about how memory is reported in Windows Vista Service Pack 1, click the following article number to view the article in the Microsoft Knowledge Base:
CAUSE
This behavior is the expected result of certain hardware and software factors. V...
Various devices in a typical computer require memory-mapped access. This is known as memory-mapped I/O (MMIO). For the MMIO space to be available to 32-bit operating systems, the MMIO space must reside within the first 4 GB of address space.
For example, if you have a video card that has 256 MB of onboard memory, that memory must be mapped within the first 4 GB of address space. If 4 GB of system memory is already installed, part of that address space must be reserved by the graphics memory mapping. Graphics memory mapping overwrites a part of the system memory. These conditions reduce the total amount of system memory that is available to the operating system.
The reduction in available system memory depends on the devices that are installed in the computer. However, to avoid potential driver compatibility issues, the 32-bit versions of Windows Vista limit the total available memory to 3.12 GB. See the "More information" section for information about potential driver compatibility issues.
If a computer has many installed devices, the available memory may be reduced to 3 GB or less. However, the maximum memory available in 32-bit versions of Windows Vista is typically 3.12 GB.
WORKAROUND
For Windows Vista to use all 4 GB of memory on a computer that has 4 GB of memor...
- The chipset must support at least 8 GB of address space. Chipsets that have this capability include the following:
支持的主板芯片- Intel 975X
- Intel P965
- Intel 955X on Socket 775
- Chipsets that support AMD processors that use socket F, socket 940, socket 939, or socket AM2. These chipsets include any AMD socket and CPU combination in which the memory controller resides in the CPU.
- The CPU must support the x64 instruction set. The AMD64 CPU and the Intel EM64T CPU support this instruction set.
- The BIOS must support the memory remapping feature. The memory remapping feature allows for the segment of system memory that was previously overwritten by the Peripheral Component Interconnect (PCI) configuration space to be remapped above the 4 GB address line. This feature must be enabled in the BIOS configuration utility on the computer. View your computer product documentation for instructions that explain how to enable this feature. Many consumer-oriented computers may not support the memory remapping feature. No standard terminology is used in documentation or in BIOS configuration utilities for this feature. Therefore, you may have to read the descriptions of the various BIOS configuration settings that are available to determine whether any of the settings enable the memory remapping feature.
- An x64 (64-bit) version of Windows Vista must be used.
Note When the physical RAM that is installed on a computer equals the address space that is supported by the chipset, the total system memory that is available to the operating system is always less than the physical RAM that is installed. For example, consider a computer that has an Intel 975X chipset that supports 8 GB of address space. If you install 8 GB of RAM, the system memory that is available to the operating system will be reduced by the PCI configuration requirements. In this scenario, PCI configuration requirements reduce the memory that is available to the operating system by an amount that is between approximately 200 MB and approximately 1 GB. The reduction depends on the configuration.
MORE INFORMATION
PAE-mode-induced driver compatibility issuesDriver compatibility issues that are...
PAE-mode-induced driver compatibility issues
Driver compatibility issues that are related to Data Execution Prevention (DEP) are typically physical address extension (PAE) mode-induced compatibility issues.Note PAE is required only on computers that have processors that support hardware-enforced DEP.
DEP may cause compatibility issues with any driver that performs code generation or that uses other techniques to generate executable code in real time. Many drivers that experienced these issues have been fixed. Because DEP is always on for drivers that are on 64-bit versions of Windows, these drivers typically experienced compatibility issues. However, there is no guarantee that all drivers have been updated to fix PAE-mode-induced compatibility issues. However, there are few drivers that use these techniques. DEP alone does not typically cause driver compatibility issues.
The primary driver compatibility issues that you may experience occur when you run PAE mode on 32-bit computers. PAE mode enables processors to use more than 4 GB of memory. The primary difference between PAE memory paging schemes and non-PAE memory paging schemes is the additional level of paging that is required in PAE mode. PAE mode requires three levels of paging instead of two levels of paging.
Some drivers might not load if PAE mode is enabled because the device might be unable to perform 64-bit addressing. Or, the drivers might be written with the assumption that PAE mode requires more than 4 GB of memory. Such drivers are written with the expectation that the drivers will always receive 64-bit addresses in PAE mode and that the driver or the device cannot interpret the address.
Other drivers might load in PAE mode but cause system instability by directly modifying system page table entries (PTE). These drivers expect 32-bit page table entries but receive 64-bit PTEs in PAE mode instead.
The most common PAE compatibility issue for drivers involves direct memory access (DMA) transfers and map register allocation. Many devices that support DMA, typically 32-bit adapters, cannot perform 64-bit physical addressing. When these devices run in 32-bit mode, the devices can address all physical address space. In PAE mode, data can be present at a physical address that is larger than 4 GB. To enable devices that have these constraints to function in this scenario, Microsoft Windows 2000 Server and later versions of Windows provide double-buffering for the DMA transaction. Windows 2000 Server and later versions of Windows do this by providing a 32-bit address that is indicated by a map register. The device can perform the DMA transaction to the 32-bit address. The kernel copies the memory to the 64-bit address that is provided to the driver. When the computer runs with PAE mode disabled, drivers for 32-bit devices do not require that system memory be allocated to their map registers. This means that double-buffering is not required because all devices and all drivers are contained within the 32-bit address space. Tests of drivers for 32-bit devices on 64-bit processor–based computers have demonstrated that DMA-capable drivers that are client tested typically expect unlimited map registers.
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.
APPLIES TO
- Windows Vista Business
- Windows Vista Enterprise
- Windows Vista Home Basic
- Windows Vista Home Premium
- Windows Vista Starter
- Windows Vista Ultimate
- Windows Vista Enterprise 64-bit Edition
- Windows Vista Home Basic 64-bit Edition
- Windows Vista Home Premium 64-bit Edition
- Windows Vista Ultimate 64-bit Edition
- Windows Vista Business 64-bit Edition
总结:需要支持4G内存的一些条件
1.CPU能寻址到64位的线性地址,或则含有64未原生或则扩展指令集的CPU,32位CPU是不能
支持4g内存访问的。
2.主板芯片组支持,需要支持64位指令的南北桥芯片。
3.操作系统支持,32位系统无法使用到4G内存,即使启用PAE地址扩展技术,
需要64位操作系统支持。