summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2012-10-18 10:44:44 -0700
committerRobert Moore <Robert.Moore@intel.com>2012-10-18 10:44:44 -0700
commite611add6c7aaded52521411804a5428731672d86 (patch)
tree3eaa42868dbe5c51fa2b4052d3cfb55ccc3b6bef
parent14f15906d42d14ac5423c173127e0d606ac1f84d (diff)
downloadacpica-e611add6c7aaded52521411804a5428731672d86.tar.gz
Add two new readme files.
1) Summary file for all other readme files 2) How to add a new ACPI table to ACPICA
-rwxr-xr-xdocuments/readme_summary.txt16
-rwxr-xr-xsource/compiler/new_table.txt88
2 files changed, 104 insertions, 0 deletions
diff --git a/documents/readme_summary.txt b/documents/readme_summary.txt
new file mode 100755
index 000000000..4a66515d6
--- /dev/null
+++ b/documents/readme_summary.txt
@@ -0,0 +1,16 @@
+
+Summary of readme files in the ACPICA directory.
+------------------------------------------------
+
+generate/unix/readme.txt: How to use the generic unix makefiles.
+
+generate/msvc9/readme.txt: Setting up to generate with VS 9.
+
+generate/release/build.txt: How to build the ACPICA release package.
+
+generate/lint/readme.txt: Using PC-lint for ACPICA source code.
+
+source/compiler/readme.txt: Integrating iASL compiler into MS VS environment.
+
+source/compiler/new_table.txt: How to add a new ACPI table to iASL.
+
diff --git a/source/compiler/new_table.txt b/source/compiler/new_table.txt
new file mode 100755
index 000000000..1e48d385b
--- /dev/null
+++ b/source/compiler/new_table.txt
@@ -0,0 +1,88 @@
+How to add a new ACPI table to ACPICA and the iASL compiler.
+------------------------------------------------------------
+
+There are four main tasks that are needed to provide support for a
+new ACPI table:
+ 1) Create a full definition of the table and any subtables
+ in the ACPICA headers.
+ 2) Add disassembler support for the new table
+ 3) Add iASL table compiler support for the new table
+ 4) Create a default template for the new table for iASL -T
+ option.
+
+Notes for each of these tasks provided below.
+
+
+1) Header Support
+-----------------
+
+New tables should be added to the appropriate header:
+ actbl2.h: Used for new tables that are not defined in the ACPI spec.
+ actbl3.h: Used for new tables that are defined in the ACPI spec.
+
+Use ACPI_TABLE_HEADER for the common ACPI table header.
+Subtables should be defined separately from the main table.
+Don't add placeholder fields for subtables and other multiple data items.
+ (Don't use xxxxx[1] for a field that can have multiple items.)
+ The disassembler and data table compiler depends on this.
+For tables not defined in the ACPI spec, add a comment to indicate where
+ the table came from.
+Use other table definitions for additional guidance.
+
+
+2) iASL Disassembler Support
+----------------------------
+
+Add definition of the table (and subtables) in common/dmtbinfo.c
+Add table access macro(s) of the form ACPI_xxxx_OFFSET
+Add ACPI_DMT_TERMINATOR at the end of every table/subtable definition
+
+Add externals for the table/subtable definitions in acdisasm.h
+Add an entry for the new table in the AcpiDmTableData in common/dmtable.c
+
+If there are no subtables, add the AcpiDmTableInfoXXXX name to the
+ AcpiDmTableData and it will automatically be disassembled.
+
+If there are subtables, a dump routine must be written:
+Add an AcpiDmDumpXXXX function to dmtbdump.c -- note, code for another
+ similar table can often be ported for the new table.
+Add an external for this function to acdisasm.h
+Add this function to the AcpiDmTableData entry for the new ACPI table
+
+Debug/Test: Either find an existing example of the new ACPI table, or
+ create one using the "generic ACPI table support" included in the
+ iASL data table compiler. Use the -G option to force a
+ generic compile. It is often best to create the table from scratch,
+ since this clearly exposes the dependencies (lengths, offsets, etc.)
+ that the Table Compiler support will need to generate.
+
+
+3) iASL Table Compiler Support
+------------------------------
+
+Simple tables do not require a compile routine. The definition of the
+ table in common/dmtbinfo.c (created in step 2 above) will suffice.
+
+Complex tables with subtables will require a compile routine with a name
+ of the form DtCompileXXXX.
+Add a DtCompileXXXX function to the dttable.c module.
+Add an external for this function in dtcompiler.h
+Add this function to the AcpiDmTableData entry for the new ACPI table
+ in common/dmtable.c
+
+
+4) Template Support (-T iASL option)
+------------------------------------
+
+Create an example of the new ACPI table. This example should create
+ multiple subtables (if supported), and multiple instances of any
+ variable length data.
+
+Compile the example file with the -sc option. This will create a C
+ array that contains the table contents.
+
+Add this array to the dttemplate.h file. Name the array TemplateXXXX.
+Add this array name to the AcpiDmTableData entry for the new ACPI table
+
+Debug/Test: Create the template file. Compile the file. Disassemble the file.
+ Compile the disassembly file.