summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/include/aclocal.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/include/aclocal.h')
-rw-r--r--sys/contrib/dev/acpica/include/aclocal.h292
1 files changed, 244 insertions, 48 deletions
diff --git a/sys/contrib/dev/acpica/include/aclocal.h b/sys/contrib/dev/acpica/include/aclocal.h
index e7a0d37..92eb49a 100644
--- a/sys/contrib/dev/acpica/include/aclocal.h
+++ b/sys/contrib/dev/acpica/include/aclocal.h
@@ -4,10 +4,118 @@
*
*****************************************************************************/
-/*
- * Copyright (C) 2000 - 2016, Intel Corp.
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
* All rights reserved.
*
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************
+ *
+ * Alternatively, you may choose to be licensed under the terms of the
+ * following license:
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -23,23 +131,23 @@
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- */
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Alternatively, you may choose to be licensed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ *****************************************************************************/
#ifndef __ACLOCAL_H__
#define __ACLOCAL_H__
@@ -54,7 +162,7 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
/* Total number of aml opcodes defined */
-#define AML_NUM_OPCODES 0x82
+#define AML_NUM_OPCODES 0x83
/* Forward declarations */
@@ -550,11 +658,12 @@ typedef union acpi_gpe_dispatch_info
*/
typedef struct acpi_gpe_event_info
{
- union acpi_gpe_dispatch_info Dispatch; /* Either Method, Handler, or NotifyList */
- struct acpi_gpe_register_info *RegisterInfo; /* Backpointer to register info */
- UINT8 Flags; /* Misc info about this GPE */
- UINT8 GpeNumber; /* This GPE */
- UINT8 RuntimeCount; /* References to a run GPE */
+ union acpi_gpe_dispatch_info Dispatch; /* Either Method, Handler, or NotifyList */
+ struct acpi_gpe_register_info *RegisterInfo; /* Backpointer to register info */
+ UINT8 Flags; /* Misc info about this GPE */
+ UINT8 GpeNumber; /* This GPE */
+ UINT8 RuntimeCount; /* References to a run GPE */
+ BOOLEAN DisableForDispatch; /* Masked during dispatching */
} ACPI_GPE_EVENT_INFO;
@@ -567,6 +676,7 @@ typedef struct acpi_gpe_register_info
UINT16 BaseGpeNumber; /* Base GPE number for this register */
UINT8 EnableForWake; /* GPEs to keep enabled when sleeping */
UINT8 EnableForRun; /* GPEs to keep enabled when running */
+ UINT8 MaskForRun; /* GPEs to keep masked when running */
UINT8 EnableMask; /* Current mask of enabled GPEs */
} ACPI_GPE_REGISTER_INFO;
@@ -904,24 +1014,58 @@ typedef union acpi_parse_value
#define ACPI_DISASM_ONLY_MEMBERS(a)
#endif
+#if defined(ACPI_ASL_COMPILER)
+#define ACPI_CONVERTER_ONLY_MEMBERS(a) a;
+#else
+#define ACPI_CONVERTER_ONLY_MEMBERS(a)
+#endif
+
#define ACPI_PARSE_COMMON \
- union acpi_parse_object *Parent; /* Parent op */\
- UINT8 DescriptorType; /* To differentiate various internal objs */\
- UINT8 Flags; /* Type of Op */\
- UINT16 AmlOpcode; /* AML opcode */\
- UINT8 *Aml; /* Address of declaration in AML */\
- union acpi_parse_object *Next; /* Next op */\
- ACPI_NAMESPACE_NODE *Node; /* For use by interpreter */\
- ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
- UINT8 ArgListLength; /* Number of elements in the arg list */\
- ACPI_DISASM_ONLY_MEMBERS (\
- UINT8 DisasmFlags; /* Used during AML disassembly */\
- UINT8 DisasmOpcode; /* Subtype used for disassembly */\
- char *OperatorSymbol;/* Used for C-style operator name strings */\
- char AmlOpName[16]) /* Op name (debug only) */
-
-
-/* Flags for DisasmFlags field above */
+ union acpi_parse_object *Parent; /* Parent op */\
+ UINT8 DescriptorType; /* To differentiate various internal objs */\
+ UINT8 Flags; /* Type of Op */\
+ UINT16 AmlOpcode; /* AML opcode */\
+ UINT8 *Aml; /* Address of declaration in AML */\
+ union acpi_parse_object *Next; /* Next op */\
+ ACPI_NAMESPACE_NODE *Node; /* For use by interpreter */\
+ ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
+ UINT8 ArgListLength; /* Number of elements in the arg list */\
+ ACPI_DISASM_ONLY_MEMBERS (\
+ UINT16 DisasmFlags; /* Used during AML disassembly */\
+ UINT8 DisasmOpcode; /* Subtype used for disassembly */\
+ char *OperatorSymbol; /* Used for C-style operator name strings */\
+ char AmlOpName[16]) /* Op name (debug only) */\
+ ACPI_CONVERTER_ONLY_MEMBERS (\
+ char *InlineComment; /* Inline comment */\
+ char *EndNodeComment; /* End of node comment */\
+ char *NameComment; /* Comment associated with the first parameter of the name node */\
+ char *CloseBraceComment; /* Comments that come after } on the same as } */\
+ ACPI_COMMENT_NODE *CommentList; /* comments that appears before this node */\
+ ACPI_COMMENT_NODE *EndBlkComment; /* comments that at the end of a block but before ) or } */\
+ char *CvFilename; /* Filename associated with this node. Used for ASL/ASL+ converter */\
+ char *CvParentFilename) /* Parent filename associated with this node. Used for ASL/ASL+ converter */
+
+
+/* categories of comments */
+
+typedef enum
+{
+ STANDARD_COMMENT = 1,
+ INLINE_COMMENT,
+ ENDNODE_COMMENT,
+ OPENBRACE_COMMENT,
+ CLOSE_BRACE_COMMENT,
+ STD_DEFBLK_COMMENT,
+ END_DEFBLK_COMMENT,
+ FILENAME_COMMENT,
+ PARENTFILENAME_COMMENT,
+ ENDBLK_COMMENT,
+ INCLUDE_COMMENT
+
+} ASL_COMMENT_TYPES;
+
+
+/* Internal opcodes for DisasmOpcode field above */
#define ACPI_DASM_BUFFER 0x00 /* Buffer is a simple data buffer */
#define ACPI_DASM_RESOURCE 0x01 /* Buffer is a Resource Descriptor */
@@ -934,7 +1078,47 @@ typedef union acpi_parse_value
#define ACPI_DASM_LNOT_PREFIX 0x08 /* Start of a LNotEqual (etc.) pair of opcodes */
#define ACPI_DASM_LNOT_SUFFIX 0x09 /* End of a LNotEqual (etc.) pair of opcodes */
#define ACPI_DASM_HID_STRING 0x0A /* String is a _HID or _CID */
-#define ACPI_DASM_IGNORE 0x0B /* Not used at this time */
+#define ACPI_DASM_IGNORE_SINGLE 0x0B /* Ignore the opcode but not it's children */
+#define ACPI_DASM_SWITCH 0x0C /* While is a Switch */
+#define ACPI_DASM_SWITCH_PREDICATE 0x0D /* Object is a predicate for a Switch or Case block */
+#define ACPI_DASM_CASE 0x0E /* If/Else is a Case in a Switch/Case block */
+#define ACPI_DASM_DEFAULT 0x0F /* Else is a Default in a Switch/Case block */
+
+
+/*
+ * List struct used in the -ca option
+ */
+typedef struct acpi_comment_node
+{
+ char *Comment;
+ struct acpi_comment_node *Next;
+
+} ACPI_COMMENT_NODE;
+
+
+typedef struct acpi_comment_addr_node
+{
+ UINT8 *Addr;
+ struct acpi_comment_addr_node *Next;
+} ACPI_COMMENT_ADDR_NODE;
+
+/*
+ * File node - used for "Include" operator file stack and
+ * depdendency tree for the -ca option
+ */
+typedef struct acpi_file_node
+{
+ void *File;
+ char *Filename;
+ char *FileStart; /* Points to AML and indicates when the AML for this particular file starts. */
+ char *FileEnd; /* Points to AML and indicates when the AML for this particular file ends. */
+ struct acpi_file_node *Next;
+ struct acpi_file_node *Parent;
+ BOOLEAN IncludeWritten;
+ ACPI_COMMENT_NODE *IncludeComment;
+
+} ACPI_FILE_NODE;
+
/*
* Generic operation (for example: If, While, Store)
@@ -970,6 +1154,8 @@ typedef struct acpi_parse_obj_asl
union acpi_parse_object *Child;
union acpi_parse_object *ParentMethod;
char *Filename;
+ BOOLEAN FileChanged;
+ char *ParentFilename;
char *ExternalName;
char *Namepath;
char NameSeg[4];
@@ -1002,6 +1188,15 @@ typedef union acpi_parse_object
} ACPI_PARSE_OBJECT;
+typedef struct asl_comment_state
+{
+ UINT8 CommentType;
+ UINT32 SpacesBefore;
+ ACPI_PARSE_OBJECT *Latest_Parse_Node;
+ ACPI_PARSE_OBJECT *ParsingParenBraceNode;
+ BOOLEAN CaptureComments;
+} ASL_COMMENT_STATE;
+
/*
* Parse state - one state per parser invocation and each control
@@ -1035,14 +1230,15 @@ typedef struct acpi_parse_state
/* Parse object DisasmFlags */
-#define ACPI_PARSEOP_IGNORE 0x01
-#define ACPI_PARSEOP_PARAMETER_LIST 0x02
-#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
-#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x08
-#define ACPI_PARSEOP_CLOSING_PAREN 0x10
-#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x20
-#define ACPI_PARSEOP_ASSIGNMENT 0x40
-#define ACPI_PARSEOP_ELSEIF 0x80
+#define ACPI_PARSEOP_IGNORE 0x0001
+#define ACPI_PARSEOP_PARAMETER_LIST 0x0002
+#define ACPI_PARSEOP_EMPTY_TERMLIST 0x0004
+#define ACPI_PARSEOP_PREDEFINED_CHECKED 0x0008
+#define ACPI_PARSEOP_CLOSING_PAREN 0x0010
+#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x0020
+#define ACPI_PARSEOP_ASSIGNMENT 0x0040
+#define ACPI_PARSEOP_ELSEIF 0x0080
+#define ACPI_PARSEOP_LEGACY_ASL_ONLY 0x0100
/*****************************************************************************
OpenPOWER on IntegriCloud