CAliM1543C_ide Class Reference

#include <AliM1543C_ide.h>

Inheritance diagram for CAliM1543C_ide:

Inheritance graph
[legend]
Collaboration diagram for CAliM1543C_ide:

Collaboration graph
[legend]

Detailed Description

Emulated IDE part of ALi M1543C multi-function device.

Documentation consulted:

Definition at line 162 of file AliM1543C_ide.h.


Public Member Functions

 CAliM1543C_ide (CConfigurator *cfg, class CSystem *c, int pcibus, int pcidev)
 Constructor.
virtual ~CAliM1543C_ide ()
virtual void register_disk (class CDisk *dsk, int bus, int dev)
virtual void WriteMem_Legacy (int index, u32 address, int dsize, u32 data)
virtual u32 ReadMem_Legacy (int index, u32 address, int dsize)
virtual void WriteMem_Bar (int func, int bar, u32 address, int dsize, u32 data)
virtual u32 ReadMem_Bar (int func, int bar, u32 address, int dsize)
virtual int SaveState (FILE *f)
 Save state to a Virtual Machine State file.
virtual int RestoreState (FILE *f)
 Restore state from a Virtual Machine State file.
virtual void check_state ()
 Check if threads are still running.
virtual void ResetPCI ()
virtual void run ()
 Thread entry point.
virtual void init ()
 Initialize the IDE device.
virtual void start_threads ()
virtual void stop_threads ()

Private Member Functions

u32 ide_command_read (int channel, u32 address, int dsize)
void ide_command_write (int channel, u32 address, int dsize, u32 data)
u32 ide_control_read (int channel, u32 address)
void ide_control_write (int channel, u32 address, u32 data)
 Write to the IDE controller control interface.
u32 ide_busmaster_read (int channel, u32 address, int dsize)
 Read from the IDE controller busmaster interface.
void ide_busmaster_write (int channel, u32 address, u32 data, int dsize)
 Write to the IDE controller busmaster interface.
int do_dma_transfer (int index, u8 *buffer, u32 size, bool direction)
void raise_interrupt (int channel)
void set_signature (int channel, int id)
u8 get_status (int index)
void command_aborted (int index, u8 command)
void identify_drive (int index, bool packet)
void ide_status (int index)
void execute (int index)

Private Attributes

Poco::ThreadthrController [2]
Poco::SemaphoresemController [2]
Poco::SemaphoresemBusMaster [2]
CRWMutexmtRegisters [2]
CRWMutexmtBusMaster [2]
bool StopThread
bool usedma
struct
CAliM1543C_ide::SAliM1543C_ideState 
state

Data Structures

struct  SAliM1543C_ideState

Constructor & Destructor Documentation

CAliM1543C_ide::CAliM1543C_ide ( CConfigurator cfg,
class CSystem c,
int  pcibus,
int  pcidev 
)

Constructor.

Definition at line 298 of file AliM1543C_ide.cpp.

References FAILURE, CSCSIDevice::scsi_register(), and theIDE.

CAliM1543C_ide::~CAliM1543C_ide (  )  [virtual]

Definition at line 383 of file AliM1543C_ide.cpp.

References stop_threads().


Member Function Documentation

void CAliM1543C_ide::register_disk ( class CDisk dsk,
int  bus,
int  dev 
) [virtual]

void CAliM1543C_ide::WriteMem_Legacy ( int  index,
u32  address,
int  dsize,
u32  data 
) [virtual]

u32 CAliM1543C_ide::ReadMem_Legacy ( int  index,
u32  address,
int  dsize 
) [virtual]

void CAliM1543C_ide::WriteMem_Bar ( int  func,
int  bar,
u32  address,
int  dsize,
u32  data 
) [virtual]

u32 CAliM1543C_ide::ReadMem_Bar ( int  func,
int  bar,
u32  address,
int  dsize 
) [virtual]

int CAliM1543C_ide::SaveState ( FILE *  f  )  [virtual]

Save state to a Virtual Machine State file.

Reimplemented from CPCIDevice.

Definition at line 433 of file AliM1543C_ide.cpp.

References CSystemComponent::devid_string, ide_magic1, ide_magic2, CPCIDevice::SaveState(), and state.

int CAliM1543C_ide::RestoreState ( FILE *  f  )  [virtual]

Restore state from a Virtual Machine State file.

Reimplemented from CPCIDevice.

Definition at line 452 of file AliM1543C_ide.cpp.

References CSystemComponent::devid_string, ide_magic1, ide_magic2, CPCIDevice::RestoreState(), and state.

void CAliM1543C_ide::check_state (  )  [virtual]

Check if threads are still running.

Reimplemented from CSystemComponent.

Definition at line 1443 of file AliM1543C_ide.cpp.

References FAILURE, and thrController.

void CAliM1543C_ide::ResetPCI (  )  [virtual]

Reimplemented from CPCIDevice.

Definition at line 388 of file AliM1543C_ide.cpp.

References COMMAND, CONTROLLER, PER_DRIVE, REGISTERS, CPCIDevice::ResetPCI(), set_signature(), and STATUS.

Referenced by init().

void CAliM1543C_ide::run ( void   )  [virtual]

void CAliM1543C_ide::init (  )  [virtual]

void CAliM1543C_ide::start_threads (  )  [virtual]

Reimplemented from CSystemComponent.

Definition at line 351 of file AliM1543C_ide.cpp.

References Poco::Thread::start(), StopThread, and thrController.

void CAliM1543C_ide::stop_threads (  )  [virtual]

Reimplemented from CSystemComponent.

Definition at line 367 of file AliM1543C_ide.cpp.

References Poco::Thread::join(), semController, Poco::Semaphore::set(), StopThread, and thrController.

Referenced by ~CAliM1543C_ide().

u32 CAliM1543C_ide::ide_command_read ( int  channel,
u32  address,
int  dsize 
) [private]

void CAliM1543C_ide::ide_command_write ( int  channel,
u32  address,
int  dsize,
u32  data 
) [private]

u32 CAliM1543C_ide::ide_control_read ( int  channel,
u32  address 
) [private]

Definition at line 895 of file AliM1543C_ide.cpp.

References CONTROLLER, mtRegisters, SCOPED_READ_LOCK, SEL_REGISTERS, and SEL_STATUS.

Referenced by ReadMem_Bar(), and ReadMem_Legacy().

void CAliM1543C_ide::ide_control_write ( int  channel,
u32  address,
u32  data 
) [private]

Write to the IDE controller control interface.

Definition at line 936 of file AliM1543C_ide.cpp.

References COMMAND, CONTROLLER, SEL_REGISTERS, set_signature(), and STATUS.

Referenced by WriteMem_Bar(), and WriteMem_Legacy().

u32 CAliM1543C_ide::ide_busmaster_read ( int  channel,
u32  address,
int  dsize 
) [private]

Read from the IDE controller busmaster interface.

Definition at line 1001 of file AliM1543C_ide.cpp.

References CONTROLLER, and FAILURE.

Referenced by ReadMem_Bar(), and ReadMem_Legacy().

void CAliM1543C_ide::ide_busmaster_write ( int  channel,
u32  address,
u32  data,
int  dsize 
) [private]

Write to the IDE controller busmaster interface.

Definition at line 1029 of file AliM1543C_ide.cpp.

References CONTROLLER, CPCIDevice::do_pci_read(), endian_32, LL, semBusMaster, and Poco::Semaphore::set().

Referenced by WriteMem_Bar(), and WriteMem_Legacy().

int CAliM1543C_ide::do_dma_transfer ( int  index,
u8 buffer,
u32  size,
bool  direction 
) [private]

void CAliM1543C_ide::raise_interrupt ( int  channel  )  [private]

void CAliM1543C_ide::set_signature ( int  channel,
int  id 
) [private]

Definition at line 1129 of file AliM1543C_ide.cpp.

References CONTROLLER, CDiskController::get_disk(), and REGISTERS.

Referenced by execute(), ide_control_write(), and ResetPCI().

u8 CAliM1543C_ide::get_status ( int  index  )  [private]

Definition at line 1175 of file AliM1543C_ide.cpp.

References CONTROLLER, SEL_DISK, and SEL_STATUS.

Referenced by ide_command_read().

void CAliM1543C_ide::command_aborted ( int  index,
u8  command 
) [private]

void CAliM1543C_ide::identify_drive ( int  index,
bool  packet 
) [private]

Definition at line 1222 of file AliM1543C_ide.cpp.

References CONTROLLER, MAX_MULTIPLE_SECTORS, SEL_DISK, SEL_PER_DRIVE, and usedma.

Referenced by execute().

void CAliM1543C_ide::ide_status ( int  index  )  [private]

Definition at line 1417 of file AliM1543C_ide.cpp.

References CONTROLLER, SEL_COMMAND, SEL_REGISTERS, and SEL_STATUS.

Referenced by execute(), ide_command_read(), ide_command_write(), and run().

void CAliM1543C_ide::execute ( int  index  )  [private]


Field Documentation

Definition at line 206 of file AliM1543C_ide.h.

Referenced by check_state(), init(), run(), start_threads(), and stop_threads().

Definition at line 207 of file AliM1543C_ide.h.

Referenced by ide_command_read(), ide_command_write(), init(), run(), and stop_threads().

Definition at line 208 of file AliM1543C_ide.h.

Referenced by do_dma_transfer(), ide_busmaster_write(), and init().

Definition at line 209 of file AliM1543C_ide.h.

Referenced by ide_control_read(), and init().

Definition at line 210 of file AliM1543C_ide.h.

Referenced by do_dma_transfer(), init(), raise_interrupt(), and run().

Definition at line 211 of file AliM1543C_ide.h.

Referenced by init(), run(), start_threads(), and stop_threads().

bool CAliM1543C_ide::usedma [private]

Definition at line 213 of file AliM1543C_ide.h.

Referenced by identify_drive(), and init().

Referenced by RestoreState(), and SaveState().


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

SourceForge.net Logo
Project space on SourceForge.net