From mj.ucw.cz/sw/pciutils we can get the code of lspci/setpci, which are two useful tools to debug PCIe related problems. This doc just introduces these two tools and also the sysfs interfaces which can be used in PCIe problem debug.
LDD3 study note 3
这篇笔记记录驱动程序中mmap的写法,以及相关的调试过程。同样代码在: https://github.com/wangzhou/scull.git
LDD3 study note 2
这篇文章在note1的基础上,进一步记录实现一个ioctl要注意的地方。相关的代码在: https://github.com/wangzhou/scull.git, tag: scull_2
LDD3 study note 1
LDD3的第三章介绍了一个简单的字符设备,实现了read/write/open/release等回调函数。 网上有LDD3自带的源代码,为了方便查找,我把官方源代码放到了: https://github.com/wangzhou/ldd3.git 自己实现的代码(第三章的简易字符设备)放在了:https://github.com/wangzhou/scull.git 本文只是记录一下实现中遇到的需要注意的地方,适合驱动入门的读者。
C语言bit操作
本文记录C语言位运算的一些corner
C语言volatile笔记
本文介绍C语言里的volatile关键词的使用方法。
git am 冲突解决技巧
本文记录一种遇到git am冲突时的解决办法
C语言嵌入ARM64汇编
本文介绍在C语言嵌入汇编语言的方法,linux kernel里有很多这样的例子。这里在aarch64 平台下介绍,所有例子都是这个平台下的。网上的这篇文章已经有很好的介绍,大家可以 参阅: http://www.ethernut.de/en/documents/arm-inline-asm.html, http://ericw.ca/notes/a-tiny-guide-to-gcc-inline-assembly.html https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html
Linux内核scatterlist用法
本文主要讲linux kernel里scatterlist的使用方法,有的设备驱动需要使用这个接口编程。 本文从设备的硬件结构,kernel scatterlist的原理,以及scatterlist API说明应该怎么 用这个接口, 很多是自己的初步理解。下面的两篇文章都是讲scatterlist的,可以参考看下: http://www.wowotech.net/memory_management/scatterlist.html https://lwn.net/Articles/234617/ lwn的文章讲的已经比较好了,wowo的文章讲了数据结构,但是基本上没有把逻辑讲完整。
Linux内核crypto子系统学习笔记
本文分析Linux kernel里crypto子系统的大概实现,写crypto子系统下的加速器驱动的时候 可以参考下。crypto子系统支持加解密,压缩解压缩等功能。