WindowsGuestDrivers/viostor/documentation: Difference between revisions
No edit summary |
No edit summary |
||
Line 58: | Line 58: | ||
| Windows Server 2003 INF file. | | Windows Server 2003 INF file. | ||
|} | |} | ||
= Main Declarations and Data Structures = | |||
== VirtIO block device configuration descriptor == | |||
''typedef struct virtio_blk_config { | |||
u64 capacity; /* The capacity (in 512-byte sectors). */ | |||
u32 size_max; /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ | |||
u32 seg_max; /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ | |||
struct virtio_blk_geometry { /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ | |||
u16 cylinders; | |||
u8 heads; | |||
u8 sectors; | |||
} geometry; | |||
u32 blk_size; /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ | |||
}blk_config, *pblk_config;'' | |||
== Miniport driver's per-HBA extension == | |||
== VirtIO request header == | |||
== VirtIO request descriptor == | |||
== Miniport driver's per-SRB extension == | |||
= Functions = | |||
= How to build = | |||
Run the appropriated WDK build environment. | |||
Go to the viostor project directory and run "build –cegZ" command. | |||
= Debugging = | |||
= Useful information = | |||
Find everything you need here: | |||
[http://msdn.microsoft.com/en-us/library/aa508893.aspx Storport Miniport Drivers] | |||
= VirtIO block for XP = | |||
An old style, SCSIPort driver, can be created by building the code in XP environment. However, due to the lack of resources SCSIPort driver has never been fully tested and currently is unsupported. |
Revision as of 11:28, 2 August 2009
STORPORT miniport driver for VIRTIO based SCSI controller
Scope
VirtIO miniport driver works together with the Storport driver. Storport miniport driver is a vendor-supplied driver used to access hardware. The following document describes VirtIO Storport miniport driver design goals and implementation. Detailed description of VirtIO itself is out of the scope and will not be covered in this document.
Code tour
File | Description |
virtio_store.c | Main source module for the miniport. |
virtio_store.h | Main include file for the miniport. |
virtio_store.rc | Resource definitions. |
virtio_store_utils.c | Source file for print to COM port routine. |
virtio_store_utils.h | Include file containing debugging and debugging print related definitions. |
virtio_store_hw_helper.c | Source file containing some "HW" related routines. |
virtio_store_hw_helper.h | Include file containing definitions for some "HW" related routines. |
osdep.h | Include OS dependent definitions. |
VirtIO.h | Include file containing VirtIO queue related definitions. |
virtio_pci.c | Source file for VirtIO PCI device routines. |
virtio_pci.h | Include file for VirtIO PCI device. |
virtio_ring.c | Source file for VirtIO ring routines. |
virtio_ring.h | Include file for VirtIO ring definitions. |
txtsetup.oem | Windows Server 2003 text-mode setup file. |
wlh.inf | Windows Server 2008 INF file. |
wnet.inf | Windows Server 2003 INF file. |
Main Declarations and Data Structures
VirtIO block device configuration descriptor
typedef struct virtio_blk_config {
u64 capacity; /* The capacity (in 512-byte sectors). */ u32 size_max; /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ u32 seg_max; /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ struct virtio_blk_geometry { /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ u16 cylinders; u8 heads; u8 sectors; } geometry; u32 blk_size; /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */
}blk_config, *pblk_config;
Miniport driver's per-HBA extension
VirtIO request header
VirtIO request descriptor
Miniport driver's per-SRB extension
Functions
How to build
Run the appropriated WDK build environment. Go to the viostor project directory and run "build –cegZ" command.
Debugging
Useful information
Find everything you need here: Storport Miniport Drivers
VirtIO block for XP
An old style, SCSIPort driver, can be created by building the code in XP environment. However, due to the lack of resources SCSIPort driver has never been fully tested and currently is unsupported.