惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
V
V2EX
B
Blog RSS Feed
有赞技术团队
有赞技术团队
博客园 - Franky
美团技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
云风的 BLOG
云风的 BLOG
L
LangChain Blog
GbyAI
GbyAI
The Cloudflare Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Stack Overflow Blog
Stack Overflow Blog
博客园 - 【当耐特】
The Register - Security
The Register - Security
大猫的无限游戏
大猫的无限游戏
D
Docker
Vercel News
Vercel News
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
N
Netflix TechBlog - Medium
博客园_首页
A
About on SuperTechFans
J
Java Code Geeks
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
Recent Announcements
Recent Announcements
G
Google Developers Blog
小众软件
小众软件
博客园 - 叶小钗
WordPress大学
WordPress大学
博客园 - 聂微东
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
F
Full Disclosure
Jina AI
Jina AI
H
Help Net Security

博客园 - embed

TCP IP for embed system [zt]模拟视频 入门 UDP and TCP difference reference book list 2004年的最后一帖 mips的函数调用与堆栈 yuv2rgb 优化与优化工具 arm assembly note dsp编程学习 图象传感器厂家 一些电路的FAQ 算法的书 TCP的写 rtos's schedule algorithm c++ 学习 关于密码学方面的书 编译原理方面的书 算法的书
linux device driver study(chapter2)
embed · 2005-02-04 · via 博客园 - embed

User space and Kernel space
Unix transfers execution from user space to kernel space whenever an application

issues a system call

or is suspended by a hardware interrupt. Kernel code executing
a system call is

working in the context of a process

— it operates

on behalf of
the calling process and is able to access data in the process’s address space

. Code
that handles interrupts, on the other hand, is asynchronous with respect to processes
and is

not related to any particular process

.

Concurrency in the Kernel
(1)kernel code must be

reentrant

source of concurrency in kernel - device interrupt , mutiple process , several sortware abstract layer in kernel(such as timer)."

that mean if you modify some global date , you must first lock then modify? and "protect your static code when other call your driver interface."

one common mistake was to assume concurrence not a problem as segment code does not go to sleep.

"2.6 and 2.4 big different here",mean 2.4 will not be preempted by other until timer(scheduler?) or be blocked(access resource?)

Compiling and Loading
MODULE to define a modue
__KERNEL__ preprocessor to include some data struct which defined in kernel include file
inline vs -O
link -r =>relocable

Use Resources
memory can be obtained by kmalloc and release by kfree.
i/o memory ,port,interrupt has a role - to use it must first to require in order to ensure it was not used by elsewhere.

I/O Port and I/O Memory
proc/ioport,iomem

(x86 has seperate io/mem space ,while arm has a unify)

x86 - io-mapped, risc like arm m68k powerpc - io-mapped check_region is available to arm and other system?

good web: http://www.linuxforum.net/forum/showthreaded.php?Cat=&Board=linuxK&Number=341384&Search=true&Forum=All_Forums&Words=iomem&Match=Entire%20Phrase&Searchpage=0&Limit=25&Old=allposts&Main=341381