Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
virtual-dev-docs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Moritz Knaut
virtual-dev-docs
Commits
27fdd2c5
There was a problem fetching the pipeline summary.
Commit
27fdd2c5
authored
9 years ago
by
Moritz Knaut
Browse files
Options
Downloads
Patches
Plain Diff
* Added some informations about the intervation_points.
parent
b0419133
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/intervention_points
+77
-0
77 additions, 0 deletions
docs/intervention_points
with
77 additions
and
0 deletions
docs/intervention_points
0 → 100644
+
77
−
0
View file @
27fdd2c5
For now using stable kernel v4.5.2
######### GLOBAL:
### How does Linux notice that there is a new device?
This differs from device type to device type. For PCI Devices e.g. the kernel
asks the pci interface driver for connected devices (see ???).
The Kernel then generates a udev event.
### How to make linux kernel load driver even when no hw is available?
Linux kernel loads the module but how to make the kernel 'activating'
this driver for not existing hardware?
TODO...
#### How does Linux decide which driver to load for a new device?
Kernel generates events (device uevents) with information abount device
and udev searches for driver with matching PID/VID(product,vendor).
Then udev loads the driver and creates device node.
######### USB:
### What abstraction layer can be used to supply virtual usb devices?
For USB we need to create a interface where usb devices can be registered.
There are three(?) possible places where this can be done.
1.) Create driver for own USB Controller and ensure that this driver is executed.
(By tricking the kernel into thinking there is a new controller?)
2.) Create driver for own USB Hub and ensure that this driver is executed.
(By tricking a usb controller into thinking there is a new device?)
3.) Trick usb controller into thinking that there is new device which redirects all the
calls from the usb driver to userspace.
For all:
TODO: How is connection between driver and usb device?
### 1.) USB Controller:
There are different USB Controller types:
ohci = usb1.1
uhci = usb1.x
ehci = usb2.0
xhci = usb1.x - usb3.0
Because we want to be able to simulate different usb devices we use a XHCI controller because
it has the ability to control all usb devices.
Drivers for usb controllers are in:
drivers/usb/host/...
e.g. drivers/usb/host/xhci-plat.c
### 2.) USB Hubs:
Probably we could foist a virtual usb hub to one of the real usb controllers.
TODO: Where does the Controller store his devices?
TODO: Where are the drivers for usb hubs?
### 3.) USB Devices
TODO: Where does the Controller store his devices?
TODO: How to redirect calls from driver?/ Where are driver calls going to?
######### Other devices
For other devices the only possibility is to use the 'top driver layer' (blockio/chario)
because underneath there is only the device driver which does direct hw access (in,out).
We have to create a new module and register a own device driver with
int register_chrdev(unsigned int major, const char *name, struct file_operations *fops);
int register_blkdev(unsigned int major, const char *name)
TODO: How to let the kernel load this driver??
# Character devices
Only possible over the top character device layer (ioctl, read, write) [or by overriding in/out]
# Block devices
Only possible over the top block device layer (blockio) [or by overriding in/out]
######### Network interface:
TODO
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment