nullplan wrote:Seriously? I want to write an OS that can at least stand on its own two feet, without requiring me to use a different OS to deliver life-support. What even is that mind-set? It would boil down to me creating a device tree (or similar) for each mainboard I want my stuff to run on. But ACPI is the PC version of a device tree, so may as well read it. And it has the benefit that it comes with the mainboard, so I don't need to ship it with the OS.
Well, I don't think any of us will end up with a general-purpose OS that many desktop users will use, and so this seems rather irrelevant. Just because you know a device exists (through ACPI), doesn't mean you know how to handle it. You need a driver for it. Once you have written a few of these, you realize the extra information from ACPI doesn't do much good for the driver. For instance, serial ports are typically at some fixed IO addresses, or PCI devices (which are discovered through PCI enumeration and not ACPI). These are easily probed, both for port & IRQ. The legacy keyboard & mouse are always on the same IO port & IRQ, and so ACPI has nothing new to contribute. Floppy discs have two alternative IO ports & IRQs, and are likewise easily probed. IDE disc controllers are at fixed IO port & IRQs unless they are PCI devices (and then they are enumerated with PCI, not ACPI). ACPI is completely irrelevant for PCI devices, except if they lack MSI or MSI-X functionality, in which case you must either probe their IRQs or read them from ACPI.
nullplan wrote:
Whether or not the computer reboots on tripple fault is a decision of the mainboard. On tripple fault, the CPU will execute a "stop special cycle" or something like that, which the chipset can interpret however it wants. Most will reboot, but reportedly, some Dell mainboards will just hang. If the ACPI tables don't work, then perhaps a BIOS update is in order. At least this sort of thing can be fixed that way.
I have a setting that determines if ACPI is used for reboot or tripple fault. The default is ACPI, but for some PCs I have to override it to disable ACPI reboot because it doesn't work.
nullplan wrote:
And none of that gives me access to standby or power-off functionality.
I don't need that functionality.
nullplan wrote:
Bravo. Now I can either read and implement ACPI once, or I can read all possible chipset documentation. I think, the former process scales better. Besides, even if the power button doesn't work, that situation is still no worse than if I did not support ACPI.
Well, if the ACPI is buggy you have no other alternatives than trying to get the BIOS manufacturer to fix the bug or use alternative methods. If you assume ACPI always works, you actually are at the mercy of the BIOS manufacturer, and those are not very keen on fixing problems that hobby-OS developers have, and so if it works on Windows it won't be fixed.
nullplan wrote:
To you. My OS is about delivering service to the user. It is not for me to determine what services are "important", that is for the user to decide. And reading battery status can be very important if you are on battery and want to save your work before the computer turns off from loss of power.
What user? In my case, it's not end-users that determine what is needed & wanted, rather business decisions or my own desire to have a function.
nullplan wrote:
The MADT is an ACPI table.
Certainly, but it doesn't need the ACPICA class to be decoded. You can decode it yourself and drop the big bloat.
Another thing I think you fail to realize is that many ACPIs have errors in them that will make ACPICA fault. Windows and Linux have extensive checks for this that appear to be lacking in ACPICA. This means that if you rely on ACPICA (or your own implementation if it doesn't handle all kinds of possible ACPI problems), then some PCs will simply fail to work because you get unrecoverable exceptions in the ACPI initialization code. I think this is the best argument why ACPI should be dropped, if possible.