The information in this article applies to:
SUMMARY
In enhanced mode Windows, the I/O permission bitmap (IOPM) is used by
the virtual machine manager (VMM) to determine whether I/O is
permitted at a given I/O port. The IOPM is clear when the VMM is
initialized, which means that any I/O port can be accessed. VxDs can
trap specific I/O ports to prevent direct access. Therefore, unless a
VxD traps a port, direct I/O access is permitted. In standard mode,
the IOPM is not used, so direct I/O access is always permitted. This
does not apply to Windows NT.
MORE INFORMATIONThe following files are available for download from the Microsoft
Download Center. Click the file names below to download the files: http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. The IOPM is contained in the task state segment (TSS). The I/O privilege level (IOPL) and the I/O permission bitmap determine whether a task is allowed to perform I/O. The IOPL determines the minimum privilege level required to perform I/O without checking the permission bitmap. For example, if IOPL = 1, then a procedure must have a code privilege level (CPL) of 1 or 0 (zero) to perform unrestricted I/O. However, if the CPL of the current task is greater than the IOPL, or the processor is operating in virtual 8086 mode, then the I/O permission bitmap is checked to determine whether I/O is permitted at the requested port. In enhanced mode Windows, CPL is always greater than IOPL, so the IOPM is always checked to determine whether direct I/O access is permitted. In standard mode, CPL equals IOPL, so the IOPM is never checked. Each bit in the bitmap corresponds to an I/O port byte address. For example, the bit for port address 60 (decimal) corresponds to the 60th bit, or the 4th bit in the 8th byte of the bitmap. In enhanced mode Windows, the bitmap is always 8192 bytes, and the bitmap is initialized to allow I/O at any port. When a VxD is initialized, it can call Install_IO_Handler to trap specific I/O ports. Install_IO_Handler sets the corresponding bits in the IOPM. When a trapped port is accessed, the VxD I/O handler will take over and perform the appropriate action. Windows maintains a single TSS for all VMs. When a VM switch occurs, the TSS IOPM is updated to reflect the local IOPM of the incoming VM. Port trapping for a specific port may be disabled locally or globally from a VxD by calling Disable_Local_Trapping or Disable_Global_Trapping. Additional query words: softlib IOPORT.ZIP kbfile
Keywords : kbfile kbsample kb16bitonly kbWinOS310 kbWinOS300 |
Last Reviewed: December 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |