diff options
Diffstat (limited to 'sys/contrib/dev/acpica/rsio.c')
-rw-r--r-- | sys/contrib/dev/acpica/rsio.c | 114 |
1 files changed, 54 insertions, 60 deletions
diff --git a/sys/contrib/dev/acpica/rsio.c b/sys/contrib/dev/acpica/rsio.c index c979585..0efa40e9 100644 --- a/sys/contrib/dev/acpica/rsio.c +++ b/sys/contrib/dev/acpica/rsio.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: rsio - IO and DMA resource descriptors - * $Revision: 14 $ + * $Revision: 17 $ * ******************************************************************************/ @@ -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 ("rsio") + ACPI_MODULE_NAME ("rsio") /******************************************************************************* @@ -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,18 +147,18 @@ ACPI_STATUS AcpiRsIoResource ( 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; - UINT32 StructSize = SIZEOF_RESOURCE (ACPI_RESOURCE_IO); + ACPI_SIZE StructSize = ACPI_SIZEOF_RESOURCE (ACPI_RESOURCE_IO); - FUNCTION_TRACE ("RsIoResource"); + ACPI_FUNCTION_TRACE ("RsIoResource"); /* @@ -181,7 +180,7 @@ AcpiRsIoResource ( * Check MinBase Address */ Buffer += 1; - MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer); + ACPI_MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer); OutputStruct->Data.Io.MinBaseAddress = Temp16; @@ -189,7 +188,7 @@ AcpiRsIoResource ( * Check MaxBase Address */ Buffer += 2; - MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer); + ACPI_MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer); OutputStruct->Data.Io.MaxBaseAddress = Temp16; @@ -228,13 +227,12 @@ AcpiRsIoResource ( * * 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 * @@ -247,18 +245,18 @@ AcpiRsIoResource ( ACPI_STATUS AcpiRsFixedIoResource ( 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; - UINT32 StructSize = SIZEOF_RESOURCE (ACPI_RESOURCE_FIXED_IO); + ACPI_SIZE StructSize = ACPI_SIZEOF_RESOURCE (ACPI_RESOURCE_FIXED_IO); - FUNCTION_TRACE ("RsFixedIoResource"); + ACPI_FUNCTION_TRACE ("RsFixedIoResource"); /* @@ -272,7 +270,7 @@ AcpiRsFixedIoResource ( * Check Range Base Address */ Buffer += 1; - MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer); + ACPI_MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer); OutputStruct->Data.FixedIo.BaseAddress = Temp16; @@ -303,9 +301,8 @@ AcpiRsFixedIoResource ( * * 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 * @@ -318,14 +315,14 @@ ACPI_STATUS AcpiRsIoStream ( ACPI_RESOURCE *LinkedList, UINT8 **OutputBuffer, - UINT32 *BytesConsumed) + ACPI_SIZE *BytesConsumed) { UINT8 *Buffer = *OutputBuffer; UINT16 Temp16 = 0; UINT8 Temp8 = 0; - FUNCTION_TRACE ("RsIoStream"); + ACPI_FUNCTION_TRACE ("RsIoStream"); /* @@ -347,7 +344,7 @@ AcpiRsIoStream ( */ Temp16 = (UINT16) LinkedList->Data.Io.MinBaseAddress; - MOVE_UNALIGNED16_TO_16 (Buffer, &Temp16); + ACPI_MOVE_UNALIGNED16_TO_16 (Buffer, &Temp16); Buffer += 2; /* @@ -355,7 +352,7 @@ AcpiRsIoStream ( */ Temp16 = (UINT16) LinkedList->Data.Io.MaxBaseAddress; - MOVE_UNALIGNED16_TO_16 (Buffer, &Temp16); + ACPI_MOVE_UNALIGNED16_TO_16 (Buffer, &Temp16); Buffer += 2; /* @@ -377,7 +374,7 @@ AcpiRsIoStream ( /* * 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); } @@ -388,9 +385,8 @@ AcpiRsIoStream ( * * 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 * @@ -403,14 +399,14 @@ ACPI_STATUS AcpiRsFixedIoStream ( ACPI_RESOURCE *LinkedList, UINT8 **OutputBuffer, - UINT32 *BytesConsumed) + ACPI_SIZE *BytesConsumed) { UINT8 *Buffer = *OutputBuffer; UINT16 Temp16 = 0; UINT8 Temp8 = 0; - FUNCTION_TRACE ("RsFixedIoStream"); + ACPI_FUNCTION_TRACE ("RsFixedIoStream"); /* @@ -425,7 +421,7 @@ AcpiRsFixedIoStream ( */ Temp16 = (UINT16) LinkedList->Data.FixedIo.BaseAddress; - MOVE_UNALIGNED16_TO_16 (Buffer, &Temp16); + ACPI_MOVE_UNALIGNED16_TO_16 (Buffer, &Temp16); Buffer += 2; /* @@ -439,7 +435,7 @@ AcpiRsFixedIoStream ( /* * 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); } @@ -450,13 +446,12 @@ AcpiRsFixedIoStream ( * * 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 * @@ -469,19 +464,19 @@ AcpiRsFixedIoStream ( ACPI_STATUS AcpiRsDmaResource ( UINT8 *ByteStreamBuffer, - UINT32 *BytesConsumed, + ACPI_SIZE *BytesConsumed, UINT8 **OutputBuffer, - UINT32 *StructureSize) + ACPI_SIZE *StructureSize) { UINT8 *Buffer = ByteStreamBuffer; ACPI_RESOURCE *OutputStruct = (ACPI_RESOURCE *) *OutputBuffer; UINT8 Temp8 = 0; UINT8 Index; UINT8 i; - UINT32 StructSize = SIZEOF_RESOURCE (ACPI_RESOURCE_DMA); + ACPI_SIZE StructSize = ACPI_SIZEOF_RESOURCE (ACPI_RESOURCE_DMA); - FUNCTION_TRACE ("RsDmaResource"); + ACPI_FUNCTION_TRACE ("RsDmaResource"); /* @@ -559,9 +554,8 @@ AcpiRsDmaResource ( * * 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 * @@ -574,7 +568,7 @@ ACPI_STATUS AcpiRsDmaStream ( ACPI_RESOURCE *LinkedList, UINT8 **OutputBuffer, - UINT32 *BytesConsumed) + ACPI_SIZE *BytesConsumed) { UINT8 *Buffer = *OutputBuffer; UINT16 Temp16 = 0; @@ -582,7 +576,7 @@ AcpiRsDmaStream ( UINT8 Index; - FUNCTION_TRACE ("RsDmaStream"); + ACPI_FUNCTION_TRACE ("RsDmaStream"); /* @@ -619,7 +613,7 @@ AcpiRsDmaStream ( /* * 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); } |