hd.h
ubixfs/ubixfs.h
src/sys/include/ubixos/init.h
src/sys/pci/hd.c
sys/thread.h
ubixos/sched.h
ubixos/types.h
sys/_types.h
vfs/file.h
sys/tss.h
mpi/mpi.h
vfs/vfs.h
vfs/mount.h
ubixfs/ubixfs.h
ubixfs/dirCache.h
src/sys/include/pci/hd.h
sys/sysproto.h
sys/signal.h
ubixos/tty.h
sys/device.h
src/sys/pci/hd.c
src/sys/init/main.c
src/sys/include/pci/hd.h
src/sys/include/ubixos/init.h
bsd_disklabel
bsd_disklabel::partition
dos_partition
driveInfo
hdCmd
0x7
hdInit
hdRead
hdWrite
hdCylHi
0x5
hdRead
hdWrite
hdCylLow
0x4
hdRead
hdWrite
hdData
0x0
hdInit
hdRead
hdWrite
hdError
0x1
hdHead
0x6
hdInit
hdRead
hdWrite
hdSecCount
0x2
hdInit
hdRead
hdWrite
hdSecNum
0x3
hdRead
hdWrite
hdStat
0x7
hdInit
hdRead
hdWrite
MAXPARTITIONS
8
NDDATA
5
NSPARE
5
int int hdInit (struct device_node *dev) hdInit struct device_node * dev 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 device_interface::size initHardDisk
int int hdIoctl () hdIoctl initHardDisk
void void hdRead (struct driveInfo *hdd, void *, uInt32, uInt32) hdRead struct driveInfo * hdd void * uInt32 uInt32 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 x20 initHardDisk
int int hdReset () hdReset initHardDisk
int int hdStandby () hdStandby initHardDisk
int int hdStart () hdStart initHardDisk
int int hdStop () hdStop initHardDisk
void void hdWrite (struct driveInfo *hdd, void *, uInt32, uInt32) hdWrite struct driveInfo * hdd void * uInt32 uInt32 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 x30 initHardDisk
int int initHardDisk () initHardDisk 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 x1
const char * const char* fstypenames[] [] fstypenames { "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 } initHardDisk

    /*****************************************************************************************
    Copyright(c)2002-2004TheUbixOSProject
    Allrightsreserved.

    Redistributionanduseinsourceandbinaryforms,withorwithoutmodification,are
    permittedprovidedthatthefollowingconditionsaremet:

    Redistributionsofsourcecodemustretaintheabovecopyrightnotice,thislistof
    conditions,thefollowingdisclaimerandthelistofauthors.Redistributionsinbinary
    formmustreproducetheabovecopyrightnotice,thislistofconditions,thefollowing
    disclaimerandthelistofauthorsinthedocumentationand/orothermaterialsprovided
    withthedistribution.NeitherthenameoftheUbixOSProjectnorthenamesofits
    contributorsmaybeusedtoendorseorpromoteproductsderivedfromthissoftware
    withoutspecificpriorwrittenpermission.

    THISSOFTWAREISPROVIDEDBYTHECOPYRIGHTHOLDERSANDCONTRIBUTORS"ASIS"ANDANY
    EXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOF
    MERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.INNOEVENTSHALL
    THECOPYRIGHTOWNERORCONTRIBUTORSBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,
    SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENT
    OFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)
    HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,OR
    TORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHIS
    SOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE.

    $Id: hd_8h.xml 88 2016-01-12 00:11:29Z reddawg $

    *****************************************************************************************/

    #ifndef_HD_H
    #define_HD_H

    #include<ubixfs/ubixfs.h>

    #definehdData0x0
    #definehdError0x1
    #definehdSecCount0x2
    #definehdSecNum0x3
    #definehdCylLow0x4
    #definehdCylHi0x5
    #definehdHead0x6
    #definehdStat0x7
    #definehdCmd0x7

    structdriveInfo{
    structdriveDiskLabel*diskLabel;
    charhdSector[512];
    charhdEnable;
    charhdDev;
    charhdFlags;
    charhdShift;
    longhdMask;
    longhdMulti;
    longhdPort;
    longhdSize;
    longhdCalc;
    longparOffset;
    };

    intinitHardDisk();
    voidhdWrite(structdriveInfo*hdd,void*,uInt32,uInt32);
    voidhdRead(structdriveInfo*hdd,void*,uInt32,uInt32);
    inthdReset();
    inthdIoctl();
    inthdStart();
    inthdStop();
    inthdStandby();
    inthdInit(structdevice_node*dev);

    structdos_partition{
    unsignedchardp_flag;/*bootstrapflags*/
    unsignedchardp_shd;/*startinghead*/
    unsignedchardp_ssect;/*startingsector*/
    unsignedchardp_scyl;/*startingcylinder*/
    unsignedchardp_type;/*partitiontype*/
    unsignedchardp_ehd;/*endhead*/
    unsignedchardp_esect;/*endsector*/
    unsignedchardp_ecyl;/*endcylinder*/
    uInt32dp_start;/*absolutestartingsectornumber*/
    uInt32dp_size;/*partitionsizeinsectors*/
    };

    #defineMAXPARTITIONS8

    structbsd_disklabel{
    uint32_td_magic;/*themagicnumber*/
    u_int16_td_type;/*drivetype*/
    u_int16_td_subtype;/*controller/d_typespecific*/
    chard_typename[16];/*typename,e.g."eagle"*/

    chard_packname[16];/*packidentifier*/

    /*diskgeometry:*/
    uint32_td_secsize;/*#ofbytespersector*/
    uint32_td_nsectors;/*#ofdatasectorspertrack*/
    uint32_td_ntracks;/*#oftrackspercylinder*/
    uint32_td_ncylinders;/*#ofdatacylindersperunit*/
    uint32_td_secpercyl;/*#ofdatasectorspercylinder*/
    uint32_td_secperunit;/*#ofdatasectorsperunit*/

    /*
    *Spares(badsectorreplacements)belowarenotcountedin
    *d_nsectorsord_secpercyl.Sparesectorsareassumedto
    *bephysicalsectorswhichoccupyspaceattheendofeach
    *trackand/orcylinder.
    */
    u_int16_td_sparespertrack;/*#ofsparesectorspertrack*/
    u_int16_td_sparespercyl;/*#ofsparesectorspercylinder*/
    /*
    *Alternatecylindersincludemaintenance,replacement,configuration
    *descriptionareas,etc.
    */
    uint32_td_acylinders;/*#ofalt.cylindersperunit*/

    /*hardwarecharacteristics:*/
    /*
    *d_interleave,d_trackskewandd_cylskewdescribeperturbations
    *inthemediaformatusedtocompensateforaslowcontroller.
    *Interleaveisphysicalsectorinterleave,setupbythe
    *formatterorcontrollerwhenformatting.Wheninterleavingis
    *inuse,logicallyadjacentsectorsarenotphysically
    *contiguous,butinsteadareseparatedbysomenumberof
    *sectors.Itisspecifiedastheratioofphysicalsectors
    *traversedperlogicalsector.Thusaninterleaveof1:1
    *impliescontiguouslayout,while2:1impliesthatlogical
    *sector0isseparatedbyonesectorfromlogicalsector1.
    *d_trackskewistheoffsetofsector0ontrackNrelativeto
    *sector0ontrackN-1onthesamecylinder.Finally,d_cylskew
    *istheoffsetofsector0oncylinderNrelativetosector0
    *oncylinderN-1.
    */
    u_int16_td_rpm;/*rotationalspeed*/
    u_int16_td_interleave;/*hardwaresectorinterleave*/
    u_int16_td_trackskew;/*sector0skew,pertrack*/
    u_int16_td_cylskew;/*sector0skew,percylinder*/
    uint32_td_headswitch;/*headswitchtime,usec*/
    uint32_td_trkseek;/*track-to-trackseek,usec*/
    uint32_td_flags;/*genericflags*/
    #defineNDDATA5
    uint32_td_drivedata[NDDATA];/*drive-typespecificinformation*/
    #defineNSPARE5
    uint32_td_spare[NSPARE];/*reservedforfutureuse*/
    uint32_td_magic2;/*themagicnumber(again)*/
    u_int16_td_checksum;/*xorofdataincl.partitions*/

    /*filesystemandpartitioninformation:*/
    u_int16_td_npartitions;/*numberofpartitionsinfollowing*/
    uint32_td_bbsize;/*sizeofbootareaatsn0,bytes*/
    uint32_td_sbsize;/*maxsizeoffssuperblock,bytes*/
    structpartition{/*thepartitiontable*/
    uint32_tp_size;/*numberofsectorsinpartition*/
    uint32_tp_offset;/*startingsector*/
    uint32_tp_fsize;/*filesystembasicfragmentsize*/
    u_int8_tp_fstype;/*filesystemtype,seebelow*/
    u_int8_tp_frag;/*filesystemfragmentsperblock*/
    u_int16_tp_cpg;/*filesystemcylinderspergroup*/
    }d_partitions[MAXPARTITIONS];/*actuallymaybemore*/
    };

    staticconstchar*fstypenames[]={
    "unused",
    "swap",
    "Version6",
    "Version7",
    "SystemV",
    "4.1BSD",
    "EighthEdition",
    "4.2BSD",
    "MSDOS",
    "4.4LFS",
    "unknown",
    "HPFS",
    "ISO9660",
    "boot",
    "vinum",
    "raid",
    "?",
    "?",
    "?",
    "?",
    "jfs",
    NULL
    };

    #endif

    /***
    $Log: hd_8h.xml,v $
    Revision 1.6  2006/12/19 14:12:51  reddawg
    rtld-elf almost workign

    Revision1.22006/10/0902:58:05reddawg
    FixingUFS

    Revision1.1.1.12006/06/0112:46:14reddawg
    ubix2

    Revision1.22005/10/1200:13:37reddawg
    Removed

    Revision1.1.1.12005/09/2617:23:50reddawg
    nomessage

    Revision1.72004/08/1500:33:02reddawg
    Wowtheidedriverworksagain

    Revision1.62004/07/2110:02:09reddawg
    devfs:renamedfunctions
    devicesystem:renamedfunctions
    fdc:fixedafewpotentialbugsandcleanedupsomeunusedvariables
    strol:fixeddefinition
    endtask:madeitprintoutfreepagedebuginfo
    kmalloc:fixedahugememoryleakwehadsomeunhandleddescriptorinsertionsosomedescriptorswerelost
    ld:fixedapointerconversion
    file:cleanedupafewunusedvariables
    sched:broketaskdeletion
    kprintf:fixedogPrintfdefinition

    Revision1.52004/05/2115:05:07reddawg
    Cleanedup

    END
    ***/