国产毛片a精品毛-国产毛片黄片-国产毛片久久国产-国产毛片久久精品-青娱乐极品在线-青娱乐精品

jrj317的個人空間 http://www.qingdxww.cn/space-uid-9104.html [收藏] [復制] [RSS]

博客

Platform Devices and Drivers

已有 1901 次閱讀2011-4-10 08:04 |

Platform Devices and Drivers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Platform devices
~~~~~~~~~~~~~~~~
Platform devices are devices that typically appear as autonomous
entities in the system. This includes legacy port-based devices and
host bridges to peripheral buses.

Platform drivers
~~~~~~~~~~~~~~~~
Drivers for platform devices are typically very simple and
unstructured. Either the device was present at a particular I/O port
and the driver was loaded, or it was not. There was no possibility
of hotplugging or alternative discovery besides probing at a specific
I/O address and expecting a specific response.

Other Architectures, Modern Firmware, and new Platforms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These devices are not always at the legacy I/O ports. This is true on
other architectures and on some modern architectures. In most cases,
the drivers are modified to discover the devices at other well-known
ports for the given platform. However, the firmware in these systems
does usually know where exactly these devices reside, and in some
cases, it's the only way of discovering them.

The Platform Bus
~~~~~~~~~~~~~~~~
A platform bus has been created to deal with these issues. First and
foremost, it groups all the legacy devices under a common bus, and
gives them a common parent if they don't already have one.
But, besides the organizational benefits, the platform bus can also
accommodate firmware-based enumeration.

Device Discovery
~~~~~~~~~~~~~~~~
The platform bus has no concept of probing for devices. Devices
discovery is left up to either the legacy drivers or the
firmware. These entities are expected to notify the platform of
devices that it discovers via the bus's add() callback:
 platform_bus.add(parent,bus_id).

Bus IDs
~~~~~~~
Bus IDs are the canonical names for the devices. There is no globally
standard addressing mechanism for legacy devices. In the IA-32 world,
we have Pnp IDs to use, as well as the legacy I/O ports. However,
neither tell what the device really is or have any meaning on other
platforms.
Since both PnP IDs and the legacy I/O ports (and other standard I/O
ports for specific devices) have a 1:1 mapping, we map the
platform-specific name or identifier to a generic name (at least
within the scope of the kernel).
For example, a serial driver might find a device at I/O 0x3f8. The
ACPI firmware might also discover a device with PnP ID (_HID)
PNP0501. Both correspond to the same device and should be mapped to the
canonical name 'serial'.
The bus_id field should be a concatenation of the canonical name and
the instance of that type of device. For example, the device at I/O
port 0x3f8 should have a bus_id of "serial0". This places the
responsibility of enumerating devices of a particular type up to the
discovery mechanism. But, they are the entity that should know best
(as opposed to the platform bus driver).

Drivers
~~~~~~~
Drivers for platform devices should have a name that is the same as
the canonical name of the devices they support. This allows the
platform bus driver to do simple matching with the basic data
structures to determine if a driver supports a certain device.
For example, a legacy serial driver should have a name of 'serial' and
register itself with the platform bus.

Driver Binding
~~~~~~~~~~~~~~
Legacy drivers assume they are bound to the device once they start up
and probe an I/O port. Divorcing them from this will be a difficult
process. However, that shouldn't prevent us from implementing
firmware-based enumeration.
The firmware should notify the platform bus about devices before the
legacy drivers have had a chance to load. Once the drivers are loaded,
they driver model core will attempt to bind the driver to any
previously-discovered devices. Once that has happened, it will be free
to discover any other devices it pleases.
 

路過

雞蛋

鮮花

握手

雷人

評論 (0 個評論)

facelist

您需要登錄后才可以評論 登錄 | 立即注冊

關于我們  -  服務條款  -  使用指南  -  站點地圖  -  友情鏈接  -  聯系我們
電子工程網 © 版權所有   京ICP備16069177號 | 京公網安備11010502021702
返回頂部
主站蜘蛛池模板: 一区二区精品在线观看 | 国产手机在线小视频免费观看 | 天使萌一区二区三区免费观看 | 日本高清一二三区 | 亚洲国产一区二区三区精品 | 亚洲黄色片免费看 | 欧美在线a | 国产日韩欧美在线一二三四 | 久久精品国产2020 | 特黄a大片免费视频 | 欧美国产大片 | 美国大片免费30分钟 | 亚洲大胆美女人体一二三区 | 久热精品视频在线播放 | 二级片免费看 | 在线动漫网站 | 永久天堂| 欧区一欧区二欧区三免费 | 中文字幕精品一区二区三区在线 | 国产在线视频一区二区三区 | 51国产午夜精品免费视频 | 永久影院 | 今野由爱毛片在线播放 | 综艺在线看免费高清 | 日韩日日操| 久久综合九色综合国产 | 欧美日韩一区二区三区在线视频 | 日本不卡一区二区三区四区 | 成人伊人青草久久综合网 | 香蕉网址 | 字幕网yellow 91在线 | 亚洲国产二区三区久久 | 在线观看国产精美视频 | 日韩女同| 久久精品六 | 欧美69精品国产成人 | 韩国一级片免费 | 极品毛片| 99热成人 | 91在线播放免费不卡无毒 | 手机看片国产高清 |