mirror of
https://github.com/acpica/acpica/
synced 2025-02-14 12:34:50 +03:00
Update types and macros
This commit is contained in:
parent
b6fc95599d
commit
31e5d64578
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acmacros.h - C macros for the entire subsystem.
|
||||
* $Revision: 1.179 $
|
||||
* $Revision: 1.180 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -424,14 +424,15 @@
|
||||
(((ACPI_NATIVE_UINT) boundary)-1)) & \
|
||||
(~(((ACPI_NATIVE_UINT) boundary)-1)))
|
||||
|
||||
/* Note: sizeof(ACPI_NATIVE_UINT) evaluates to either 2, 4, or 8 */
|
||||
|
||||
#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a,4)
|
||||
#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a,8)
|
||||
#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,ALIGNED_ADDRESS_BOUNDARY)
|
||||
#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(ACPI_NATIVE_UINT))
|
||||
|
||||
#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a,4)
|
||||
#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a,8)
|
||||
#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,ALIGNED_ADDRESS_BOUNDARY)
|
||||
|
||||
#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(ACPI_NATIVE_UINT))
|
||||
|
||||
#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7)
|
||||
#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a))
|
||||
@ -442,6 +443,8 @@
|
||||
|
||||
#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary))
|
||||
|
||||
#define ACPI_IS_MISALIGNED(value) (((ACPI_NATIVE_UINT)value) & (sizeof(ACPI_NATIVE_UINT)-1))
|
||||
|
||||
/*
|
||||
* Bitmask creation
|
||||
* Bit positions start at zero.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: actypes.h - Common data types for the entire ACPI subsystem
|
||||
* $Revision: 1.300 $
|
||||
* $Revision: 1.301 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -231,7 +231,6 @@ typedef UINT64 ACPI_PHYSICAL_ADDRESS;
|
||||
#define ACPI_MAX_PTR ACPI_UINT64_MAX
|
||||
#define ACPI_SIZE_MAX ACPI_UINT64_MAX
|
||||
|
||||
#define ALIGNED_ADDRESS_BOUNDARY 0x00000008
|
||||
#define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */
|
||||
|
||||
/*
|
||||
@ -274,8 +273,6 @@ typedef UINT64 ACPI_PHYSICAL_ADDRESS;
|
||||
#define ACPI_MAX_PTR ACPI_UINT32_MAX
|
||||
#define ACPI_SIZE_MAX ACPI_UINT32_MAX
|
||||
|
||||
#define ALIGNED_ADDRESS_BOUNDARY 0x00000004
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
@ -304,7 +301,6 @@ typedef char *ACPI_PHYSICAL_ADDRESS;
|
||||
#define ACPI_MAX_PTR ACPI_UINT16_MAX
|
||||
#define ACPI_SIZE_MAX ACPI_UINT16_MAX
|
||||
|
||||
#define ALIGNED_ADDRESS_BOUNDARY 0x00000002
|
||||
#define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */
|
||||
|
||||
/* 64-bit integers cannot be supported */
|
||||
@ -1537,12 +1533,6 @@ typedef struct acpi_resource
|
||||
|
||||
#define ACPI_NEXT_RESOURCE(Res) (ACPI_RESOURCE *)((UINT8 *) Res + Res->Length)
|
||||
|
||||
#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
|
||||
#define ACPI_ALIGN_RESOURCE_SIZE(Length) (Length)
|
||||
#else
|
||||
#define ACPI_ALIGN_RESOURCE_SIZE(Length) ACPI_ROUND_UP_TO_NATIVE_WORD(Length)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* END: of definitions for Resource Attributes
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user