class Bus
Defined at line 17 of file ../../src/devices/block/drivers/ahci/bus.h
Public Methods
void ~Bus ()
Defined at line 19 of file ../../src/devices/block/drivers/ahci/bus.h
void Bus (const Bus & )
Defined at line 21 of file ../../src/devices/block/drivers/ahci/bus.h
zx_status_t Configure ()
Configure the bus for use. Registers should be accessible after this call.
zx_status_t DmaBufferInit (std::unique_ptr<dma_buffer::ContiguousBuffer> * buffer_out, size_t size, zx_paddr_t * phys_out, void ** virt_out)
Initialize dma buffer, returning the mapped physical and virtual addresses
in |phys_out| and |virt_out|.
zx_status_t BtiPin (uint32_t options, const zx::unowned_vmo & vmo, uint64_t offset, uint64_t size, zx_paddr_t * addrs, size_t addrs_count, zx::pmt * pmt_out)
Pin a set of pages for bus transaction initiators (if supported).
Parameters the same as zx_bti_pin();
zx_status_t RegRead (size_t offset, uint32_t * val_out)
Read or write a 32-bit register.
If the bus encounters an error, non-error status will be returned.
A bus error typically means the device is no longer accessible. This may be due to hot-
unplug and should be handled gracefully.
zx_status_t RegWrite (size_t offset, uint32_t val)
zx_status_t InterruptWait ()
Wait on an interrupt from the bus's interrupt source.
void InterruptCancel ()
Cancel a pending interrupt wait.
zx_status_t WaitForClear (size_t offset, uint32_t mask, zx::duration timeout)
Wait until all bits in |mask| are cleared in |reg| or timeout expires.
Defined at line 12 of file ../../src/devices/block/drivers/ahci/bus.cc
Bus & operator= (const Bus & )
Defined at line 21 of file ../../src/devices/block/drivers/ahci/bus.h
zx_status_t WaitForSet (size_t offset, uint32_t mask, zx::duration timeout)
Wait until one bit in |mask| is set in |reg| or timeout expires.
Defined at line 27 of file ../../src/devices/block/drivers/ahci/bus.cc
Protected Methods
void Bus ()
Defined at line 57 of file ../../src/devices/block/drivers/ahci/bus.h