Hello,
Currently, I am setting up acpi.
I plan to let the scheduler manage the power efficiency by setting the values for my cpu in assembly, directly, according to the Intel doc.
Only one platform will be needed for that OS -> x86.
Is there a pressure on me to use the acpica layer(s) or not ? is there something I will miss later in this constant context ?
Thanks
ACPICA - pressure to use it ? or not ?
-
- Member
- Posts: 97
- Joined: Tue Mar 10, 2015 10:08 am
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: ACPICA - pressure to use it ? or not ?
If you wish to limit yourself to using MSRs for a specific processor variant, and not support others, that's power to you. You don't particularly need ACPI support for that in the first place, though it may decide to interfere and reset your settings.
ACPI is to support power management independent of chipset and processor. Using ACPI means you won't be writing any code to write power settings directly to a CPU, but instead you reuse the firmware's code to do that.
For starters, pick one of the two options above, and don't mix and match as you seem to be doing right now. If you do decide that using ACPI is the proper way, then you can make the choice of either using ACPICA or writing a custom replacement for that library.
ACPI is to support power management independent of chipset and processor. Using ACPI means you won't be writing any code to write power settings directly to a CPU, but instead you reuse the firmware's code to do that.
For starters, pick one of the two options above, and don't mix and match as you seem to be doing right now. If you do decide that using ACPI is the proper way, then you can make the choice of either using ACPICA or writing a custom replacement for that library.
-
- Member
- Posts: 97
- Joined: Tue Mar 10, 2015 10:08 am
Re: ACPICA - pressure to use it ? or not ?
Thanks Combuster,
I will implement acpica then. It will be more consistent in the end I think.
Bye
I will implement acpica then. It will be more consistent in the end I think.
Bye
Re: ACPICA - pressure to use it ? or not ?
For most OSes, power management is not an issue, so that is typically not the main reason to use ACPICA or not. Instead the main reason is to be able to figure out PCI interrupt routings. This can be handled for most devices with detecting IRQs, or by using MSI.
Re: ACPICA - pressure to use it ? or not ?
You hardly need ACPI in a hobby OS except softly turn off your machine. For the shutting down, http://forum.osdev.org/viewtopic.php?t=16990 is a good reference. I also write a simple AML Interpreter in C++, if you want to roll your own, this is simpler than source code of ACPICA and can probably be easier to understand https://github.com/nbdd0121/AMLInterpreter/ (note that many instruction are not supported by this, this is only used by me to shutdown the machine. It is only tested to work in bochs, qemu, VMware and my own dell laptop).
-
- Member
- Posts: 97
- Joined: Tue Mar 10, 2015 10:08 am
Re: ACPICA - pressure to use it ? or not ?
Thanks a lot, will definitely have a look !