Difference between revisions of "ACPI"

From coreboot
Jump to navigation Jump to search
(ACPI bytecode generator)
Line 194: Line 194:
  * make sure that you reserve _RAMBASE - LB_MEM_TOPK
  * make sure that you reserve _RAMBASE - LB_MEM_TOPK
  * SMP might need some fixes
  * SMP might need some fixes
=== ACPI bytecode generator ===
Some ACPI stuff is generated runtime. To achieve this goal we have a AML code generator which generates binary
ACPI bytecode. Such code then resides typically in SSDT table. There is a helper function which creates such
table - acpi_create_ssdt_generator(). The content of the table is created through callback function acpi_fill_ssdt_generator(). So far we have two big users of the generator k8acpi_write_vars() and amd_model_fxx_generate_powernow(). The first function will generate some runtime configuration of HT bus and PCI decode ranges. Second function generates the P-States.
The available functions are in acpigen.h. Mostly there are functions generating some primitive named data structures. However sometime is necessary to put more data to a package. ACPI AML code needs to know the block
lengths. The len is unknown until we have filled the payload of such package. Therefore when we are done, we need
to call function acpigen_patch_len(int len) which will patch last object (package) which need patching. It uses
stack internally so more structures can be nested. Look to acpigen.c and learn what functions call  acpigen_write_len_f() - those needs patching.

=== Debugging ACPI ===
=== Debugging ACPI ===

Revision as of 20:37, 12 April 2009