hdreg.h File Reference

Go to the source code of this file.

Data Structures

struct  hd_geometry

Defines

#define HD_DATA   0x1f0
 Hd controller regs. Ref: IBM AT Bios-listing _CTL when writing.
#define HD_ERROR   0x1f1
 see err-bits
#define HD_NSECTOR   0x1f2
 nr of sectors to read/write
#define HD_SECTOR   0x1f3
 starting sector
#define HD_LCYL   0x1f4
 starting cylinder
#define HD_HCYL   0x1f5
 high byte of starting cyl
#define HD_CURRENT   0x1f6
 101dhhhh , d=drive, hhhh=head
#define HD_STATUS   0x1f7
 see status-bits
#define HD_PRECOMP   HD_ERROR
 same io address, read=error, write=precomp
#define HD_COMMAND   HD_STATUS
 same io address, read=status, write=cmd
#define HD_CMD   0x3f6
#define ERR_STAT   0x01
 Bits of HD_STATUS.
#define INDEX_STAT   0x02
#define ECC_STAT   0x04
 Corrected error.
#define DRQ_STAT   0x08
#define SEEK_STAT   0x10
#define WRERR_STAT   0x20
#define READY_STAT   0x40
#define BUSY_STAT   0x80
#define WIN_RESTORE   0x10
 Values for HD_COMMAND.
#define WIN_READ   0x20
#define WIN_WRITE   0x30
#define WIN_VERIFY   0x40
#define WIN_FORMAT   0x50
#define WIN_INIT   0x60
#define WIN_SEEK   0x70
#define WIN_DIAGNOSE   0x90
#define WIN_SPECIFY   0x91
#define MARK_ERR   0x01
 Bits for HD_ERROR Bad address mark.
#define TRK0_ERR   0x02
 couldn't find track 0
#define ABRT_ERR   0x04
 Command aborted.
#define ID_ERR   0x10
 ID field not found.
#define ECC_ERR   0x40
 Uncorrectable ECC error.
#define BBD_ERR   0x80
 block marked bad
#define HDIO_REQ   0x301
#define HDIO_GETGEO   0x301


Define Documentation

#define ABRT_ERR   0x04

Command aborted.

Definition at line 52 of file hdreg.h.

#define BBD_ERR   0x80

block marked bad

Definition at line 55 of file hdreg.h.

#define BUSY_STAT   0x80

Definition at line 36 of file hdreg.h.

#define DRQ_STAT   0x08

Definition at line 32 of file hdreg.h.

#define ECC_ERR   0x40

Uncorrectable ECC error.

Definition at line 54 of file hdreg.h.

#define ECC_STAT   0x04

Corrected error.

Definition at line 31 of file hdreg.h.

#define ERR_STAT   0x01

Bits of HD_STATUS.

Definition at line 29 of file hdreg.h.

#define HD_CMD   0x3f6

Definition at line 26 of file hdreg.h.

#define HD_COMMAND   HD_STATUS

same io address, read=status, write=cmd

Definition at line 24 of file hdreg.h.

#define HD_CURRENT   0x1f6

101dhhhh , d=drive, hhhh=head

Definition at line 21 of file hdreg.h.

#define HD_DATA   0x1f0

Hd controller regs. Ref: IBM AT Bios-listing _CTL when writing.

This file contains some defines for the AT-hd-controller. Various sources. Check out some definitions (see comments with a ques).

Definition at line 15 of file hdreg.h.

#define HD_ERROR   0x1f1

see err-bits

Definition at line 16 of file hdreg.h.

#define HD_HCYL   0x1f5

high byte of starting cyl

Definition at line 20 of file hdreg.h.

#define HD_LCYL   0x1f4

starting cylinder

Definition at line 19 of file hdreg.h.

#define HD_NSECTOR   0x1f2

nr of sectors to read/write

Definition at line 17 of file hdreg.h.

#define HD_PRECOMP   HD_ERROR

same io address, read=error, write=precomp

Definition at line 23 of file hdreg.h.

#define HD_SECTOR   0x1f3

starting sector

Definition at line 18 of file hdreg.h.

#define HD_STATUS   0x1f7

see status-bits

Definition at line 22 of file hdreg.h.

#define HDIO_GETGEO   0x301

Definition at line 65 of file hdreg.h.

#define HDIO_REQ   0x301

HDIO_GETGEO is the preferred choice - HDIO_REQ will be removed at some

Definition at line 64 of file hdreg.h.

#define ID_ERR   0x10

ID field not found.

Definition at line 53 of file hdreg.h.

#define INDEX_STAT   0x02

Definition at line 30 of file hdreg.h.

#define MARK_ERR   0x01

Bits for HD_ERROR Bad address mark.

Definition at line 50 of file hdreg.h.

#define READY_STAT   0x40

Definition at line 35 of file hdreg.h.

#define SEEK_STAT   0x10

Definition at line 33 of file hdreg.h.

#define TRK0_ERR   0x02

couldn't find track 0

Definition at line 51 of file hdreg.h.

#define WIN_DIAGNOSE   0x90

Definition at line 46 of file hdreg.h.

#define WIN_FORMAT   0x50

Definition at line 43 of file hdreg.h.

#define WIN_INIT   0x60

Definition at line 44 of file hdreg.h.

#define WIN_READ   0x20

Definition at line 40 of file hdreg.h.

#define WIN_RESTORE   0x10

Values for HD_COMMAND.

Definition at line 39 of file hdreg.h.

#define WIN_SEEK   0x70

Definition at line 45 of file hdreg.h.

#define WIN_SPECIFY   0x91

Definition at line 47 of file hdreg.h.

#define WIN_VERIFY   0x40

Definition at line 42 of file hdreg.h.

#define WIN_WRITE   0x30

Definition at line 41 of file hdreg.h.

#define WRERR_STAT   0x20

Definition at line 34 of file hdreg.h.


Generated on Mon May 1 21:47:00 2006 for KernelAPI by  doxygen 1.4.6-5