aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev/acpica/aclocal.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/aclocal.h')
-rw-r--r--sys/contrib/dev/acpica/aclocal.h141
1 files changed, 77 insertions, 64 deletions
diff --git a/sys/contrib/dev/acpica/aclocal.h b/sys/contrib/dev/acpica/aclocal.h
index 0a3868b88f77..2378345b05b6 100644
--- a/sys/contrib/dev/acpica/aclocal.h
+++ b/sys/contrib/dev/acpica/aclocal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
- * $Revision: 82 $
+ * $Revision: 89 $
*
*****************************************************************************/
@@ -268,6 +268,7 @@ typedef struct acpi_node
#define ANOBJ_AML_ATTACHMENT 0x1
#define ANOBJ_END_OF_PEER_LIST 0x2
+#define ANOBJ_DATA_WIDTH_32 0x4 /* Parent table is 64-bits */
/*
@@ -281,6 +282,7 @@ typedef struct AcpiTableDesc
ACPI_TABLE_HEADER *Pointer;
void *BasePointer;
UINT8 *AmlPointer;
+ UINT64 PhysicalAddress;
UINT32 AmlLength;
UINT32 Length;
UINT32 Count;
@@ -544,8 +546,7 @@ typedef struct acpi_opcode_info
UINT32 ParseArgs; /* Grammar/Parse time arguments */
UINT32 RuntimeArgs; /* Interpret time arguments */
- DEBUG_ONLY_MEMBERS (
- NATIVE_CHAR *Name) /* op name (debug only) */
+ DEBUG_ONLY_MEMBERS (NATIVE_CHAR *Name) /* op name (debug only) */
} ACPI_OPCODE_INFO;
@@ -572,7 +573,7 @@ typedef union acpi_parse_val
DEBUG_ONLY_MEMBERS (\
NATIVE_CHAR OpName[16]) /* op name (debug only) */\
/* NON-DEBUG members below: */\
- ACPI_NAMESPACE_NODE *Node;/* for use by interpreter */\
+ ACPI_NAMESPACE_NODE *Node; /* for use by interpreter */\
ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
@@ -649,7 +650,7 @@ typedef struct acpi_walk_state
UINT8 CurrentResult; /* */
struct acpi_walk_state *Next; /* Next WalkState in list */
- ACPI_PARSE_OBJECT *Origin; /* Start of walk */
+ ACPI_PARSE_OBJECT *Origin; /* Start of walk [Obsolete] */
/* TBD: Obsolete with removal of WALK procedure ? */
ACPI_PARSE_OBJECT *PrevOp; /* Last op that was processed */
@@ -769,72 +770,92 @@ typedef struct acpi_get_devices_info
#define MAX_CX_STATE_LATENCY 0xFFFFFFFF
#define MAX_CX_STATES 4
+
/*
* The #define's and enum below establish an abstract way of identifying what
* register block and register is to be accessed. Do not change any of the
* values as they are used in switch statements and offset calculations.
*/
-#define REGISTER_BLOCK_MASK 0xFF00
-#define BIT_IN_REGISTER_MASK 0x00FF
-#define PM1_EVT 0x0100
-#define PM1_CONTROL 0x0200
-#define PM2_CONTROL 0x0300
-#define PM_TIMER 0x0400
-#define PROCESSOR_BLOCK 0x0500
-#define GPE0_STS_BLOCK 0x0600
-#define GPE0_EN_BLOCK 0x0700
-#define GPE1_STS_BLOCK 0x0800
-#define GPE1_EN_BLOCK 0x0900
-
-enum
-{
- /* PM1 status register ids */
+#define REGISTER_BLOCK_MASK 0xFF00 /* Register Block Id */
+#define BIT_IN_REGISTER_MASK 0x00FF /* Bit Id in the Register Block Id */
+#define BYTE_IN_REGISTER_MASK 0x00FF /* Register Offset in the Register Block */
- TMR_STS = (PM1_EVT | 0x01),
- BM_STS,
- GBL_STS,
- PWRBTN_STS,
- SLPBTN_STS,
- RTC_STS,
- WAK_STS,
+#define REGISTER_BLOCK_ID(RegId) (RegId & REGISTER_BLOCK_MASK)
+#define REGISTER_BIT_ID(RegId) (RegId & BIT_IN_REGISTER_MASK)
+#define REGISTER_OFFSET(RegId) (RegId & BYTE_IN_REGISTER_MASK)
- /* PM1 enable register ids */
+/*
+ * Access Rule
+ * To access a Register Bit:
+ * -> Use Bit Name (= Register Block Id | Bit Id) defined in the enum.
+ *
+ * To access a Register:
+ * -> Use Register Id (= Register Block Id | Register Offset)
+ */
- TMR_EN,
- /* need to skip 1 enable number since there's no bus master enable register */
- GBL_EN = (PM1_EVT | 0x0A),
- PWRBTN_EN,
- SLPBTN_EN,
- RTC_EN,
- /* PM1 control register ids */
+/*
+ * Register Block Id
+ */
+#define PM1_STS 0x0100
+#define PM1_EN 0x0200
+#define PM1_CONTROL 0x0300
+#define PM2_CONTROL 0x0400
+#define PM_TIMER 0x0500
+#define PROCESSOR_BLOCK 0x0600
+#define GPE0_STS_BLOCK 0x0700
+#define GPE0_EN_BLOCK 0x0800
+#define GPE1_STS_BLOCK 0x0900
+#define GPE1_EN_BLOCK 0x0A00
+#define SMI_CMD_BLOCK 0x0B00
- SCI_EN = (PM1_CONTROL | 0x01),
- BM_RLD,
- GBL_RLS,
- SLP_TYPE_A,
- SLP_TYPE_B,
- SLP_EN,
+/*
+ * Address space bitmasks for mmio or io spaces
+ */
- /* PM2 control register ids */
+#define SMI_CMD_ADDRESS_SPACE 0x01
+#define PM1_BLK_ADDRESS_SPACE 0x02
+#define PM2_CNT_BLK_ADDRESS_SPACE 0x04
+#define PM_TMR_BLK_ADDRESS_SPACE 0x08
+#define GPE0_BLK_ADDRESS_SPACE 0x10
+#define GPE1_BLK_ADDRESS_SPACE 0x20
- ARB_DIS = (PM2_CONTROL | 0x01),
+/*
+ * Control bit definitions
+ */
+#define TMR_STS (PM1_STS | 0x01)
+#define BM_STS (PM1_STS | 0x02)
+#define GBL_STS (PM1_STS | 0x03)
+#define PWRBTN_STS (PM1_STS | 0x04)
+#define SLPBTN_STS (PM1_STS | 0x05)
+#define RTC_STS (PM1_STS | 0x06)
+#define WAK_STS (PM1_STS | 0x07)
- /* PM Timer register ids */
+#define TMR_EN (PM1_EN | 0x01)
+ /* no BM_EN */
+#define GBL_EN (PM1_EN | 0x03)
+#define PWRBTN_EN (PM1_EN | 0x04)
+#define SLPBTN_EN (PM1_EN | 0x05)
+#define RTC_EN (PM1_EN | 0x06)
+#define WAK_EN (PM1_EN | 0x07)
- TMR_VAL = (PM_TIMER | 0x01),
+#define SCI_EN (PM1_CONTROL | 0x01)
+#define BM_RLD (PM1_CONTROL | 0x02)
+#define GBL_RLS (PM1_CONTROL | 0x03)
+#define SLP_TYPE_A (PM1_CONTROL | 0x04)
+#define SLP_TYPE_B (PM1_CONTROL | 0x05)
+#define SLP_EN (PM1_CONTROL | 0x06)
- GPE0_STS = (GPE0_STS_BLOCK | 0x01),
- GPE0_EN = (GPE0_EN_BLOCK | 0x01),
+#define ARB_DIS (PM2_CONTROL | 0x01)
- GPE1_STS = (GPE1_STS_BLOCK | 0x01),
- GPE1_EN = (GPE0_EN_BLOCK | 0x01),
+#define TMR_VAL (PM_TIMER | 0x01)
- /* Last register value is one less than LAST_REG */
+#define GPE0_STS (GPE0_STS_BLOCK | 0x01)
+#define GPE0_EN (GPE0_EN_BLOCK | 0x01)
- LAST_REG
-};
+#define GPE1_STS (GPE1_STS_BLOCK | 0x01)
+#define GPE1_EN (GPE1_EN_BLOCK | 0x01)
#define TMR_STS_MASK 0x0001
@@ -845,8 +866,9 @@ enum
#define RTC_STS_MASK 0x0400
#define WAK_STS_MASK 0x8000
-#define ALL_FIXED_STS_BITS (TMR_STS_MASK | BM_STS_MASK | GBL_STS_MASK | PWRBTN_STS_MASK | \
- SLPBTN_STS_MASK | RTC_STS_MASK | WAK_STS_MASK)
+#define ALL_FIXED_STS_BITS (TMR_STS_MASK | BM_STS_MASK | GBL_STS_MASK \
+ | PWRBTN_STS_MASK | SLPBTN_STS_MASK \
+ | RTC_STS_MASK | WAK_STS_MASK)
#define TMR_EN_MASK 0x0001
#define GBL_EN_MASK 0x0020
@@ -861,6 +883,7 @@ enum
#define SLP_EN_MASK 0x2000
#define ARB_DIS_MASK 0x0001
+#define TMR_VAL_MASK 0xFFFFFFFF
#define GPE0_STS_MASK
#define GPE0_EN_MASK
@@ -872,16 +895,6 @@ enum
#define ACPI_READ 1
#define ACPI_WRITE 2
-#define LOW_BYTE 0x00FF
-#define ONE_BYTE 0x08
-
-#ifndef SET
- #define SET 1
-#endif
-#ifndef CLEAR
- #define CLEAR 0
-#endif
-
/* Plug and play */