I think I understand the basic principles of OS, kernel, BIOS, and drivers. But I can't finish understanding how all of these components communicate.
My doubt comes from how the OS ultimately communicates with a device connected to the motherboard. I understand that the OS must have a driver to communicate with said device. But ultimately a driver is Machine Code, a set of instructions that the CPU can understand.
But how can this set of instructions, which only has to do with the CPU's architecture, communicate with something out of that architecture? I've read that the BIOS might map some register that will be read/written by the device. But that arose another doubt, is the BIOS standardized? Or are each OS or Driver adapted to each kind of BIOS and the mapping of those special registers to communicate with the devices connected to the motherboard?
I cant seem to put my finger on these topic, maybe i cant formulate a well crafted search on Google. Further reading material on those subjects would be greatly appreciated.