9.1.5 Read/Write Sectors Commands

The read and write commands take identical parameters except for the command word. These commands use every field in the BlockDev_Command_Block structure. The caller specifies the address of a buffer and the starting sector at which the I/O should begin. If the scatter/gather option is not selected then the buffer pointer points to a buffer large enough to accept the entire transfer, and the count field contains the number of sectors to transfer. If the scatter/gather option flag is set then the count field is ignored, and the buffer pointer points to an array of transfer addresses and counts. The scatter/gather table has the following format:

Dword count of sectors for memory region 1

Dword linear address for transfer of region 1 sectors

Dword count of sectors for memory region 2

Dword linear address for transfer of region 2 sectors

.

.

.

Dword count of sectors for memory region x

Dword linear address for transfer of region x sectors

Dword 0 to terminate list

It is the client's responsibility to ensure that all memory that is passed to this service is page locked.

Interrupts are disabled before the command complete callback is called. The client may enable interrupts and may return with interrupts enabled if desired.

The caller is allowed to modify the EAX, EBX, ECX, EDX, ESI, EDI, and Flags registers.