I'm trying to settle a debate with a friend of mine about how the OS communicates with the hardware (get the CD tray to eject, disable the ethernet card, play sound, etc).
He says it's through the BIOS, always. I shot that down because everything I've read tells me this can only be done in real mode, and it's kep[t quite basic, so you can't use the full power of the hardware.
I said that it's direct communication with the device through the system bus. Load your information, signal the device, let it do it's thing and wait for the result.
Can anyone post what actually happens?
Thanks,
How does the kernel communicate with the hardware
Moderator:Moderators
You should just ask your friend what the IN and OUT instructions are for
You got the basic idea. When the processor executes an IN or OUT instruction, the cpu sets the IO RW line (I forget the exact name for this line atm) in the control bus and puts the data on the data bus and port address on the address bus. With the IO RW line set, the southbridge takes the port number and the device that is using the port number works with the data in some way depending on the register the port corresponds to.
During bootup, the BIOS initializes the onboard controllers and creates the IO port address space for the southbridge.
This is my understanding of it, anyways. If there are any errors or additional information I will be glad to hear it
You got the basic idea. When the processor executes an IN or OUT instruction, the cpu sets the IO RW line (I forget the exact name for this line atm) in the control bus and puts the data on the data bus and port address on the address bus. With the IO RW line set, the southbridge takes the port number and the device that is using the port number works with the data in some way depending on the register the port corresponds to.
During bootup, the BIOS initializes the onboard controllers and creates the IO port address space for the southbridge.
This is my understanding of it, anyways. If there are any errors or additional information I will be glad to hear it