Skip to content

andkae/pcimem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pcimem

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-write

pcimem_init

Initializes common PCI handle data structure.

int pcimem_init( t_pcimem *this );

pcimem_verbose

Sets output level.

int pcimem_verbose( t_pcimem *this, uint8_t level );

pcimem_open

Open memory window to PCI mapped memory.

pcimem_open( t_pcimem *this, char linuxPciBarPath[], uint32_t barOffset=0, uint32_t mapLen=<OSpage> );

pcimem_close

Close memory handle.

int pcimem_close( t_pcimem *this );

pcimem_ptr

Returns memory void pointer to opened PCI memory base.

void* pcimem_ptr( t_pcimem *this );

References

About

Linux library and CLI tool to acces PCI mapped memory from userspace.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published