ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

xboxdisk.c File Reference
#include <freeldr.h>
#include <debug.h>

Go to the source code of this file.

Data Structures

struct  PIDE_DRIVE_IDENTIFY

Defines

#define NDEBUG
#define XBOX_IDE_COMMAND_PORT   0x1f0
#define XBOX_IDE_CONTROL_PORT   0x170
#define XBOX_SIGNATURE_SECTOR   3
#define XBOX_SIGNATURE   ('B' | ('R' << 8) | ('F' << 16) | ('R' << 24))
#define IDE_SECTOR_BUF_SZ   512
#define IDE_MAX_POLL_RETRIES   100000
#define IDE_MAX_BUSY_RETRIES   50000
#define IDE_REG_ALT_STATUS   0x0000
#define IDE_REG_DEV_CNTRL   0x0000 /* device control register */
#define IDE_DC_SRST   0x04 /* drive reset (both drives) */
#define IDE_DC_nIEN   0x02 /* IRQ enable (active low) */
#define IDE_REG_DRV_ADDR   0x0001
#define IDE_REG_DATA_PORT   0x0000
#define IDE_REG_ERROR   0x0001 /* error register */
#define IDE_ER_AMNF   0x01 /* addr mark not found */
#define IDE_ER_TK0NF   0x02 /* track 0 not found */
#define IDE_ER_ABRT   0x04 /* command aborted */
#define IDE_ER_MCR   0x08 /* media change requested */
#define IDE_ER_IDNF   0x10 /* ID not found */
#define IDE_ER_MC   0x20 /* Media changed */
#define IDE_ER_UNC   0x40 /* Uncorrectable data error */
#define IDE_REG_PRECOMP   0x0001
#define IDE_REG_SECTOR_CNT   0x0002
#define IDE_REG_SECTOR_NUM   0x0003
#define IDE_REG_CYL_LOW   0x0004
#define IDE_REG_CYL_HIGH   0x0005
#define IDE_REG_DRV_HEAD   0x0006
#define IDE_DH_FIXED   0xA0
#define IDE_DH_LBA   0x40
#define IDE_DH_HDMASK   0x0F
#define IDE_DH_DRV0   0x00
#define IDE_DH_DRV1   0x10
#define IDE_REG_STATUS   0x0007
#define IDE_SR_BUSY   0x80
#define IDE_SR_DRDY   0x40
#define IDE_SR_WERR   0x20
#define IDE_SR_DRQ   0x08
#define IDE_SR_ERR   0x01
#define IDE_REG_COMMAND   0x0007
#define IDE_CMD_RESET   0x08
#define IDE_CMD_READ   0x20
#define IDE_CMD_READ_RETRY   0x21
#define IDE_CMD_WRITE   0x30
#define IDE_CMD_WRITE_RETRY   0x31
#define IDE_CMD_PACKET   0xA0
#define IDE_CMD_READ_MULTIPLE   0xC4
#define IDE_CMD_WRITE_MULTIPLE   0xC5
#define IDE_CMD_READ_DMA   0xC8
#define IDE_CMD_WRITE_DMA   0xCA
#define IDE_CMD_FLUSH_CACHE   0xE7
#define IDE_CMD_FLUSH_CACHE_EXT   0xEA
#define IDE_CMD_IDENT_ATA_DRV   0xEC
#define IDE_CMD_IDENT_ATAPI_DRV   0xA1
#define IDE_CMD_GET_MEDIA_STATUS   0xDA
#define IDEReadError(Address)   (READ_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_ERROR)))
#define IDEWritePrecomp(Address, Data)   (WRITE_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_PRECOMP), (Data)))
#define IDEReadSectorCount(Address)   (READ_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_SECTOR_CNT)))
#define IDEWriteSectorCount(Address, Data)   (WRITE_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_SECTOR_CNT), (Data)))
#define IDEReadSectorNum(Address)   (READ_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_SECTOR_NUM)))
#define IDEWriteSectorNum(Address, Data)   (WRITE_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_SECTOR_NUM), (Data)))
#define IDEReadCylinderLow(Address)   (READ_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_CYL_LOW)))
#define IDEWriteCylinderLow(Address, Data)   (WRITE_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_CYL_LOW), (Data)))
#define IDEReadCylinderHigh(Address)   (READ_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_CYL_HIGH)))
#define IDEWriteCylinderHigh(Address, Data)   (WRITE_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_CYL_HIGH), (Data)))
#define IDEReadDriveHead(Address)   (READ_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_DRV_HEAD)))
#define IDEWriteDriveHead(Address, Data)   (WRITE_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_DRV_HEAD), (Data)))
#define IDEReadStatus(Address)   (READ_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_STATUS)))
#define IDEWriteCommand(Address, Data)   (WRITE_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_COMMAND), (Data)))
#define IDEReadDMACommand(Address)   (READ_PORT_UCHAR((PUCHAR)((Address))))
#define IDEWriteDMACommand(Address, Data)   (WRITE_PORT_UCHAR((PUCHAR)((Address)), (Data)))
#define IDEReadDMAStatus(Address)   (READ_PORT_UCHAR((PUCHAR)((Address) + 2)))
#define IDEWriteDMAStatus(Address, Data)   (WRITE_PORT_UCHAR((PUCHAR)((Address) + 2), (Data)))
#define IDEWritePRDTable(Address, Data)   (WRITE_PORT_ULONG((PULONG)((Address) + 4), (Data)))
#define IDEReadBlock(Address, Buffer, Count)   (READ_PORT_BUFFER_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer), (Count) / 2))
#define IDEWriteBlock(Address, Buffer, Count)   (WRITE_PORT_BUFFER_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer), (Count) / 2))
#define IDEReadBlock32(Address, Buffer, Count)   (READ_PORT_BUFFER_ULONG((PULONG)((Address) + IDE_REG_DATA_PORT), (PULONG)(Buffer), (Count) / 4))
#define IDEWriteBlock32(Address, Buffer, Count)   (WRITE_PORT_BUFFER_ULONG((PULONG)((Address) + IDE_REG_DATA_PORT), (PULONG)(Buffer), (Count) / 4))
#define IDEReadWord(Address)   (READ_PORT_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT)))
#define IDEReadAltStatus(Address)   (READ_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_ALT_STATUS)))
#define IDEWriteDriveControl(Address, Data)   (WRITE_PORT_UCHAR((PUCHAR)((Address) + IDE_REG_DEV_CNTRL), (Data)))
#define IDE_DRID_STBY_SUPPORTED   0x2000
#define IDE_DRID_IORDY_SUPPORTED   0x0800
#define IDE_DRID_IORDY_DISABLE   0x0400
#define IDE_DRID_LBA_SUPPORTED   0x0200
#define IDE_DRID_DMA_SUPPORTED   0x0100

Functions

 DBG_DEFAULT_CHANNEL (DISK)
static BOOLEAN XboxDiskPolledRead (ULONG CommandPort, ULONG ControlPort, UCHAR PreComp, UCHAR SectorCnt, UCHAR SectorNum, UCHAR CylinderLow, UCHAR CylinderHigh, UCHAR DrvHead, UCHAR Command, PVOID Buffer)
BOOLEAN XboxDiskReadLogicalSectors (UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
BOOLEAN XboxDiskGetPartitionEntry (UCHAR DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry)
BOOLEAN XboxDiskGetDriveGeometry (UCHAR DriveNumber, PGEOMETRY Geometry)
ULONG XboxDiskGetCacheableBlockCount (UCHAR DriveNumber)

Variables

struct {
   ULONG   SectorCountBeforePartition
   ULONG   PartitionSectorCount
   UCHAR   SystemIndicator
XboxPartitions []

Generated on Sat May 26 2012 04:46:18 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.