标签:传输 root this stat type sch call port tran
本文简要介绍一下UEFI中EHCI的代码实现框架:
下图是HCDI:
下图是EHCI驱动初始化的流程:
下面简要分析一下上面两张图:
接口图:
1.大部分接口的最后动作都是去操作寄存器,ECHI的spec:《ehci-specification-for-usb.pdf》;
2.寄存器PORTSC用来获取/设置端口的状态(这里表示root hub的端口),root hub有几个port,这里就会有几个对应的寄存器(根据硬件厂商自己的实现);
3.图中出现了2个链表是由硬件自己维护的,链表位于内存的地址由相关寄存器指定,驱动程序把要发送的数据写到这里,硬件会自动执行发送;
初始化流程图:
1.定义了一个定时器,这样在驱动程序初始化完成后,会有一个函数周期执行,用来查询异步中断传输队列;
(参考UEFI spec中的这句话:An Asynchronous Interrupt Transfer is typically used to query a device’s status at a fixed rate. For example, keyboard,mouse, and hub devices use this type of transfer to query their interrupt endpoints at a fixed rate.)后面我们会发现,在初始化HUB、KB这些device的时候会调用到AsyncInterruptTransfer()来把数据添加到periodic schedule frame list。
标签:传输 root this stat type sch call port tran
原文地址:http://www.cnblogs.com/nju347/p/7810929.html