mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-28 12:05:59 +00:00
DM USB: introduce data structure and APIs for USB port mapper
Introduce the struct usb_dev which is used to abstract the physical USB devices. And APIs for external call are also provided. Change-Id: Ia25d52a6c670040da787f82b3bea34eee9f3d04d Signed-off-by: Wu, Xiaoguang <xiaoguang.wu@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Reviewed-by: Yu Wang <yu1.wang@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -24,6 +24,57 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* USB emulation designed as following diagram. It devided into three layers:
|
||||
* HCD: USB host controller device layer, like xHCI, eHCI...
|
||||
* USB core: middle abstraction layer for USB statck.
|
||||
* USB Port Mapper: This layer supports to share physical USB
|
||||
* devices(physical ports) to spcified virtual USB port of
|
||||
* HCD DM. All the commands and data transfers are through
|
||||
* Libusb to access native USB stack.
|
||||
*
|
||||
* +---------------+
|
||||
* | |
|
||||
* +----------+----------+ |
|
||||
* | ACRN DM | |
|
||||
* | +-----------------+ | |
|
||||
* | | HCD (xHCI) | | |
|
||||
* | +-----------------+ | |
|
||||
* | | | |
|
||||
* | +-----------------+ | |
|
||||
* | | USB Core | | |
|
||||
* | +-----------------+ | |
|
||||
* | | | |
|
||||
* | +-----------------+ | |
|
||||
* | | USB Port Mapper | | |
|
||||
* | +-----------------+ | |
|
||||
* | | | |
|
||||
* | +-----------------+ | |
|
||||
* | | Libusb | | |
|
||||
* | +-----------------+ | |
|
||||
* +---------------------+ |
|
||||
* Service OS User Space | User OS User Space
|
||||
* |
|
||||
* -------------------------- | ---------------------------
|
||||
* |
|
||||
* Service OS Kernel Space | User OS Kernel Space
|
||||
* |
|
||||
* | +-----------------+
|
||||
* | | USB Core |
|
||||
* | +-----------------+
|
||||
* | |
|
||||
* | +-----------------+
|
||||
* | | HCD |
|
||||
* | | (xHCI/uHCI/...) |
|
||||
* | +--------+--------+
|
||||
* | |
|
||||
* +-------------+
|
||||
* Current distribution:
|
||||
* HCD: xhci.{h,c}
|
||||
* USB core: usb_core.{h,c}
|
||||
* USB device: usb_mouse.c usb_pmapper.{h,c}
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
|
Reference in New Issue
Block a user