Coder Social home page Coder Social logo

xhci_uio's Introduction

xhci_uio

Simple implementation of xHCI (USB3.0 Host Controller) Linux usermode driver (and keyboard driver for demo)

HOWTO

!! You should use SSH. !!

setup environment

This script downloads linux kernel source and builds uio kernel module. It will work on Ubuntu 14.04 or later.

$ wget https://raw.githubusercontent.com/PFLab-OS/Raph_Kernel_devenv_box/master/uio.sh
$ chmod +x uio.sh
$ ./uio.sh

Identify vendor ID and bus number

$ lspci | grep xHCI
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)

In this case, bus id of xHCI is 00:14.0.

awamoto@ubuntu:~$ lspci -n
00:02.0 0380: 8086:191d (rev 06)
00:14.0 0c03: 8086:a12f (rev 31)
00:14.2 1180: 8086:a131 (rev 31)
00:16.0 0780: 8086:a13a (rev 31)

You now know the vendor ID is 8086:a12f. (See the entry of 00:14.0)

Edit the Makefile.

load:
	sudo modprobe uio_pci_generic
	sudo sh -c "echo '8086 a12f' > /sys/bus/pci/drivers/uio_pci_generic/new_id"   <-- vendor ID
	sudo sh -c "echo -n 0000:00:14.0 > /sys/bus/pci/drivers/xhci_hcd/unbind"      <-- bus ID
	sudo sh -c "echo -n 0000:00:14.0 > /sys/bus/pci/drivers/uio_pci_generic/bind" <-- bus ID

Complie and Run.

$ make load
$ make run

Enjoy!

image

Future Work

  • Bulk / Isoch Transfers
  • Segmented Rings
  • Multi Interrupters

xhci_uio's People

Contributors

liva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.