OSDev.org https://forum.osdev.org/ |
|
uACPI, a portable and easy-to-integrate ACPI implementation https://forum.osdev.org/viewtopic.php?f=2&t=57141 |
Page 1 of 1 |
Author: | 8infy [ Sun Mar 03, 2024 3:53 pm ] |
Post subject: | uACPI, a portable and easy-to-integrate ACPI implementation |
Hi all! uACPI is an ACPI implementation (including an AML interpreter and other components) that aims to be easy to port and integrate. Project on GitHub: https://github.com/UltraOS/uACPI Current state of the project - A well-tested interpreter fully supporting all of AML - A fully implemented resource subsystem supporting all existing descriptors - Lots of API already available, this includes sleep/reset, device search, namespace management, opregion/notify handlers, gas read/write, pci routing, interrupt model - Works on all real hardware tested so far (about 8 different computers), and all VMs. This includes namespace initialization, reading battery state, shutting down and rebooting More details in the README: https://github.com/UltraOS/uACPI?tab=readme-ov-file#state-of-the-project Project goals - Perfect compatibility with the Windows NT ACPI interpreter - Addressing some of the fundamental design flaws of ACPICA: the global interpreter lock, unsafe object lifetimes, NT incompatibility (reference semantics, implicit-casts, etc) - Simplifying code by embracing AML designed for the NT ACPI interpreter, instead of trying to work around it (see: ACPICA two-pass package named object resolution) - Ease of integration and development Some code examples & more details in the README: https://github.com/UltraOS/uACPI?tab=readme-ov-file#why-would-i-use-this-over-acpica A reddit post by me showcasing the interpreter on real hardware: https://www.reddit.com/r/osdev/comments/1and6yg/my_aml_interpreter_on_real_hardware/ Thanks! |
Author: | eekee [ Thu Mar 14, 2024 2:37 pm ] |
Post subject: | Re: uACPI, a portable and easy-to-integrate ACPI implementat |
Excellent goals! I particularly like that the instructions for building it without CMake are just 2 lines. Bookmarked. |
Author: | 8infy [ Sat Mar 23, 2024 3:55 pm ] |
Post subject: | Re: uACPI, a portable and easy-to-integrate ACPI implementat |
An update on the state of the project: - uACPI now has a fairly complete event subsystem for fixed and general purpose events - Added support for gracefully skipping opcodes attempting to create duplicate named objects during namespace load - A bunch of small improvements and various bug fixes, removed strtoull os dependency, now shipping own implementation - We have tested a lot more computers since, the number is probably close to 20 if not more at the moment, all working just fine! - uACPI is now the official ACPI subsystem used by the managarm operating system: https://github.com/managarm/managarm |
Author: | rdos [ Wed Mar 27, 2024 1:20 pm ] |
Post subject: | Re: uACPI, a portable and easy-to-integrate ACPI implementat |
Interesting. How does it compare in executable size to ACPICA? What does it require from the runtime library? Does it work for a 32-bit protected mode kernel? |
Author: | 8infy [ Wed Mar 27, 2024 2:29 pm ] |
Post subject: | Re: uACPI, a portable and easy-to-integrate ACPI implementat |
rdos wrote: How does it compare in executable size to ACPICA? I haven't measured, but it's ~20k loc of C code, so that should give you an idea rdos wrote: What does it require from the runtime library? A few very common libc functions (memcpy, strcmp, ...) + snprintf. Besides that, kernel API like map/unmap, alloc/free, mutexes, ticks, etc. rdos wrote: Does it work for a 32-bit protected mode kernel? This is not something I've tested personally, but there aren't any places in code that assume 64-bit at least as far as I'm aware, so might just work |
Author: | 8infy [ Fri Apr 05, 2024 4:19 am ] |
Post subject: | Re: uACPI, a portable and easy-to-integrate ACPI implementat |
Yet another project state update! - Dynamic table loads from AML via (Load/LoadTable) are no longer recursive (they are in ACPICA even to this day!) - Fixed a bunch of bugs/missing error checks found via fuzzing - Sped up name string parsing - Added a bunch of new tests |
Author: | 8infy [ Fri Apr 26, 2024 4:46 pm ] |
Post subject: | Re: uACPI, a portable and easy-to-integrate ACPI implementat |
uACPI now has a page on osdev wiki! https://wiki.osdev.org/UACPI Since the last update I also: - Added a highly requested UACPI_SIZED_FREES mode, which makes all frees include a size argument - Made 32-bit builds first class citizen (now run 32-bit CI for every commit as well) - Did some more fuzzing thanks to the help from a friend, this time against 500 publicly available real hardware AML blobs - Fixed a few important bugs (we no longer have any crashes when fuzzing! perhaps needs longer sessions) - Reworked secondary table loading to include PSDTs and made failures non-critical - Added a more verbose log level (with some extra interpreter bytecode tracing on top) |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |