I'm trying to figure out how I can read, write, and update memory addresses for eeprom on a pci network card using c language on ubuntu.

Can some please point me in the right direction to get started? Thank you

有帮助吗?

解决方案

After some research, it appears ethtool can be used to read and write to the eeprom (http://manpages.ubuntu.com/manpages/hardy/en/man8/ethtool.8.html):

   ethtool -d|--register-dump ethX [raw on|off] [hex on|off] [file name]

   ethtool -e|--eeprom-dump ethX [raw on|off] [offset N] [length N]

   ethtool -E|--change-eeprom ethX [magic N] [offset N] [value N]

To dump eeprom, you can do ethtool -e ethX raw <on|off> offset <N> length <N>.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top