Chinaunix首页 | 论坛 | 博客
  • 博客访问: 136514
  • 博文数量: 42
  • 博客积分: 2521
  • 博客等级: 少校
  • 技术积分: 440
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-31 21:29
文章分类

全部博文(42)

文章存档

2011年(1)

2010年(33)

2009年(8)

我的朋友

分类: LINUX

2009-09-25 21:44:36

~frey/linux/

Linux Device Drivers Examples

Purpose

The examples below show some code and explanations to solve various problems with Linux device drivers that I run into while writing drivers for our development projects.

Mapping Memory to user space

shows how to map vmalloc() allocated memory from a device driver to user space.
It contains a function virt_to_kseg() that calculates the address in the 1:1 virtual to physical mapping kernel virtual memory view out of a general kernel virtual memory address. This function can also be useful e.g. to do DMA into such an address.

Starting and Stopping Kernel Threads

shows how to start and stop kernel threads in a loadable module.
阅读(748) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~