IDE驱动分析.pdf

  1. 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
IDE驱动分析.pdf

IDE 驱动分析 本次分析以 linux2.6.32 内核为基础,重点分析ide 硬盘驱动的实现。通过前面 子系统的分析,不难发现任何一个底层驱动的实现都离不开其他内核模块的支持。 同时内核对各个模块的加载有着一定的先后顺序,要想对一个子系统进行深入分析, 首先必须对整个子系统的构架有个充分的了解,更通俗的来讲就是当使用 make menuconfig 来配置内核模块的时候,要清楚的知道这些 module 之间的层次关系, 以及这些module 分别对应于内核中的那些.c 文件。而这些信息也正是由kconfig 和 makefile 文件得到的。具体到 ide 硬盘驱动,我们首先来看看/driver/ide 目录下的 kconfig 文件…. menuconfig IDE tristate ATA/ATAPI/MFM/RLL support depends on HAVE_IDE depends on BLOCK if IDE …. … endif # IDE 也就是说这里的IDE 是一切ide 驱动的基础,对应到文件就是ide-core.c ide.o ide-ioctls.o ide-io.o ide-iops.o ide-lib.o ide-probe.o \ ide-taskfile.o ide-pm.o ide-park.o ide-sysfs.o ide-devsets.o \ ide-io-std.o ide-eh.o 然后就到了硬盘驱动的配置: config IDE_GD tristate generic ATA/ATAPI disk support ,对应到makefile 中的文件就是ide-gd.c、 ide-gd_mod.c config CONFIG_IDE_GD_ATA 对应到 makefile 中的文件就是 ide-disk.o ide-disk_ioctl.o 最后,就是与硬件平台相关的了,对于ARM 体系结构,属于generic IDE driver , 同样对应的文件即是ide-generic.o config IDE_GENERIC tristate generic/default IDE chipset support depends on ALPHA || X86 || IA64 || M32R || MIPS || ARCH_RPC || ARCH_SHARK default ARM (ARCH_RPC || ARCH_SHARK) help This is the generic IDE driver. This driver attaches to the fixed legacy ports (e.g. on PCs 0x1f0/0x170, 0x1e8/0x168 and so on). Please note that if this driver is built into the kernel or loaded before other ATA (IDE or libata) drivers and the controller is located at legacy ports, this driver may grab those ports and thus can prevent the controller specific driver from attaching. Also, currently, IDE generic doesnt allow IRQ sharing meaning that the IRQs it grabs wont be available to other controllers sharing those IRQs which usually makes drivers for those controllers fail. Generally, its not a good idea to load IDE gener

文档评论(0)

dlmus + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档