Previous: Data comparison technique, Up: BIOS device mapping techniques

4.2.2 I/O restriction technique

This first step may be unnecessary, but first create copy-on-write mappings for the device drivers writing into pc ram. Keep the original copies for the clean bios virtual machine to be created later.

For each device driver brought online, determine which bios devices become inaccessible by:

  1. Create a clean bios virtual machine.
  2. Set the I/O permission map for the I/O area claimed by the device driver to no permissions (neither read nor write).
  3. Access each device.
  4. Record which devices succeed, and those which try to access the restricted I/O areas (hopefully, this will be an xor situation).

For each device driver, given how many of the bios devices were subsumed by it (there should be no gaps in this list), it should be easy to determine which devices on the controller these are.

In general, you have at most 2 disks from each controller given bios numbers, but they pretty much always count from the lowest logically numbered devices on the controller.