NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HostIde Class Reference

A simple IDE host driver. More...

Inheritance diagram for HostIde:
StaticReceiver< HostIde > Device

Public Member Functions

unsigned disk_count ()
bool receive (MessageDisk &msg)
 HostIde (DBus< MessageHwIOIn > &bus_hwioin, DBus< MessageHwIOOut > &bus_hwioout, DBus< MessageDiskCommit > &bus_commit, unsigned disknr, unsigned short iobase, unsigned short iobase_ctrl, Clock *clock)
- Public Member Functions inherited from StaticReceiver< HostIde >
 StaticReceiver ()
- Public Member Functions inherited from Device
void debug_dump ()
 Device (const char *debug_name)

Private Member Functions

unsigned wait_disk_state (unsigned char mask, unsigned char value, unsigned msec, bool check_error)
 Wait with timeout for the right disk state.
unsigned send_packet (unsigned char *packet)
unsigned ata_command (unsigned char *packet, void *output, unsigned outlen, bool read) __attribute__((noinline))
 Send a packet to the ata controller.
bool make_sector_packets (HostGenericAta &params, unsigned char *packets, unsigned char command, unsigned long long sector, unsigned count)
 Initialize packets for a single sector LBA function.
unsigned identify_drive (unsigned short *buffer, HostGenericAta &params, bool slave)

Private Attributes

DBus< MessageDiskCommit > & _bus_commit
unsigned _disknr
unsigned short _iobase
unsigned short _iobase_ctrl
HostGenericAta _params [2]
Clock_clock
unsigned _disk_count

Static Private Attributes

static unsigned const FREQ = 1000

Additional Inherited Members

- Static Public Member Functions inherited from StaticReceiver< HostIde >
static bool receive_static (Device *o, M &msg)

Detailed Description

A simple IDE host driver.

State: testing Features: lba28, lba48, PIO Missing: dma, IRQ

Constructor & Destructor Documentation

HostIde::HostIde ( DBus< MessageHwIOIn > &  bus_hwioin,
DBus< MessageHwIOOut > &  bus_hwioout,
DBus< MessageDiskCommit > &  bus_commit,
unsigned  disknr,
unsigned short  iobase,
unsigned short  iobase_ctrl,
Clock clock 
)
inline

Member Function Documentation

unsigned HostIde::ata_command ( unsigned char *  packet,
void *  output,
unsigned  outlen,
bool  read 
)
inlineprivate

Send a packet to the ata controller.

unsigned HostIde::disk_count ( )
inline
unsigned HostIde::identify_drive ( unsigned short *  buffer,
HostGenericAta params,
bool  slave 
)
inlineprivate
bool HostIde::make_sector_packets ( HostGenericAta params,
unsigned char *  packets,
unsigned char  command,
unsigned long long  sector,
unsigned  count 
)
inlineprivate

Initialize packets for a single sector LBA function.

bool HostIde::receive ( MessageDisk msg)
inline
unsigned HostIde::send_packet ( unsigned char *  packet)
inlineprivate
unsigned HostIde::wait_disk_state ( unsigned char  mask,
unsigned char  value,
unsigned  msec,
bool  check_error 
)
inlineprivate

Wait with timeout for the right disk state.

Member Data Documentation

DBus<MessageDiskCommit>& HostIde::_bus_commit
private
Clock* HostIde::_clock
private
unsigned HostIde::_disk_count
private
unsigned HostIde::_disknr
private
unsigned short HostIde::_iobase
private
unsigned short HostIde::_iobase_ctrl
private
HostGenericAta HostIde::_params[2]
private
unsigned const HostIde::FREQ = 1000
staticprivate

The documentation for this class was generated from the following file: