Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
AHCIModule Class Reference

#include <ahci.hpp>

Inheritance diagram for AHCIModule:
IOforgePCI IOForge

Public Member Functions

 AHCIModule ()
 
void load () override
 
void unload () override
 
int submit_impl (struct ioforge_block_device *dev, struct ioforge_block_request *req)
 
- Public Member Functions inherited from IOforgePCI
 IOforgePCI (const char *mod)
 
struct ioforge_pci_devicefindDevice (uint16_t vendor_id, uint16_t device_id)
 
- Public Member Functions inherited from IOForge
 IOForge (const char *mod)
 

Static Public Member Functions

static AHCIModulegetInstance ()
 

Protected Member Functions

void port_power_off (ahci_port_t *port)
 
void port_power_on (ahci_port_t *port)
 
void port_reset (ahci_port_t *port)
 
void setup ()
 
void probe ()
 
void port_configure (ahci_port_t *port, struct ahci_internal_vaddr *vaddr)
 
bool ata_rw (ahci_port_t *p, struct ahci_internal_vaddr *vaddr, struct ioforge_block_request *req)
 
int atapi_packet (ahci_port_t *p, struct ahci_internal_vaddr *vaddr, struct ioforge_block_request *req)
 
int ata_identify (ahci_port_t *p, struct ahci_internal_vaddr *vaddr, struct ioforge_block_request *req, bool is_atapi)
 
int ata_flush (ahci_port_t *p, struct ahci_internal_vaddr *vaddr, struct ioforge_block_request *req)
 
boolean_t issue_and_wait (ahci_port_t *p, int slot, uint32_t timeout)
 

Private Member Functions

void build_prdt (ahci_cmd_t *cmd, ahci_cmd_tbl_t *cmdtbl, void *buffer, size_t size)
 

Private Attributes

struct ioforge_pci_devicedev_
 
ahci_op_t * op
 

Additional Inherited Members

- Protected Attributes inherited from IOForge
const char * mod
 

Detailed Description

Definition at line 15 of file ahci.hpp.

Constructor & Destructor Documentation

◆ AHCIModule()

AHCIModule::AHCIModule ( )

Definition at line 7 of file init.cpp.

References IOforgePCI::IOforgePCI().

Referenced by getInstance().

Member Function Documentation

◆ ata_flush()

◆ ata_identify()

◆ ata_rw()

◆ atapi_packet()

◆ build_prdt()

void AHCIModule::build_prdt ( ahci_cmd_t * cmd,
ahci_cmd_tbl_t * cmdtbl,
void * buffer,
size_t size )
private

Definition at line 159 of file ahci.cpp.

References addr, buffer, cmd, idx, and size.

Referenced by ata_identify(), ata_rw(), and atapi_packet().

◆ getInstance()

AHCIModule * AHCIModule::getInstance ( )
static

Definition at line 10 of file init.cpp.

References AHCIModule(), and instance.

Referenced by submit().

◆ issue_and_wait()

boolean_t AHCIModule::issue_and_wait ( ahci_port_t * p,
int slot,
uint32_t timeout )
protected

◆ load()

void AHCIModule::load ( )
overridevirtual

Implements IOforgePCI.

Definition at line 17 of file init.cpp.

References dev_, IOforgePCI::findDevice(), log, IOForge::mod, and setup().

◆ port_configure()

◆ port_power_off()

void AHCIModule::port_power_off ( ahci_port_t * port)
protected

Definition at line 42 of file ahci.cpp.

References ahci_port_t::cmd, log, IOForge::mod, and IOForge::IOUtils::sleep().

Referenced by issue_and_wait(), and port_configure().

◆ port_power_on()

void AHCIModule::port_power_on ( ahci_port_t * port)
protected

Definition at line 70 of file ahci.cpp.

References ahci_port_t::cmd, and IOForge::IOUtils::sleep().

Referenced by issue_and_wait(), port_configure(), and probe().

◆ port_reset()

void AHCIModule::port_reset ( ahci_port_t * port)
protected

References slot.

◆ probe()

◆ setup()

void AHCIModule::setup ( )
protected

Definition at line 568 of file ahci.cpp.

References dev_, log, IOForge::mod, op, and probe().

Referenced by load().

◆ submit_impl()

◆ unload()

void AHCIModule::unload ( )
overridevirtual

Implements IOforgePCI.

Definition at line 14 of file init.cpp.

Field Documentation

◆ dev_

struct ioforge_pci_device* AHCIModule::dev_
private

Definition at line 46 of file ahci.hpp.

Referenced by load(), and setup().

◆ op

ahci_op_t* AHCIModule::op
private

Definition at line 47 of file ahci.hpp.

Referenced by probe(), setup(), and submit_impl().


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