【问题标题】:Kernel Function definitions内核函数定义
【发布时间】: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


【解决方案1】:

您无法使用“哑”索引器/标记器找到它们,因为它们是由宏 here 生成的。

【讨论】:

  • 谢谢 IBY,你拯救了这一天 :)
猜你喜欢
  • 2014-12-06
  • 2017-03-31
  • 2014-10-19
  • 2015-08-06
  • 1970-01-01
  • 2015-05-05
  • 2020-09-13
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多