2

I am a bit confused on where the drivers come from or are developed for motherboard peripherals? Ex, USB, Sound or Ethernet controllers?

Basically from my understanding the x86/64 programmers reference manual doesn't detail these things.

How did the developer of the driver know how to interface with the device at a register level?

FourierFlux
  • 137
  • 3
  • 1
    The manufacturer of a motherboard does not always provide Linux drivers for everything in the motherboard, for example wifi. – karel Jan 01 '22 at 09:19
  • 1
    Are you looking for a user level answer ("how do I know if a particular computer will run a Linux-based system?") or a developer's answer ("how do I write a driver for this wild new piece of hardware I've got?")? – roaima Jan 01 '22 at 11:03
  • It's worth noting that drivers are generally for a specific chipset or group of chipsets. When a motherboard has onboard Ethernet, it's not going to have a brand new Ethernet chipset just for that motherboard. There may not be any plug and socket between the chip and the motherboard, but it's the same chip with the same wires into the same interface (PCIE, USB, ...). – Philip Couling Jan 01 '22 at 13:46

3 Answers3

3

All drivers are developed based on datasheets. Whenever a company manufactures a device it produces full documentation regarding wiring & programming details unless the device is announced fully compliant with some already established standard.

See for example the documentation available for Intel's ICH10 component of many motherboards.

This documentation is not necessarily available for free.

And is sometimes not made available at all. (See Nvidia (and Linus' famous rant) or ATI (see Stallman famous demonstrations)) When the manufacturer argues that making the documentation available would reveal their manufacturing secrets.

In this particular case, the manufacturer generally produces the driver for the dedicated operating system in a closed binary form only.

There is then no option for other devs apart from trying to reverse engineer the code.

MC68020
  • 6,281
  • 2
  • 13
  • 44
  • I have no idea why this question was closed but stackexchanges often have mental mods, anyway - how do you even know how the device is hooked up within the motherboard though? At its most basic level a processor can load and store memory locations which in the case of peripherals are the registers of the peripheral. The issue I am having is understanding how for example, the hookups between motherboard were even found out. – FourierFlux Jan 01 '22 at 22:03
  • @FourierFlux the question has been closed for tricky reasons in this instance. Personally I see your question as a reasonable one the way I interpreted it, but there is a rule specific to this forum that we don't allow questions just asking for help finding documentation. Unfortunately **one interpretation** of your question is "where do I find the manual for..." and it's been closed as a result. – Philip Couling Jan 02 '22 at 00:43
  • @FourierFlux Perhaps you are searching for the wrong thing. You mention in your question "USB, Sound or Ethernet controllers" but then in comments talk about memory locations. Discussion of memory locations and CPU "Ports" would be a topic for PCI (or PCIE). PCI is standardised on x86 and should be documented in intel manuals and data sheets. PCI itself allows device discovery so figuring out how the ethernet is wired in is more a matter of [PCI Bus Enumeration](https://en.wikipedia.org/wiki/PCI_configuration_space#Bus_enumeration) than trawling through manuals and datasheets. – Philip Couling Jan 02 '22 at 01:24
  • It's not even clear to me how it's known the devices run off PCI or not...again they are closed source as far as I know. – FourierFlux Jan 02 '22 at 02:39
  • @FourierFlux look at another way. What other choices does a motherboard manufacturer have? There aren't many alternatives to PCI into an X86 CPU. A motherboard manufacturer can't add extra wires into a CPU even if they wanted to. X86 standards limits their choices a lot. The story is quite different for ARM CPUs where the CPUs are often manufactured with custom interfaces, eg with Ethernet and USB built into the same the CPU. – Philip Couling Jan 02 '22 at 10:09
  • 1
    @FourierFlux please don't call mods mental for no reason! No moderator was involved in closing this question. It was closed by regular members of the community and in fact a moderator (me) reopened it since it isn't in any way a request for external resources. next time you have a disagreement with an action performed on the site, please flag it for moderator attention instead of resorting to name calling. – terdon Jan 03 '22 at 12:33
  • Thanks, I appreciate your help, sorry. – FourierFlux Jan 03 '22 at 20:36
0

Motherboard in itself does not need any drivers because it's basically something which holds standards components, like CPU, RAM, PCI-E slots, onboard devices, etc. and they all communicate using standards protocols which are initialized on boot and managed by the kernel via the CPU.

And all these components are shared between motherboard manufactures, they are all pretty standard and in most cases have datasheets which allow to "talk" to them, i.e. to work with them via drivers. Some devices are poorly documented or have no datasheets, that's why Linux struggles to support them, e.g. lots of hardware monitoring chips are barely or not supported by Linux.

When you install "motherboard drivers" in Windows, you do not install "motherboard" drivers, you install drivers for individual devices which the motherboard contains.

Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64
  • I'm curious who's so eager to downvote this answer despite it being factual and answering all the posed questions. – Artem S. Tashkinov Jan 01 '22 at 17:16
  • 1
    Perhaps because all those things, do have drivers. It's just that they are built into the kernel. Even the cpu requires a `driver` to initialise it and to handle events. Protocols require drivers. – Bib Jan 01 '22 at 19:40
  • If we are to talk about (the linux) kernel modules, then, no, the CPU doesn't need one, it's the core of the booted vmlinuz. – Artem S. Tashkinov Jan 01 '22 at 22:24
  • I never mentioned modules, just the kernel. However, modules can be built into the kernel. There is also a difference between _need_ and _required to provide functionality_. There'e a whole lot of driver code which handles crc, crypto, hyper-v and other virtual requirements, switching of modes, and a whole lot of others, Some of these are built as modules and some baked into the core kernel file. Some are for traditional cpus, and some are for soc's. I'm sorry, but your pedantry is wrong. – Bib Jan 01 '22 at 22:43
  • there's a lot of downvotes going round on this question I can't speak for why. The way this answer scans, it seems like you are saying motherboards don't need drivers and it's all standardised. The OP specifically used the example "peripherals... USB, Sound or Ethernet controllers" where both sound and ethernet can be annoyingly exotic and require special drivers. I can't be sure but I wonder if someone saw a mismatch between the OP's question and the one this seems to try to answer. – Philip Couling Jan 02 '22 at 02:25
-3
  1. In GNU/Linux motherboards hasn't drivers, you don't need it.

Resource: https://www.quora.com/If-a-motherboard-has-no-Linux-drivers-what-problems-might-occur-when-installing-and-using-Linux

  1. Drivers developed for devices like keyboard, mouse etc and like what you said, so yes
Ali Koca
  • 1
  • 1
  • 1
    I edited, but still don't know answer of third paragraph. – Ali Koca Jan 01 '22 at 09:34
  • Sorry, but they do have _modules_ which are the equivalent of "drivers" in the Windows world, they are just commonly packaged as part of the kernel so the user doesn't need to worry about them. – terdon Jan 03 '22 at 12:36