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:
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.