Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| drivers [2018/05/18 09:31] – [Kernel memory allocation] admin | drivers [2018/05/18 09:53] (current) – [Debugging] admin | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| * dma_alloc_coherent | * dma_alloc_coherent | ||
| * dma_alloc_sg | * dma_alloc_sg | ||
| - | * contiguous memory (CMA, ION) | + | * contiguous memory |
| Debugging features: | Debugging features: | ||
| Line 29: | Line 29: | ||
| An issue with I/O memory accesses is memory reordering, which may require memory barriers (rmb(), wmb(), mw()). | An issue with I/O memory accesses is memory reordering, which may require memory barriers (rmb(), wmb(), mw()). | ||
| + | ===== User space memory handling ===== | ||
| User-space applications can access physical addresses directly through /dev/mem. | User-space applications can access physical addresses directly through /dev/mem. | ||
| + | |||
| + | * Process heap (sbrk, brk) | ||
| + | * Direct/ | ||
| + | * Allocators (malloc, calloc, realloc, free) | ||
| + | |||
| ====== Modules ====== | ====== Modules ====== | ||
| Line 103: | Line 109: | ||
| Threaded interrupts are executed inside a thread (allows to block inside the handler). There is support for interrupt handler execution priority. | Threaded interrupts are executed inside a thread (allows to block inside the handler). There is support for interrupt handler execution priority. | ||
| + | |||
| + | UIO allows the handling from interrupt in user space. | ||
| ====== Concurrency ====== | ====== Concurrency ====== | ||
| The kernel lock validator is an useful tool to detect violations of locking rules during system life. Alternatives to locking are the use of lock-free algorithms (e.g. read copy update, RCU) or atomic operations (.e.g. atomic_set/ | The kernel lock validator is an useful tool to detect violations of locking rules during system life. Alternatives to locking are the use of lock-free algorithms (e.g. read copy update, RCU) or atomic operations (.e.g. atomic_set/ | ||
| + | ===== Semaphores ===== | ||
| ===== Mutexes ===== | ===== Mutexes ===== | ||
| Line 132: | Line 141: | ||
| * Kernel markers | * Kernel markers | ||
| * LTTng with LTTV | * LTTng with LTTV | ||
| + | * printk | ||
| + | * kernel configs | ||
| + | * debugfs/ | ||
| + | * ftrace | ||
| + | * Kdb | ||
| + | * Kgdb | ||
| + | * jtag + gdb | ||
| + | * emulation (QEmu) | ||
| + | Userspace: | ||
| + | * printf | ||
| + | * strace | ||
| + | * ltrace | ||
| + | * valgrind | ||
| + | * gdb | ||
| ====== Userspace drivers ====== | ====== Userspace drivers ====== | ||
| http:// | http:// | ||