5 ms·
Abstract the hardware platform from the OS and applications. You know, like pretty much every operating system except linux on arm. Everyone complains about hav
by StillBored 5y ago
Abstract the hardware platform from the OS and applications. You know, like pretty much every operating system except linux on arm. Everyone complains about having to install drivers on windows, but having a driver ABI is largely how one can expect 10+ years of OS updates without any particular engineering work. The OS and applications get updated and as long as they maintain the driver API the graphics drivers, network drivers, etc all continue to work. Once in a while you have to go back and revisit this stuff, but drivers themselves are rarely sources of exploits because they exist below all the userspace interaction shielded by the kernel, and on the HW side tend to be little more than shims to forward data/packets/etc from the HW to the OS.
- kllrnohj 5y ago> You know, like pretty much every operating system except linux on arm. Android is Linux on ARM but it also abstracts the hardware platform from the OS & apps, that's the whole "Project Treble" thing Google was talking about a few years back. https://android-developers.googleblog.com/2017/05/here-comes-treble-modular-base-for.html https://android-developers.googleblog.com/2017/05/here-comes... But that's the easy non-answer. Abstractions can't add features. Like Windows 11 dropped support for old hardware not because the right abstractions weren't in place, but because you can't add things like a TPM in software. It needs full stack support. Similarly if it turns out a device driver had a bug in its implementation of the interface, you're kinda stuck with that. And the workaround may or may not be reasonable to put up with, if a workaround exists at all.
- StillBored 5y agoOne doesn't need new features to "support" and older platform. You simply assure that code paths have fall back logic to deal with missing GPU functionality/etc and as you mention emulate it. The fact that this has worked for decades on lots of other OS's is proof of this. Iphone6's don't have facial recognition cameras but you can still unlock your phone/etc. Oh, and btw there are soft TPMs, which are the defaults on most new machines, and is probably part of the reason MS made it a requirement. But as others have shown by getting win11 to run without a TPM, it is entirely artificial, like when they decide not to ship IE/directX/whatever on an older OS. If a random hacker type can get it to work in a reasonable timeframe, there isn't really an excuse for MS not to just add the functionality with a little "your machine doesn't have a TPM so your not secure as you could be" notice somewhere. Its mostly laziness and market segmentation.
- kllrnohj 5y agoThat missing feature set bleeds into the developer experience and results in cries of "fragmentation." It's not "laziness" it has a real cost to 3p developers. And no, your claims of "just emulate it" is not accurate, nor is that how any other OS works. If you're missing a GPU feature on your Linux system (or, more likely, if your driver is even if your hardware supports it) it's up to everything that uses the GPU to not hit that path. Nothing is emulating it or in any way pretending to have a feature it doesn't "natively" have.
- StillBored 5y agoWell of course, for somethings it becomes a least common denominator, but even for GPU's in the past the idea was that it was possible to use something like Mesa as the baseline and then accelerate the important/critical functionality in hardware. The original DX API was also designed like this. Its only once the market became basically a duopoly that the expectations shifted. Frankly, having a solid software reference model/fallback path likely makes peoples jobs easier because its easier to track down bugs by doing a/b testing. Oh, and BTW, you can likely boot your linux machine without your graphics card driver, and it will still be able to run your desktop/etc and simple openGL/etc applications like glxgears. How is that, because linux can and does fallback to software emulation, using... mesa.
- kllrnohj 5y agoNo, that's not how that works. You can have an entirely software emulation or stub of a device, but that's not the same as more like a polyfill. Mesa will not emulate just the gap between your hardware and the latest feature set. You either get hardware with whatever it has, or only software emulated. It's complete unacceptable for everyone if an os update suddenly means your GPU is entirely unused because it doesn't support some new extension or feature, so now you're stuck with only CPU emulation. That's not a viable solution.
- StillBored 5y ago? I'm not sure where your point is.. and read directly is false: You should read: https://www.freedesktop.org/wiki/Software/gallium/ https://www.freedesktop.org/wiki/Software/gallium/ for example: "The Draw module provides point/line/polygon rendering services such as vertex transformation, polygon culling and clipping. It will be used by drivers for hardware which lacks vertex transformation (such as the i915/i945). It may also be instantiated and used directly by the state tracker to implement some API functionality that doesn't map well to hardware capabilities. " And on and on... This doesn't mean that all the extensions exist for any piece of hardware, only that there is a pretty solid baseline. Its why I can run a gforce 7600 (which I was messing with a few days back) with a fairly recent rolling linux distro and it continues to work, and provide some level of acceleration. And while i'm at it: https://mesamatrix.net/ https://mesamatrix.net/