News for hackers. Stuff that matters.
Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by laumars on Sunday December 18, 2016 @06:49PM (#13208444)
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.
Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by Sanddancer on Sunday December 18, 2016 @07:23PM (#13208573)
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.
Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by kobeya on Sunday December 18, 2016 @06:51PM (#13208454)
Not when they are open source...
Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by laumars on Monday December 19, 2016 @06:05AM (#13210698)
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.

Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by jheriko on Sunday December 18, 2016 @07:54PM (#13208706)
lol. good joke there.
Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by kobeya on Sunday December 18, 2016 @08:43PM (#13208910)
That's ... literally what the GP comment was about.
Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by jheriko on Monday December 19, 2016 @03:08PM (#13214587)
i don't understand.

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...

Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by kobeya on Monday December 19, 2016 @05:13PM (#13215453)
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.)
Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by jheriko on Wednesday December 21, 2016 @12:25PM (#13230854)
> 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.

Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by agumonkey on Sunday December 18, 2016 @06:53PM (#13208461)
I never wrote a single driver, but I believe all bets are off with hardware. Drivers can execute logic on the cpu and on the chip, it's probably wild.
Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by laumars on Sunday December 18, 2016 @06:58PM (#13208492)
Drivers can execute code wherever they want in addition to the CPU but CPU will always be needed at some point.
Re:GNU Hurd 0.9, GNU Mach 1.8, GNU MIG 1.8 Released by derefr on Sunday December 18, 2016 @08:55PM (#13208948)
Right; "drivers" that run only on a microcontroller in the device, don't touch the host's CPU, are called firmware. :)