summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/rsmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/rsmisc.c')
-rw-r--r--sys/contrib/dev/acpica/rsmisc.c162
1 files changed, 77 insertions, 85 deletions
diff --git a/sys/contrib/dev/acpica/rsmisc.c b/sys/contrib/dev/acpica/rsmisc.c
index ee1732f..adc3b4e 100644
--- a/sys/contrib/dev/acpica/rsmisc.c
+++ b/sys/contrib/dev/acpica/rsmisc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsmisc - Miscellaneous resource descriptors
- * $Revision: 17 $
+ * $Revision: 20 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -120,7 +120,7 @@
#include "acresrc.h"
#define _COMPONENT ACPI_RESOURCES
- MODULE_NAME ("rsmisc")
+ ACPI_MODULE_NAME ("rsmisc")
/*******************************************************************************
@@ -129,13 +129,12 @@
*
* PARAMETERS: ByteStreamBuffer - Pointer to the resource input byte
* stream
- * BytesConsumed - UINT32 pointer that is filled with
- * the number of bytes consumed from
- * the ByteStreamBuffer
- * OutputBuffer - Pointer to the user's return buffer
- * StructureSize - UINT32 pointer that is filled with
- * the number of bytes in the filled
- * in structure
+ * BytesConsumed - Pointer to where the number of bytes
+ * consumed the ByteStreamBuffer is
+ * returned
+ * OutputBuffer - Pointer to the return data buffer
+ * StructureSize - Pointer to where the number of bytes
+ * in the return data struct is returned
*
* RETURN: Status
*
@@ -148,15 +147,15 @@
ACPI_STATUS
AcpiRsEndTagResource (
UINT8 *ByteStreamBuffer,
- UINT32 *BytesConsumed,
+ ACPI_SIZE *BytesConsumed,
UINT8 **OutputBuffer,
- UINT32 *StructureSize)
+ ACPI_SIZE *StructureSize)
{
ACPI_RESOURCE *OutputStruct = (ACPI_RESOURCE *) *OutputBuffer;
- UINT32 StructSize = ACPI_RESOURCE_LENGTH;
+ ACPI_SIZE StructSize = ACPI_RESOURCE_LENGTH;
- FUNCTION_TRACE ("RsEndTagResource");
+ ACPI_FUNCTION_TRACE ("RsEndTagResource");
/*
@@ -188,9 +187,8 @@ AcpiRsEndTagResource (
*
* PARAMETERS: LinkedList - Pointer to the resource linked list
* OutputBuffer - Pointer to the user's return buffer
- * BytesConsumed - UINT32 pointer that is filled with
- * the number of bytes of the
- * OutputBuffer used
+ * BytesConsumed - Pointer to where the number of bytes
+ * used in the OutputBuffer is returned
*
* RETURN: Status
*
@@ -203,13 +201,13 @@ ACPI_STATUS
AcpiRsEndTagStream (
ACPI_RESOURCE *LinkedList,
UINT8 **OutputBuffer,
- UINT32 *BytesConsumed)
+ ACPI_SIZE *BytesConsumed)
{
UINT8 *Buffer = *OutputBuffer;
UINT8 Temp8 = 0;
- FUNCTION_TRACE ("RsEndTagStream");
+ ACPI_FUNCTION_TRACE ("RsEndTagStream");
/*
@@ -230,7 +228,7 @@ AcpiRsEndTagStream (
/*
* Return the number of bytes consumed in this operation
*/
- *BytesConsumed = POINTER_DIFF (Buffer, *OutputBuffer);
+ *BytesConsumed = ACPI_PTR_DIFF (Buffer, *OutputBuffer);
return_ACPI_STATUS (AE_OK);
}
@@ -241,13 +239,12 @@ AcpiRsEndTagStream (
*
* PARAMETERS: ByteStreamBuffer - Pointer to the resource input byte
* stream
- * BytesConsumed - UINT32 pointer that is filled with
- * the number of bytes consumed from
- * the ByteStreamBuffer
- * OutputBuffer - Pointer to the user's return buffer
- * StructureSize - UINT32 pointer that is filled with
- * the number of bytes in the filled
- * in structure
+ * BytesConsumed - Pointer to where the number of bytes
+ * consumed the ByteStreamBuffer is
+ * returned
+ * OutputBuffer - Pointer to the return data buffer
+ * StructureSize - Pointer to where the number of bytes
+ * in the return data struct is returned
*
* RETURN: Status
*
@@ -260,19 +257,19 @@ AcpiRsEndTagStream (
ACPI_STATUS
AcpiRsVendorResource (
UINT8 *ByteStreamBuffer,
- UINT32 *BytesConsumed,
+ ACPI_SIZE *BytesConsumed,
UINT8 **OutputBuffer,
- UINT32 *StructureSize)
+ ACPI_SIZE *StructureSize)
{
UINT8 *Buffer = ByteStreamBuffer;
ACPI_RESOURCE *OutputStruct = (ACPI_RESOURCE *) *OutputBuffer;
UINT16 Temp16 = 0;
UINT8 Temp8 = 0;
UINT8 Index;
- UINT32 StructSize = SIZEOF_RESOURCE (ACPI_RESOURCE_VENDOR);
+ ACPI_SIZE StructSize = ACPI_SIZEOF_RESOURCE (ACPI_RESOURCE_VENDOR);
- FUNCTION_TRACE ("RsVendorResource");
+ ACPI_FUNCTION_TRACE ("RsVendorResource");
/*
@@ -289,7 +286,7 @@ AcpiRsVendorResource (
/* Dereference */
- MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer);
+ ACPI_MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer);
/* Calculate bytes consumed */
@@ -329,7 +326,7 @@ AcpiRsVendorResource (
* calculate the length of the vendor string and expand the
* StructSize to the next 32-bit boundary.
*/
- StructSize += ROUND_UP_TO_32BITS (Temp16);
+ StructSize += ACPI_ROUND_UP_TO_32BITS (Temp16);
/*
* Set the Length parameter
@@ -350,9 +347,8 @@ AcpiRsVendorResource (
*
* PARAMETERS: LinkedList - Pointer to the resource linked list
* OutputBuffer - Pointer to the user's return buffer
- * BytesConsumed - UINT32 pointer that is filled with
- * the number of bytes of the
- * OutputBuffer used
+ * BytesConsumed - Pointer to where the number of bytes
+ * used in the OutputBuffer is returned
*
* RETURN: Status
*
@@ -365,7 +361,7 @@ ACPI_STATUS
AcpiRsVendorStream (
ACPI_RESOURCE *LinkedList,
UINT8 **OutputBuffer,
- UINT32 *BytesConsumed)
+ ACPI_SIZE *BytesConsumed)
{
UINT8 *Buffer = *OutputBuffer;
UINT16 Temp16 = 0;
@@ -373,7 +369,7 @@ AcpiRsVendorStream (
UINT8 Index;
- FUNCTION_TRACE ("RsVendorStream");
+ ACPI_FUNCTION_TRACE ("RsVendorStream");
/*
@@ -389,7 +385,7 @@ AcpiRsVendorStream (
Temp16 = (UINT16) LinkedList->Data.VendorSpecific.Length;
- MOVE_UNALIGNED16_TO_16 (Buffer, &Temp16);
+ ACPI_MOVE_UNALIGNED16_TO_16 (Buffer, &Temp16);
Buffer += 2;
}
else
@@ -418,24 +414,23 @@ AcpiRsVendorStream (
/*
* Return the number of bytes consumed in this operation
*/
- *BytesConsumed = POINTER_DIFF (Buffer, *OutputBuffer);
+ *BytesConsumed = ACPI_PTR_DIFF (Buffer, *OutputBuffer);
return_ACPI_STATUS (AE_OK);
}
/*******************************************************************************
*
- * FUNCTION: AcpiRsStartDependentFunctionsResource
+ * FUNCTION: AcpiRsStartDependFnsResource
*
* PARAMETERS: ByteStreamBuffer - Pointer to the resource input byte
* stream
- * BytesConsumed - UINT32 pointer that is filled with
- * the number of bytes consumed from
- * the ByteStreamBuffer
- * OutputBuffer - Pointer to the user's return buffer
- * StructureSize - UINT32 pointer that is filled with
- * the number of bytes in the filled
- * in structure
+ * BytesConsumed - Pointer to where the number of bytes
+ * consumed the ByteStreamBuffer is
+ * returned
+ * OutputBuffer - Pointer to the return data buffer
+ * StructureSize - Pointer to where the number of bytes
+ * in the return data struct is returned
*
* RETURN: Status
*
@@ -446,19 +441,19 @@ AcpiRsVendorStream (
******************************************************************************/
ACPI_STATUS
-AcpiRsStartDependentFunctionsResource (
+AcpiRsStartDependFnsResource (
UINT8 *ByteStreamBuffer,
- UINT32 *BytesConsumed,
+ ACPI_SIZE *BytesConsumed,
UINT8 **OutputBuffer,
- UINT32 *StructureSize)
+ ACPI_SIZE *StructureSize)
{
UINT8 *Buffer = ByteStreamBuffer;
- ACPI_RESOURCE *OutputStruct = (ACPI_RESOURCE *) *OutputBuffer;
+ ACPI_RESOURCE *OutputStruct = (ACPI_RESOURCE *) *OutputBuffer;
UINT8 Temp8 = 0;
- UINT32 StructSize = SIZEOF_RESOURCE (ACPI_RESOURCE_START_DPF);
+ ACPI_SIZE StructSize = ACPI_SIZEOF_RESOURCE (ACPI_RESOURCE_START_DPF);
- FUNCTION_TRACE ("RsStartDependentFunctionsResource");
+ ACPI_FUNCTION_TRACE ("RsStartDependFnsResource");
/*
@@ -501,10 +496,10 @@ AcpiRsStartDependentFunctionsResource (
else
{
OutputStruct->Data.StartDpf.CompatibilityPriority =
- ACCEPTABLE_CONFIGURATION;
+ ACPI_ACCEPTABLE_CONFIGURATION;
OutputStruct->Data.StartDpf.PerformanceRobustness =
- ACCEPTABLE_CONFIGURATION;
+ ACPI_ACCEPTABLE_CONFIGURATION;
}
/*
@@ -522,17 +517,16 @@ AcpiRsStartDependentFunctionsResource (
/*******************************************************************************
*
- * FUNCTION: AcpiRsEndDependentFunctionsResource
+ * FUNCTION: AcpiRsEndDependFnsResource
*
* PARAMETERS: ByteStreamBuffer - Pointer to the resource input byte
* stream
- * BytesConsumed - UINT32 pointer that is filled with
- * the number of bytes consumed from
- * the ByteStreamBuffer
- * OutputBuffer - Pointer to the user's return buffer
- * StructureSize - UINT32 pointer that is filled with
- * the number of bytes in the filled
- * in structure
+ * BytesConsumed - Pointer to where the number of bytes
+ * consumed the ByteStreamBuffer is
+ * returned
+ * OutputBuffer - Pointer to the return data buffer
+ * StructureSize - Pointer to where the number of bytes
+ * in the return data struct is returned
*
* RETURN: Status
*
@@ -543,17 +537,17 @@ AcpiRsStartDependentFunctionsResource (
******************************************************************************/
ACPI_STATUS
-AcpiRsEndDependentFunctionsResource (
+AcpiRsEndDependFnsResource (
UINT8 *ByteStreamBuffer,
- UINT32 *BytesConsumed,
+ ACPI_SIZE *BytesConsumed,
UINT8 **OutputBuffer,
- UINT32 *StructureSize)
+ ACPI_SIZE *StructureSize)
{
ACPI_RESOURCE *OutputStruct = (ACPI_RESOURCE *) *OutputBuffer;
- UINT32 StructSize = ACPI_RESOURCE_LENGTH;
+ ACPI_SIZE StructSize = ACPI_RESOURCE_LENGTH;
- FUNCTION_TRACE ("RsEndDependentFunctionsResource");
+ ACPI_FUNCTION_TRACE ("RsEndDependFnsResource");
/*
@@ -581,7 +575,7 @@ AcpiRsEndDependentFunctionsResource (
/*******************************************************************************
*
- * FUNCTION: AcpiRsStartDependentFunctionsStream
+ * FUNCTION: AcpiRsStartDependFnsStream
*
* PARAMETERS: LinkedList - Pointer to the resource linked list
* OutputBuffer - Pointer to the user's return buffer
@@ -597,25 +591,25 @@ AcpiRsEndDependentFunctionsResource (
******************************************************************************/
ACPI_STATUS
-AcpiRsStartDependentFunctionsStream (
+AcpiRsStartDependFnsStream (
ACPI_RESOURCE *LinkedList,
UINT8 **OutputBuffer,
- UINT32 *BytesConsumed)
+ ACPI_SIZE *BytesConsumed)
{
UINT8 *Buffer = *OutputBuffer;
UINT8 Temp8 = 0;
- FUNCTION_TRACE ("RsStartDependentFunctionsStream");
+ ACPI_FUNCTION_TRACE ("RsStartDependFnsStream");
/*
* The descriptor field is set based upon whether a byte is needed
* to contain Priority data.
*/
- if (ACCEPTABLE_CONFIGURATION ==
+ if (ACPI_ACCEPTABLE_CONFIGURATION ==
LinkedList->Data.StartDpf.CompatibilityPriority &&
- ACCEPTABLE_CONFIGURATION ==
+ ACPI_ACCEPTABLE_CONFIGURATION ==
LinkedList->Data.StartDpf.PerformanceRobustness)
{
*Buffer = 0x30;
@@ -641,20 +635,19 @@ AcpiRsStartDependentFunctionsStream (
/*
* Return the number of bytes consumed in this operation
*/
- *BytesConsumed = POINTER_DIFF (Buffer, *OutputBuffer);
+ *BytesConsumed = ACPI_PTR_DIFF (Buffer, *OutputBuffer);
return_ACPI_STATUS (AE_OK);
}
/*******************************************************************************
*
- * FUNCTION: AcpiRsEndDependentFunctionsStream
+ * FUNCTION: AcpiRsEndDependFnsStream
*
* PARAMETERS: LinkedList - Pointer to the resource linked list
* OutputBuffer - Pointer to the user's return buffer
- * BytesConsumed - UINT32 pointer that is filled with
- * the number of bytes of the
- * OutputBuffer used
+ * BytesConsumed - Pointer to where the number of bytes
+ * used in the OutputBuffer is returned
*
* RETURN: Status
*
@@ -664,16 +657,15 @@ AcpiRsStartDependentFunctionsStream (
******************************************************************************/
ACPI_STATUS
-AcpiRsEndDependentFunctionsStream (
+AcpiRsEndDependFnsStream (
ACPI_RESOURCE *LinkedList,
UINT8 **OutputBuffer,
- UINT32 *BytesConsumed
- )
+ ACPI_SIZE *BytesConsumed)
{
UINT8 *Buffer = *OutputBuffer;
- FUNCTION_TRACE ("RsEndDependentFunctionsStream");
+ ACPI_FUNCTION_TRACE ("RsEndDependFnsStream");
/*
@@ -685,7 +677,7 @@ AcpiRsEndDependentFunctionsStream (
/*
* Return the number of bytes consumed in this operation
*/
- *BytesConsumed = POINTER_DIFF (Buffer, *OutputBuffer);
+ *BytesConsumed = ACPI_PTR_DIFF (Buffer, *OutputBuffer);
return_ACPI_STATUS (AE_OK);
}
OpenPOWER on IntegriCloud