summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/rsaddr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/rsaddr.c')
-rw-r--r--sys/contrib/dev/acpica/rsaddr.c219
1 files changed, 106 insertions, 113 deletions
diff --git a/sys/contrib/dev/acpica/rsaddr.c b/sys/contrib/dev/acpica/rsaddr.c
index 7231098..5a6fbd3 100644
--- a/sys/contrib/dev/acpica/rsaddr.c
+++ b/sys/contrib/dev/acpica/rsaddr.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsaddr - Address resource descriptors (16/32/64)
- * $Revision: 20 $
+ * $Revision: 24 $
*
******************************************************************************/
@@ -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 ("rsaddr")
+ ACPI_MODULE_NAME ("rsaddr")
/*******************************************************************************
@@ -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,26 +147,26 @@
ACPI_STATUS
AcpiRsAddress16Resource (
UINT8 *ByteStreamBuffer,
- UINT32 *BytesConsumed,
+ ACPI_SIZE *BytesConsumed,
UINT8 **OutputBuffer,
- UINT32 *StructureSize)
+ ACPI_SIZE *StructureSize)
{
UINT8 *Buffer = ByteStreamBuffer;
ACPI_RESOURCE *OutputStruct = (ACPI_RESOURCE *) *OutputBuffer;
NATIVE_CHAR *TempPtr;
- UINT32 StructSize = SIZEOF_RESOURCE (ACPI_RESOURCE_ADDRESS16);
+ ACPI_SIZE StructSize = ACPI_SIZEOF_RESOURCE (ACPI_RESOURCE_ADDRESS16);
UINT32 Index;
UINT16 Temp16;
UINT8 Temp8;
- FUNCTION_TRACE ("RsAddress16Resource");
+ ACPI_FUNCTION_TRACE ("RsAddress16Resource");
/*
* Point past the Descriptor to get the number of bytes consumed
*/
Buffer += 1;
- MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer);
+ ACPI_MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer);
*BytesConsumed = Temp16 + 3;
OutputStruct->Id = ACPI_RSTYPE_ADDRESS16;
@@ -215,7 +214,7 @@ AcpiRsAddress16Resource (
Buffer += 1;
Temp8 = *Buffer;
- if (MEMORY_RANGE == OutputStruct->Data.Address16.ResourceType)
+ if (ACPI_MEMORY_RANGE == OutputStruct->Data.Address16.ResourceType)
{
OutputStruct->Data.Address16.Attribute.Memory.ReadWriteAttribute =
(UINT16) (Temp8 & 0x01);
@@ -224,7 +223,7 @@ AcpiRsAddress16Resource (
}
else
{
- if (IO_RANGE == OutputStruct->Data.Address16.ResourceType)
+ if (ACPI_IO_RANGE == OutputStruct->Data.Address16.ResourceType)
{
OutputStruct->Data.Address16.Attribute.Io.RangeAttribute =
(UINT16) (Temp8 & 0x03);
@@ -240,35 +239,35 @@ AcpiRsAddress16Resource (
* Get Granularity (Bytes 6-7)
*/
Buffer += 1;
- MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.Granularity,
+ ACPI_MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.Granularity,
Buffer);
/*
* Get MinAddressRange (Bytes 8-9)
*/
Buffer += 2;
- MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.MinAddressRange,
+ ACPI_MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.MinAddressRange,
Buffer);
/*
* Get MaxAddressRange (Bytes 10-11)
*/
Buffer += 2;
- MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.MaxAddressRange,
+ ACPI_MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.MaxAddressRange,
Buffer);
/*
* Get AddressTranslationOffset (Bytes 12-13)
*/
Buffer += 2;
- MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.AddressTranslationOffset,
+ ACPI_MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.AddressTranslationOffset,
Buffer);
/*
* Get AddressLength (Bytes 14-15)
*/
Buffer += 2;
- MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.AddressLength,
+ ACPI_MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.AddressLength,
Buffer);
/*
@@ -327,7 +326,7 @@ AcpiRsAddress16Resource (
* StructSize to the next 32-bit boundary.
*/
Temp8 = (UINT8) (Index + 1);
- StructSize += ROUND_UP_TO_32BITS (Temp8);
+ StructSize += ACPI_ROUND_UP_TO_32BITS (Temp8);
}
else
{
@@ -355,9 +354,8 @@ AcpiRsAddress16Resource (
*
* 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
*
@@ -370,16 +368,16 @@ ACPI_STATUS
AcpiRsAddress16Stream (
ACPI_RESOURCE *LinkedList,
UINT8 **OutputBuffer,
- UINT32 *BytesConsumed)
+ ACPI_SIZE *BytesConsumed)
{
UINT8 *Buffer = *OutputBuffer;
UINT8 *LengthField;
UINT8 Temp8;
NATIVE_CHAR *TempPointer = NULL;
- UINT32 ActualBytes;
+ ACPI_SIZE ActualBytes;
- FUNCTION_TRACE ("RsAddress16Stream");
+ ACPI_FUNCTION_TRACE ("RsAddress16Stream");
/*
@@ -418,7 +416,7 @@ AcpiRsAddress16Stream (
*/
Temp8 = 0;
- if (MEMORY_RANGE == LinkedList->Data.Address16.ResourceType)
+ if (ACPI_MEMORY_RANGE == LinkedList->Data.Address16.ResourceType)
{
Temp8 = (UINT8)
(LinkedList->Data.Address16.Attribute.Memory.ReadWriteAttribute &
@@ -428,7 +426,7 @@ AcpiRsAddress16Stream (
(LinkedList->Data.Address16.Attribute.Memory.CacheAttribute &
0x0F) << 1;
}
- else if (IO_RANGE == LinkedList->Data.Address16.ResourceType)
+ else if (ACPI_IO_RANGE == LinkedList->Data.Address16.ResourceType)
{
Temp8 = (UINT8)
(LinkedList->Data.Address16.Attribute.Io.RangeAttribute &
@@ -441,35 +439,35 @@ AcpiRsAddress16Stream (
/*
* Set the address space granularity
*/
- MOVE_UNALIGNED16_TO_16 (Buffer,
+ ACPI_MOVE_UNALIGNED16_TO_16 (Buffer,
&LinkedList->Data.Address16.Granularity);
Buffer += 2;
/*
* Set the address range minimum
*/
- MOVE_UNALIGNED16_TO_16 (Buffer,
+ ACPI_MOVE_UNALIGNED16_TO_16 (Buffer,
&LinkedList->Data.Address16.MinAddressRange);
Buffer += 2;
/*
* Set the address range maximum
*/
- MOVE_UNALIGNED16_TO_16 (Buffer,
+ ACPI_MOVE_UNALIGNED16_TO_16 (Buffer,
&LinkedList->Data.Address16.MaxAddressRange);
Buffer += 2;
/*
* Set the address translation offset
*/
- MOVE_UNALIGNED16_TO_16 (Buffer,
+ ACPI_MOVE_UNALIGNED16_TO_16 (Buffer,
&LinkedList->Data.Address16.AddressTranslationOffset);
Buffer += 2;
/*
* Set the address length
*/
- MOVE_UNALIGNED16_TO_16 (Buffer,
+ ACPI_MOVE_UNALIGNED16_TO_16 (Buffer,
&LinkedList->Data.Address16.AddressLength);
Buffer += 2;
@@ -488,21 +486,21 @@ AcpiRsAddress16Stream (
/*
* Copy the string
*/
- STRCPY (TempPointer,
+ ACPI_STRCPY (TempPointer,
LinkedList->Data.Address16.ResourceSource.StringPtr);
/*
* Buffer needs to be set to the length of the sting + one for the
* terminating null
*/
- Buffer += (STRLEN (LinkedList->Data.Address16.ResourceSource.StringPtr)
+ Buffer += (ACPI_STRLEN (LinkedList->Data.Address16.ResourceSource.StringPtr)
+ 1);
}
/*
* Return the number of bytes consumed in this operation
*/
- ActualBytes = POINTER_DIFF (Buffer, *OutputBuffer);
+ ActualBytes = ACPI_PTR_DIFF (Buffer, *OutputBuffer);
*BytesConsumed = ActualBytes;
/*
@@ -510,7 +508,7 @@ AcpiRsAddress16Stream (
* minus the header size (3 bytes)
*/
ActualBytes -= 3;
- MOVE_UNALIGNED16_TO_16 (LengthField, &ActualBytes);
+ ACPI_MOVE_UNALIGNED16_TO_16 (LengthField, &ActualBytes);
return_ACPI_STATUS (AE_OK);
}
@@ -521,13 +519,12 @@ AcpiRsAddress16Stream (
*
* 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
*
@@ -540,33 +537,32 @@ AcpiRsAddress16Stream (
ACPI_STATUS
AcpiRsAddress32Resource (
UINT8 *ByteStreamBuffer,
- UINT32 *BytesConsumed,
+ ACPI_SIZE *BytesConsumed,
UINT8 **OutputBuffer,
- UINT32 *StructureSize)
+ ACPI_SIZE *StructureSize)
{
UINT8 *Buffer;
ACPI_RESOURCE *OutputStruct;
UINT16 Temp16;
UINT8 Temp8;
NATIVE_CHAR *TempPtr;
- UINT32 StructSize;
+ ACPI_SIZE StructSize;
UINT32 Index;
- FUNCTION_TRACE ("RsAddress32Resource");
+ ACPI_FUNCTION_TRACE ("RsAddress32Resource");
Buffer = ByteStreamBuffer;
OutputStruct = (ACPI_RESOURCE *) *OutputBuffer;
- StructSize = SIZEOF_RESOURCE (ACPI_RESOURCE_ADDRESS32);
+ StructSize = ACPI_SIZEOF_RESOURCE (ACPI_RESOURCE_ADDRESS32);
/*
* Point past the Descriptor to get the number of bytes consumed
*/
Buffer += 1;
- MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer);
-
+ ACPI_MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer);
*BytesConsumed = Temp16 + 3;
OutputStruct->Id = ACPI_RSTYPE_ADDRESS32;
@@ -617,7 +613,7 @@ AcpiRsAddress32Resource (
Buffer += 1;
Temp8 = *Buffer;
- if (MEMORY_RANGE == OutputStruct->Data.Address32.ResourceType)
+ if (ACPI_MEMORY_RANGE == OutputStruct->Data.Address32.ResourceType)
{
OutputStruct->Data.Address32.Attribute.Memory.ReadWriteAttribute =
(UINT16) (Temp8 & 0x01);
@@ -627,7 +623,7 @@ AcpiRsAddress32Resource (
}
else
{
- if (IO_RANGE == OutputStruct->Data.Address32.ResourceType)
+ if (ACPI_IO_RANGE == OutputStruct->Data.Address32.ResourceType)
{
OutputStruct->Data.Address32.Attribute.Io.RangeAttribute =
(UINT16) (Temp8 & 0x03);
@@ -643,35 +639,35 @@ AcpiRsAddress32Resource (
* Get Granularity (Bytes 6-9)
*/
Buffer += 1;
- MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.Granularity,
+ ACPI_MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.Granularity,
Buffer);
/*
* Get MinAddressRange (Bytes 10-13)
*/
Buffer += 4;
- MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.MinAddressRange,
+ ACPI_MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.MinAddressRange,
Buffer);
/*
* Get MaxAddressRange (Bytes 14-17)
*/
Buffer += 4;
- MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.MaxAddressRange,
+ ACPI_MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.MaxAddressRange,
Buffer);
/*
* Get AddressTranslationOffset (Bytes 18-21)
*/
Buffer += 4;
- MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.AddressTranslationOffset,
+ ACPI_MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.AddressTranslationOffset,
Buffer);
/*
* Get AddressLength (Bytes 22-25)
*/
Buffer += 4;
- MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.AddressLength,
+ ACPI_MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.AddressLength,
Buffer);
/*
@@ -727,7 +723,7 @@ AcpiRsAddress32Resource (
* StructSize to the next 32-bit boundary.
*/
Temp8 = (UINT8) (Index + 1);
- StructSize += ROUND_UP_TO_32BITS (Temp8);
+ StructSize += ACPI_ROUND_UP_TO_32BITS (Temp8);
}
else
{
@@ -755,9 +751,8 @@ AcpiRsAddress32Resource (
*
* 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
*
@@ -770,7 +765,7 @@ ACPI_STATUS
AcpiRsAddress32Stream (
ACPI_RESOURCE *LinkedList,
UINT8 **OutputBuffer,
- UINT32 *BytesConsumed)
+ ACPI_SIZE *BytesConsumed)
{
UINT8 *Buffer;
UINT16 *LengthField;
@@ -778,7 +773,7 @@ AcpiRsAddress32Stream (
NATIVE_CHAR *TempPointer;
- FUNCTION_TRACE ("RsAddress32Stream");
+ ACPI_FUNCTION_TRACE ("RsAddress32Stream");
Buffer = *OutputBuffer;
@@ -819,7 +814,7 @@ AcpiRsAddress32Stream (
*/
Temp8 = 0;
- if(MEMORY_RANGE == LinkedList->Data.Address32.ResourceType)
+ if (ACPI_MEMORY_RANGE == LinkedList->Data.Address32.ResourceType)
{
Temp8 = (UINT8)
(LinkedList->Data.Address32.Attribute.Memory.ReadWriteAttribute &
@@ -829,7 +824,7 @@ AcpiRsAddress32Stream (
(LinkedList->Data.Address32.Attribute.Memory.CacheAttribute &
0x0F) << 1;
}
- else if (IO_RANGE == LinkedList->Data.Address32.ResourceType)
+ else if (ACPI_IO_RANGE == LinkedList->Data.Address32.ResourceType)
{
Temp8 = (UINT8)
(LinkedList->Data.Address32.Attribute.Io.RangeAttribute &
@@ -842,35 +837,35 @@ AcpiRsAddress32Stream (
/*
* Set the address space granularity
*/
- MOVE_UNALIGNED32_TO_32 (Buffer,
+ ACPI_MOVE_UNALIGNED32_TO_32 (Buffer,
&LinkedList->Data.Address32.Granularity);
Buffer += 4;
/*
* Set the address range minimum
*/
- MOVE_UNALIGNED32_TO_32 (Buffer,
+ ACPI_MOVE_UNALIGNED32_TO_32 (Buffer,
&LinkedList->Data.Address32.MinAddressRange);
Buffer += 4;
/*
* Set the address range maximum
*/
- MOVE_UNALIGNED32_TO_32 (Buffer,
+ ACPI_MOVE_UNALIGNED32_TO_32 (Buffer,
&LinkedList->Data.Address32.MaxAddressRange);
Buffer += 4;
/*
* Set the address translation offset
*/
- MOVE_UNALIGNED32_TO_32 (Buffer,
+ ACPI_MOVE_UNALIGNED32_TO_32 (Buffer,
&LinkedList->Data.Address32.AddressTranslationOffset);
Buffer += 4;
/*
* Set the address length
*/
- MOVE_UNALIGNED32_TO_32 (Buffer,
+ ACPI_MOVE_UNALIGNED32_TO_32 (Buffer,
&LinkedList->Data.Address32.AddressLength);
Buffer += 4;
@@ -889,20 +884,20 @@ AcpiRsAddress32Stream (
/*
* Copy the string
*/
- STRCPY (TempPointer,
+ ACPI_STRCPY (TempPointer,
LinkedList->Data.Address32.ResourceSource.StringPtr);
/*
* Buffer needs to be set to the length of the sting + one for the
* terminating null
*/
- Buffer += (STRLEN (LinkedList->Data.Address32.ResourceSource.StringPtr) + 1);
+ Buffer += (ACPI_STRLEN (LinkedList->Data.Address32.ResourceSource.StringPtr) + 1);
}
/*
* Return the number of bytes consumed in this operation
*/
- *BytesConsumed = POINTER_DIFF (Buffer, *OutputBuffer);
+ *BytesConsumed = ACPI_PTR_DIFF (Buffer, *OutputBuffer);
/*
* Set the length field to the number of bytes consumed
@@ -919,13 +914,12 @@ AcpiRsAddress32Stream (
*
* 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
*
@@ -938,32 +932,32 @@ AcpiRsAddress32Stream (
ACPI_STATUS
AcpiRsAddress64Resource (
UINT8 *ByteStreamBuffer,
- UINT32 *BytesConsumed,
+ ACPI_SIZE *BytesConsumed,
UINT8 **OutputBuffer,
- UINT32 *StructureSize)
+ ACPI_SIZE *StructureSize)
{
UINT8 *Buffer;
ACPI_RESOURCE *OutputStruct;
UINT16 Temp16;
UINT8 Temp8;
NATIVE_CHAR *TempPtr;
- UINT32 StructSize;
+ ACPI_SIZE StructSize;
UINT32 Index;
- FUNCTION_TRACE ("RsAddress64Resource");
+ ACPI_FUNCTION_TRACE ("RsAddress64Resource");
Buffer = ByteStreamBuffer;
OutputStruct = (ACPI_RESOURCE *) *OutputBuffer;
- StructSize = SIZEOF_RESOURCE (ACPI_RESOURCE_ADDRESS64);
+ StructSize = ACPI_SIZEOF_RESOURCE (ACPI_RESOURCE_ADDRESS64);
/*
* Point past the Descriptor to get the number of bytes consumed
*/
Buffer += 1;
- MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer);
+ ACPI_MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer);
*BytesConsumed = Temp16 + 3;
OutputStruct->Id = ACPI_RSTYPE_ADDRESS64;
@@ -1015,7 +1009,7 @@ AcpiRsAddress64Resource (
Buffer += 1;
Temp8 = *Buffer;
- if (MEMORY_RANGE == OutputStruct->Data.Address64.ResourceType)
+ if (ACPI_MEMORY_RANGE == OutputStruct->Data.Address64.ResourceType)
{
OutputStruct->Data.Address64.Attribute.Memory.ReadWriteAttribute =
(UINT16) (Temp8 & 0x01);
@@ -1025,7 +1019,7 @@ AcpiRsAddress64Resource (
}
else
{
- if (IO_RANGE == OutputStruct->Data.Address64.ResourceType)
+ if (ACPI_IO_RANGE == OutputStruct->Data.Address64.ResourceType)
{
OutputStruct->Data.Address64.Attribute.Io.RangeAttribute =
(UINT16) (Temp8 & 0x03);
@@ -1041,35 +1035,35 @@ AcpiRsAddress64Resource (
* Get Granularity (Bytes 6-13)
*/
Buffer += 1;
- MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.Granularity,
+ ACPI_MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.Granularity,
Buffer);
/*
* Get MinAddressRange (Bytes 14-21)
*/
Buffer += 8;
- MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.MinAddressRange,
+ ACPI_MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.MinAddressRange,
Buffer);
/*
* Get MaxAddressRange (Bytes 22-29)
*/
Buffer += 8;
- MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.MaxAddressRange,
+ ACPI_MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.MaxAddressRange,
Buffer);
/*
* Get AddressTranslationOffset (Bytes 30-37)
*/
Buffer += 8;
- MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.AddressTranslationOffset,
+ ACPI_MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.AddressTranslationOffset,
Buffer);
/*
* Get AddressLength (Bytes 38-45)
*/
Buffer += 8;
- MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.AddressLength,
+ ACPI_MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.AddressLength,
Buffer);
/*
@@ -1128,7 +1122,7 @@ AcpiRsAddress64Resource (
* StructSize to the next 32-bit boundary.
*/
Temp8 = (UINT8) (Index + 1);
- StructSize += ROUND_UP_TO_32BITS (Temp8);
+ StructSize += ACPI_ROUND_UP_TO_32BITS (Temp8);
}
else
{
@@ -1156,9 +1150,8 @@ AcpiRsAddress64Resource (
*
* 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
*
@@ -1171,7 +1164,7 @@ ACPI_STATUS
AcpiRsAddress64Stream (
ACPI_RESOURCE *LinkedList,
UINT8 **OutputBuffer,
- UINT32 *BytesConsumed)
+ ACPI_SIZE *BytesConsumed)
{
UINT8 *Buffer;
UINT16 *LengthField;
@@ -1179,7 +1172,7 @@ AcpiRsAddress64Stream (
NATIVE_CHAR *TempPointer;
- FUNCTION_TRACE ("RsAddress64Stream");
+ ACPI_FUNCTION_TRACE ("RsAddress64Stream");
Buffer = *OutputBuffer;
@@ -1221,7 +1214,7 @@ AcpiRsAddress64Stream (
*/
Temp8 = 0;
- if(MEMORY_RANGE == LinkedList->Data.Address64.ResourceType)
+ if (ACPI_MEMORY_RANGE == LinkedList->Data.Address64.ResourceType)
{
Temp8 = (UINT8)
(LinkedList->Data.Address64.Attribute.Memory.ReadWriteAttribute &
@@ -1231,7 +1224,7 @@ AcpiRsAddress64Stream (
(LinkedList->Data.Address64.Attribute.Memory.CacheAttribute &
0x0F) << 1;
}
- else if (IO_RANGE == LinkedList->Data.Address64.ResourceType)
+ else if (ACPI_IO_RANGE == LinkedList->Data.Address64.ResourceType)
{
Temp8 = (UINT8)
(LinkedList->Data.Address64.Attribute.Io.RangeAttribute &
@@ -1244,35 +1237,35 @@ AcpiRsAddress64Stream (
/*
* Set the address space granularity
*/
- MOVE_UNALIGNED64_TO_64 (Buffer,
+ ACPI_MOVE_UNALIGNED64_TO_64 (Buffer,
&LinkedList->Data.Address64.Granularity);
Buffer += 8;
/*
* Set the address range minimum
*/
- MOVE_UNALIGNED64_TO_64 (Buffer,
+ ACPI_MOVE_UNALIGNED64_TO_64 (Buffer,
&LinkedList->Data.Address64.MinAddressRange);
Buffer += 8;
/*
* Set the address range maximum
*/
- MOVE_UNALIGNED64_TO_64 (Buffer,
+ ACPI_MOVE_UNALIGNED64_TO_64 (Buffer,
&LinkedList->Data.Address64.MaxAddressRange);
Buffer += 8;
/*
* Set the address translation offset
*/
- MOVE_UNALIGNED64_TO_64 (Buffer,
+ ACPI_MOVE_UNALIGNED64_TO_64 (Buffer,
&LinkedList->Data.Address64.AddressTranslationOffset);
Buffer += 8;
/*
* Set the address length
*/
- MOVE_UNALIGNED64_TO_64 (Buffer,
+ ACPI_MOVE_UNALIGNED64_TO_64 (Buffer,
&LinkedList->Data.Address64.AddressLength);
Buffer += 8;
@@ -1291,19 +1284,19 @@ AcpiRsAddress64Stream (
/*
* Copy the string
*/
- STRCPY (TempPointer, LinkedList->Data.Address64.ResourceSource.StringPtr);
+ ACPI_STRCPY (TempPointer, LinkedList->Data.Address64.ResourceSource.StringPtr);
/*
* Buffer needs to be set to the length of the sting + one for the
* terminating null
*/
- Buffer += (STRLEN (LinkedList->Data.Address64.ResourceSource.StringPtr) + 1);
+ Buffer += (ACPI_STRLEN (LinkedList->Data.Address64.ResourceSource.StringPtr) + 1);
}
/*
* Return the number of bytes consumed in this operation
*/
- *BytesConsumed = POINTER_DIFF (Buffer, *OutputBuffer);
+ *BytesConsumed = ACPI_PTR_DIFF (Buffer, *OutputBuffer);
/*
* Set the length field to the number of bytes consumed
OpenPOWER on IntegriCloud