managarm / lai Goto Github PK
View Code? Open in Web Editor NEWLAI is an interpreter for AML, the ACPI Machine Language.
License: MIT License
LAI is an interpreter for AML, the ACPI Machine Language.
License: MIT License
This issue is part of an ongoing effort to remove the lai_eval_operand()
function. The goal is to make the interpreter completely non-recursive.
The PCI access functions do not support non-zero segments. Furthermore, they only support 32-bit access. Both of those issues should be fixed by refactoring the PCI access functions.
Implement the missing opcode and add a unit test
Add the missing opcode and a unit test.
Implement ToBuffer
, ToDecimalString
, ToHexString
, ToString
.
Temporary namespace objects need to be deleted when a control method exits.
IndexField() I/O is known to be broken. Refactor it.
Scan entire namespace instead of just \_SB_
Implement the missing feature and add a unit test
Opcodes related to feature
Acquire
(Currently stubbed)Release
(Currently stubbed)Stub since it is purely a hint towards the compiler
Notify
is still missing.
Due to the possibility of AML writing to a field on table level before the EC is currently initializeable, ACPI provides a table to be able to access the EC before the AML interpreter is even started, support this
Currently the EC driver and how to enable it is undocumented, document this
Snippet containing initialization code:
https://pastebin.com/sYzy9npi
Includes: <lai/core.h> and <acpispec/tables.h>
Add the missing opcode and a unit test.
Packages either need to be refcounted properly (i.e., we need to make sure our behavior is consistent with ACPICA) or garbage-collected.
Add the missing opcode and a unit test.
Implement the missing opcode and add a unit test
Currently, Processor() objects are skipped in the AML. They should be implemented in a similar way as Device
.
https://github.com/qword-os/lai/blob/a979904bdae9870b2aef6029bc9673fc1e3de63e/helpers/pm.c#L113
Instead of returning a numerical error code, we should return proper errors.
Add the missing opcode and a unit test.
Ever since ACPI 2.0 the FADT provides a way to reset the system in a hardware independant way(On most PCs this is implemented via a mostly unknown PCI I/O port). This could be used to reboot a system instead of shutting it down. The reset doesn’t require the use of the AML interpreter but just requires a write of a byte to a Generic Address Structure.
otherwise panic stating that lai_iterate_prt
should be used
Implement the missing feature and add a unit test
Opcodes related to feature
Signal
Wait
Notify
Implement the missing opcode and add a unit test
Log: https://pastebin.com/hccay1hM
Display:
Some time ago when refactoring the directory structure of lai I discovered an unimplemented function prototype
void acpi_disable(void);
We discussed it back then but came to the conclusion that disabling ACPI was impossible for non-system-firmware however this is possible per the spec. Implement such a function
Add the missing opcode and a unit test.
Implement the missing opcode and add a unit test
This issue is part of an ongoing effort to remove the lai_eval_operand()
function. The goal is to make the interpreter completely non-recursive.
Implement the missing opcode and add a unit test
Add the missing opcode and a unit test.
The API to iterate over a ACPI resource buffer (e.g., the buffer returned by _CRS
) should be implemented as a lightweight (non-allocating) iterator over a buffer (defined by a const void *
+ size_t
).
Suggestions for methods:
lai_resource_read()
: advance to the next resource descriptor or determine that no such descriptor existslai_resource_get_type()
: return the type of the descriptorlai_resource_get_irq()
: take an index n
and return the n
-th IRQ vectorHelpers, that is, functions that are implemented on top of the AML interpreter, should be separated from the core. Their declarations should move to a lai/helpers/
directory in include/
. Their implementation should move to helpers/
.
Adding a PM Timer helper could be a pretty nice and simple addition to Lai.
Currently only integer comparisons are supported
Add the missing opcode and a unit test.
The I/O code in opregion.c
needs an overhaul.
Add an enum lai_node_type
similar to enum lai_object_type
and a function to query it.
Implement the missing opcode and add a unit test
Add the missing opcode and a unit test.
Add the missing opcode and a unit test.
The API functions lai_assign_object()
, lai_move_object()
and lai_free_object()
should be renamed to lai_var_<function>
, made public and documented. free
should become finalize
to match acpi_state_t
. There should be a cleanup macro for finalize
and an initializer macro.
Implement the missing opcode and add a unit test
This issue is part of an ongoing effort to remove the lai_eval_operand()
function. The goal is to make the interpreter completely non-recursive.
This issue is part of an ongoing effort to remove the lai_eval_operand()
function. The goal is to make the interpreter completely non-recursive.
ACPI specifies that accesses to fields that are larger than the integer size return buffers instead. This needs to be implemented in opregion.c
.
Currently for the buffer case only little endian systems are supported, fix this
Code could look like
#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
bswap64(&object->integer);
#endif
However bswap64
is not yet implemented, it should be implemented with its already implemented counterparts bswap32
and bswap16
in core/eval.c
Implement the missing opcode and add a unit test
Implement the missing opcode and add a unit test
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.