Linux Drivers notes
Linux Drivers notes
Block vs. Char Devices: Both are accessed via nodes in /dev. The
key distinction is how data is managed internally by the kernel.
Block devices typically handle I/O in fixed-size blocks (often 512
bytes or larger multiples), while char devices permit transfer of any
number of bytes at a time. Although Linux allows applications to
read/write block devices like character devices the core differences
mean they have completely different kernel interfaces.
2. Module Development
4. Debugging Techniques
8. Memory Allocation
kmalloc: Discusses the real story of kmalloc (as it is not always the
best way to allocate memory).
Explicit Sizing: It is important to use fixed size data types like u8,
u16, u32, and u64 instead of the more general types like int to
ensure portability across different architectures.
PCI Interface: Discusses the PCI bus and how to access hardware
on it. Mentions other PC buses such as ISA, PC/104, SBus and
NuBus.
USB Device Model: Discusses how USB devices are exposed via
sysfs.
Direct I/O: How to perform I/O operations directly into user space
buffers.
TTY Line Settings: How TTY devices are configured (e.g., baud
rate, parity)