Results 1 to 5 of 5
Hi all,
I had been looking at the sdio kernel driver code. I can see the module will be included in the kernel. But how will the kernel know, what ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-11-2010 #1Just Joined!
- Join Date
- Oct 2009
- Location
- Cambridge, UK
- Posts
- 15
How does kernel recognise a new devise inserted?
Hi all,
I had been looking at the sdio kernel driver code. I can see the module will be included in the kernel. But how will the kernel know, what hardware is connected and which driver to be invoked.? The answer need not be specific to SDIO. Please answer if you can help with any hardware. I just want to learn how it works.
Cheers,
Tony
- 02-12-2010 #2
I believe hald is what does this
HAL (software) - Wikipedia, the free encyclopedia
- 02-12-2010 #3Just Joined!
- Join Date
- Oct 2009
- Location
- Cambridge, UK
- Posts
- 15
Hi coopstah13,
Thank you for the link. The link was informative. But the information there is also incomplete. It still does not say how the HAL layer knows what hardware is connected, and how it invokes the correct driver. But the wiki page says, HAL is becoming obsolete, at present we use udev and devicekit is the future.
But udev is described as an deamon which listens for uevents from the kernel. The uvevents are issued by the kernel after the hardware initialisation happens. But how does the kernel know how to initialise the hardware and what hardware it is dealing with?
I am sure there are lot of kernel experts who can explain how it works.
Thanks in advance,
TonyLast edited by tonysonney; 02-12-2010 at 02:30 PM. Reason: to make more readable
- 02-14-2010 #4
when a device is connected, the kernel recognizes it somehow. that somehow i think depends on if the buss its connected on can support hotplugging. if you do lspci you can see vendor information about the devic,e and i think based on this vendor string and the bus location, the kernal creates an internal representation of it. then it lets udev create a file representing the device. hal is just a library that holds information about the dives, and it bases it on the kernal info and any udev scripts you may have made.
nVidia G-Force 6600GT (bfg) pci-e: amd 64 2000+ (939): 1024 corsair ram: 2X 80gb seagate harddisk SATA: plextor cd/dvd-read/write cdrom SATA
- 02-21-2010 #5Just Joined!
- Join Date
- Feb 2010
- Location
- Bangalore
- Posts
- 2
Hai Tony,
I am giving some information which i know regarding your doubt.
You need to remember the boot process. In kernel initialization process the devices are detected and device drivers are loaded and initialized. So that the kernel needs the device driver information (Which is nothing but an machine code). For example, when we need to use printer which is externally connected to the computer machine, we suppose to install the device driver of the printer to computer machine. so printer driver information is the key to understand it by the kernel. Once the driver information installed ( nothing but the driver information will be load on the kernel only), then the device table will be updated ( HAL table). Each device will send a response to OS during BIOS initialization.
I hope that my information may clear your doubt.
reply me if you need more information regarding this.
Thanking you


Reply With Quote
