summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2001-10-31 02:34:45 +0000
committermsmith <msmith@FreeBSD.org>2001-10-31 02:34:45 +0000
commitd560998a74aec46d39d9809a8aea41e507cc5468 (patch)
tree356c7fa1da5a6d598394a8af02ebd690e96b374c /sys/contrib
parente2ce4e5ccf9338008aa7e77235f376be92b5833e (diff)
downloadFreeBSD-src-d560998a74aec46d39d9809a8aea41e507cc5468.zip
FreeBSD-src-d560998a74aec46d39d9809a8aea41e507cc5468.tar.gz
Merge local changes, add new files and remove obsoleted ones.
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/dev/acpica/acconfig.h8
-rw-r--r--sys/contrib/dev/acpica/acgcc.h7
-rw-r--r--sys/contrib/dev/acpica/acpiosxf.h3
-rw-r--r--sys/contrib/dev/acpica/exfldio.c61
-rw-r--r--sys/contrib/dev/acpica/psparse.c49
5 files changed, 62 insertions, 66 deletions
diff --git a/sys/contrib/dev/acpica/acconfig.h b/sys/contrib/dev/acpica/acconfig.h
index e735134..fb97fc2 100644
--- a/sys/contrib/dev/acpica/acconfig.h
+++ b/sys/contrib/dev/acpica/acconfig.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
- * $Revision: 71 $
+ * $Revision: 74 $
*
*****************************************************************************/
@@ -144,7 +144,11 @@
/* Version string */
-#define ACPI_CA_VERSION 0x20010920
+#define ACPI_CA_VERSION 0x20011018
+
+/* Version of ACPI supported */
+
+#define ACPI_CA_SUPPORT_LEVEL 2
/* Maximum objects in the various object caches */
diff --git a/sys/contrib/dev/acpica/acgcc.h b/sys/contrib/dev/acpica/acgcc.h
index ed0bd70..9ca66f1 100644
--- a/sys/contrib/dev/acpica/acgcc.h
+++ b/sys/contrib/dev/acpica/acgcc.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acgcc.h - GCC specific defines, etc.
- * $Revision: 13 $
+ * $Revision: 14 $
*
*****************************************************************************/
@@ -251,4 +251,9 @@
#endif /* IA 32 */
+/* This macro is used to tag functions as "printf-like" because
+ * some compilers (like GCC) can catch printf format string problems.
+ */
+#define ACPI_PRINTF_LIKE_FUNC __attribute__ ((__format__ (__printf__, 4, 5)))
+
#endif /* __ACGCC_H__ */
diff --git a/sys/contrib/dev/acpica/acpiosxf.h b/sys/contrib/dev/acpica/acpiosxf.h
index ec8c787..57c9f97 100644
--- a/sys/contrib/dev/acpica/acpiosxf.h
+++ b/sys/contrib/dev/acpica/acpiosxf.h
@@ -33,7 +33,8 @@
* 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
+ * solely to the minimum extent necessary to exer
+ se 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;
diff --git a/sys/contrib/dev/acpica/exfldio.c b/sys/contrib/dev/acpica/exfldio.c
index feca92c..c10b336 100644
--- a/sys/contrib/dev/acpica/exfldio.c
+++ b/sys/contrib/dev/acpica/exfldio.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exfldio - Aml Field I/O
- * $Revision: 64 $
+ * $Revision: 66 $
*
*****************************************************************************/
@@ -165,7 +165,6 @@ AcpiExSetupField (
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
-
/*
* If the Region Address and Length have not been previously evaluated,
* evaluate them now and save the results.
@@ -180,7 +179,6 @@ AcpiExSetupField (
}
}
-
/*
* Validate the request. The entire request from the byte offset for a
* length of one field datum (access width) must fit within the region.
@@ -257,7 +255,6 @@ AcpiExReadFieldDatum (
*Value = 0;
-
/*
* BufferFields - Read from a Buffer
* Other Fields - Read from a Operation Region.
@@ -290,7 +287,6 @@ AcpiExReadFieldDatum (
return_ACPI_STATUS (Status);
}
-
/*
* The physical address of this field datum is:
*
@@ -302,13 +298,12 @@ AcpiExReadFieldDatum (
Address = RgnDesc->Region.Address + ObjDesc->CommonField.BaseByteOffset +
FieldDatumByteOffset;
- ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Region %s(%X) width %X base:off %X:%X at %8.8lX%8.8lX\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Region %s(%X) width %X base:off %X:%X at %8.8X%8.8X\n",
AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId, ObjDesc->CommonField.AccessBitWidth,
ObjDesc->CommonField.BaseByteOffset, FieldDatumByteOffset,
HIDWORD(Address), LODWORD(Address)));
-
/* Invoke the appropriate AddressSpace/OpRegion handler */
Status = AcpiEvAddressSpaceDispatch (RgnDesc, ACPI_READ_ADR_SPACE,
@@ -338,7 +333,7 @@ AcpiExReadFieldDatum (
}
- ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Returned value=%08lX \n", *Value));
+ ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Returned value=%08X \n", *Value));
return_ACPI_STATUS (Status);
}
@@ -487,7 +482,6 @@ AcpiExExtractFromField (
ByteFieldLength, DatumCount, ObjDesc->CommonField.AccessBitWidth,
ObjDesc->CommonField.AccessByteWidth));
-
/*
* Clear the caller's buffer (the whole buffer length as given)
* This is very important, especially in the cases where a byte is read,
@@ -601,7 +595,6 @@ AcpiExExtractFromField (
}
}
-
/*
* Store the merged field datum in the caller's buffer, according to
* the granularity of the field (size of each datum).
@@ -617,7 +610,6 @@ AcpiExExtractFromField (
DatumOffset++;
}
-
return_ACPI_STATUS (AE_OK);
}
@@ -694,7 +686,7 @@ AcpiExWriteFieldDatum (
FieldDatumByteOffset;
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
- "Store %X in Region %s(%X) at %8.8lX%8.8lX width %X\n",
+ "Store %X in Region %s(%X) at %8.8X%8.8X width %X\n",
Value, AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId, HIDWORD(Address), LODWORD(Address),
ObjDesc->CommonField.AccessBitWidth));
@@ -732,7 +724,7 @@ AcpiExWriteFieldDatum (
}
- ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Value written=%08lX \n", Value));
+ ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Value written=%08X \n", Value));
return_ACPI_STATUS (Status);
}
@@ -769,7 +761,6 @@ AcpiExWriteFieldDatumWithUpdateRule (
MergedValue = FieldValue;
-
/* If the mask is all ones, we don't need to worry about the update rule */
if (Mask != ACPI_UINT32_MAX)
@@ -778,9 +769,7 @@ AcpiExWriteFieldDatumWithUpdateRule (
switch (ObjDesc->CommonField.UpdateRule)
{
-
case UPDATE_PRESERVE:
-
/*
* Check if update rule needs to be applied (not if mask is all
* ones) The left shift drops the bits we want to ignore.
@@ -896,7 +885,6 @@ AcpiExInsertIntoField (
ByteFieldLength, DatumCount, ObjDesc->CommonField.AccessBitWidth,
ObjDesc->CommonField.AccessByteWidth));
-
/*
* Break the request into up to three parts (similar to an I/O request):
* 1) non-aligned part at start
@@ -998,33 +986,37 @@ AcpiExInsertIntoField (
MergedDatum = ThisRawDatum;
}
-
/*
* Special handling for the last datum if the field does NOT end on
* a datum boundary. Update Rule must be applied to the bits outside
* the field.
*/
- if ((DatumOffset == DatumCount) &&
- ObjDesc->CommonField.EndFieldValidBits)
+ if (DatumOffset == DatumCount)
{
/*
- * Part3:
- * This is the last datum and the field does not end on a datum boundary.
- * Build the partial datum and write with the update rule.
+ * If there are dangling non-aligned bits, perform one more merged write
+ * Else - field is aligned at the end, no need for any more writes
*/
+ if (ObjDesc->CommonField.EndFieldValidBits)
+ {
+ /*
+ * Part3:
+ * This is the last datum and the field does not end on a datum boundary.
+ * Build the partial datum and write with the update rule.
+ *
+ * Mask off the unused bits above (after) the end-of-field
+ */
+ Mask = MASK_BITS_ABOVE (ObjDesc->CommonField.EndFieldValidBits);
+ MergedDatum &= Mask;
- /* Mask off the unused bits above (after) the end-of-field */
-
- Mask = MASK_BITS_ABOVE (ObjDesc->CommonField.EndFieldValidBits);
- MergedDatum &= Mask;
-
- /* Write the last datum with the update rule */
+ /* Write the last datum with the update rule */
- Status = AcpiExWriteFieldDatumWithUpdateRule (ObjDesc, Mask,
- MergedDatum, FieldDatumByteOffset);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
+ Status = AcpiExWriteFieldDatumWithUpdateRule (ObjDesc, Mask,
+ MergedDatum, FieldDatumByteOffset);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
}
}
@@ -1047,7 +1039,6 @@ AcpiExInsertIntoField (
PreviousRawDatum = ThisRawDatum;
}
-
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/psparse.c b/sys/contrib/dev/acpica/psparse.c
index 877d3df..1829586 100644
--- a/sys/contrib/dev/acpica/psparse.c
+++ b/sys/contrib/dev/acpica/psparse.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psparse - Parser top level AML parse routines
- * $Revision: 101 $
+ * $Revision: 104 $
*
*****************************************************************************/
@@ -298,25 +298,18 @@ AcpiPsCompleteThisOp (
ACPI_PARSE_OBJECT *Prev;
ACPI_PARSE_OBJECT *Next;
const ACPI_OPCODE_INFO *ParentInfo;
- UINT32 OpcodeClass;
ACPI_PARSE_OBJECT *ReplacementOp = NULL;
FUNCTION_TRACE_PTR ("PsCompleteThisOp", Op);
- OpcodeClass = ACPI_GET_OP_CLASS (WalkState->OpInfo);
/* Delete this op and the subtree below it if asked to */
if (((WalkState->ParseFlags & ACPI_PARSE_TREE_MASK) == ACPI_PARSE_DELETE_TREE) &&
- (OpcodeClass != OPTYPE_CONSTANT) &&
- (OpcodeClass != OPTYPE_LITERAL) &&
- (OpcodeClass != OPTYPE_LOCAL_VARIABLE) &&
- (OpcodeClass != OPTYPE_METHOD_ARGUMENT) &&
- (OpcodeClass != OPTYPE_DATA_TERM) &&
- (Op->Opcode != AML_INT_NAMEPATH_OP))
+ (WalkState->OpInfo->Class != AML_CLASS_ARGUMENT))
{
/* Make sure that we only delete this subtree */
@@ -328,12 +321,13 @@ AcpiPsCompleteThisOp (
*/
ParentInfo = AcpiPsGetOpcodeInfo (Op->Parent->Opcode);
- switch (ACPI_GET_OP_CLASS (ParentInfo))
+ switch (ParentInfo->Class)
{
- case OPTYPE_CONTROL: /* IF, ELSE, WHILE only */
+ case AML_CLASS_CONTROL: /* IF, ELSE, WHILE only */
break;
- case OPTYPE_NAMED_OBJECT: /* Scope, method, etc. */
+ case AML_CLASS_NAMED_OBJECT: /* Scope, method, etc. */
+ case AML_CLASS_CREATE:
/*
* These opcodes contain TermArg operands. The current
@@ -652,18 +646,10 @@ AcpiPsParseLoop (
* 3) An unknown/invalid opcode
*/
WalkState->OpInfo = AcpiPsGetOpcodeInfo (WalkState->Opcode);
- switch (ACPI_GET_OP_TYPE (WalkState->OpInfo))
+ switch (WalkState->OpInfo->Class)
{
- case ACPI_OP_TYPE_OPCODE:
-
- /* Found opcode info, this is a normal opcode */
-
- ParserState->Aml += AcpiPsGetOpcodeSize (WalkState->Opcode);
- WalkState->ArgTypes = WalkState->OpInfo->ParseArgs;
- break;
-
- case ACPI_OP_TYPE_ASCII:
- case ACPI_OP_TYPE_PREFIX:
+ case AML_CLASS_ASCII:
+ case AML_CLASS_PREFIX:
/*
* Starts with a valid prefix or ASCII char, this is a name
* string. Convert the bare name string to a namepath.
@@ -672,12 +658,12 @@ AcpiPsParseLoop (
WalkState->ArgTypes = ARGP_NAMESTRING;
break;
- case ACPI_OP_TYPE_UNKNOWN:
+ case AML_CLASS_UNKNOWN:
/* The opcode is unrecognized. Just skip unknown opcodes */
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Found unknown opcode %lX at AML offset %X, ignoring\n",
+ "Found unknown opcode %X at AML offset %X, ignoring\n",
WalkState->Opcode, WalkState->AmlOffset));
DUMP_BUFFER (ParserState->Aml, 128);
@@ -686,6 +672,15 @@ AcpiPsParseLoop (
ParserState->Aml++;
continue;
+
+ default:
+
+ /* Found opcode info, this is a normal opcode */
+
+ ParserState->Aml += AcpiPsGetOpcodeSize (WalkState->Opcode);
+ WalkState->ArgTypes = WalkState->OpInfo->ParseArgs;
+ break;
+
}
@@ -822,7 +817,7 @@ AcpiPsParseLoop (
if (WalkState->OpInfo)
{
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
- "Op=%p Opcode=%4.4lX Aml %p Oft=%5.5lX\n",
+ "Op=%p Opcode=%4.4X Aml %p Oft=%5.5X\n",
Op, Op->Opcode, ParserState->Aml, Op->AmlOffset));
}
}
@@ -1171,7 +1166,7 @@ AcpiPsParseAml (
FUNCTION_TRACE ("PsParseAml");
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Entered with WalkState=%p Aml=%p size=%lX\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Entered with WalkState=%p Aml=%p size=%X\n",
WalkState, WalkState->ParserState.Aml, WalkState->ParserState.AmlSize));
OpenPOWER on IntegriCloud