CLI tool and library to interact with PCI interfaced registers.
Usage: sudo ./bin/pcimem { vendorID } { deviceID } { bar } { offset } { type } [ data[:mask] ]
vendorID vendor identification of PCI device f.e. 0x110A
deviceID device identification of PCI device f.e. 0x4080
bar bar of targeted PCI device
offset byte offset in BAR
type access data width
[b]yte, 8Bit
[h]alfword, 16Bit
[w]ord, 32Bit
data[:mask] write data
optional mask performs read-modify-writeInitializes common PCI handle data structure.
int pcimem_init( t_pcimem *this );Sets output level.
int pcimem_verbose( t_pcimem *this, uint8_t level );Open memory window to PCI mapped memory.
pcimem_open( t_pcimem *this, char linuxPciBarPath[], uint32_t barOffset=0, uint32_t mapLen=<OSpage> );Close memory handle.
int pcimem_close( t_pcimem *this );Returns memory void pointer to opened PCI memory base.
void* pcimem_ptr( t_pcimem *this );