hd.h File Reference

#include <ubixfs/ubixfs.h>

Include dependency graph for hd.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bsd_disklabel
struct  bsd_disklabel::partition
struct  dos_partition
struct  driveInfo

Defines

#define hdCmd   0x7
#define hdCylHi   0x5
#define hdCylLow   0x4
#define hdData   0x0
#define hdError   0x1
#define hdHead   0x6
#define hdSecCount   0x2
#define hdSecNum   0x3
#define hdStat   0x7
#define MAXPARTITIONS   8
#define NDDATA   5
#define NSPARE   5

Functions

int hdInit (struct device_node *dev)
int hdIoctl ()
void hdRead (struct driveInfo *hdd, void *, uInt32, uInt32)
int hdReset ()
int hdStandby ()
int hdStart ()
int hdStop ()
void hdWrite (struct driveInfo *hdd, void *, uInt32, uInt32)
int initHardDisk ()

Variables

static const char * fstypenames []


Define Documentation

#define hdCmd   0x7

Definition at line 43 of file hd.h.

Referenced by hdInit(), hdRead(), and hdWrite().

#define hdCylHi   0x5

Definition at line 40 of file hd.h.

Referenced by hdRead(), and hdWrite().

#define hdCylLow   0x4

Definition at line 39 of file hd.h.

Referenced by hdRead(), and hdWrite().

#define hdData   0x0

Definition at line 35 of file hd.h.

Referenced by hdInit(), hdRead(), and hdWrite().

#define hdError   0x1

Definition at line 36 of file hd.h.

#define hdHead   0x6

Definition at line 41 of file hd.h.

Referenced by hdInit(), hdRead(), and hdWrite().

#define hdSecCount   0x2

Definition at line 37 of file hd.h.

Referenced by hdInit(), hdRead(), and hdWrite().

#define hdSecNum   0x3

Definition at line 38 of file hd.h.

Referenced by hdRead(), and hdWrite().

#define hdStat   0x7

Definition at line 42 of file hd.h.

Referenced by hdInit(), hdRead(), and hdWrite().

#define MAXPARTITIONS   8

Definition at line 84 of file hd.h.

#define NDDATA   5

Definition at line 140 of file hd.h.

#define NSPARE   5

Definition at line 142 of file hd.h.


Function Documentation

int hdInit ( struct device_node dev  ) 

Definition at line 145 of file hd.c.

References device_node::devInfo, hdCmd, hdData, driveInfo::hdDev, driveInfo::hdEnable, hdHead, driveInfo::hdMask, driveInfo::hdMulti, driveInfo::hdPort, hdSecCount, driveInfo::hdSector, driveInfo::hdShift, driveInfo::hdSize, hdStat, device_interface::info, device_interface::initialized, inportByte(), inportWord(), kprintf(), outportByte(), and device_interface::size.

Referenced by initHardDisk().

Here is the call graph for this function:

int hdIoctl (  ) 

Definition at line 137 of file hd.c.

Referenced by initHardDisk().

void hdRead ( struct driveInfo hdd,
void *  ,
uInt32  ,
uInt32   
)

Definition at line 284 of file hd.c.

References driveInfo::hdCalc, hdCmd, hdCylHi, hdCylLow, hdData, driveInfo::hdDev, driveInfo::hdEnable, hdHead, driveInfo::hdMulti, driveInfo::hdPort, hdSecCount, hdSecNum, driveInfo::hdShift, hdStat, inportByte(), inportWord(), kprintf(), outportByte(), driveInfo::parOffset, and x20.

Referenced by initHardDisk().

Here is the call graph for this function:

int hdReset (  ) 

Definition at line 141 of file hd.c.

Referenced by initHardDisk().

int hdStandby (  ) 

Definition at line 125 of file hd.c.

Referenced by initHardDisk().

int hdStart (  ) 

Definition at line 129 of file hd.c.

Referenced by initHardDisk().

int hdStop (  ) 

Definition at line 133 of file hd.c.

Referenced by initHardDisk().

void hdWrite ( struct driveInfo hdd,
void *  ,
uInt32  ,
uInt32   
)

Definition at line 222 of file hd.c.

References driveInfo::hdCalc, hdCmd, hdCylHi, hdCylLow, hdData, driveInfo::hdDev, driveInfo::hdEnable, hdHead, driveInfo::hdMulti, driveInfo::hdPort, hdSecCount, hdSecNum, driveInfo::hdShift, hdStat, inportByte(), kprintf(), outportByte(), outportWord(), driveInfo::parOffset, and x30.

Referenced by initHardDisk().

Here is the call graph for this function:

int initHardDisk (  ) 

Definition at line 39 of file hd.c.

References bsd_disklabel::d_npartitions, bsd_disklabel::d_partitions, devfs_makeNode(), device_add(), dos_partition::dp_start, fstypenames, driveInfo::hdDev, hdInit(), hdIoctl(), driveInfo::hdPort, hdRead(), hdReset(), driveInfo::hdSize, hdStandby(), hdStart(), hdStop(), hdWrite(), device_interface::info, device_interface::init, device_interface::ioctl, kmalloc(), kprintf(), device_interface::major, memcpy(), name, bsd_disklabel::partition::p_fstype, bsd_disklabel::partition::p_offset, bsd_disklabel::partition::p_size, driveInfo::parOffset, device_interface::read, device_interface::reset, sprintf(), device_interface::standby, device_interface::start, device_interface::stop, device_interface::write, and x1.

Here is the call graph for this function:


Variable Documentation

const char* fstypenames[] [static]

Initial value:

 {
        "unused",
        "swap",
        "Version 6",
        "Version 7",
        "System V",
        "4.1BSD",
        "Eighth Edition",
        "4.2BSD",
        "MSDOS",
        "4.4LFS",
        "unknown",
        "HPFS",
        "ISO9660",
        "boot",
        "vinum",
        "raid",
        "?",
        "?",
        "?",
        "?",
        "jfs",
        NULL
}

Definition at line 161 of file hd.h.

Referenced by initHardDisk().


Generated on Fri Dec 15 11:20:00 2006 for UbixOS V2 by  doxygen 1.4.7