六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 44|回复: 0

Solaris Source Insight: PCI bus driver moduls

[复制链接]

升级  53.65%

673

主题

673

主题

673

主题

探花

Rank: 6Rank: 6

积分
2073
 楼主| 发表于 2013-1-26 14:09:53 | 显示全部楼层 |阅读模式
<!--@page { margin: 0.79in }TD P { margin-bottom: 0in }P { margin-bottom: 0.08in }-->
Continue with other PCI relatedmodules.

[root@blu-nhm-ep:~]modinfo| grep PCI
13 fffffffffbbd99e8  b278   -   1  pci_autoconfig (PCI BIOS interface)
36 fffffffff78a2000  9520 183   1  npe (Host to PCIe nexus driver)
37 fffffffff78ab000  5878   -   1  pcihp (PCI nexus hotplug support)
39 fffffffff78b1000  8448   -   1  pcie (PCIE: PCI framework)
88 fffffffff7c4e000  4ee0 184   1  pcieb (PCIe to PCI nexus driver)
89 fffffffff7a70000  1ae0  84   1  pci_pci (PCI to PCI bridge nexus driver)

We have completed pci_autoconfig, npe.Let's go ahead with pcie. The pcie module are compiled from severalsource files. You can guess their purpose from the file name.

[allen@blu-devl:uts]find .-name Makefile.files | xargs grep pcie
./intel/Makefile.files:PCIEB_OBJS+= pcieb_x86.o
./intel/Makefile.files:PCI_AUTOCONFIG_OBJS+= pci_autoconfig.o pci_boot.o pcie_nvidia.o \
./common/Makefile.files:PCIE_MISC_OBJS+= pcie.o pcie_fault.o pcie_hp.o pciehpc.o pcishpc.o pcie_pwr.o
./common/Makefile.files:PCIEB_OBJS+= pcieb.o
./sparc/Makefile.files:PCIE_MISC_OBJS+=pcie_sparc.o
./sparc/Makefile.files:PCIEB_OBJS+=pcieb_sparc.o
./i86pc/Makefile.files:PCIE_MISC_OBJS+= pcie_acpi.o pciehpc_acpi.o pcie_x86.o
./i86xpv/Makefile.files:PCIE_MISC_OBJS+= pcie_acpi.o pciehpc_acpi.o pcie_x86.o
[allen@blu-xvm-osol:uts]find. -name Makefile\* | xargs grep PCIE_MISC_OBJS
./i86pc/pcie/Makefile:OBJECTS=$(PCIE_MISC_OBJS:%=$(OBJS_DIR)/%) \
./i86pc/pcie/Makefile:LINTS=$(PCIE_MISC_OBJS:%.o=$(LINTS_DIR)/%.ln) \
./i86pc/Makefile.files:PCIE_MISC_OBJS+= pcie_acpi.o pciehpc_acpi.o pcie_x86.o
./common/Makefile.files:PCIE_MISC_OBJS+= pcie.o pcie_fault.o pcie_hp.o pciehpc.o pcishpc.o pcie_pwr.o
./sparc/pcie/Makefile:OBJECTS=$(PCIE_MISC_OBJS:%=$(OBJS_DIR)/%) \
./sparc/pcie/Makefile:LINTS=$(PCIE_MISC_OBJS:%.o=$(LINTS_DIR)/%.ln) \
./sparc/Makefile.files:PCIE_MISC_OBJS+=pcie_sparc.o
./i86xpv/pcie/Makefile:OBJECTS=$(PCIE_MISC_OBJS:%=$(OBJS_DIR)/%) \
./i86xpv/pcie/Makefile:LINTS=$(PCIE_MISC_OBJS:%.o=$(LINTS_DIR)/%.ln) \
./i86xpv/Makefile.files:PCIE_MISC_OBJS+= pcie_acpi.o pciehpc_acpi.o pcie_x86.o

pcie is a misc module, it providesinterface to manipulate a pcie framework. There is no devinfo noderelated to this module, but you can find many reference call in otherdriver modules, such as npe we have just read.

153 /*
154  * modload support
155  */
156
157 static structmodlmisc modlmisc|= {
158|_______&mod_miscops,|__/* Type|of module */
159 |_______"PCIExpress Framework Module"
160 };
161
162 static structmodlinkage modlinkage = {
163 |_______MODREV_1,
164|_______(void|__*)&modlmisc,
165 |_______NULL
166 };

All the related files are stored underusr/src/uts/common/io/pciex/ and intel/io/pciex/.

[allen@blu-devl:uts]find./common/io/pciex/
./common/io/pciex/
./common/io/pciex/pcie.c
./common/io/pciex/hotplug
./common/io/pciex/hotplug/pcishpc.c
./common/io/pciex/hotplug/pcie_hp.c
./common/io/pciex/hotplug/pciehpc.c
./common/io/pciex/pcie_fault.c
./common/io/pciex/pcieb.h
./common/io/pciex/pcie_pwr.c
./common/io/pciex/pcieb.conf
./common/io/pciex/pcieb.c
[allen@blu-xvm-osol:uts]findintel/io/pciex/ -name \*.c
intel/io/pciex/pcie_nvidia.c(part of pci_autoconfig)
intel/io/pciex/hotplug/pciehpc_acpi.c
intel/io/pciex/pcieb_x86.c
intel/io/pciex/pcie_acpi.c

Objcet File
Function
pcie.o
The module definition, pcie main framework
pcie_fault.o
PCI/PCIe IO fabric errors handling
pcie_hp.o
Common hotplug code that is used by Standard PCIe and PCIHotPlug Controller code.
pciehpc.o
Standard PCI Express HotPlug functionality that is compatiblewith the PCI Express ver 1.1 specification.
pcishpc.o
PCI HotPlug functionality that is compatible with the PCI SHPCspecification 1.x.
pci_pwr.o
The power management functionality for pci express switch andpci express-to-
pci/pci-x bridge.
pcie_acpi.o
PCIe ACPI interfaces.
pciehpc_acpi.o
ACPI interface related functions used in PCIEHPC driver module.
pcie_x86.o
Platform related PCIe functions.


I won't dive into each object.
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表