【发布时间】:2013-06-07 11:46:09
【问题描述】:
在哪里可以找到以下函数的完整实现/主体,在 Linux 内核的“include/linux/pci.h”中定义为函数原型。
int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val);
int pci_bus_write_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 val);
我通常使用free-electron's cross reference 来查找内核中的函数定义。我还使用cscope 来查找这些函数的定义,但在这两种情况下都没有运气。
【问题讨论】:
-
如果您对我的回答投了赞成票并觉得满意,请采纳。 :)
-
@microMolvi 下面的答案得到了它,但更具体/直接的是,PCI 配置空间是在 x86 平台上使用端口 0xCFC 和 0xCF8 上的 ioport 调用读取/写入的。
-
@PeterL。谢谢你指出这一点。我希望它对我将来和现在的许多人都有帮助。目前我正在尝试将 PCIe 驱动程序移植到基于 ARM 的平台上的 U-boot。
标签: linux-kernel cross-reference