Automated cleanup

date	2003.05.21.22.49.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 19:45:45 +00:00
parent 696b42bb8b
commit 0dcb2d32d4
2 changed files with 151 additions and 97 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
* $Revision: 1.196 $
* $Revision: 1.197 $
*
*****************************************************************************/
@ -418,7 +418,7 @@ typedef struct acpi_gpe_register_info
} ACPI_GPE_REGISTER_INFO;
/*
/*
* Information about a GPE register block, one per each installed block --
* GPE0, GPE1, and one per each installed GPE Block Device.
*/
@ -962,7 +962,6 @@ typedef struct acpi_bit_register_info
#define ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE 0x8A
/*****************************************************************************
*
* Miscellaneous

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmacros.h - C macros for the entire subsystem.
* $Revision: 1.138 $
* $Revision: 1.145 $
*
*****************************************************************************/
@ -189,7 +189,7 @@
#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **)(void *)(p))
#if ACPI_MACHINE_WIDTH == 16
#define ACPI_STORE_POINTER(d,s) ACPI_MOVE_UNALIGNED32_TO_32(d,s)
#define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s)
#define ACPI_PHYSADDR_TO_PTR(i) (void *)(i)
#define ACPI_PTR_TO_PHYSADDR(i) (UINT32) (char *)(i)
#else
@ -207,77 +207,167 @@
/*
* Macros for big-endian machines
*/
#define ACPI_MOVE_UNALIGNED16_TO_16(d,s) {((UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[1];\
((UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[0];}
#define ACPI_MOVE_UNALIGNED16_TO_32(d,s) {(*(UINT32*)(void *)(d)) = 0;\
((UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[1];\
((UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[0];}
/* This macro sets a buffer index, starting from the end of the buffer */
#define ACPI_MOVE_UNALIGNED32_TO_16(d,s) {((UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[3];\
((UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[2];}
#define ACPI_BUFFER_INDEX(BufLen,BufOffset,ByteGran) ((BufLen) - (((BufOffset)+1) * (ByteGran)))
#define ACPI_MOVE_UNALIGNED32_TO_32(d,s) {((UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
((UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\
((UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[1];\
((UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[0];}
/* These macros reverse the bytes during the move, converting little-endian to big endian */
#define ACPI_MOVE_UNALIGNED64_TO_64(d,s) {((UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
((UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
((UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\
((UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];\
((UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[3];\
((UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[2];\
((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\
((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];}
/* Big Endian <== Little Endian */
/* Hi...Lo Lo...Hi */
/* 16-bit source, 16/32/64 destination */
#define ACPI_MOVE_16_TO_16(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[1];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[0];}
#define ACPI_MOVE_16_TO_32(d,s) {(*(UINT32 *)(void *)(d))=0;\
((UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[1];\
((UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[0];}
#define ACPI_MOVE_16_TO_64(d,s) {(*(UINT64 *)(void *)(d))=0;\
((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\
((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];}
/* 32-bit source, 16/32/64 destination */
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_32(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\
(( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[1];\
(( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[0];}
#define ACPI_MOVE_32_TO_64(d,s) {(*(UINT64 *)(void *)(d))=0;\
((UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[3];\
((UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[2];\
((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\
((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];}
/* 64-bit source, 16/32/64 destination */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_64(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
(( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\
(( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];\
(( UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[3];\
(( UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[2];\
(( UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\
(( UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];}
#else
/*
* Macros for little-endian machines
*/
/* This macro sets a buffer index, starting from the beginning of the buffer */
#define ACPI_BUFFER_INDEX(BufLen,BufOffset,ByteGran) (BufOffset)
#ifdef ACPI_MISALIGNED_TRANSFERS
/* The hardware supports unaligned transfers, just do the move */
/* The hardware supports unaligned transfers, just do the little-endian move */
#define ACPI_MOVE_UNALIGNED16_TO_16(d,s) *(UINT16 *)(void *)(d) = *(UINT16 *)(void *)(s)
#define ACPI_MOVE_UNALIGNED16_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT16 *)(void *)(s)
#if ACPI_MACHINE_WIDTH == 16
#define ACPI_MOVE_UNALIGNED32_TO_16(d,s) ACPI_MOVE_UNALIGNED16_TO_16(d,s)
#define ACPI_MOVE_UNALIGNED32_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
/* No 64-bit integers */
/* 16-bit source, 16/32/64 destination */
#define ACPI_MOVE_UNALIGNED64_TO_64(d,s) *(UINT64 *)(void *)(d) = *(UINT64 *)(void *)(s)
#define ACPI_MOVE_16_TO_16(d,s) *(UINT16 *)(void *)(d) = *(UINT16 *)(void *)(s)
#define ACPI_MOVE_16_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT16 *)(void *)(s)
#define ACPI_MOVE_16_TO_64(d,s) ACPI_MOVE_16_TO_32(d,s)
#define ACPI_MOVE_UNALIGNED_SIZE_TO_16(d,s) ACPI_MOVE_UNALIGNED16_TO_16(d,s)
/* 32-bit source, 16/32/64 destination */
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
#define ACPI_MOVE_32_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
/* 64-bit source, 16/32/64 destination */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
#else
/* 16-bit source, 16/32/64 destination */
#define ACPI_MOVE_16_TO_16(d,s) *(UINT16 *)(void *)(d) = *(UINT16 *)(void *)(s)
#define ACPI_MOVE_16_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT16 *)(void *)(s)
#define ACPI_MOVE_16_TO_64(d,s) *(UINT64 *)(void *)(d) = *(UINT16 *)(void *)(s)
/* 32-bit source, 16/32/64 destination */
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
#define ACPI_MOVE_32_TO_64(d,s) *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s)
/* 64-bit source, 16/32/64 destination */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_64(d,s) *(UINT64 *)(void *)(d) = *(UINT64 *)(void *)(s)
#endif
#else
/*
* The hardware does not support unaligned transfers. We must move the
* data one byte at a time. These macros work whether the source or
* the destination (or both) is/are unaligned.
* the destination (or both) is/are unaligned. (Little-endian move)
*/
#define ACPI_MOVE_UNALIGNED16_TO_16(d,s) {((UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
((UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];}
/* 16-bit source, 16/32/64 destination */
#define ACPI_MOVE_UNALIGNED16_TO_32(d,s) {(*(UINT32*)(void *)(d)) = 0; ACPI_MOVE_UNALIGNED16_TO_16(d,s);}
#define ACPI_MOVE_16_TO_16(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];}
#define ACPI_MOVE_UNALIGNED32_TO_16(d,s) ACPI_MOVE_UNALIGNED16_TO_16(d,s)
#define ACPI_MOVE_16_TO_32(d,s) {(*(UINT32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);}
#define ACPI_MOVE_16_TO_64(d,s) {(*(UINT64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);}
#define ACPI_MOVE_UNALIGNED32_TO_32(d,s) {((UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
((UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];\
((UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[2];\
((UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[3];}
/* 32-bit source, 16/32/64 destination */
#define ACPI_MOVE_UNALIGNED64_TO_64(d,s) {((UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
((UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];\
((UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[2];\
((UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[3];\
((UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[4];\
((UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[5];\
((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[6];\
((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[7];}
#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_32(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];\
(( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[2];\
(( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[3];}
#define ACPI_MOVE_32_TO_64(d,s) {(*(UINT64 *)(void *)(d)) = 0; ACPI_MOVE_32_TO_32(d,s);}
/* 64-bit source, 16/32/64 destination */
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_64(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];\
(( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[2];\
(( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[3];\
(( UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[4];\
(( UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[5];\
(( UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[6];\
(( UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[7];}
#endif
#endif
/* Macros based on machine integer width */
#if ACPI_MACHINE_WIDTH == 16
#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s)
#elif ACPI_MACHINE_WIDTH == 32
#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_32_TO_16(d,s)
#elif ACPI_MACHINE_WIDTH == 64
#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_64_TO_16(d,s)
#else
#error unknown ACPI_MACHINE_WIDTH
#endif
/*
* Fast power-of-two math macros for non-optimized compilers
@ -343,21 +433,6 @@
#if ACPI_MACHINE_WIDTH != 16
#define ACPI_PCI_DEVICE_MASK (UINT64) 0x0000FFFF00000000
#define ACPI_PCI_FUNCTION_MASK (UINT64) 0x00000000FFFF0000
#define ACPI_PCI_REGISTER_MASK (UINT64) 0x000000000000FFFF
/*
* Obsolete
*/
/*
#define ACPI_PCI_FUNCTION(a) (UINT16) ((((UINT64)((UINT64)(a) & ACPI_PCI_FUNCTION_MASK)) >> 16))
#define ACPI_PCI_DEVICE(a) (UINT16) ((((UINT64)((UINT64)(a) & ACPI_PCI_DEVICE_MASK)) >> 32))
#define ACPI_PCI_REGISTER(a) (UINT16) (((UINT64)((UINT64)(a) & ACPI_PCI_REGISTER_MASK)))
*/
#define ACPI_PCI_DEVICE(a) (UINT16) ((ACPI_HIDWORD ((a))) & 0x0000FFFF)
#define ACPI_PCI_FUNCTION(a) (UINT16) ((ACPI_LODWORD ((a))) >> 16)
#define ACPI_PCI_REGISTER(a) (UINT16) ((ACPI_LODWORD ((a))) & 0x0000FFFF)
@ -438,31 +513,11 @@
#define INCREMENT_ARG_LIST(List) (List >>= ((UINT32) ARG_TYPE_WIDTH))
/*
* Build a GAS structure from earlier ACPI table entries (V1.0 and 0.71 extensions)
*
* 1) Address space
* 2) Length in bytes -- convert to length in bits
* 3) Bit offset is zero
* 4) Reserved field is zero
* 5) Expand address to 64 bits
*/
#define ASL_BUILD_GAS_FROM_ENTRY(a,b,c,d) do {a.AddressSpaceId = (UINT8) d;\
a.RegisterBitWidth = (UINT8) ACPI_MUL_8 (b);\
a.RegisterBitOffset = 0;\
a.Reserved = 0;\
ACPI_STORE_ADDRESS (a.Address,(ACPI_PHYSICAL_ADDRESS) c);} while (0)
/* ACPI V1.0 entries -- address space is always I/O */
#define ASL_BUILD_GAS_FROM_V1_ENTRY(a,b,c) ASL_BUILD_GAS_FROM_ENTRY(a,b,c,ACPI_ADR_SPACE_SYSTEM_IO)
/*
* Reporting macros that are never compiled out
*/
#define ACPI_PARAM_LIST(pl) pl
#define ACPI_PARAM_LIST(pl) pl
/*
* Error reporting. These versions add callers module and line#. Since
@ -519,21 +574,21 @@
* as a local string ("_ProcName) so that it can be also used by the function exit macros below.
*/
#define ACPI_FUNCTION_NAME(a) ACPI_DEBUG_PRINT_INFO _Dbg; \
_Dbg.ComponentId = _COMPONENT; \
_Dbg.ProcName = a; \
_Dbg.ModuleName = _THIS_MODULE;
#define ACPI_FUNCTION_NAME(a) ACPI_DEBUG_PRINT_INFO _Dbg; \
_Dbg.ComponentId = _COMPONENT; \
_Dbg.ProcName = a; \
_Dbg.ModuleName = _THIS_MODULE;
#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a)\
AcpiUtTrace(__LINE__,&_Dbg)
#define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a)\
AcpiUtTracePtr(__LINE__,&_Dbg,(void *)b)
#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a)\
AcpiUtTraceU32(__LINE__,&_Dbg,(UINT32)b)
#define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a)\
AcpiUtTraceStr(__LINE__,&_Dbg,(char *)b)
#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \
AcpiUtTrace(__LINE__,&_Dbg)
#define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \
AcpiUtTracePtr(__LINE__,&_Dbg,(void *)b)
#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \
AcpiUtTraceU32(__LINE__,&_Dbg,(UINT32)b)
#define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a) \
AcpiUtTraceStr(__LINE__,&_Dbg,(char *)b)
#define ACPI_FUNCTION_ENTRY() AcpiUtTrackStackPtr()
#define ACPI_FUNCTION_ENTRY() AcpiUtTrackStackPtr()
/*
* Function exit tracing.