summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2003-12-09 02:48:38 +0000
committernjl <njl@FreeBSD.org>2003-12-09 02:48:38 +0000
commitd8881cd64b4e763a8a4c2f511ef73968dc62a744 (patch)
tree6e9526e0b1f8d8f3629aa58a2339d9e19ba2d43a /sys/contrib
parentd6cef33bc61ee26e623277c4064e87bd2ac4fd79 (diff)
downloadFreeBSD-src-d8881cd64b4e763a8a4c2f511ef73968dc62a744.zip
FreeBSD-src-d8881cd64b4e763a8a4c2f511ef73968dc62a744.tar.gz
Unchanged files that are off the vendor branch.
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/dev/acpica/dbfileio.c8
-rw-r--r--sys/contrib/dev/acpica/exsystem.c32
-rw-r--r--sys/contrib/dev/acpica/rscreate.c4
-rw-r--r--sys/contrib/dev/acpica/tbget.c16
-rw-r--r--sys/contrib/dev/acpica/utglobal.c103
5 files changed, 129 insertions, 34 deletions
diff --git a/sys/contrib/dev/acpica/dbfileio.c b/sys/contrib/dev/acpica/dbfileio.c
index a0dd713..58b11b7 100644
--- a/sys/contrib/dev/acpica/dbfileio.c
+++ b/sys/contrib/dev/acpica/dbfileio.c
@@ -2,7 +2,7 @@
*
* Module Name: dbfileio - Debugger file I/O commands. These can't usually
* be used when running the debugger in Ring 0 (Kernel mode)
- * $Revision: 74 $
+ * $Revision: 75 $
*
******************************************************************************/
@@ -261,12 +261,12 @@ AcpiDbCheckTextModeCorruption (
}
}
- /*
+ /*
* Entire table scanned, each CR is part of a CR/LF pair --
* meaning that the table was treated as a text file somewhere.
*
* NOTE: We can't "fix" the table, because any existing CR/LF pairs in the
- * original table are left untouched by the text conversion process --
+ * original table are left untouched by the text conversion process --
* meaning that we cannot simply replace CR/LF pairs with LFs.
*/
AcpiOsPrintf ("Table has been corrupted by text mode conversion\n");
@@ -358,7 +358,7 @@ AcpiDbReadTable (
if (Status == AE_BAD_CHECKSUM)
{
- Status = AcpiDbCheckTextModeCorruption ((UINT8 *) *Table,
+ Status = AcpiDbCheckTextModeCorruption ((UINT8 *) *Table,
FileSize, (*Table)->Length);
return (Status);
}
diff --git a/sys/contrib/dev/acpica/exsystem.c b/sys/contrib/dev/acpica/exsystem.c
index ae38ec8..ba4ef4e 100644
--- a/sys/contrib/dev/acpica/exsystem.c
+++ b/sys/contrib/dev/acpica/exsystem.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exsystem - Interface to OS services
- * $Revision: 76 $
+ * $Revision: 79 $
*
*****************************************************************************/
@@ -188,11 +188,16 @@ AcpiExSystemWaitSemaphore (
*
* FUNCTION: AcpiExSystemDoStall
*
- * PARAMETERS: HowLong - The amount of time to stall
+ * PARAMETERS: HowLong - The amount of time to stall,
+ * in microseconds
*
* RETURN: Status
*
* DESCRIPTION: Suspend running thread for specified amount of time.
+ * Note: ACPI specification requires that Stall() does not
+ * relinquish the processor, and delays longer than 100 usec
+ * should use Sleep() instead. We allow stalls up to 255 usec
+ * for compatibility with other interpreters and existing BIOSs.
*
******************************************************************************/
@@ -206,19 +211,17 @@ AcpiExSystemDoStall (
ACPI_FUNCTION_ENTRY ();
- if (HowLong > 1000) /* 1 millisecond */
+ if (HowLong > 255) /* 255 microseconds */
{
- /* Since this thread will sleep, we must release the interpreter */
-
- AcpiExExitInterpreter ();
-
- AcpiOsSleep (0, (HowLong / 1000) + 1);
-
- /* And now we must get the interpreter again */
-
- Status = AcpiExEnterInterpreter ();
+ /*
+ * Longer than 255 usec, this is an error
+ *
+ * (ACPI specifies 100 usec as max, but this gives some slack in
+ * order to support existing BIOSs)
+ */
+ ACPI_REPORT_ERROR (("Stall: Time parameter is too large (%d)\n", HowLong));
+ Status = AE_AML_OPERAND_VALUE;
}
-
else
{
AcpiOsStall (HowLong);
@@ -232,7 +235,8 @@ AcpiExSystemDoStall (
*
* FUNCTION: AcpiExSystemDoSuspend
*
- * PARAMETERS: HowLong - The amount of time to suspend
+ * PARAMETERS: HowLong - The amount of time to suspend,
+ * in milliseconds
*
* RETURN: None
*
diff --git a/sys/contrib/dev/acpica/rscreate.c b/sys/contrib/dev/acpica/rscreate.c
index 83fee4f..168fd6c 100644
--- a/sys/contrib/dev/acpica/rscreate.c
+++ b/sys/contrib/dev/acpica/rscreate.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rscreate - Create resource lists/tables
- * $Revision: 64 $
+ * $Revision: 65 $
*
******************************************************************************/
@@ -420,7 +420,7 @@ AcpiRsCreatePciRoutingTable (
/* Now align the current length */
- UserPrt->Length = ACPI_ROUND_UP_TO_64BITS (UserPrt->Length);
+ UserPrt->Length = (UINT32) ACPI_ROUND_UP_TO_64BITS (UserPrt->Length);
/*
* 4) Fourth subobject: Dereference the PRT.SourceIndex
diff --git a/sys/contrib/dev/acpica/tbget.c b/sys/contrib/dev/acpica/tbget.c
index 01fac0e..0850f5f 100644
--- a/sys/contrib/dev/acpica/tbget.c
+++ b/sys/contrib/dev/acpica/tbget.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbget - ACPI Table get* routines
- * $Revision: 84 $
+ * $Revision: 87 $
*
*****************************************************************************/
@@ -222,12 +222,11 @@ AcpiTbGetTableHeader (
/* Create a logical address for the physical pointer*/
Status = AcpiOsMapMemory (Address->Pointer.Physical, sizeof (ACPI_TABLE_HEADER),
- (void **) &Header);
+ (void *) &Header);
if (ACPI_FAILURE (Status))
{
ACPI_REPORT_ERROR (("Could not map memory at %8.8X%8.8X for length %X\n",
- ACPI_HIDWORD (Address->Pointer.Physical),
- ACPI_LODWORD (Address->Pointer.Physical),
+ ACPI_FORMAT_UINT64 (Address->Pointer.Physical),
sizeof (ACPI_TABLE_HEADER)));
return_ACPI_STATUS (Status);
}
@@ -446,13 +445,12 @@ AcpiTbGetThisTable (
* into our address space.
*/
Status = AcpiOsMapMemory (Address->Pointer.Physical, (ACPI_SIZE) Header->Length,
- (void **) &FullTable);
+ (void *) &FullTable);
if (ACPI_FAILURE (Status))
{
ACPI_REPORT_ERROR (("Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X\n",
Header->Signature,
- ACPI_HIDWORD (Address->Pointer.Physical),
- ACPI_LODWORD (Address->Pointer.Physical), Header->Length));
+ ACPI_FORMAT_UINT64 (Address->Pointer.Physical), Header->Length));
return (Status);
}
@@ -496,8 +494,7 @@ AcpiTbGetThisTable (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"Found table [%4.4s] at %8.8X%8.8X, mapped/copied to %p\n",
FullTable->Signature,
- ACPI_HIDWORD (Address->Pointer.Physical),
- ACPI_LODWORD (Address->Pointer.Physical), FullTable));
+ ACPI_FORMAT_UINT64 (Address->Pointer.Physical), FullTable));
return_ACPI_STATUS (Status);
}
@@ -549,6 +546,7 @@ AcpiTbGetTablePtr (
{
/* Get the first */
+ *TablePtrLoc = NULL;
if (AcpiGbl_TableLists[TableType].Next)
{
*TablePtrLoc = AcpiGbl_TableLists[TableType].Next->Pointer;
diff --git a/sys/contrib/dev/acpica/utglobal.c b/sys/contrib/dev/acpica/utglobal.c
index 9a16eea..1a88f7c 100644
--- a/sys/contrib/dev/acpica/utglobal.c
+++ b/sys/contrib/dev/acpica/utglobal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utglobal - Global variables for the ACPI subsystem
- * $Revision: 185 $
+ * $Revision: 191 $
*
*****************************************************************************/
@@ -388,9 +388,9 @@ ACPI_TABLE_SUPPORT AcpiGbl_TableData[NUM_ACPI_TABLE_TYPES] =
/*********** Name, Signature, Global typed pointer Signature size, Type How many allowed?, Contains valid AML? */
/* RSDP 0 */ {RSDP_NAME, RSDP_SIG, NULL, sizeof (RSDP_SIG)-1, ACPI_TABLE_ROOT | ACPI_TABLE_SINGLE},
- /* DSDT 1 */ {DSDT_SIG, DSDT_SIG, (void **) &AcpiGbl_DSDT, sizeof (DSDT_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE | ACPI_TABLE_EXECUTABLE},
- /* FADT 2 */ {FADT_SIG, FADT_SIG, (void **) &AcpiGbl_FADT, sizeof (FADT_SIG)-1, ACPI_TABLE_PRIMARY | ACPI_TABLE_SINGLE},
- /* FACS 3 */ {FACS_SIG, FACS_SIG, (void **) &AcpiGbl_FACS, sizeof (FACS_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE},
+ /* DSDT 1 */ {DSDT_SIG, DSDT_SIG, (void *) &AcpiGbl_DSDT, sizeof (DSDT_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE | ACPI_TABLE_EXECUTABLE},
+ /* FADT 2 */ {FADT_SIG, FADT_SIG, (void *) &AcpiGbl_FADT, sizeof (FADT_SIG)-1, ACPI_TABLE_PRIMARY | ACPI_TABLE_SINGLE},
+ /* FACS 3 */ {FACS_SIG, FACS_SIG, (void *) &AcpiGbl_FACS, sizeof (FACS_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE},
/* PSDT 4 */ {PSDT_SIG, PSDT_SIG, NULL, sizeof (PSDT_SIG)-1, ACPI_TABLE_PRIMARY | ACPI_TABLE_MULTIPLE | ACPI_TABLE_EXECUTABLE},
/* SSDT 5 */ {SSDT_SIG, SSDT_SIG, NULL, sizeof (SSDT_SIG)-1, ACPI_TABLE_PRIMARY | ACPI_TABLE_MULTIPLE | ACPI_TABLE_EXECUTABLE},
/* XSDT 6 */ {XSDT_SIG, XSDT_SIG, NULL, sizeof (RSDT_SIG)-1, ACPI_TABLE_ROOT | ACPI_TABLE_SINGLE},
@@ -439,7 +439,7 @@ ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] =
/* ACPI_EVENT_GLOBAL */ {ACPI_BITREG_GLOBAL_LOCK_STATUS, ACPI_BITREG_GLOBAL_LOCK_ENABLE, ACPI_BITMASK_GLOBAL_LOCK_STATUS, ACPI_BITMASK_GLOBAL_LOCK_ENABLE},
/* ACPI_EVENT_POWER_BUTTON */ {ACPI_BITREG_POWER_BUTTON_STATUS, ACPI_BITREG_POWER_BUTTON_ENABLE, ACPI_BITMASK_POWER_BUTTON_STATUS, ACPI_BITMASK_POWER_BUTTON_ENABLE},
/* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_BUTTON_STATUS, ACPI_BITREG_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_STATUS, ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
- /* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, ACPI_BITREG_RT_CLOCK_ENABLE, 0, 0},
+ /* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, ACPI_BITREG_RT_CLOCK_ENABLE, ACPI_BITMASK_RT_CLOCK_STATUS, ACPI_BITMASK_RT_CLOCK_ENABLE},
};
/*****************************************************************************
@@ -615,6 +615,99 @@ AcpiUtGetObjectTypeName (
}
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiUtGetNodeName
+ *
+ * PARAMETERS: Object - A namespace node
+ *
+ * RETURN: Pointer to a string
+ *
+ * DESCRIPTION: Validate the node and return the node's ACPI name.
+ *
+ ****************************************************************************/
+
+char *
+AcpiUtGetNodeName (
+ void *Object)
+{
+ ACPI_NAMESPACE_NODE *Node;
+
+
+ if (!Object)
+ {
+ return ("NULL NODE");
+ }
+
+ Node = (ACPI_NAMESPACE_NODE *) Object;
+
+ if (Node->Descriptor != ACPI_DESC_TYPE_NAMED)
+ {
+ return ("****");
+ }
+
+ if (!AcpiUtValidAcpiName (* (UINT32 *) Node->Name.Ascii))
+ {
+ return ("----");
+ }
+
+ return (Node->Name.Ascii);
+}
+
+
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiUtGetDescriptorName
+ *
+ * PARAMETERS: Object - An ACPI object
+ *
+ * RETURN: Pointer to a string
+ *
+ * DESCRIPTION: Validate object and return the descriptor type
+ *
+ ****************************************************************************/
+
+static const char *AcpiGbl_DescTypeNames[] = /* printable names of descriptor types */
+{
+ /* 00 */ "Invalid",
+ /* 01 */ "Cached",
+ /* 02 */ "State-Generic",
+ /* 03 */ "State-Update",
+ /* 04 */ "State-Package",
+ /* 05 */ "State-Control",
+ /* 06 */ "State-RootParseScope",
+ /* 07 */ "State-ParseScope",
+ /* 08 */ "State-WalkScope",
+ /* 09 */ "State-Result",
+ /* 10 */ "State-Notify",
+ /* 11 */ "State-Thread",
+ /* 12 */ "Walk",
+ /* 13 */ "Parser",
+ /* 14 */ "Operand",
+ /* 15 */ "Node"
+};
+
+
+char *
+AcpiUtGetDescriptorName (
+ void *Object)
+{
+
+ if (!Object)
+ {
+ return ("NULL OBJECT");
+ }
+
+ if (ACPI_GET_DESCRIPTOR_TYPE (Object) > ACPI_DESC_TYPE_MAX)
+ {
+ return ((char *) AcpiGbl_BadType);
+ }
+
+ return ((char *) AcpiGbl_DescTypeNames[ACPI_GET_DESCRIPTOR_TYPE (Object)]);
+
+}
+
+
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
/*
* Strings and procedures used for debug only
OpenPOWER on IntegriCloud