diff options
Diffstat (limited to 'sys/contrib/dev/acpica/rsaddr.c')
-rw-r--r-- | sys/contrib/dev/acpica/rsaddr.c | 106 |
1 files changed, 38 insertions, 68 deletions
diff --git a/sys/contrib/dev/acpica/rsaddr.c b/sys/contrib/dev/acpica/rsaddr.c index 4787ffa..fe083cb 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: 29 $ + * $Revision: 32 $ * ******************************************************************************/ @@ -166,7 +166,7 @@ AcpiRsAddress16Resource ( * Point past the Descriptor to get the number of bytes consumed */ Buffer += 1; - ACPI_MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer); + ACPI_MOVE_16_TO_16 (&Temp16, Buffer); *BytesConsumed = Temp16 + 3; OutputStruct->Id = ACPI_RSTYPE_ADDRESS16; @@ -241,36 +241,31 @@ AcpiRsAddress16Resource ( * Get Granularity (Bytes 6-7) */ Buffer += 1; - ACPI_MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.Granularity, - Buffer); + ACPI_MOVE_16_TO_32 (&OutputStruct->Data.Address16.Granularity, Buffer); /* * Get MinAddressRange (Bytes 8-9) */ Buffer += 2; - ACPI_MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.MinAddressRange, - Buffer); + ACPI_MOVE_16_TO_32 (&OutputStruct->Data.Address16.MinAddressRange, Buffer); /* * Get MaxAddressRange (Bytes 10-11) */ Buffer += 2; - ACPI_MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.MaxAddressRange, - Buffer); + ACPI_MOVE_16_TO_32 (&OutputStruct->Data.Address16.MaxAddressRange, Buffer); /* * Get AddressTranslationOffset (Bytes 12-13) */ Buffer += 2; - ACPI_MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.AddressTranslationOffset, - Buffer); + ACPI_MOVE_16_TO_32 (&OutputStruct->Data.Address16.AddressTranslationOffset, Buffer); /* * Get AddressLength (Bytes 14-15) */ Buffer += 2; - ACPI_MOVE_UNALIGNED16_TO_16 (&OutputStruct->Data.Address16.AddressLength, - Buffer); + ACPI_MOVE_16_TO_32 (&OutputStruct->Data.Address16.AddressLength, Buffer); /* * Resource Source Index (if present) @@ -444,36 +439,31 @@ AcpiRsAddress16Stream ( /* * Set the address space granularity */ - ACPI_MOVE_UNALIGNED16_TO_16 (Buffer, - &LinkedList->Data.Address16.Granularity); + ACPI_MOVE_32_TO_16 (Buffer, &LinkedList->Data.Address16.Granularity); Buffer += 2; /* * Set the address range minimum */ - ACPI_MOVE_UNALIGNED16_TO_16 (Buffer, - &LinkedList->Data.Address16.MinAddressRange); + ACPI_MOVE_32_TO_16 (Buffer, &LinkedList->Data.Address16.MinAddressRange); Buffer += 2; /* * Set the address range maximum */ - ACPI_MOVE_UNALIGNED16_TO_16 (Buffer, - &LinkedList->Data.Address16.MaxAddressRange); + ACPI_MOVE_32_TO_16 (Buffer, &LinkedList->Data.Address16.MaxAddressRange); Buffer += 2; /* * Set the address translation offset */ - ACPI_MOVE_UNALIGNED16_TO_16 (Buffer, - &LinkedList->Data.Address16.AddressTranslationOffset); + ACPI_MOVE_32_TO_16 (Buffer, &LinkedList->Data.Address16.AddressTranslationOffset); Buffer += 2; /* * Set the address length */ - ACPI_MOVE_UNALIGNED16_TO_16 (Buffer, - &LinkedList->Data.Address16.AddressLength); + ACPI_MOVE_32_TO_16 (Buffer, &LinkedList->Data.Address16.AddressLength); Buffer += 2; /* @@ -498,7 +488,7 @@ AcpiRsAddress16Stream ( * Buffer needs to be set to the length of the sting + one for the * terminating null */ - Buffer += (ACPI_STRLEN (LinkedList->Data.Address16.ResourceSource.StringPtr) + 1); + Buffer += (ACPI_SIZE)(ACPI_STRLEN (LinkedList->Data.Address16.ResourceSource.StringPtr) + 1); } /* @@ -512,7 +502,7 @@ AcpiRsAddress16Stream ( * minus the header size (3 bytes) */ ActualBytes -= 3; - ACPI_MOVE_UNALIGNED16_TO_16 (LengthField, &ActualBytes); + ACPI_MOVE_SIZE_TO_16 (LengthField, &ActualBytes); return_ACPI_STATUS (AE_OK); } @@ -564,7 +554,7 @@ AcpiRsAddress32Resource ( * Point past the Descriptor to get the number of bytes consumed */ Buffer += 1; - ACPI_MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer); + ACPI_MOVE_16_TO_16 (&Temp16, Buffer); *BytesConsumed = Temp16 + 3; OutputStruct->Id = ACPI_RSTYPE_ADDRESS32; @@ -643,36 +633,31 @@ AcpiRsAddress32Resource ( * Get Granularity (Bytes 6-9) */ Buffer += 1; - ACPI_MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.Granularity, - Buffer); + ACPI_MOVE_32_TO_32 (&OutputStruct->Data.Address32.Granularity, Buffer); /* * Get MinAddressRange (Bytes 10-13) */ Buffer += 4; - ACPI_MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.MinAddressRange, - Buffer); + ACPI_MOVE_32_TO_32 (&OutputStruct->Data.Address32.MinAddressRange, Buffer); /* * Get MaxAddressRange (Bytes 14-17) */ Buffer += 4; - ACPI_MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.MaxAddressRange, - Buffer); + ACPI_MOVE_32_TO_32 (&OutputStruct->Data.Address32.MaxAddressRange, Buffer); /* * Get AddressTranslationOffset (Bytes 18-21) */ Buffer += 4; - ACPI_MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.AddressTranslationOffset, - Buffer); + ACPI_MOVE_32_TO_32 (&OutputStruct->Data.Address32.AddressTranslationOffset, Buffer); /* * Get AddressLength (Bytes 22-25) */ Buffer += 4; - ACPI_MOVE_UNALIGNED32_TO_32 (&OutputStruct->Data.Address32.AddressLength, - Buffer); + ACPI_MOVE_32_TO_32 (&OutputStruct->Data.Address32.AddressLength, Buffer); /* * Resource Source Index (if present) @@ -844,36 +829,31 @@ AcpiRsAddress32Stream ( /* * Set the address space granularity */ - ACPI_MOVE_UNALIGNED32_TO_32 (Buffer, - &LinkedList->Data.Address32.Granularity); + ACPI_MOVE_32_TO_32 (Buffer, &LinkedList->Data.Address32.Granularity); Buffer += 4; /* * Set the address range minimum */ - ACPI_MOVE_UNALIGNED32_TO_32 (Buffer, - &LinkedList->Data.Address32.MinAddressRange); + ACPI_MOVE_32_TO_32 (Buffer, &LinkedList->Data.Address32.MinAddressRange); Buffer += 4; /* * Set the address range maximum */ - ACPI_MOVE_UNALIGNED32_TO_32 (Buffer, - &LinkedList->Data.Address32.MaxAddressRange); + ACPI_MOVE_32_TO_32 (Buffer, &LinkedList->Data.Address32.MaxAddressRange); Buffer += 4; /* * Set the address translation offset */ - ACPI_MOVE_UNALIGNED32_TO_32 (Buffer, - &LinkedList->Data.Address32.AddressTranslationOffset); + ACPI_MOVE_32_TO_32 (Buffer, &LinkedList->Data.Address32.AddressTranslationOffset); Buffer += 4; /* * Set the address length */ - ACPI_MOVE_UNALIGNED32_TO_32 (Buffer, - &LinkedList->Data.Address32.AddressLength); + ACPI_MOVE_32_TO_32 (Buffer, &LinkedList->Data.Address32.AddressLength); Buffer += 4; /* @@ -898,7 +878,7 @@ AcpiRsAddress32Stream ( * Buffer needs to be set to the length of the sting + one for the * terminating null */ - Buffer += (ACPI_STRLEN (LinkedList->Data.Address32.ResourceSource.StringPtr) + 1); + Buffer += (ACPI_SIZE)(ACPI_STRLEN (LinkedList->Data.Address32.ResourceSource.StringPtr) + 1); } /* @@ -962,7 +942,7 @@ AcpiRsAddress64Resource ( * Point past the Descriptor to get the number of bytes consumed */ Buffer += 1; - ACPI_MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer); + ACPI_MOVE_16_TO_16 (&Temp16, Buffer); *BytesConsumed = Temp16 + 3; OutputStruct->Id = ACPI_RSTYPE_ADDRESS64; @@ -1042,36 +1022,31 @@ AcpiRsAddress64Resource ( * Get Granularity (Bytes 6-13) */ Buffer += 1; - ACPI_MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.Granularity, - Buffer); + ACPI_MOVE_64_TO_64 (&OutputStruct->Data.Address64.Granularity, Buffer); /* * Get MinAddressRange (Bytes 14-21) */ Buffer += 8; - ACPI_MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.MinAddressRange, - Buffer); + ACPI_MOVE_64_TO_64 (&OutputStruct->Data.Address64.MinAddressRange, Buffer); /* * Get MaxAddressRange (Bytes 22-29) */ Buffer += 8; - ACPI_MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.MaxAddressRange, - Buffer); + ACPI_MOVE_64_TO_64 (&OutputStruct->Data.Address64.MaxAddressRange, Buffer); /* * Get AddressTranslationOffset (Bytes 30-37) */ Buffer += 8; - ACPI_MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.AddressTranslationOffset, - Buffer); + ACPI_MOVE_64_TO_64 (&OutputStruct->Data.Address64.AddressTranslationOffset, Buffer); /* * Get AddressLength (Bytes 38-45) */ Buffer += 8; - ACPI_MOVE_UNALIGNED64_TO_64 (&OutputStruct->Data.Address64.AddressLength, - Buffer); + ACPI_MOVE_64_TO_64 (&OutputStruct->Data.Address64.AddressLength, Buffer); /* * Resource Source Index (if present) @@ -1247,36 +1222,31 @@ AcpiRsAddress64Stream ( /* * Set the address space granularity */ - ACPI_MOVE_UNALIGNED64_TO_64 (Buffer, - &LinkedList->Data.Address64.Granularity); + ACPI_MOVE_64_TO_64 (Buffer, &LinkedList->Data.Address64.Granularity); Buffer += 8; /* * Set the address range minimum */ - ACPI_MOVE_UNALIGNED64_TO_64 (Buffer, - &LinkedList->Data.Address64.MinAddressRange); + ACPI_MOVE_64_TO_64 (Buffer, &LinkedList->Data.Address64.MinAddressRange); Buffer += 8; /* * Set the address range maximum */ - ACPI_MOVE_UNALIGNED64_TO_64 (Buffer, - &LinkedList->Data.Address64.MaxAddressRange); + ACPI_MOVE_64_TO_64 (Buffer, &LinkedList->Data.Address64.MaxAddressRange); Buffer += 8; /* * Set the address translation offset */ - ACPI_MOVE_UNALIGNED64_TO_64 (Buffer, - &LinkedList->Data.Address64.AddressTranslationOffset); + ACPI_MOVE_64_TO_64 (Buffer, &LinkedList->Data.Address64.AddressTranslationOffset); Buffer += 8; /* * Set the address length */ - ACPI_MOVE_UNALIGNED64_TO_64 (Buffer, - &LinkedList->Data.Address64.AddressLength); + ACPI_MOVE_64_TO_64 (Buffer, &LinkedList->Data.Address64.AddressLength); Buffer += 8; /* @@ -1300,7 +1270,7 @@ AcpiRsAddress64Stream ( * Buffer needs to be set to the length of the sting + one for the * terminating null */ - Buffer += (ACPI_STRLEN (LinkedList->Data.Address64.ResourceSource.StringPtr) + 1); + Buffer += (ACPI_SIZE)(ACPI_STRLEN (LinkedList->Data.Address64.ResourceSource.StringPtr) + 1); } /* |