Solaris的minor device
来源:互联网 发布:java开发微信公众号 编辑:程序博客网 时间:2024/06/01 11:06
A minor device is a "personality" of a major device. For example, on my
laptop, under /devices, we have:
drwxr-xr-x 6 root sys 13 Nov 25 21:48 pci@0,0/
crw------- 1 root sys 183, 255 Dec 26 20:44 pci@0,0:devctl
crw------- 1 root sys 183, 252 Dec 26 20:44 pci@0,0:intr
crw------- 1 root sys 183, 253 Dec 26 20:44 pci@0,0:reg
drwxr-xr-x 2 root sys 2 Dec 25 01:17 pci@2,0/
crw------- 1 root sys 86, 255 Dec 26 20:44 pci@2,0:devctl
crw------- 1 root sys 86, 252 Dec 26 20:44 pci@2,0:intr
crw------- 1 root sys 86, 253 Dec 26 20:44 pci@2,0:reg
pci@0,0:devctl, pci@0,0:intr, and pci@0,0:reg are all minor devices
of major device pci@0,0. When a minor device is opened, its
corresponding major device's driver is asked to service the call.
The driver, however, automatically gets an ID code which
differentiates the call from other "personalities".
In this particular example, we use the "intr" interface to manage
all the interrupts related ioctl calls, which would allow registered
interrupts to be displayed, or rerouted to different CPUs. The "reg"
interface is used by a pcitool-like applications to arbitrarily
read or write any device's register (obviously an extremely dangerous
but useful thing to do). The two interfaces reasonably separates
operations that are moderate from that are dangerous (helpful
in requiring certain credentials). Internally, the two interfaces
are implemented very differently since the "intr" interface need
to interact with the local APICs and "regs" deals with createing
VM mappings for device registers.
laptop, under /devices, we have:
drwxr-xr-x 6 root sys 13 Nov 25 21:48 pci@0,0/
crw------- 1 root sys 183, 255 Dec 26 20:44 pci@0,0:devctl
crw------- 1 root sys 183, 252 Dec 26 20:44 pci@0,0:intr
crw------- 1 root sys 183, 253 Dec 26 20:44 pci@0,0:reg
drwxr-xr-x 2 root sys 2 Dec 25 01:17 pci@2,0/
crw------- 1 root sys 86, 255 Dec 26 20:44 pci@2,0:devctl
crw------- 1 root sys 86, 252 Dec 26 20:44 pci@2,0:intr
crw------- 1 root sys 86, 253 Dec 26 20:44 pci@2,0:reg
pci@0,0:devctl, pci@0,0:intr, and pci@0,0:reg are all minor devices
of major device pci@0,0. When a minor device is opened, its
corresponding major device's driver is asked to service the call.
The driver, however, automatically gets an ID code which
differentiates the call from other "personalities".
In this particular example, we use the "intr" interface to manage
all the interrupts related ioctl calls, which would allow registered
interrupts to be displayed, or rerouted to different CPUs. The "reg"
interface is used by a pcitool-like applications to arbitrarily
read or write any device's register (obviously an extremely dangerous
but useful thing to do). The two interfaces reasonably separates
operations that are moderate from that are dangerous (helpful
in requiring certain credentials). Internally, the two interfaces
are implemented very differently since the "intr" interface need
to interact with the local APICs and "regs" deals with createing
VM mappings for device registers.
- Solaris的minor device
- Linux系统设备(device)的major和minor number
- Solaris device driver
- Writing Solaris Device Driver: Hardening Solaris Drivers
- Writing Solaris Device Driver: Device Context Management
- Writing Solaris Device Driver: DMA
- [Solaris-Driver]Device Address Mapping
- Writing Solaris Device Driver: Basic
- Writing Solaris Device Driver: Multithreading
- Writing Solaris Device Driver: Properties
- Solaris device driver development reference
- Writing Solaris Device Driver: Driver Autoconfiguration
- Writing Solaris Device Driver: Interrupt Handlers
- Writing Solaris Device Driver: Power Management
- Writing Solaris Device Driver: Layered Driver Interface
- Solaris x86, Device DMA, and the DDI
- How Solaris disk device names work
- Power Management interface for Solaris device driver
- 面试模拟题4
- IE6躲躲猫bug -IE6 Peekaboo Bug
- 面试模拟题5
- 我国公布整治互联网低俗之风第二批曝光网站名单
- 安装某个程序所需的依赖包
- Solaris的minor device
- 工程索引(Engineering Index, Ei)数据库中被《Ei Compendex》收录与被《Ei Pageone》收录数据的区别和识辨
- IIS上安装PHP
- Primary Key和Unique Key;UNION和UNION ALL 区别
- 高效稳定的大型网站系统架构分析
- 一个网管员的反黑之路:渗透+分析+反击
- sqlserver2005 SSIS 之Foreach容器
- 得奖了^_^,感谢大家一直以来的支持。
- mvn 学习总结.不断更新中....