PIIX3ATABmDma.h revision c98fb3e16fcd571a790eab772c0c66173d225205
137N/A/** @file
137N/A *
137N/A * VBox storage devices:
137N/A * PIIX3 ATA busmaster controller definitions
943N/A */
137N/A
137N/A/*
919N/A * Copyright (C) 2006-2007 innotek GmbH
919N/A *
919N/A * This file is part of VirtualBox Open Source Edition (OSE), as
919N/A * available from http://www.virtualbox.org. This file is free software;
919N/A * you can redistribute it and/or modify it under the terms of the GNU
919N/A * General Public License as published by the Free Software Foundation,
919N/A * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
919N/A * distribution. VirtualBox OSE is distributed in the hope that it will
919N/A * be useful, but WITHOUT ANY WARRANTY of any kind.
919N/A */
919N/A
919N/A#ifndef __PIIX3ATABmDma_h__
919N/A#define __PIIX3ATABmDma_h__
919N/A
919N/A
919N/A/** @defgroup grp_piix3atabmdma PIIX3 ATA Bus Master DMA
919N/A * @{
137N/A */
137N/A
137N/A/** @name BM_STATUS
137N/A * @{
493N/A */
137N/A/** Currently performing a DMA operation. */
137N/A#define BM_STATUS_DMAING 0x01
851N/A/** An error occurred during the DMA operation. */
137N/A#define BM_STATUS_ERROR 0x02
911N/A/** The DMA unit has raised the IDE interrupt line. */
911N/A#define BM_STATUS_INT 0x04
911N/A/** User-defined bit 0, commonly used to signal that drive 0 supports DMA. */
911N/A#define BM_STATUS_D0DMA 0x20
137N/A/** User-defined bit 1, commonly used to signal that drive 1 supports DMA. */
137N/A#define BM_STATUS_D1DMA 0x40
137N/A/** @} */
137N/A
137N/A/** @name BM_CMD
137N/A * @{
137N/A */
137N/A/** Start the DMA operation. */
137N/A#define BM_CMD_START 0x01
493N/A/** Data transfer direction: from device to memory if set. */
137N/A#define BM_CMD_WRITE 0x08
137N/A/** @} */
137N/A
493N/A
137N/A/** PIIX3 Bus Master DMA unit state. */
137N/Atypedef struct BMDMAState {
493N/A /** Command register. */
137N/A uint8_t u8Cmd;
493N/A /** Status register. */
137N/A uint8_t u8Status;
137N/A /** Address of the MMIO region in the guest's memory space. */
137N/A RTGCPHYS pvAddr;
137N/A} BMDMAState;
137N/A
/** PIIX3 Bus Master DMA descriptor entry. */
typedef struct BMDMADesc {
/** Address of the DMA source/target buffer. */
RTGCPHYS pBuffer;
/** Size of the DMA source/target buffer. */
uint32_t cbBuffer;
} BMDMADesc;
/** @} */
#endif /* !__PIIX3ATABmDma_h__ */