Problem: Windows NT/2K/XP/2003 NTVDM configured for EMS memory does not make available any EMS memory. The EMS page frame is not […]
Show full quote
Problem: Windows NT/2K/XP/2003 NTVDM configured for EMS memory does not make available any EMS memory. The EMS page frame is not allocated, therefore no EMS memory is available for applications. Changes to the PIF file for the NTVDM or its associated CONFIG.NT file have no effect on providing an EMS page-frame for EMS memory.
Description: The Windows NTDETECT.COM and NTLDR detect and enumerate the system memory map at boot time. The NTDETECT.COM performs an Int 15h/AX=E820h BIOS Query System Address Map (if supported) and NTLDR performs a scan of any Option ROMs installed in the System. This information is consolidated and stored in the System Registry during every boot process. This undocumented data is used to instantiate an NTVDM process combined with other data based on custom parameters stored in a PIF file (Program Information File) associated with the particular NTVDM process.
The creation of the NTVDM process involves the use of this System Registry information to map into the NTVDM virtual address space certain required adapter Option ROMs and adapter Memory-Mapped Input/Output (MMIO) registers in the below 1MB virtual address space. The current conservative practice maps all Option ROMs and MMIO registers detailed in the System Registry into the NTVDM process address space - even though they may have no function in the NTVDM process. Legacy third-party VGA adapters have Option ROMs typically located at the 0xC0000 address, however IBM PS/2 models with planar VGA or adapter VGA Option ROM addresses located somewhere in the 0xC0000-0xE0000 memory region. Certain PS/2 microchannel token-ring adapters also had MMIO registers located exclusively in the 0xC0000-0xE0000 address space. These varying Option ROM addresses help explain the conservative exclusion of so many Upper Memory Block addresses during the NTVDM process creation. The video adapter Option ROMs were required to be mapped into the NTVDM address space at the same under 1MB memory address location as the physical address the video adapter occupied at boot time. The allowed for the NTVDM emulation process to allow the video adapter ROM to have exclusive access to most I/O ports for video mode control for VGA and VESA graphics.
The System Registry also identified either PS/2 ABIOS or PC/AT-style extended BIOS support typically located at the 0xE0000-0xF0000 memory address region. The expected PC/AT or PS/2 BIOS 64kB segment located at 0xF0000-0x100000 is also enumerated in the System Registry as an excluded memory region. All of these ROM locations or MMIO registers are excluded from availability as Upper Memory Blocks in the NTVDM virtual memory address space and are the reason for the lack of address space for the location of a 64kB EMS page-frame.