3.4.3 Return Value, Instanced Data, and Excluded Pages

The real-mode initialization procedure uses return values to direct the VMM to carry out specific actions, such as instancing data items and reserving physical pages. The procedure must return values in each of the following registers:

Register Description

AX Contains the return value. It can be one of the following values:

Value Meaning

Abort_Device_Load Directs the VMM to prevent the virtual device from loading. This does not affect the loading of other the virtual devices.
Abort_Win386_Load Specifies a fatal error and directs the VMM to end Windows.
Device_Load_Ok Directs the VMM to load and initialize the rest of the virtual device.
No_Fail_Message When combined with the Abort_Device_Load or Abort_Win386_Load value, directs the VMM to carry out its error handling without displaying a message. If this value is not given, the VMM displays an error message when a virtual device fails.
Register Description

BX Points to a null-terminated array of page numbers specifying the physical pages to reserve for exclusive use by the virtual device. The pages must be in low memory (that is, page numbers must be in the range 0 through 100h). This register must be set to 0 if the virtual device does not reserve pages.
EDX Specifies a 32-bit value representing reference data to be passed through the EDX register to the virtual device's device control procedure when the VMM sends the Sys_Critical_Init message. This value can be a linear address to ROM BIOS data, a constant, or some other value. For example, an EBIOS device can pass the EBIOS page number, so that the procedure that processes the message does not need to look for the page again.
SI Points to a null-terminated array of instance data items. Each element in the array has the following form:
  ItemAddress dd ? ; segment:offset of item to instance Length dw ? ; length in bytes of data item
  The VMM allocates a unique copy of the instanced data for each virtual machine. This register must be set to 0 if the virtual device does not instance data. Note that the virtual device must not attempt to instance the interrupt vector table; the VMM automatically instances this table.

In some rare cases, a virtual device consists of nothing more than a real-mode initialization procedure that reserves exclusive pages and declares instance data. Such a virtual device always returns 8001h to prevent the VMM from loading any other portion of the virtual device, or displaying an error message.