Commit ea936b78 authored by Bob Moore's avatar Bob Moore Committed by Len Brown

ACPI: ACPICA 20060217

Implemented a change to the IndexField support to match
the behavior of the Microsoft AML interpreter. The value
written to the Index register is now a byte offset,
no longer an index based upon the width of the Data
register. This should fix IndexField problems seen on
some machines where the Data register is not exactly one
byte wide. The ACPI specification will be clarified on
this point.

Fixed a problem where several resource descriptor
types could overrun the internal descriptor buffer due
to size miscalculation: VendorShort, VendorLong, and
Interrupt. This was noticed on IA64 machines, but could
affect all platforms.

Fixed a problem where individual resource descriptors were
misaligned within the internal buffer, causing alignment
faults on IA64 platforms.
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 52fc0b02
...@@ -519,13 +519,20 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) ...@@ -519,13 +519,20 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)
acpi_ut_add_reference(obj_desc->index_field.index_obj); acpi_ut_add_reference(obj_desc->index_field.index_obj);
/* /*
* February 2006: Changed to match MS behavior
*
* The value written to the Index register is the byte offset of the * The value written to the Index register is the byte offset of the
* target field * target field.
* Note: may change code to: ACPI_DIV_8 (Info->field_bit_position) *
* Previously, the value was calculated as an index in terms of the
* width of the Data register, as below:
*
* obj_desc->index_field.Value = (u32)
* (Info->field_bit_position / ACPI_MUL_8 (
* obj_desc->Field.access_byte_width));
*/ */
obj_desc->index_field.value = (u32) obj_desc->index_field.value =
(info->field_bit_position / (u32) ACPI_DIV_8(info->field_bit_position);
ACPI_MUL_8(obj_desc->field.access_byte_width));
ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
"index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n", "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n",
......
...@@ -78,6 +78,7 @@ acpi_ns_report_error(char *module_name, ...@@ -78,6 +78,7 @@ acpi_ns_report_error(char *module_name,
char *internal_name, acpi_status lookup_status) char *internal_name, acpi_status lookup_status)
{ {
acpi_status status; acpi_status status;
u32 bad_name;
char *name = NULL; char *name = NULL;
acpi_ut_report_error(module_name, line_number); acpi_ut_report_error(module_name, line_number);
...@@ -86,8 +87,8 @@ acpi_ns_report_error(char *module_name, ...@@ -86,8 +87,8 @@ acpi_ns_report_error(char *module_name,
/* There is a non-ascii character in the name */ /* There is a non-ascii character in the name */
acpi_os_printf("[0x%4.4X] (NON-ASCII)", ACPI_MOVE_32_TO_32(&bad_name, internal_name);
*(ACPI_CAST_PTR(u32, internal_name))); acpi_os_printf("[0x%4.4X] (NON-ASCII)", bad_name);
} else { } else {
/* Convert path to external format */ /* Convert path to external format */
......
...@@ -767,6 +767,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state) ...@@ -767,6 +767,7 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
return_ACPI_STATUS(status2); return_ACPI_STATUS(status2);
} }
} }
acpi_ps_pop_scope(parser_state, &op, acpi_ps_pop_scope(parser_state, &op,
&walk_state->arg_types, &walk_state->arg_types,
&walk_state->arg_count); &walk_state->arg_count);
......
...@@ -162,9 +162,11 @@ acpi_rs_stream_option_length(u32 resource_length, ...@@ -162,9 +162,11 @@ acpi_rs_stream_option_length(u32 resource_length,
resource_length - minimum_aml_resource_length - 1; resource_length - minimum_aml_resource_length - 1;
} }
/* Round up length to 32 bits for internal structure alignment */ /*
* Round the length up to a multiple of the native word in order to
return ((u32) ACPI_ROUND_UP_to_32_bITS(string_length)); * guarantee that the entire resource descriptor is native word aligned
*/
return ((u32) ACPI_ROUND_UP_TO_NATIVE_WORD(string_length));
} }
/******************************************************************************* /*******************************************************************************
...@@ -336,7 +338,7 @@ acpi_rs_get_list_length(u8 * aml_buffer, ...@@ -336,7 +338,7 @@ acpi_rs_get_list_length(u8 * aml_buffer,
acpi_status status; acpi_status status;
u8 *end_aml; u8 *end_aml;
u8 *buffer; u8 *buffer;
u32 buffer_size = 0; u32 buffer_size;
u16 temp16; u16 temp16;
u16 resource_length; u16 resource_length;
u32 extra_struct_bytes; u32 extra_struct_bytes;
...@@ -345,6 +347,7 @@ acpi_rs_get_list_length(u8 * aml_buffer, ...@@ -345,6 +347,7 @@ acpi_rs_get_list_length(u8 * aml_buffer,
ACPI_FUNCTION_TRACE("rs_get_list_length"); ACPI_FUNCTION_TRACE("rs_get_list_length");
*size_needed = 0;
end_aml = aml_buffer + aml_buffer_length; end_aml = aml_buffer + aml_buffer_length;
/* Walk the list of AML resource descriptors */ /* Walk the list of AML resource descriptors */
...@@ -391,37 +394,28 @@ acpi_rs_get_list_length(u8 * aml_buffer, ...@@ -391,37 +394,28 @@ acpi_rs_get_list_length(u8 * aml_buffer,
break; break;
case ACPI_RESOURCE_NAME_VENDOR_SMALL: case ACPI_RESOURCE_NAME_VENDOR_SMALL:
case ACPI_RESOURCE_NAME_VENDOR_LARGE:
/* /*
* Vendor Resource: * Vendor Resource:
* Ensure a 32-bit boundary for the structure * Get the number of vendor data bytes
*/ */
extra_struct_bytes = (u32) extra_struct_bytes = resource_length;
ACPI_ROUND_UP_to_32_bITS(resource_length) -
resource_length;
break; break;
case ACPI_RESOURCE_NAME_END_TAG: case ACPI_RESOURCE_NAME_END_TAG:
/* /*
* End Tag: This is the normal exit, add size of end_tag * End Tag:
* This is the normal exit, add size of end_tag
*/ */
*size_needed = buffer_size + ACPI_RS_SIZE_MIN; *size_needed += ACPI_RS_SIZE_MIN;
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
case ACPI_RESOURCE_NAME_VENDOR_LARGE:
/*
* Vendor Resource:
* Add vendor data and ensure a 32-bit boundary for the structure
*/
extra_struct_bytes = (u32)
ACPI_ROUND_UP_to_32_bITS(resource_length) -
resource_length;
break;
case ACPI_RESOURCE_NAME_ADDRESS32: case ACPI_RESOURCE_NAME_ADDRESS32:
case ACPI_RESOURCE_NAME_ADDRESS16: case ACPI_RESOURCE_NAME_ADDRESS16:
case ACPI_RESOURCE_NAME_ADDRESS64:
/* /*
* 32-Bit or 16-bit Address Resource: * Address Resource:
* Add the size of any optional data (resource_source) * Add the size of the optional resource_source
*/ */
extra_struct_bytes = extra_struct_bytes =
acpi_rs_stream_option_length(resource_length, acpi_rs_stream_option_length(resource_length,
...@@ -430,50 +424,46 @@ acpi_rs_get_list_length(u8 * aml_buffer, ...@@ -430,50 +424,46 @@ acpi_rs_get_list_length(u8 * aml_buffer,
case ACPI_RESOURCE_NAME_EXTENDED_IRQ: case ACPI_RESOURCE_NAME_EXTENDED_IRQ:
/* /*
* Extended IRQ: * Extended IRQ Resource:
* Point past the interrupt_vector_flags to get the * Using the interrupt_table_length, add 4 bytes for each additional
* interrupt_table_length. * interrupt. Note: at least one interrupt is required and is
* included in the minimum descriptor size (reason for the -1)
*/ */
buffer++; extra_struct_bytes = (buffer[1] - 1) * sizeof(u32);
extra_struct_bytes = (u32) /* Add the size of the optional resource_source */
/*
* Add 4 bytes for each additional interrupt. Note: at extra_struct_bytes +=
* least one interrupt is required and is included in
* the minimum descriptor size
*/
((*buffer - 1) * sizeof(u32)) +
/* Add the size of any optional data (resource_source) */
acpi_rs_stream_option_length(resource_length - acpi_rs_stream_option_length(resource_length -
extra_struct_bytes, extra_struct_bytes,
minimum_aml_resource_length); minimum_aml_resource_length);
break; break;
case ACPI_RESOURCE_NAME_ADDRESS64:
/*
* 64-Bit Address Resource:
* Add the size of any optional data (resource_source)
* Ensure a 64-bit boundary for the structure
*/
extra_struct_bytes = (u32)
ACPI_ROUND_UP_to_64_bITS
(acpi_rs_stream_option_length
(resource_length, minimum_aml_resource_length));
break;
default: default:
break; break;
} }
/* Update the required buffer size for the internal descriptor structs */ /*
* Update the required buffer size for the internal descriptor structs
*
* Important: Round the size up for the appropriate alignment. This
* is a requirement on IA64.
*/
buffer_size = acpi_gbl_resource_struct_sizes[resource_index] +
extra_struct_bytes;
buffer_size = ACPI_ROUND_UP_TO_NATIVE_WORD(buffer_size);
*size_needed += buffer_size;
temp16 = (u16) (acpi_gbl_resource_struct_sizes[resource_index] + ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
extra_struct_bytes); "Type %.2X, Aml %.2X internal %.2X\n",
buffer_size += (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(temp16); acpi_ut_get_resource_type(aml_buffer),
acpi_ut_get_descriptor_length(aml_buffer),
buffer_size));
/* /*
* Point to the next resource within the stream * Point to the next resource within the AML stream using the length
* using the size of the header plus the length contained in the header * contained in the resource descriptor header
*/ */
aml_buffer += acpi_ut_get_descriptor_length(aml_buffer); aml_buffer += acpi_ut_get_descriptor_length(aml_buffer);
} }
...@@ -589,7 +579,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, ...@@ -589,7 +579,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
/* Round up the size since each element must be aligned */ /* Round up the size since each element must be aligned */
temp_size_needed = ACPI_ROUND_UP_to_64_bITS(temp_size_needed); temp_size_needed = ACPI_ROUND_UP_to_64_bIT(temp_size_needed);
/* Point to the next union acpi_operand_object */ /* Point to the next union acpi_operand_object */
...@@ -597,7 +587,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, ...@@ -597,7 +587,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object,
} }
/* /*
* Adding an extra element to the end of the list, essentially a * Add an extra element to the end of the list, essentially a
* NULL terminator * NULL terminator
*/ */
*buffer_size_needed = *buffer_size_needed =
......
...@@ -332,7 +332,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, ...@@ -332,7 +332,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
/* Now align the current length */ /* Now align the current length */
user_prt->length = user_prt->length =
(u32) ACPI_ROUND_UP_to_64_bITS(user_prt->length); (u32) ACPI_ROUND_UP_to_64_bIT(user_prt->length);
/* 4) Fourth subobject: Dereference the PRT.source_index */ /* 4) Fourth subobject: Dereference the PRT.source_index */
......
...@@ -77,6 +77,15 @@ acpi_rs_convert_aml_to_resources(u8 * aml, u32 aml_length, u8 * output_buffer) ...@@ -77,6 +77,15 @@ acpi_rs_convert_aml_to_resources(u8 * aml, u32 aml_length, u8 * output_buffer)
/* Loop until end-of-buffer or an end_tag is found */ /* Loop until end-of-buffer or an end_tag is found */
while (aml < end_aml) { while (aml < end_aml) {
/*
* Check that the input buffer and all subsequent pointers into it
* are aligned on a native word boundary. Most important on IA64
*/
if (ACPI_IS_MISALIGNED(resource)) {
ACPI_WARNING((AE_INFO,
"Misaligned resource pointer %p",
resource));
}
/* Validate the Resource Type and Resource Length */ /* Validate the Resource Type and Resource Length */
...@@ -101,6 +110,12 @@ acpi_rs_convert_aml_to_resources(u8 * aml, u32 aml_length, u8 * output_buffer) ...@@ -101,6 +110,12 @@ acpi_rs_convert_aml_to_resources(u8 * aml, u32 aml_length, u8 * output_buffer)
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES,
"Type %.2X, Aml %.2X internal %.2X\n",
acpi_ut_get_resource_type(aml),
acpi_ut_get_descriptor_length(aml),
resource->length));
/* Normal exit on completion of an end_tag resource descriptor */ /* Normal exit on completion of an end_tag resource descriptor */
if (acpi_ut_get_resource_type(aml) == if (acpi_ut_get_resource_type(aml) ==
......
...@@ -81,7 +81,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, ...@@ -81,7 +81,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
u16 item_count = 0; u16 item_count = 0;
u16 temp16 = 0; u16 temp16 = 0;
ACPI_FUNCTION_TRACE("rs_get_resource"); ACPI_FUNCTION_TRACE("rs_convert_aml_to_resource");
if (((acpi_native_uint) resource) & 0x3) { if (((acpi_native_uint) resource) & 0x3) {
...@@ -297,10 +297,10 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, ...@@ -297,10 +297,10 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,
exit: exit:
if (!flags_mode) { if (!flags_mode) {
/* Round the resource struct length up to the next 32-bit boundary */ /* Round the resource struct length up to the next boundary (32 or 64) */
resource->length = resource->length =
(u32) ACPI_ROUND_UP_to_32_bITS(resource->length); (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(resource->length);
} }
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
......
...@@ -299,7 +299,8 @@ static u16 acpi_rs_strcpy(char *destination, char *source) ...@@ -299,7 +299,8 @@ static u16 acpi_rs_strcpy(char *destination, char *source)
* string_ptr - (optional) where to store the actual * string_ptr - (optional) where to store the actual
* resource_source string * resource_source string
* *
* RETURN: Length of the string plus NULL terminator, rounded up to 32 bit * RETURN: Length of the string plus NULL terminator, rounded up to native
* word boundary
* *
* DESCRIPTION: Copy the optional resource_source data from a raw AML descriptor * DESCRIPTION: Copy the optional resource_source data from a raw AML descriptor
* to an internal resource descriptor * to an internal resource descriptor
...@@ -346,18 +347,16 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length, ...@@ -346,18 +347,16 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length,
} }
/* /*
* In order for the struct_size to fall on a 32-bit boundary, calculate * In order for the Resource length to be a multiple of the native
* the length of the string (+1 for the NULL terminator) and expand the * word, calculate the length of the string (+1 for NULL terminator)
* struct_size to the next 32-bit boundary. * and expand to the next word multiple.
* *
* Zero the entire area of the buffer. * Zero the entire area of the buffer.
*/ */
total_length = total_length =
(u32) ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) +
ACPI_ROUND_UP_to_32_bITS(ACPI_STRLEN 1;
(ACPI_CAST_PTR total_length = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(total_length);
(char,
&aml_resource_source[1])) + 1);
ACPI_MEMSET(resource_source->string_ptr, 0, total_length); ACPI_MEMSET(resource_source->string_ptr, 0, total_length);
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */ /* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20060210 #define ACPI_CA_VERSION 0x20060217
/* /*
* OS name, used for the _OS object. The _OS object is essentially obsolete, * OS name, used for the _OS object. The _OS object is essentially obsolete,
......
...@@ -341,29 +341,33 @@ ...@@ -341,29 +341,33 @@
/* /*
* Rounding macros (Power of two boundaries only) * Rounding macros (Power of two boundaries only)
*/ */
#define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \ #define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \
(~(((acpi_native_uint) boundary)-1))) (~(((acpi_native_uint) boundary)-1)))
#define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \ #define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \
(((acpi_native_uint) boundary)-1)) & \ (((acpi_native_uint) boundary)-1)) & \
(~(((acpi_native_uint) boundary)-1))) (~(((acpi_native_uint) boundary)-1)))
#define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4) /* Note: sizeof(acpi_native_uint) evaluates to either 2, 4, or 8 */
#define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8)
#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,ALIGNED_ADDRESS_BOUNDARY)
#define ACPI_ROUND_UP_to_32_bITS(a) ACPI_ROUND_UP(a,4) #define ACPI_ROUND_DOWN_to_32_bIT(a) ACPI_ROUND_DOWN(a,4)
#define ACPI_ROUND_UP_to_64_bITS(a) ACPI_ROUND_UP(a,8) #define ACPI_ROUND_DOWN_to_64_bIT(a) ACPI_ROUND_DOWN(a,8)
#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,ALIGNED_ADDRESS_BOUNDARY) #define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(acpi_native_uint))
#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7) #define ACPI_ROUND_UP_to_32_bIT(a) ACPI_ROUND_UP(a,4)
#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a)) #define ACPI_ROUND_UP_to_64_bIT(a) ACPI_ROUND_UP(a,8)
#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(acpi_native_uint))
#define ACPI_ROUND_UP_TO_1K(a) (((a) + 1023) >> 10) #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))
#define ACPI_ROUND_UP_TO_1K(a) (((a) + 1023) >> 10)
/* Generic (non-power-of-two) rounding */ /* Generic (non-power-of-two) rounding */
#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary)) #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 * Bitmask creation
...@@ -371,10 +375,10 @@ ...@@ -371,10 +375,10 @@
* MASK_BITS_ABOVE creates a mask starting AT the position and above * MASK_BITS_ABOVE creates a mask starting AT the position and above
* MASK_BITS_BELOW creates a mask starting one bit BELOW the position * MASK_BITS_BELOW creates a mask starting one bit BELOW the position
*/ */
#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position)))) #define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position))))
#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position))) #define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position)))
#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) #define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
/* Bitfields within ACPI registers */ /* Bitfields within ACPI registers */
......
...@@ -154,7 +154,6 @@ typedef u64 acpi_physical_address; ...@@ -154,7 +154,6 @@ typedef u64 acpi_physical_address;
#define ACPI_MAX_PTR ACPI_UINT64_MAX #define ACPI_MAX_PTR ACPI_UINT64_MAX
#define ACPI_SIZE_MAX 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 */ #define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */
/* /*
...@@ -195,8 +194,6 @@ typedef u64 acpi_physical_address; ...@@ -195,8 +194,6 @@ typedef u64 acpi_physical_address;
#define ACPI_MAX_PTR ACPI_UINT32_MAX #define ACPI_MAX_PTR ACPI_UINT32_MAX
#define ACPI_SIZE_MAX ACPI_UINT32_MAX #define ACPI_SIZE_MAX ACPI_UINT32_MAX
#define ALIGNED_ADDRESS_BOUNDARY 0x00000004
/******************************************************************************* /*******************************************************************************
* *
* Types specific to 16-bit targets * Types specific to 16-bit targets
...@@ -223,7 +220,6 @@ typedef char *acpi_physical_address; ...@@ -223,7 +220,6 @@ typedef char *acpi_physical_address;
#define ACPI_MAX_PTR ACPI_UINT16_MAX #define ACPI_MAX_PTR ACPI_UINT16_MAX
#define ACPI_SIZE_MAX 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 */ #define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */
/* 64-bit integers cannot be supported */ /* 64-bit integers cannot be supported */
...@@ -1297,12 +1293,6 @@ struct acpi_resource { ...@@ -1297,12 +1293,6 @@ struct acpi_resource {
#define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) #define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) 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 * END: of definitions for Resource Attributes
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment