Introduction to Virtual Device Drivers


Return Value, Instanced Data, and Excluded Pages



Download 274.5 Kb.
Page48/80
Date19.01.2022
Size274.5 Kb.
#58083
1   ...   44   45   46   47   48   49   50   51   ...   80
VXDS

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:



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.



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.

Download 274.5 Kb.

Share with your friends:
1   ...   44   45   46   47   48   49   50   51   ...   80




The database is protected by copyright ©ininet.org 2024
send message

    Main page