c - 在 ubuntu 上读取、写入、更新 pci 卡上的 eeprom

标签 c memory pci-e eeprom

我正在尝试弄清楚如何在 ubuntu 上使用 c 语言读取、写入和更新 pci 网卡上 eeprom 的内存地址。

有人能给我指出正确的入门方向吗?谢谢

最佳答案

经过一些研究,它出现了ethtool可用于读取和写入 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]

要转储eeprom,你可以做ethtool -e ethX raw <on|off> offset <N> length <N> .

关于c - 在 ubuntu 上读取、写入、更新 pci 卡上的 eeprom,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22491157/

相关文章:

c++ - 为什么我必须初始化一个数组?

windows - Windows Server 2003 内存使用说明

linux - DMA 引擎在 PowerPC Linux 上无法正确响应

linux - pci_Driver.probe 未被调用

linux - 如何在 Linux 上关闭 GPU 设备的 "REAL"PCIe 电源

c - 为什么 VS 2012 中出现此运行时 OpenGL 错误?

c - 我怎样才能打破一个功能

c - 一个数字在一个数字中出现了多少次

linux - 将变量存储在任何地方(交换空间、磁盘)但不在物理内存中

c++内存位置与数组指针