PCI & PCIE (on-going)

Terms
DLLP : Data Link Layer Packet
LTSSM: Link Training and Status state Machine
TLP : Transaction Layer Packet

Wiki
https://wiki.osdev.org/PCI#The_PCI_Bus
Background
https://blog.csdn.net/zuowanbishe/article/details/86751577

概念
Lagacy PCIe Endpoint是指那些原本准备设计为PCI-X总线接口的设备,但是却被改为PCIe接口的设备。
Native PCIe Endpoint则是标准的PCIe设备。其中,Lagacy PCIe Endpoint可以使用一些在Native PCIe Endpoint禁止使用的操作,如IO Space和Locked Request等。Native PCIe Endpoint则全部通过Memory Map来进行操作,因此,Native PCIe Endpoint也被称为Memory Mapped Devices(MMIO Devices)。

PCIE 地址空间区别(内存/IO/配置)
https://www.cnblogs.com/yangxingsha/p/11551472.html

PCI设备讲解1
https://www.cnblogs.com/ck1020/p/5942703.html

PCIe扫盲系列
http://blog.chinaaet.com/justlxy/p/5100053251

枚举过程
https://www.cnblogs.com/szhb-5251/p/11620310.html
https://www.cnblogs.com/zxc2man/articles/4678340.html

LTSSM状态机
https://mp.weixin.qq.com/s?__biz=MzIwNTUxNDgwNg==&mid=2247484932&idx=1&sn=b418f541865fcb3cbc6a6a9207a7688b&chksm=972ef75da0597e4bc6f74bd347f9d074e5ede646f22de214b993a43f57d70491f563b01e83af&scene=21#wechat_redirect

基地址寄存器(BAR)详解
http://blog.chinaaet.com/justlxy/p/5100053320

LinuxPCI 设备讲解
https://www.cnblogs.com/ck1020/p/5943593.html
pci_scan_root_bus
https://www.cnblogs.com/ck1020/p/5994433.html

linux PCI-PCIE初始化总结
https://blog.csdn.net/shipinsky/article/details/88780025?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-2&spm=1001.2101.3001.4242
参考文档:
device tree中对PCIe的描述
https://blog.csdn.net/ambercctv/article/details/53762753 ***
linux 下PCIE控制器设备树 学习
https://blog.csdn.net/wstpt/article/details/75040656
理解linux pci 扫描流程
https://blog.csdn.net/mao0514/article/details/75505425?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_baidulandingword-3&spm=1001.2101.3001.4242
https://blog.csdn.net/moon146/article/details/18988849

地址空间映射:
#address-cells = <0x3>; //指ranges中PCIe地址域包含3个32位数值,第一个(0x2000000)指示是I/O,mem或ECAM
#size-cells = <0x2>; //指长度域中包含2个32数
ranges = <0x2000000 0x0 0xe1000000 0x0 0xe1000000 0x0 0xf000000>;
这个属性表示了PCIe地址空间和CPU地址空间的地址映射关系
PCIe:内存地址0x00000000_0xe1000000映射到CPU 0x00000000_0xe1000000地址,映射长度是0x00000000_0F000000

配置空间
桥设备和普通设备的配置空间内容不一样
桥设备的配置空间需要说明pci总线的拓扑,内存映射的地址范围等等
普通设备的配置空间需要说明该设备 内存映射的地址范围,pci的中断号等等

PCIe 配置空间读写内核实现(Linux软件)
https://blog.csdn.net/YuZhiHui_No1/article/details/47278995?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2.not_use_machine_learn_pai&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromBaidu-2.not_use_machine_learn_pai

Type0 & Type1 型配置(配置请求传递)
http://blog.chinaaet.com/justlxy/p/5100053245
https://blog.csdn.net/kunkliu/article/details/94380235

读取linux系统中所有PCI设备的64bytes配置空间信息
lspci -x

PCIE设备驱动
https://blog.csdn.net/fengyv/article/details/813775
https://blog.csdn.net/hpu11/article/details/81876366

struct msm_gpu_funcs {
int (*get_param)(struct msm_gpu *gpu, uint32_t param, uint64_t *value);
int (*hw_init)(struct msm_gpu *gpu);
int (*pm_suspend)(struct msm_gpu *gpu);
int (*pm_resume)(struct msm_gpu *gpu);
void (*submit)(struct msm_gpu *gpu, struct msm_gem_submit *submit,
struct msm_file_private *ctx);
void (*flush)(struct msm_gpu *gpu);
irqreturn_t (*irq)(struct msm_gpu *irq);
uint32_t (*last_fence)(struct msm_gpu *gpu);
void (*recover)(struct msm_gpu *gpu);
void (*destroy)(struct msm_gpu gpu);
#ifdef CONFIG_DEBUG_FS
/
show GPU status in debugfs: */
void (*show)(struct msm_gpu *gpu, struct seq_file *m);
#endif
};

Linux PCI设备驱动的实现思路与思想
https://www.cnblogs.com/zhouhaibing/p/7898792.html

协议摘录与介绍
1.Transaction Layer
TLP format

1.1 packet header fields

在这里插入图片描述

(P58 in PCI Express 3.0 Specification)

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值