summaryrefslogtreecommitdiff
path: root/include/acpi/acpigen.h
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-04-22common: Convert *.c/h from UTF-8 to ASCII enconfingMichal Simek
Convert UTF-8 chars to ASCII in cases where make sense. No Copyright or names are converted. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Tom Rini <[email protected]> Acked-by: Marek BehĂșn <[email protected]>
2022-01-19doc: replace @return by Return:Heinrich Schuchardt
Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <[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-25x86: Add a few common Intel CPU functionsSimon Glass
Add functions to query CPU information, needed for ACPI. 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: Export functions to write sized valuesSimon Glass
At present only acpigen_write_integer() is exported for use by other code. But in some cases it is useful to call the specific function depending on the size of the value. Export these functions and add a test. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]> [bmeng: Fix the "new blank line at EOF" warning] 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 Device Properties objects via _DSDSimon Glass
More complex device properties can be provided to drivers via a device-specific data (_DSD) object. To create this we need to build it up in a separate data structure and then generate the ACPI code, due to its recursive nature. Add an implementation of 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 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]>