9 ms·
I would like to offer a prophecy: For the next evolution of ACPI, Linux kernel devs (employed at hardware companies) will figure out a way to replace the bespok
by tux3 3y ago
I would like to offer a prophecy: For the next evolution of ACPI, Linux kernel devs (employed at hardware companies) will figure out a way to replace the bespoke bytecode with eBPF.
Windows will, of course, spawn a WSL instance when it needs to interact with ACPI. macOS is its own hardware platform, and will naturally come up with their own separate replacement.
- kryptiskt 3y agoThere already is an eBPF for Windows, it's even Microsoft's own project https://github.com/microsoft/ebpf-for-windows https://github.com/microsoft/ebpf-for-windows
- 6th 3y agoAhh. Just as the prophecy foretold.
- _trackno5 3y agomacOS already uses (at least on ARM chips) device trees. I don’t see why they would go back to ACPI as long as they keep their SoC model.
- mschuster91 3y ago> macOS is its own hardware platform, and will naturally come up with their own separate replacement. Actually, no. The M-series SoCs use device trees [1], and in fact their Apple SoC predecessors did just as well - the earliest I could find is the iPhone 3GS [2]. [1] https://lore.kernel.org/lkml/20230202-asahi-t8112-dt-v1-0-cb5442d1c229@jannau.net/T/ https://lore.kernel.org/lkml/20230202-asahi-t8112-dt-v1-0-cb... [2] https://www.theiphonewiki.com/wiki/DeviceTree https://www.theiphonewiki.com/wiki/DeviceTree
- monocasa 3y agoThey're very device tree oriented. They've been using them since "new world PowerPC" Macs in the 90s. Even on x86, their boot loader constructs a device tree to describe the hardware to the kernel.
- surajrmal 3y agoThey have no incentive to use or benefit from ACPI. They don't have the problem of trying to scale to an innumerable number of hardware permutations. They have a limited set which they control the entire stack of. I would certainly be very confused if they went with such an overkill solution as well.
- tinus_hn 3y agoThis appears logical but the reality is that the only reason you can’t immediately run MacOS on a generic X64 computer is that it doesn’t contain the licensing chip. If you patch out that requirement (using a Hackintosh installation) and covert the ACPI tables into the format used by Apple it runs just fine, for as far as drivers are available for your hardware.
- lmm 3y agoSure, but they don't care about supporting that use pattern. If anything having Hackintoshes break is a bonus to them.
- snvzz 3y agoWhy bother with bespoke bytecode when we have a high quality, standard ISA? RISC-V's base RV64I has 47 instructions. Legacy ISAs can simply emulate these 47 instructions.
- adrian_b 3y agoBytecode is presumably chosen to minimize the program length, while the RISC-V is at the opposite end of verbosity for representing a program. You may be one of those who believe that RISC-V is a high-quality ISA, but this is not an universal opinion and it is a belief that is typically shared only by those who have been exposed to few or no other ISAs. In the context of something like ACPI, I would be worried by the use of something like the RISC-V ISA, because this is an ISA very inappropriate for writing safe programs. Even something as trivial as checking for integer overflow is extremely complicated in comparison with any truly high-quality ISA.
- Joker_vD 3y agoFor example, Open Firmware specification used a flavour of Forth for its bytecode.
- IshKebab 3y agoHow patronising. Can you give an example of an ISA that is higher quality than RISC-V?
- patmorgan23 3y agoWell first you need to define your criteria for "high quality"
- snvzz 3y agoThe parent (adrian_b) has to, if anyone. But as far as I can see, they simply have a (misguided) preference for CISC. They're very vocal against load/store architectures, and they don't seem to understand the tradeoffs RISC-V does make. They don't even seem to get that RISC-V has had the highest density in 64bit from the start (first ratified user spec, 2019), and now has highest density among the 32bit too (as of recent Zc ratification).
- blueflow 3y agoUnlikely. ACPI is made by Wintel vendors, so Windows will get support for the fancy new things and Linux will lag behind until the new thing is documented or reverse engineered.
- surajrmal 3y agoACPI is standardized via a specification. It's quite easy for non windows operating systems to support ACPI. I can't say the same for device tree as that requires reading Linux source.
- turminal 3y agoThat specification is a monster. "quite easy to support" is not a good description of the situation.
- surajrmal 3y agoBy comparison it is easier. The alternative is that you need to read even an order of magnitude more lines of GPL source code in the Linux kernel to write your OS, which may not be an option.
- trelane 3y agoLots of things are available in a specification. HTML, for instance. Just being an open specification is insufficient when there's a superdominant implementation. At that point, that implementation is the specification. In HTML, it was Internet Explorer for a long time, now it's Chrome/Chromium. In ACPI, it's Windows. In fact, Linux pretends to be Windows because anything else is a shipwreck graveyard of disappointment and untested code. https://askubuntu.com/questions/28848/what-does-the-kernel-boot-parameter-set-acpi-osi-linux-do https://askubuntu.com/questions/28848/what-does-the-kernel-b... Also, see the whole necessity of patching your DSDT (Windows users: "The what?" Linux users: nodding sadly) https://wiki.archlinux.org/title/DSDT https://wiki.archlinux.org/title/DSDT Modern computers are sufficiently complicated that they really only support one OS. And of course, those are almost entirely Windows computers. Buy a computer with Linux preinstalled, with support, if you want to avoid having to care about things like this (or having a computer that never works quite right (e.g. doesn't reliably suspend or the fans are running wrong)).
- monocasa 3y agoBPF doesn't really make sense here. It can't fully specify the kinds of computation an AML replacement would need since BPF is guaranteed to terminate (it's not Turing complete).