メモリーリマッピング

コンテンツ
Windows XP, Windows Vistaの種類 - ライセンスの比較
Windows XPの種類 - ライセンスの比較
Windows Vistaの種類 - ライセンスの比較
Windows 7の種類 - ライセンスの比較
ボリュームライセンス
使用許諾契約書
CAL クライアントアクセスライセンス
Retail版Windows SKU
DSP版Windows SKU
プロダクトアクティベーション (ライセンス認証)
Windows XPのインストール
不明なデバイス
メモリーリマッピング
メモリーおよびアドレス空間の限界値

このページの目次
メモリー リマッピング (メモリー リマップ)

メモリー リマッピング (メモリー リマップ)

4GBを超えるアドレス空間をサポートするチップセットにおいては、3GB〜4GB付近のI/Oのための空間と重なるため通常は使えない数百MBのメモリーを4GB以上のアドレスに割り当てる機能を持つものがある。この機能はIntelチップセットではMemory Reclaimingと呼ばれる。この機能を使用するとI/Oのためのアドレス空間と重なるメモリーを無駄にしないですむ。BIOSで設定をON/OFFできるマザーボードや、設定がなく自動で処理されるマザーボードがある。
たとえばメモリーを4GB実装した状態だとI/Oのための空間と重なるはずだったメモリーが4GB以上のアドレスに割り当てられ、Windows Server 2003, Standard Edition (32bit)ではほぼ4GBのメモリーが利用可能になり、Windows XP (32bit)ではGavotte RamdiskなどのRAM DISKドライバーによりOSでは利用できないはずだったメモリーをRAM DISKとして利用可能になる。
32-bit Windowsでは物理アドレス拡張(PAE)カーネルにする必要がある(Windows Server 2003 R2までならboot.iniに/PAEを指定、Windows Vistaからは管理者の権限でコマンド プロンプトを開き BCDEDIT /SET PAE ForceEnable と入力)。Windows XP SP2からはハードウェアDEPが有効な場合、boot.iniやBCDEDITでPAEを指定しなくても自動で物理アドレス拡張(PAE)が有効になる。サポート技術情報 875352 900524

I/Oのためのアドレス空間の説明を Microsoft Windows XP Professional での RAM の割り当て (日本ヒューレット・パッカード株式会社) より引用
PCI メモリ アドレス範囲
例を Intel Chipset 4 GB System Memory Supportより引用

Memory Initialization and Assignment of Resources

When the system is powered on, system BIOS initializes all of the populated memory on the system, enables onboard and add-in devices, assigns Memory and IO resources (internal graphics, IOxAPICs, PCI Space, or other memory mapped IO ranges), and dynamically builds industry standard tables (Int 15h E820h, and ACPI Tables) that describe the memory range usage to the operating system.

In uni-processor based systems for mobile, desktop, workstation, and entry level servers, chipsets may be limited to 4 GB of maximum memory. In today’s dual processor Intel server chipsets and workstations, maximum system memory size can be upwards of 16 GB. BIOS Table locations, memory ranges, and IO space by definition must be less than 4 GB. In platforms populated with physical memory sizes approaching 4 GB and greater, onboard system resource requirements will likely not allow the operating system to take advantage of all physical memory populated due to PCI specification requirements and other memory mapped IO resources. Portions of physical memory may overlap with the memory space dedicated to other subsystems and become unavailable to the operating system. While some memory ranges required for addressing IO devices (PCI add in cards, system BIOS flash, IOxAPIC ranges, ACPI ranges) are unused, other ranges (integrated graphics shared memory and system management memory ranges) which the operating system does not report as available, are utilized by the platform.

Future generations of Intel chipset products and commercially available OS will allow more flexibility for system designers to use memory resources more efficiently.

Below is an example of memory use in a system with 4 Gbytes and 3 Gbytes of physical memory installed.

System Resource Size Physical Memory
Remaining
(4 GB Total System
Memory)
Physical Memory
Remaining
(3 GB Total System
Memory)
Firmware Hub flash memory (the BIOS) 1 MB 3.99 3.00
Local APIC 4 KB
Area available to the chipset 2 MB
IO APIC (4kBytes) 4 KB
PCI Enumeration Area 1 256 MB 3.76 3.00
PCI Express* area (256 MB) 256 MB 3.51 3.00
PCI Enumeration Area 2 (if needed)
(aligned on 256-MB boundary)
512 MB 3.01 3.00
VGA memory 16 MB 2.85 2.85
TSEG 1 MB 2.84 2.84
Memory available to BIOS, OS, and
applications
  2.84 2.84


FWH is the Local APIC area, the IO APIC, and other areas used by the chipset.

The chipset requires the PCI Express area to be aligned on a 256-MB boundary, and it is 256 MB in size. Therefore, the area was placed at 3.5 GB. For some BIOS’ this may be a hard coded address.

The PCI enumeration algorithm may scan the buses to determine how much memory is needed for the different PCI devices in the system. If the amount of memory requested is less than 0.23 GB, the BIOS will assign that memory to PCI Enumeration Area 1. However, if the amount of memory required for PCI is larger than this size, the BIOS may allocate memory for PCI devices below the PCI Express area in PCI enumeration Area 2. This area is aligned on a 256-MB boundary and rounded up to the nearest multiple of 256 MB.

Note that the enumeration will ask for a contiguous memory area for all the devices below the host bridge. Therefore, if PCI needs greater than 256 MB of memory, the BIOS will put it at 3.0 GB - 3.5 GB, since 300 MB is rounded up to 512 MB. (For example, some video adapters will require 256 MB, or more, memory for graphics aperture)

If the system graphics device requires less than 0.23 GB, all the PCI devices should fit within PCI Enumeration Area 1. In that case the top amount of usable DRAM would move up to 3.5 GB increasing the amount of available memory by 512 MB.

While some memory ranges required for addressing IO devices (PCI add in cards, system BIOS flash, IOxAPIC ranges, ACPI ranges) are unused, other ranges (integrated graphics shared memory and system management memory ranges) which the operating system does not report as available, are utilized by the platform.

Note, that in the above example, the system BIOS reports the same amount of physical memory to the operating system in both scenarios even though one is populated with 4 GB of memory.



Experimental Data

EXAMPLE DATA: For today’s desktop platforms, such as the 915G/P and 925X Express chipset-based platforms, memory mapped IO (MMIO) and other system resources may utilize upwards of 512 MB of the 4 GB of linear addressable space. When the maximum physical memory supported is populated, MMIO will overlap with physical memory. Standard PCI Architecture limitations have prevented end users from taking advantage of all memory when 4 GB of memory populated.

The following E820h table was captured from a reference 915G Express chipset-based platform with Internal Graphics enabled. This table indicates to the operating system how much memory is available to the system.

Table 1. E820h Table from Reference Intel® 915G Express Chipset-Based Platform with Internal Graphics
Start Length (bytes) Size (bytes) Status
0000 0000h 9FC00h 654336 Available
0009 FC00h 0400h 1024 Reserved
000E 0000h 020000h 131072 Reserved
0010 0000h CF530000h 3478323200 Available
CF63 0000h 010000h 65536 Reserved
CF64 0000h 0C0000h 786432 Reserved
CF70 0000h 100000h 1048576 Reserved
CF80 0000h 800000h 8588608 Reserved
FEC0 0000h 1000h 4096 Reserved
FEE0 0000h 1000h 4096 Reserved

The operating system uses the available memory regions above to determine the available memory on the system. For example:
654336 Bytes + 347832300 Bytes = 3,478,977,536 Bytes = 3,397,439 KB = 3.24 GB

Note that in the examples below, the value of 3.24 GB is reported by the operating system.
0000 0000h 〜 0009 FFFFh (655360Bytes)が1MB以下のアドレスのメモリー640KBである。そのうちの最後の1024バイトはReservedになっていてWindowsの使えるメモリーから除外されている。これが 654336 Bytesとなる。
0010 0000h 〜 CF62 FFFFh ( 3478323200 Bytes)は1MB以上のアドレスから、Reservedの開始するCF63 0000hの手前までメモリーとして利用可能なエリアである。

メモリー使用状況の例 (デバイスマネージャ) 4GB実装しWindowsが使用できる物理メモリは3,398,864KB
メモリー使用状況 3,398,864KB


メモリホール補完機能(Memory Reclaim機能)の説明を システム構成図 Express5800/110Ge (日本電気株式会社)より引用
■ メモリホールについて ■ メモリホール補完機能(Memory Reclaim機能) Memory Reclaim機能

システムバス上でCPUやdeviceがメモリー空間の読み取りや書き込みを要求した場合メモリーコントローラはシステムボードに割り当てられているアドレスに対して物理メモリーの読み取りや書き込みとして処理する。PCIバスに割り当てられているアドレスに対しては何もしない。Memory Reclaim機能を有効にしているなら、CPUやdeviceがリマップされているメモリー(4GB超のアドレス)の読み取りや書き込みを要求したときに、メモリーコントローラは物理メモリー(メモリーホールとなっている4GB未満のアドレス)の読み取りや書き込みとして処理する。
remap
Memory Reclaimingの説明を Intel Q965 Express Chipset Intel 965 Express Chipset Family Datasheet - For the Intel 82Q965, 82Q963, 82G965 Graphics and Memory Controller Hub (GMCH) and Intel 82P965 Memory Controller Hub (MCH)より引用
3.4.2 Memory Reclaiming
An incoming address (referred to as a logical address) is checked to see if it falls in the memory re-map window. The bottom of the re-map window is defined by the value in the RECLAIMBASE register. The top of the re-map window is defined by the value in the RECLAIMLIMIT register. An address that falls within this window is reclaimed to the physical memory starting at the address defined by the TOLUD register. The TOLUD register must be 64 MB aligned when RECLAIM is enabled, but can be 1 MB aligned when reclaim is disabled.
System Address Ranges
ASUSのP5B系マザーボードの旧BIOSはメモリーリマッピングが1GB単位という仕様の問題があり、メモリーリマッピングすると逆にWindowsで利用できるメモリーが約3GBから約2GBになり1GBほど減ってしまっていたらしい。Gavotte Ramdisk まとめWIKI - P5B系使用時の注意(仮) MVK サポートFAQ

4GB超のアドレス空間をサポートしないチップセットやマザーボードでは当然メモリーリマッピングできない。
■元麻布春男の週刊PCホットライン■ 1GB=2,000円時代のメモリ増設を考える(下)より引用

 ではそのプールはどれくらい深くできるのか。CPUの仕様としては上で述べたように64GBである。が、実際には上限はチップセットに内蔵されるメモリコントローラの仕様で決まる。チップセットがサポート可能なアドレス空間は、945チップセットまでは4GB、955X以降のチップセットでは64GBまで拡張されている。

【表2】Intel製チップセットのアドレス空間と実メモリ搭載可能量
チップセットアドレス空間実メモリ搭載可能量
915〜945以前のチップセット4GB4GB
955X以降のチップセット64GB4〜8GB

 しかし、このアドレス空間をすべてメモリで埋め尽くせるわけではない。実際のメモリチップに接続するメモリコントローラの信号線は、コストなどの理由により、必ずしもアドレス空間全体を満たせるほど用意されていないからだ。こうした制約により、チップセット(メモリコントローラ)に接続できる実メモリ搭載可能量が決まる。アドレス空間が4GBまでだった945以前のチップセットでは、実メモリ搭載可能量はアドレス空間の4GBを越えることができず、955X以降のチップセットでも実メモリ搭載可能量は8GBまでとなっている。また、955X以降のチップセットでも、バリューセグメント向けのチップセットでは、コストダウンのために実メモリ搭載可能量が4GBに制限されているものなど(G31/P31など)もある。

参考
Memory Limits for Windows Releases 仮想アドレス空間の限界、物理メモリー量の限界
物理アドレス拡張 - PAE メモリと Windows
オペレーティング システムおよび PAE のサポート
データ実行防止 - Windows Server 2003 Service Pack 1 ハードウェアDEP
"Windows XP Service Pack 2 セキュリティ強化機能搭載" での機能の変更点 ‐ 第 3 部 : メモリ保護技術 ハードウェアDEP
Windows Vista または Windows Server 2003 で報告されるメモリ容量が予想より少ない 管理者の権限でコマンド プロンプトを開き、BCDEDIT /SET PAE ForceEnable
Windows XP および Windows Server 2003 の Boot.ini ファイルで使用可能なスイッチ オプション /PAE
ブート構成データ エディタについてよく寄せられる質問
合計 4GB のメモリーを搭載した際に、物理メモリーが少なく表示される
デスクトップ・ボード - トラブルシューティング: オペレーティング・システムの問題 Windows におけるメモリの制限について
【PSU】ハードウェア環境総合スレ18【PC】 567から

コンテンツ
Windows XP, Windows Vistaの種類 - ライセンスの比較
Windows XPの種類 - ライセンスの比較
Windows Vistaの種類 - ライセンスの比較
Windows 7の種類 - ライセンスの比較
ボリュームライセンス
使用許諾契約書
CAL クライアントアクセスライセンス
Retail版Windows SKU
DSP版Windows SKU
プロダクトアクティベーション (ライセンス認証)
Windows XPのインストール
不明なデバイス
メモリーリマッピング
メモリーおよびアドレス空間の限界値

Top
最終更新 2012-10-13