Skip to content

# 10.2. J6X PCIe软件架构与模块划分

## 10.2.1. 软件框架

PCIe软件框架分为RC和EP两个部分：

## 10.2.2. 驱动模块说明

驱动相关的源码在kernel/drivers/pci/controller/hobot目录下，各个模块的细节信息如下：

side | component | output | Source file
--- | --- | --- | ---
both | S13E01C01 PCIe basic driver | hobot-pcie-common.ko | hobot-ep-dev/hobot-pcie-common/
S13E01C03 PCIe controller driver | hobot-pcie.ko | hobot.c
S13E01C14 PCIe safety driver | hobot-pcie-stl.ko | hobot-pcie-stl/
RC | S13E01C02 PCIe device manager | hobot-pcie-dev-manager.ko | hobot-ep-dev/hobot-pcie-dev-manager
S13E01C04 PCIe RC controller driver | hobot-pcie-rc.ko | hobot-rc.c
S13E01C10 PCIe hybrid device driver | hobot-pcie-ep-dev.ko | hobot-ep-dev/hobot-pcie-ep-dev
S13E01C11 PCIe device wrapper |
S13E01C12 PCIe vnet device driver |
S13E01C13 PCIe AI device driver |
S13E01C05 PCIe EP controller driver | hobot-pcie-ep.ko | hobot-ep.c
EP | S13E01C06 PCIe function wrapper | hobot-pcie-ep-fun.ko | hobot-ep-fun/
S13E01C07 PCIe hybrid function driver |
S13E01C08 PCIe vnet function driver |
S13E01C09 PCIe AI function driver |

### 10.2.2.1. RC端模块的加载顺序

hobot-pcie-common.ko -> hobot-pcie.ko -> hobot-pcie-stl.ko -> hobot-pcie-rc.ko -> hobot-pcie-ep-dev.ko -> hobot-pcie-dev-manager.ko

### 10.2.2.2. EP端模块的加载顺序

hobot-pcie-common.ko -> hobot-pcie.ko -> hobot-pcie-stl.ko -> hobot-pcie-ep.ko -> hobot-pcie-ep-fun.ko

## 10.2.3. 用户态模块说明

用户态相关的源码在hbre目录下，各个模块的细节信息如下：

side | component | output | Source file
--- | --- | --- | ---
both | S13E01C15 PCIe user library | libhbpcie.so | libhbpcie/
S13E01C16 PCIe High Level API | libhbpciehl.so | libhbpciehl/