summaryrefslogtreecommitdiff
path: root/lib/acpi/acpigen.c
AgeCommit message (Collapse)Author
2024-10-27acpi: Add processor devicePatrick Rudolph
Add a new method to write the processor device identified by _HID ACPI0007, that is preferred over the Processor OpCode since ACPI 6.0. Fixes booting arm using ACPI only since the Processor OpCode isn't found valid by the Linux kernel. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Simon Glass <[email protected]> Cc: Simon Glass <[email protected]>
2024-09-12include: export uuid.hCaleb Connolly
Move this header to include/u-boot/ so that it can be used by external tools. Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2023-12-21lib: Remove <common.h> inclusion from these filesTom Rini
After some header file cleanups to add missing include files, remove common.h from all files in the lib directory. This primarily means just dropping the line but in a few cases we need to add in other header files now. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2020-09-25acpi: Add more support for generating processor tablesSimon Glass
This adds tables relating to P-States and C-States. Signed-off-by: Simon Glass <[email protected]>
2020-09-25acpi: Add support for generating processor tablesSimon Glass
ACPI has a number of CPU-related tables. Add utility functions to write out the basic packages. Signed-off-by: Simon Glass <[email protected]>
2020-09-25acpi: Support generating a multi-function _DSM for devicesSimon Glass
Add a function to generate ACPI code for a _DSM method for a device. This includes functions for starting and ending each part of the _DSM. Signed-off-by: Simon Glass <[email protected]> [bmeng: fix the "new blank line at EOF" git warning] Signed-off-by: Bin Meng <[email protected]>
2020-09-25acpi: Add support for conditions and return valuesSimon Glass
Add functions to support generating ACPI code for condition checks and return values. Signed-off-by: Simon Glass <[email protected]>
2020-09-25acpi: Add support for writing a _PRWSimon Glass
A 'Power Resource for Wake' list the resources a device depends on for wake. Add a function to generate this. Signed-off-by: Simon Glass <[email protected]>
2020-07-17acpi: Support writing named valuesSimon Glass
Allow writing named integers and strings to the generated ACPI code. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> [bmeng: Fix the "new blank line at EOF" warning] Signed-off-by: Bin Meng <[email protected]>
2020-07-17acpi: Support generation of a deviceSimon Glass
Allow writing an ACPI device to the generated ACPI code. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> [bmeng: Fix build failures on Sandbox] Signed-off-by: Bin Meng <[email protected]>
2020-07-17acpi: Support generation of a generic registerSimon Glass
Allow writing out a generic register. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> [bmeng: Fix build failures on Sandbox] Signed-off-by: Bin Meng <[email protected]>
2020-07-17acpi: Support generation of a scopeSimon Glass
Add a function to write a scope to the generated ACPI code. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]> [bmeng: Fix build failures on Sandbox] Signed-off-by: Bin Meng <[email protected]>
2020-07-17acpi: Add support for writing a GPIO power sequenceSimon Glass
Power to some devices is controlled by GPIOs. Add a way to generate ACPI code to enable and disable a GPIO so that this can be handled within an ACPI method. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-07-17acpi: Add support for writing a Power ResourceSimon Glass
These are used in ACPI to disable power to various pats of the system when in sleep. Add a way to create a power resource, with the caller finishing off the details. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-07-17acpi: Add support for various misc ACPI opcodesSimon Glass
Add more functions to handle some miscellaneous ACPI opcodes. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-07-17acpi: Support writing a UUIDSimon Glass
ACPI supports writing a UUID in a special format. Add a function to handle this. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-07-17acpi: Support writing a nameSimon Glass
ACPI supports storing names which are made up of multiple path components. Several special cases are supported. Add a function to emit a name. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-07-17acpi: Support writing a stringSimon Glass
ACPI supports storing a simple null-terminated string. Add support for this. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-07-17acpi: Support writing an integerSimon Glass
ACPI supports storing integers in various ways. Add a function to handle this. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-07-17acpigen: Support writing a packageSimon Glass
A package collects together several elements. Add an easy way of writing a package header and updating its length later. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-07-17acpigen: Support writing a lengthSimon Glass
It is convenient to write a length value for preceding a block of data. Of course the length is not known or is hard to calculate a priori. So add a way to mark the start on a stack, so the length can be updated when known. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-07-17acpi: Support string outputSimon Glass
Add support for output of strings and streams of bytes. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-07-17acpi: Support generation of ACPI codeSimon Glass
Add a new file to handle generating ACPI code programatically. This is used when information must be dynamically added to the tables, e.g. the SSDT. Initial support is just for writing simple values. Also add a 'base' value so that the table can be freed. This likely doesn't happen in normal code, but is nice to do in tests. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>