Most device drivers are more or less independent of CPU architecture. A PCI card is going to be the same PCI card no matter whether it's running on x86, Power, RISC-V or anything else.
Device drivers don't execute on the device. They execute on the CPU, instructing the OS how to use the device. So device drivers do need to support both the CPU architecture and the OS platform.
They may need compiled to a specific architecture, but the actual driver code itself is pretty device-independent. Unless you're doing something like implementing your own bus instead of using something like PCI, aside from weird corner cases, the code at that level doesn't care.
True. Despite spending the majority of my working and personal life buried neck deep in open source, for someone reason I forgot we weren't talking about source code here and commented about the distribution of the resulting kernel modules.
@OP: Sorry for the correction. I blame my cold for the poor reasoning on my part hehe.
i was trying to comment on the idea that something being open source doesn't change that it needs compiling for a particular platform, and that it should be expected to not be straightfowards. especially at the low level where you need to raise interrupts and fill particular registers...
Oh that's actually reasonably cross platform these days. You can write drivers that are ISA independent and make use of kernel APIs for interacting with the hardware. There's no reason to drop into assembly. (Although yes sometimes the memory coherency model or details of the interrupt handler protocol bleed into a driver requiring tweaks to get it to work, but those are bugs a good driver author can avoid.)
some hardware can be a nightmare for this stuff though...
i still contend that it can be much more complicated than simply recompiling for your target... and even when its not, that is still one more step than doing nothing, which was the impression i got from the "its open source you can do nothing" comment.
Fair point. However, there will never be AGP or IDE for it. In fact there is no hardware with PCI and RISC V and may never be. My point is that they could solve the "what hardware do we support" problem by porting to architecture that doesn't have any hardware yet ;-) it would be gamble on an arch...
You can still get mainboards for modern CPUs (e.g. Intel Skylake) with PCI slots. Not sure how they work internally, e.g. if there is a PCIe bridge and if yes on what level PCI emulation happens.
PCI is a CPU-independent bus (unlike AT/ISA), it isn't really emulated, rather, there's a host bridge on these mainboards that connect it to PCIe from the CPU or southbridge.
No they don't make them any more. But my AMD64 machine from 2005 has AGP, IDE, and SATA. It's well supported by Fedora 25 which is a month old. Unless you're in new territory you have to decide what to support and will never gain traction due to the limited support.
Once RISC-V matures, I'd be very surprised if no-one makes a board with PCIe slots, a SATA controller, a USB controller and all the other things which are relatively similar to a PC.