Every fast disk device is identified by a unique Block Device Descriptor (BDD). This structure contains fields used to identify the type of device, its name, its physical characteristics (such as number of heads, cylinders, and sectors per track), and various code entry points. A fast disk device registers its BDD when it calls the BlockDev_Register_Device service during initialization. Note that a device may register more than one BDD. This may be the case, for example, with a controller that supports multiple hard disk drives. Most of the information in the BDD is reserved for use by the virtual block device, however, clients are allowed to scan a list of BDDs for all installed fast disk devices and examine the name, flags, and Interrupt 13h drive number fields.
The BDD_Major_Ver and BDD_Minor_Ver fields define the version of virtual block device support that is required by this fast disk device, not the fast disk device's version number.
BDD_Device_Type identifies the fast disk device as a fixed disk, floppy, tape, and so on.
BDD_Int_13h_Number identifies the fast disk device's Interrupt 13h drive number if it has one. Note that this field is ignored unless the BDF_Int13_Drive flag is set in the BDD_Flags field.
BDD_Flags is a bit field that defines various properties about the fast disk device's capabilities.
BDD_Name_Ptr points to a null-terminated string that uniquely identifies the fast disk device.
BDD_Max_Sector defines the highest valid sector number for this fast disk device. Sector numbers start at 0 and the maximum sector value is inclusive. Therefore, a maximum sector number of 1000h would mean that the drive has 1001h sectors, numbered 0 through 1000h.
BDD_Sector_Size specifies the size of a single sector in bytes. For Interrupt 13h drives this value must by 200h (512 decimal).
The BDD_Num_Heads, BDD_Num_Cylinders, and BDD_Num_Sectors_Per_Track specify the physical characteristics of the drive. The Interrupt 13h translation virtual device will use these values to convert Interrupt 13h calls from virtual mode into fast disk device commands. Other virtual devices, such as disk caches, may also use this information to optimize I/O. Block devices that are not disk drives do not need to fill in these fields.
BDD_Sync_Command_Proc specifies the address for synchronous commands to be sent to a fast disk device. Clients should never call this address directly. Clients must always call BlockDev_Synchronous_Command to communicate with a fast disk device.
BDD_Command specifies the address for asynchronous commands to be sent
to a fast disk device. Clients should never call this address directly. Clients must
always call BlockDev_Send_Command to communicate with a fast disk device.
The BDD_Hw_Int_Proc service is called whenever a hardware interrupt occurs on IRQ 14. If this field is 0, then virtual block device will not call the fast disk device when interrupts occur. This allows devices to be written that use an interrupt other than IRQ 14.
The procedure must return with the carry flag clear if the fast disk has serviced the hardware interrupt. The carry flag is set if it has not serviced the interrupt. Fast disk devices must call the VPICD_Phys_EOI service to end the physical interrupt before returning with carry flag clear. Fast disk devices may not use any of the VPICD services related to virtual interrupts. They may only call the following VPICD services:
VPICD_Get_Complete_Status
VPICD_Get_IRQ_Complete_Status
VPICD_Get_Status
VPICD_Get_Version
VPICD_Phys_EOI
VPICD_Physically_Mask
VPICD_Physically_Unmask
VPICD_Test_Phys_Request
It is important to only rely on the state of the actual physical interrupt controller so that these virtual devices can be used in future environments that do not have virtual interrupt support.