提交 0897831b 编写于 作者: B Bob Moore 提交者: Len Brown

[ACPI] ACPICA 20051021

Implemented support for the EM64T and other x86_64
processors. This essentially entails recognizing
that these processors support non-aligned memory
transfers. Previously, all 64-bit processors were assumed
to lack hardware support for non-aligned transfers.

Completed conversion of the Resource Manager to nearly
full table-driven operation. Specifically, the resource
conversion code (convert AML to internal format and the
reverse) and the debug code to dump internal resource
descriptors are fully table-driven, reducing code and data
size and improving maintainability.

The OSL interfaces for Acquire and Release Lock now use a
64-bit flag word on 64-bit processors instead of a fixed
32-bit word. (Alexey Starikovskiy)

Implemented support within the resource conversion code
for the Type-Specific byte within the various ACPI 3.0
*WordSpace macros.

Fixed some issues within the resource conversion code for
the type-specific flags for both Memory and I/O address
resource descriptors. For Memory, implemented support
for the MTP and TTP flags. For I/O, split the TRS and TTP
flags into two separate fields.
Signed-off-by: NBob Moore <robert.moore@intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 50eca3eb
...@@ -195,7 +195,7 @@ add_io_space (struct pci_root_info *info, struct acpi_resource_address64 *addr) ...@@ -195,7 +195,7 @@ add_io_space (struct pci_root_info *info, struct acpi_resource_address64 *addr)
min = addr->minimum; min = addr->minimum;
max = min + addr->address_length - 1; max = min + addr->address_length - 1;
if (addr->attribute.io.translation_attribute == ACPI_SPARSE_TRANSLATION) if (addr->info.io.translation_type == ACPI_SPARSE_TRANSLATION)
sparse = 1; sparse = 1;
space_nr = new_space(addr->translation_offset, sparse); space_nr = new_space(addr->translation_offset, sparse);
......
...@@ -372,14 +372,14 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, ...@@ -372,14 +372,14 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
{ {
acpi_status status;
struct acpi_gpe_block_info *gpe_block;
struct acpi_gpe_register_info *gpe_register_info;
u32 int_status = ACPI_INTERRUPT_NOT_HANDLED; u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
u8 enabled_status_byte; u8 enabled_status_byte;
struct acpi_gpe_register_info *gpe_register_info;
u32 status_reg; u32 status_reg;
u32 enable_reg; u32 enable_reg;
u32 flags; acpi_native_uint flags;
acpi_status status;
struct acpi_gpe_block_info *gpe_block;
acpi_native_uint i; acpi_native_uint i;
acpi_native_uint j; acpi_native_uint j;
......
...@@ -136,7 +136,7 @@ acpi_status acpi_ev_walk_gpe_list(ACPI_GPE_CALLBACK gpe_walk_callback) ...@@ -136,7 +136,7 @@ acpi_status acpi_ev_walk_gpe_list(ACPI_GPE_CALLBACK gpe_walk_callback)
struct acpi_gpe_block_info *gpe_block; struct acpi_gpe_block_info *gpe_block;
struct acpi_gpe_xrupt_info *gpe_xrupt_info; struct acpi_gpe_xrupt_info *gpe_xrupt_info;
acpi_status status = AE_OK; acpi_status status = AE_OK;
u32 flags; acpi_native_uint flags;
ACPI_FUNCTION_TRACE("ev_walk_gpe_list"); ACPI_FUNCTION_TRACE("ev_walk_gpe_list");
...@@ -479,7 +479,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32 ...@@ -479,7 +479,7 @@ static struct acpi_gpe_xrupt_info *acpi_ev_get_gpe_xrupt_block(u32
struct acpi_gpe_xrupt_info *next_gpe_xrupt; struct acpi_gpe_xrupt_info *next_gpe_xrupt;
struct acpi_gpe_xrupt_info *gpe_xrupt; struct acpi_gpe_xrupt_info *gpe_xrupt;
acpi_status status; acpi_status status;
u32 flags; acpi_native_uint flags;
ACPI_FUNCTION_TRACE("ev_get_gpe_xrupt_block"); ACPI_FUNCTION_TRACE("ev_get_gpe_xrupt_block");
...@@ -553,7 +553,7 @@ static acpi_status ...@@ -553,7 +553,7 @@ static acpi_status
acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt) acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
{ {
acpi_status status; acpi_status status;
u32 flags; acpi_native_uint flags;
ACPI_FUNCTION_TRACE("ev_delete_gpe_xrupt"); ACPI_FUNCTION_TRACE("ev_delete_gpe_xrupt");
...@@ -610,7 +610,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block, ...@@ -610,7 +610,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block,
struct acpi_gpe_block_info *next_gpe_block; struct acpi_gpe_block_info *next_gpe_block;
struct acpi_gpe_xrupt_info *gpe_xrupt_block; struct acpi_gpe_xrupt_info *gpe_xrupt_block;
acpi_status status; acpi_status status;
u32 flags; acpi_native_uint flags;
ACPI_FUNCTION_TRACE("ev_install_gpe_block"); ACPI_FUNCTION_TRACE("ev_install_gpe_block");
...@@ -663,7 +663,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block, ...@@ -663,7 +663,7 @@ acpi_ev_install_gpe_block(struct acpi_gpe_block_info *gpe_block,
acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block) acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block)
{ {
acpi_status status; acpi_status status;
u32 flags; acpi_native_uint flags;
ACPI_FUNCTION_TRACE("ev_install_gpe_block"); ACPI_FUNCTION_TRACE("ev_install_gpe_block");
......
...@@ -562,7 +562,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, ...@@ -562,7 +562,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
struct acpi_gpe_event_info *gpe_event_info; struct acpi_gpe_event_info *gpe_event_info;
struct acpi_handler_info *handler; struct acpi_handler_info *handler;
acpi_status status; acpi_status status;
u32 flags; acpi_native_uint flags;
ACPI_FUNCTION_TRACE("acpi_install_gpe_handler"); ACPI_FUNCTION_TRACE("acpi_install_gpe_handler");
...@@ -653,7 +653,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, ...@@ -653,7 +653,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
struct acpi_gpe_event_info *gpe_event_info; struct acpi_gpe_event_info *gpe_event_info;
struct acpi_handler_info *handler; struct acpi_handler_info *handler;
acpi_status status; acpi_status status;
u32 flags; acpi_native_uint flags;
ACPI_FUNCTION_TRACE("acpi_remove_gpe_handler"); ACPI_FUNCTION_TRACE("acpi_remove_gpe_handler");
......
...@@ -625,9 +625,8 @@ acpi_ex_do_logical_op(u16 opcode, ...@@ -625,9 +625,8 @@ acpi_ex_do_logical_op(u16 opcode,
/* Lexicographic compare: compare the data bytes */ /* Lexicographic compare: compare the data bytes */
compare = ACPI_MEMCMP((const char *)operand0->buffer.pointer, compare = ACPI_MEMCMP(operand0->buffer.pointer,
(const char *)local_operand1->buffer. local_operand1->buffer.pointer,
pointer,
(length0 > length1) ? length1 : length0); (length0 > length1) ? length1 : length0);
switch (opcode) { switch (opcode) {
......
...@@ -77,7 +77,7 @@ acpi_ex_system_memory_space_handler(u32 function, ...@@ -77,7 +77,7 @@ acpi_ex_system_memory_space_handler(u32 function,
struct acpi_mem_space_context *mem_info = region_context; struct acpi_mem_space_context *mem_info = region_context;
u32 length; u32 length;
acpi_size window_size; acpi_size window_size;
#ifndef ACPI_MISALIGNED_TRANSFERS #ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
u32 remainder; u32 remainder;
#endif #endif
...@@ -109,7 +109,7 @@ acpi_ex_system_memory_space_handler(u32 function, ...@@ -109,7 +109,7 @@ acpi_ex_system_memory_space_handler(u32 function,
return_ACPI_STATUS(AE_AML_OPERAND_VALUE); return_ACPI_STATUS(AE_AML_OPERAND_VALUE);
} }
#ifndef ACPI_MISALIGNED_TRANSFERS #ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
/* /*
* Hardware does not support non-aligned data transfers, we must verify * Hardware does not support non-aligned data transfers, we must verify
* the request. * the request.
......
...@@ -1058,11 +1058,9 @@ EXPORT_SYMBOL(max_cstate); ...@@ -1058,11 +1058,9 @@ EXPORT_SYMBOL(max_cstate);
* Acquire a spinlock. * Acquire a spinlock.
* *
* handle is a pointer to the spinlock_t. * handle is a pointer to the spinlock_t.
* flags is *not* the result of save_flags - it is an ACPI-specific flag variable
* that indicates whether we are at interrupt level.
*/ */
unsigned long acpi_os_acquire_lock(acpi_handle handle) acpi_native_uint acpi_os_acquire_lock(acpi_handle handle)
{ {
unsigned long flags; unsigned long flags;
spin_lock_irqsave((spinlock_t *) handle, flags); spin_lock_irqsave((spinlock_t *) handle, flags);
...@@ -1073,7 +1071,7 @@ unsigned long acpi_os_acquire_lock(acpi_handle handle) ...@@ -1073,7 +1071,7 @@ unsigned long acpi_os_acquire_lock(acpi_handle handle)
* Release a spinlock. See above. * Release a spinlock. See above.
*/ */
void acpi_os_release_lock(acpi_handle handle, unsigned long flags) void acpi_os_release_lock(acpi_handle handle, acpi_native_uint flags)
{ {
spin_unlock_irqrestore((spinlock_t *) handle, flags); spin_unlock_irqrestore((spinlock_t *) handle, flags);
} }
......
此差异已折叠。
...@@ -52,7 +52,7 @@ ACPI_MODULE_NAME("rscalc") ...@@ -52,7 +52,7 @@ ACPI_MODULE_NAME("rscalc")
/* Local prototypes */ /* Local prototypes */
static u8 acpi_rs_count_set_bits(u16 bit_field); static u8 acpi_rs_count_set_bits(u16 bit_field);
static acpi_size static acpi_rs_length
acpi_rs_struct_option_length(struct acpi_resource_source *resource_source); acpi_rs_struct_option_length(struct acpi_resource_source *resource_source);
static u32 static u32
...@@ -100,7 +100,7 @@ static u8 acpi_rs_count_set_bits(u16 bit_field) ...@@ -100,7 +100,7 @@ static u8 acpi_rs_count_set_bits(u16 bit_field)
* *
******************************************************************************/ ******************************************************************************/
static acpi_size static acpi_rs_length
acpi_rs_struct_option_length(struct acpi_resource_source *resource_source) acpi_rs_struct_option_length(struct acpi_resource_source *resource_source)
{ {
ACPI_FUNCTION_ENTRY(); ACPI_FUNCTION_ENTRY();
...@@ -111,7 +111,7 @@ acpi_rs_struct_option_length(struct acpi_resource_source *resource_source) ...@@ -111,7 +111,7 @@ acpi_rs_struct_option_length(struct acpi_resource_source *resource_source)
* resource_source_index (1). * resource_source_index (1).
*/ */
if (resource_source->string_ptr) { if (resource_source->string_ptr) {
return ((acpi_size) resource_source->string_length + 1); return ((acpi_rs_length) (resource_source->string_length + 1));
} }
return (0); return (0);
...@@ -184,7 +184,7 @@ acpi_status ...@@ -184,7 +184,7 @@ acpi_status
acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
{ {
acpi_size aml_size_needed = 0; acpi_size aml_size_needed = 0;
acpi_size segment_size; acpi_rs_length total_size;
ACPI_FUNCTION_TRACE("rs_get_aml_length"); ACPI_FUNCTION_TRACE("rs_get_aml_length");
...@@ -199,7 +199,7 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) ...@@ -199,7 +199,7 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
/* Get the base size of the (external stream) resource descriptor */ /* Get the base size of the (external stream) resource descriptor */
segment_size = acpi_gbl_aml_resource_sizes[resource->type]; total_size = acpi_gbl_aml_resource_sizes[resource->type];
/* /*
* Augment the base size for descriptors with optional and/or * Augment the base size for descriptors with optional and/or
...@@ -216,13 +216,14 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) ...@@ -216,13 +216,14 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
if (resource->data.vendor.byte_length > 7) { if (resource->data.vendor.byte_length > 7) {
/* Base size of a Large resource descriptor */ /* Base size of a Large resource descriptor */
segment_size = total_size =
sizeof(struct aml_resource_large_header); sizeof(struct aml_resource_large_header);
} }
/* Add the size of the vendor-specific data */ /* Add the size of the vendor-specific data */
segment_size += resource->data.vendor.byte_length; total_size = (acpi_rs_length)
(total_size + resource->data.vendor.byte_length);
break; break;
case ACPI_RESOURCE_TYPE_END_TAG: case ACPI_RESOURCE_TYPE_END_TAG:
...@@ -230,7 +231,7 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) ...@@ -230,7 +231,7 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
* End Tag: * End Tag:
* We are done -- return the accumulated total size. * We are done -- return the accumulated total size.
*/ */
*size_needed = aml_size_needed + segment_size; *size_needed = aml_size_needed + total_size;
/* Normal exit */ /* Normal exit */
...@@ -241,10 +242,11 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) ...@@ -241,10 +242,11 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
* 16-Bit Address Resource: * 16-Bit Address Resource:
* Add the size of the optional resource_source info * Add the size of the optional resource_source info
*/ */
segment_size += total_size = (acpi_rs_length)
(total_size +
acpi_rs_struct_option_length(&resource->data. acpi_rs_struct_option_length(&resource->data.
address16. address16.
resource_source); resource_source));
break; break;
case ACPI_RESOURCE_TYPE_ADDRESS32: case ACPI_RESOURCE_TYPE_ADDRESS32:
...@@ -252,10 +254,11 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) ...@@ -252,10 +254,11 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
* 32-Bit Address Resource: * 32-Bit Address Resource:
* Add the size of the optional resource_source info * Add the size of the optional resource_source info
*/ */
segment_size += total_size = (acpi_rs_length)
(total_size +
acpi_rs_struct_option_length(&resource->data. acpi_rs_struct_option_length(&resource->data.
address32. address32.
resource_source); resource_source));
break; break;
case ACPI_RESOURCE_TYPE_ADDRESS64: case ACPI_RESOURCE_TYPE_ADDRESS64:
...@@ -263,10 +266,11 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) ...@@ -263,10 +266,11 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
* 64-Bit Address Resource: * 64-Bit Address Resource:
* Add the size of the optional resource_source info * Add the size of the optional resource_source info
*/ */
segment_size += total_size = (acpi_rs_length)
(total_size +
acpi_rs_struct_option_length(&resource->data. acpi_rs_struct_option_length(&resource->data.
address64. address64.
resource_source); resource_source));
break; break;
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ: case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
...@@ -275,16 +279,14 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) ...@@ -275,16 +279,14 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
* Add the size of each additional optional interrupt beyond the * Add the size of each additional optional interrupt beyond the
* required 1 (4 bytes for each u32 interrupt number) * required 1 (4 bytes for each u32 interrupt number)
*/ */
segment_size += (((acpi_size) total_size = (acpi_rs_length)
resource->data.extended_irq. (total_size +
interrupt_count - 1) * 4); ((resource->data.extended_irq.interrupt_count -
1) * 4) +
/* Add the size of the optional resource_source info */ /* Add the size of the optional resource_source info */
segment_size +=
acpi_rs_struct_option_length(&resource->data. acpi_rs_struct_option_length(&resource->data.
extended_irq. extended_irq.
resource_source); resource_source));
break; break;
default: default:
...@@ -293,7 +295,7 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) ...@@ -293,7 +295,7 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
/* Update the total */ /* Update the total */
aml_size_needed += segment_size; aml_size_needed += total_size;
/* Point to the next object */ /* Point to the next object */
...@@ -341,7 +343,7 @@ acpi_rs_get_list_length(u8 * aml_buffer, ...@@ -341,7 +343,7 @@ acpi_rs_get_list_length(u8 * aml_buffer,
while (bytes_parsed < aml_buffer_length) { while (bytes_parsed < aml_buffer_length) {
/* The next byte in the stream is the resource descriptor type */ /* The next byte in the stream is the resource descriptor type */
resource_type = acpi_rs_get_resource_type(*aml_buffer); resource_type = acpi_ut_get_resource_type(aml_buffer);
/* Get the base stream size and structure sizes for the descriptor */ /* Get the base stream size and structure sizes for the descriptor */
...@@ -352,10 +354,7 @@ acpi_rs_get_list_length(u8 * aml_buffer, ...@@ -352,10 +354,7 @@ acpi_rs_get_list_length(u8 * aml_buffer,
/* Get the Length field from the input resource descriptor */ /* Get the Length field from the input resource descriptor */
resource_length = resource_length = acpi_ut_get_resource_length(aml_buffer);
acpi_rs_get_resource_length(ACPI_CAST_PTR
(union aml_resource,
aml_buffer));
/* Augment the size for descriptors with optional fields */ /* Augment the size for descriptors with optional fields */
......
此差异已折叠。
...@@ -58,60 +58,60 @@ ACPI_MODULE_NAME("rsinfo") ...@@ -58,60 +58,60 @@ ACPI_MODULE_NAME("rsinfo")
* descriptors are indexed by the acpi_resource_type field. * descriptors are indexed by the acpi_resource_type field.
*/ */
/* Dispatch table for resource-to-AML (Set Resource) conversion functions */ /* Dispatch table for resource-to-AML (Set Resource) conversion functions */
ACPI_SET_RESOURCE_HANDLER acpi_gbl_set_resource_dispatch[] = { struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[] = {
acpi_rs_set_irq, /* 0x00, ACPI_RESOURCE_TYPE_IRQ */ acpi_rs_set_irq, /* 0x00, ACPI_RESOURCE_TYPE_IRQ */
acpi_rs_set_dma, /* 0x01, ACPI_RESOURCE_TYPE_DMA */ acpi_rs_convert_dma, /* 0x01, ACPI_RESOURCE_TYPE_DMA */
acpi_rs_set_start_dpf, /* 0x02, ACPI_RESOURCE_TYPE_START_DEPENDENT */ acpi_rs_set_start_dpf, /* 0x02, ACPI_RESOURCE_TYPE_START_DEPENDENT */
acpi_rs_set_end_dpf, /* 0x03, ACPI_RESOURCE_TYPE_END_DEPENDENT */ acpi_rs_convert_end_dpf, /* 0x03, ACPI_RESOURCE_TYPE_END_DEPENDENT */
acpi_rs_set_io, /* 0x04, ACPI_RESOURCE_TYPE_IO */ acpi_rs_convert_io, /* 0x04, ACPI_RESOURCE_TYPE_IO */
acpi_rs_set_fixed_io, /* 0x05, ACPI_RESOURCE_TYPE_FIXED_IO */ acpi_rs_convert_fixed_io, /* 0x05, ACPI_RESOURCE_TYPE_FIXED_IO */
acpi_rs_set_vendor, /* 0x06, ACPI_RESOURCE_TYPE_VENDOR */ acpi_rs_set_vendor, /* 0x06, ACPI_RESOURCE_TYPE_VENDOR */
acpi_rs_set_end_tag, /* 0x07, ACPI_RESOURCE_TYPE_END_TAG */ acpi_rs_convert_end_tag, /* 0x07, ACPI_RESOURCE_TYPE_END_TAG */
acpi_rs_set_memory24, /* 0x08, ACPI_RESOURCE_TYPE_MEMORY24 */ acpi_rs_convert_memory24, /* 0x08, ACPI_RESOURCE_TYPE_MEMORY24 */
acpi_rs_set_memory32, /* 0x09, ACPI_RESOURCE_TYPE_MEMORY32 */ acpi_rs_convert_memory32, /* 0x09, ACPI_RESOURCE_TYPE_MEMORY32 */
acpi_rs_set_fixed_memory32, /* 0x0A, ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */ acpi_rs_convert_fixed_memory32, /* 0x0A, ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */
acpi_rs_set_address16, /* 0x0B, ACPI_RESOURCE_TYPE_ADDRESS16 */ acpi_rs_convert_address16, /* 0x0B, ACPI_RESOURCE_TYPE_ADDRESS16 */
acpi_rs_set_address32, /* 0x0C, ACPI_RESOURCE_TYPE_ADDRESS32 */ acpi_rs_convert_address32, /* 0x0C, ACPI_RESOURCE_TYPE_ADDRESS32 */
acpi_rs_set_address64, /* 0x0D, ACPI_RESOURCE_TYPE_ADDRESS64 */ acpi_rs_convert_address64, /* 0x0D, ACPI_RESOURCE_TYPE_ADDRESS64 */
acpi_rs_set_ext_address64, /* 0x0E, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */ acpi_rs_convert_ext_address64, /* 0x0E, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */
acpi_rs_set_ext_irq, /* 0x0F, ACPI_RESOURCE_TYPE_EXTENDED_IRQ */ acpi_rs_convert_ext_irq, /* 0x0F, ACPI_RESOURCE_TYPE_EXTENDED_IRQ */
acpi_rs_set_generic_reg /* 0x10, ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ acpi_rs_convert_generic_reg /* 0x10, ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
}; };
/* Dispatch tables for AML-to-resource (Get Resource) conversion functions */ /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */
ACPI_GET_RESOURCE_HANDLER acpi_gbl_sm_get_resource_dispatch[] = { struct acpi_rsconvert_info *acpi_gbl_sm_get_resource_dispatch[] = {
NULL, /* 0x00, Reserved */ NULL, /* 0x00, Reserved */
NULL, /* 0x01, Reserved */ NULL, /* 0x01, Reserved */
NULL, /* 0x02, Reserved */ NULL, /* 0x02, Reserved */
NULL, /* 0x03, Reserved */ NULL, /* 0x03, Reserved */
acpi_rs_get_irq, /* 0x04, ACPI_RESOURCE_NAME_IRQ */ acpi_rs_get_irq, /* 0x04, ACPI_RESOURCE_NAME_IRQ */
acpi_rs_get_dma, /* 0x05, ACPI_RESOURCE_NAME_DMA */ acpi_rs_convert_dma, /* 0x05, ACPI_RESOURCE_NAME_DMA */
acpi_rs_get_start_dpf, /* 0x06, ACPI_RESOURCE_NAME_START_DEPENDENT */ acpi_rs_get_start_dpf, /* 0x06, ACPI_RESOURCE_NAME_START_DEPENDENT */
acpi_rs_get_end_dpf, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */ acpi_rs_convert_end_dpf, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */
acpi_rs_get_io, /* 0x08, ACPI_RESOURCE_NAME_IO */ acpi_rs_convert_io, /* 0x08, ACPI_RESOURCE_NAME_IO */
acpi_rs_get_fixed_io, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO */ acpi_rs_convert_fixed_io, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO */
NULL, /* 0x0A, Reserved */ NULL, /* 0x0A, Reserved */
NULL, /* 0x0B, Reserved */ NULL, /* 0x0B, Reserved */
NULL, /* 0x0C, Reserved */ NULL, /* 0x0C, Reserved */
NULL, /* 0x0D, Reserved */ NULL, /* 0x0D, Reserved */
acpi_rs_get_vendor, /* 0x0E, ACPI_RESOURCE_NAME_VENDOR_SMALL */ acpi_rs_get_vendor_small, /* 0x0E, ACPI_RESOURCE_NAME_VENDOR_SMALL */
acpi_rs_get_end_tag /* 0x0F, ACPI_RESOURCE_NAME_END_TAG */ acpi_rs_convert_end_tag /* 0x0F, ACPI_RESOURCE_NAME_END_TAG */
}; };
ACPI_GET_RESOURCE_HANDLER acpi_gbl_lg_get_resource_dispatch[] = { struct acpi_rsconvert_info *acpi_gbl_lg_get_resource_dispatch[] = {
NULL, /* 0x00, Reserved */ NULL, /* 0x00, Reserved */
acpi_rs_get_memory24, /* 0x01, ACPI_RESOURCE_NAME_MEMORY24 */ acpi_rs_convert_memory24, /* 0x01, ACPI_RESOURCE_NAME_MEMORY24 */
acpi_rs_get_generic_reg, /* 0x02, ACPI_RESOURCE_NAME_GENERIC_REGISTER */ acpi_rs_convert_generic_reg, /* 0x02, ACPI_RESOURCE_NAME_GENERIC_REGISTER */
NULL, /* 0x03, Reserved */ NULL, /* 0x03, Reserved */
acpi_rs_get_vendor, /* 0x04, ACPI_RESOURCE_NAME_VENDOR_LARGE */ acpi_rs_get_vendor_large, /* 0x04, ACPI_RESOURCE_NAME_VENDOR_LARGE */
acpi_rs_get_memory32, /* 0x05, ACPI_RESOURCE_NAME_MEMORY32 */ acpi_rs_convert_memory32, /* 0x05, ACPI_RESOURCE_NAME_MEMORY32 */
acpi_rs_get_fixed_memory32, /* 0x06, ACPI_RESOURCE_NAME_FIXED_MEMORY32 */ acpi_rs_convert_fixed_memory32, /* 0x06, ACPI_RESOURCE_NAME_FIXED_MEMORY32 */
acpi_rs_get_address32, /* 0x07, ACPI_RESOURCE_NAME_ADDRESS32 */ acpi_rs_convert_address32, /* 0x07, ACPI_RESOURCE_NAME_ADDRESS32 */
acpi_rs_get_address16, /* 0x08, ACPI_RESOURCE_NAME_ADDRESS16 */ acpi_rs_convert_address16, /* 0x08, ACPI_RESOURCE_NAME_ADDRESS16 */
acpi_rs_get_ext_irq, /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_IRQ */ acpi_rs_convert_ext_irq, /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_IRQ */
acpi_rs_get_address64, /* 0x0A, ACPI_RESOURCE_NAME_ADDRESS64 */ acpi_rs_convert_address64, /* 0x0A, ACPI_RESOURCE_NAME_ADDRESS64 */
acpi_rs_get_ext_address64 /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */ acpi_rs_convert_ext_address64 /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */
}; };
#ifdef ACPI_FUTURE_USAGE #ifdef ACPI_FUTURE_USAGE
...@@ -119,7 +119,7 @@ ACPI_GET_RESOURCE_HANDLER acpi_gbl_lg_get_resource_dispatch[] = { ...@@ -119,7 +119,7 @@ ACPI_GET_RESOURCE_HANDLER acpi_gbl_lg_get_resource_dispatch[] = {
/* Dispatch table for resource dump functions */ /* Dispatch table for resource dump functions */
ACPI_DUMP_RESOURCE_HANDLER acpi_gbl_dump_resource_dispatch[] = { struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = {
acpi_rs_dump_irq, /* ACPI_RESOURCE_TYPE_IRQ */ acpi_rs_dump_irq, /* ACPI_RESOURCE_TYPE_IRQ */
acpi_rs_dump_dma, /* ACPI_RESOURCE_TYPE_DMA */ acpi_rs_dump_dma, /* ACPI_RESOURCE_TYPE_DMA */
acpi_rs_dump_start_dpf, /* ACPI_RESOURCE_TYPE_START_DEPENDENT */ acpi_rs_dump_start_dpf, /* ACPI_RESOURCE_TYPE_START_DEPENDENT */
...@@ -136,17 +136,17 @@ ACPI_DUMP_RESOURCE_HANDLER acpi_gbl_dump_resource_dispatch[] = { ...@@ -136,17 +136,17 @@ ACPI_DUMP_RESOURCE_HANDLER acpi_gbl_dump_resource_dispatch[] = {
acpi_rs_dump_address64, /* ACPI_RESOURCE_TYPE_ADDRESS64 */ acpi_rs_dump_address64, /* ACPI_RESOURCE_TYPE_ADDRESS64 */
acpi_rs_dump_ext_address64, /* ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */ acpi_rs_dump_ext_address64, /* ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */
acpi_rs_dump_ext_irq, /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */ acpi_rs_dump_ext_irq, /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */
acpi_rs_dump_generic_reg /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ acpi_rs_dump_generic_reg, /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
}; };
#endif #endif
#endif /* ACPI_FUTURE_USAGE */ #endif /* ACPI_FUTURE_USAGE */
/* /*
* Base sizes for external AML resource descriptors, indexed by internal type. * Base sizes for external AML resource descriptors, indexed by internal type.
* Includes size of the descriptor header (1 byte for small descriptors, * Includes size of the descriptor header (1 byte for small descriptors,
* 3 bytes for large descriptors) * 3 bytes for large descriptors)
*/ */
u8 acpi_gbl_aml_resource_sizes[] = { const u8 acpi_gbl_aml_resource_sizes[] = {
sizeof(struct aml_resource_irq), /* ACPI_RESOURCE_TYPE_IRQ (optional Byte 3 always created) */ sizeof(struct aml_resource_irq), /* ACPI_RESOURCE_TYPE_IRQ (optional Byte 3 always created) */
sizeof(struct aml_resource_dma), /* ACPI_RESOURCE_TYPE_DMA */ sizeof(struct aml_resource_dma), /* ACPI_RESOURCE_TYPE_DMA */
sizeof(struct aml_resource_start_dependent), /* ACPI_RESOURCE_TYPE_START_DEPENDENT (optional Byte 1 always created) */ sizeof(struct aml_resource_start_dependent), /* ACPI_RESOURCE_TYPE_START_DEPENDENT (optional Byte 1 always created) */
...@@ -168,8 +168,8 @@ u8 acpi_gbl_aml_resource_sizes[] = { ...@@ -168,8 +168,8 @@ u8 acpi_gbl_aml_resource_sizes[] = {
/* Macros used in the tables below */ /* Macros used in the tables below */
#define ACPI_RLARGE(r) sizeof (r) - sizeof (struct aml_resource_large_header) #define ACPI_RLARGE(r) (sizeof (r) - sizeof (struct aml_resource_large_header))
#define ACPI_RSMALL(r) sizeof (r) - sizeof (struct aml_resource_small_header) #define ACPI_RSMALL(r) (sizeof (r) - sizeof (struct aml_resource_small_header))
/* /*
* Base sizes of resource descriptors, both the AML stream resource length * Base sizes of resource descriptors, both the AML stream resource length
...@@ -182,47 +182,46 @@ struct acpi_resource_info acpi_gbl_sm_resource_info[] = { ...@@ -182,47 +182,46 @@ struct acpi_resource_info acpi_gbl_sm_resource_info[] = {
{0, 0, 0}, {0, 0, 0},
{0, 0, 0}, {0, 0, 0},
{2, ACPI_RSMALL(struct aml_resource_irq), {2, ACPI_RSMALL(struct aml_resource_irq),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_irq)}, ACPI_RS_SIZE(struct acpi_resource_irq)},
{0, ACPI_RSMALL(struct aml_resource_dma), {0, ACPI_RSMALL(struct aml_resource_dma),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_dma)}, ACPI_RS_SIZE(struct acpi_resource_dma)},
{2, ACPI_RSMALL(struct aml_resource_start_dependent), {2, ACPI_RSMALL(struct aml_resource_start_dependent),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_start_dependent)}, ACPI_RS_SIZE(struct acpi_resource_start_dependent)},
{0, ACPI_RSMALL(struct aml_resource_end_dependent), {0, ACPI_RSMALL(struct aml_resource_end_dependent), ACPI_RS_SIZE_MIN},
ACPI_RESOURCE_LENGTH},
{0, ACPI_RSMALL(struct aml_resource_io), {0, ACPI_RSMALL(struct aml_resource_io),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_io)}, ACPI_RS_SIZE(struct acpi_resource_io)},
{0, ACPI_RSMALL(struct aml_resource_fixed_io), {0, ACPI_RSMALL(struct aml_resource_fixed_io),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_fixed_io)}, ACPI_RS_SIZE(struct acpi_resource_fixed_io)},
{0, 0, 0}, {0, 0, 0},
{0, 0, 0}, {0, 0, 0},
{0, 0, 0}, {0, 0, 0},
{0, 0, 0}, {0, 0, 0},
{1, ACPI_RSMALL(struct aml_resource_vendor_small), {1, ACPI_RSMALL(struct aml_resource_vendor_small),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_vendor)}, ACPI_RS_SIZE(struct acpi_resource_vendor)},
{0, ACPI_RSMALL(struct aml_resource_end_tag), ACPI_RESOURCE_LENGTH} {0, ACPI_RSMALL(struct aml_resource_end_tag), ACPI_RS_SIZE_MIN}
}; };
struct acpi_resource_info acpi_gbl_lg_resource_info[] = { struct acpi_resource_info acpi_gbl_lg_resource_info[] = {
{0, 0, 0}, {0, 0, 0},
{0, ACPI_RLARGE(struct aml_resource_memory24), {0, ACPI_RLARGE(struct aml_resource_memory24),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_memory24)}, ACPI_RS_SIZE(struct acpi_resource_memory24)},
{0, ACPI_RLARGE(struct aml_resource_generic_register), {0, ACPI_RLARGE(struct aml_resource_generic_register),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_generic_register)}, ACPI_RS_SIZE(struct acpi_resource_generic_register)},
{0, 0, 0}, {0, 0, 0},
{1, ACPI_RLARGE(struct aml_resource_vendor_large), {1, ACPI_RLARGE(struct aml_resource_vendor_large),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_vendor)}, ACPI_RS_SIZE(struct acpi_resource_vendor)},
{0, ACPI_RLARGE(struct aml_resource_memory32), {0, ACPI_RLARGE(struct aml_resource_memory32),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_memory32)}, ACPI_RS_SIZE(struct acpi_resource_memory32)},
{0, ACPI_RLARGE(struct aml_resource_fixed_memory32), {0, ACPI_RLARGE(struct aml_resource_fixed_memory32),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_fixed_memory32)}, ACPI_RS_SIZE(struct acpi_resource_fixed_memory32)},
{1, ACPI_RLARGE(struct aml_resource_address32), {1, ACPI_RLARGE(struct aml_resource_address32),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_address32)}, ACPI_RS_SIZE(struct acpi_resource_address32)},
{1, ACPI_RLARGE(struct aml_resource_address16), {1, ACPI_RLARGE(struct aml_resource_address16),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_address16)}, ACPI_RS_SIZE(struct acpi_resource_address16)},
{1, ACPI_RLARGE(struct aml_resource_extended_irq), {1, ACPI_RLARGE(struct aml_resource_extended_irq),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_extended_irq)}, ACPI_RS_SIZE(struct acpi_resource_extended_irq)},
{1, ACPI_RLARGE(struct aml_resource_address64), {1, ACPI_RLARGE(struct aml_resource_address64),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_address64)}, ACPI_RS_SIZE(struct acpi_resource_address64)},
{0, ACPI_RLARGE(struct aml_resource_extended_address64), {0, ACPI_RLARGE(struct aml_resource_extended_address64),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_extended_address64)} ACPI_RS_SIZE(struct acpi_resource_extended_address64)}
}; };
...@@ -49,269 +49,206 @@ ACPI_MODULE_NAME("rsio") ...@@ -49,269 +49,206 @@ ACPI_MODULE_NAME("rsio")
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_get_io * acpi_rs_convert_io
*
* PARAMETERS: Aml - Pointer to the AML resource descriptor
* aml_resource_length - Length of the resource from the AML header
* Resource - Where the internal resource is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert a raw AML resource descriptor to the corresponding
* internal resource descriptor, simplifying bitflags and handling
* alignment and endian issues if necessary.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_convert_io[5] = {
acpi_rs_get_io(union aml_resource *aml, {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_IO,
u16 aml_resource_length, struct acpi_resource *resource) ACPI_RS_SIZE(struct acpi_resource_io),
{ ACPI_RSC_TABLE_SIZE(acpi_rs_convert_io)},
ACPI_FUNCTION_TRACE("rs_get_io");
/* Get the Decode flag */ {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_IO,
sizeof(struct aml_resource_io),
0},
resource->data.io.io_decode = aml->io.information & 0x01; /* Decode flag */
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.io.io_decode),
AML_OFFSET(io.flags),
0},
/* /*
* Get the following contiguous fields from the AML descriptor: * These fields are contiguous in both the source and destination:
* Minimum Base Address
* Maximum Base Address
* Address Alignment * Address Alignment
* Length * Length
* Minimum Base Address
* Maximum Base Address
*/ */
ACPI_MOVE_16_TO_32(&resource->data.io.minimum, &aml->io.minimum); {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.io.alignment),
ACPI_MOVE_16_TO_32(&resource->data.io.maximum, &aml->io.maximum); AML_OFFSET(io.alignment),
resource->data.io.alignment = aml->io.alignment; 2},
resource->data.io.address_length = aml->io.address_length;
/* Complete the resource header */
resource->type = ACPI_RESOURCE_TYPE_IO; {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.io.minimum),
resource->length = ACPI_SIZEOF_RESOURCE(struct acpi_resource_io); AML_OFFSET(io.minimum),
return_ACPI_STATUS(AE_OK); 2}
} };
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_set_io * acpi_rs_convert_fixed_io
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Aml - Where the AML descriptor is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert an internal resource descriptor to the corresponding
* external AML resource descriptor.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_convert_fixed_io[4] = {
acpi_rs_set_io(struct acpi_resource *resource, union aml_resource *aml) {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_FIXED_IO,
{ ACPI_RS_SIZE(struct acpi_resource_fixed_io),
ACPI_FUNCTION_TRACE("rs_set_io"); ACPI_RSC_TABLE_SIZE(acpi_rs_convert_fixed_io)},
/* I/O Information Byte */
aml->io.information = (u8) (resource->data.io.io_decode & 0x01);
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_FIXED_IO,
sizeof(struct aml_resource_fixed_io),
0},
/* /*
* Set the following contiguous fields in the AML descriptor: * These fields are contiguous in both the source and destination:
* Minimum Base Address * Base Address
* Maximum Base Address
* Address Alignment
* Length * Length
*/ */
ACPI_MOVE_32_TO_16(&aml->io.minimum, &resource->data.io.minimum); {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.fixed_io.address_length),
ACPI_MOVE_32_TO_16(&aml->io.maximum, &resource->data.io.maximum); AML_OFFSET(fixed_io.address_length),
aml->io.alignment = (u8) resource->data.io.alignment; 1},
aml->io.address_length = (u8) resource->data.io.address_length;
/* Complete the AML descriptor header */
acpi_rs_set_resource_header(ACPI_RESOURCE_NAME_IO, {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.fixed_io.address),
sizeof(struct aml_resource_io), aml); AML_OFFSET(fixed_io.address),
return_ACPI_STATUS(AE_OK); 1}
} };
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_get_fixed_io * acpi_rs_convert_generic_reg
*
* PARAMETERS: Aml - Pointer to the AML resource descriptor
* aml_resource_length - Length of the resource from the AML header
* Resource - Where the internal resource is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert a raw AML resource descriptor to the corresponding
* internal resource descriptor, simplifying bitflags and handling
* alignment and endian issues if necessary.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_convert_generic_reg[4] = {
acpi_rs_get_fixed_io(union aml_resource *aml, {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_GENERIC_REGISTER,
u16 aml_resource_length, struct acpi_resource *resource) ACPI_RS_SIZE(struct acpi_resource_generic_register),
{ ACPI_RSC_TABLE_SIZE(acpi_rs_convert_generic_reg)},
ACPI_FUNCTION_TRACE("rs_get_fixed_io");
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_GENERIC_REGISTER,
sizeof(struct aml_resource_generic_register),
0},
/* /*
* Get the following contiguous fields from the AML descriptor: * These fields are contiguous in both the source and destination:
* Base Address * Address Space ID
* Length * Register Bit Width
* Register Bit Offset
* Access Size
*/ */
ACPI_MOVE_16_TO_32(&resource->data.fixed_io.address, {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.generic_reg.space_id),
&aml->fixed_io.address); AML_OFFSET(generic_reg.address_space_id),
resource->data.fixed_io.address_length = aml->fixed_io.address_length; 4},
/* Complete the resource header */ /* Get the Register Address */
resource->type = ACPI_RESOURCE_TYPE_FIXED_IO; {ACPI_RSC_MOVE64, ACPI_RS_OFFSET(data.generic_reg.address),
resource->length = ACPI_SIZEOF_RESOURCE(struct acpi_resource_fixed_io); AML_OFFSET(generic_reg.address),
return_ACPI_STATUS(AE_OK); 1}
} };
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_set_fixed_io * acpi_rs_convert_end_dpf
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Aml - Where the AML descriptor is returned
* *
* RETURN: Status ******************************************************************************/
struct acpi_rsconvert_info acpi_rs_convert_end_dpf[2] = {
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_END_DEPENDENT,
ACPI_RS_SIZE_MIN,
ACPI_RSC_TABLE_SIZE(acpi_rs_convert_end_dpf)},
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_END_DEPENDENT,
sizeof(struct aml_resource_end_dependent),
0}
};
/*******************************************************************************
* *
* DESCRIPTION: Convert an internal resource descriptor to the corresponding * acpi_rs_convert_end_tag
* external AML resource descriptor.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_convert_end_tag[2] = {
acpi_rs_set_fixed_io(struct acpi_resource *resource, union aml_resource *aml) {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_END_TAG,
{ ACPI_RS_SIZE_MIN,
ACPI_FUNCTION_TRACE("rs_set_fixed_io"); ACPI_RSC_TABLE_SIZE(acpi_rs_convert_end_tag)},
/* /*
* Set the following contiguous fields in the AML descriptor: * Note: The checksum field is set to zero, meaning that the resource
* Base Address * data is treated as if the checksum operation succeeded.
* Length * (ACPI Spec 1.0b Section 6.4.2.8)
*/ */
ACPI_MOVE_32_TO_16(&aml->fixed_io.address, {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_END_TAG,
&resource->data.fixed_io.address); sizeof(struct aml_resource_end_tag),
aml->fixed_io.address_length = 0}
(u8) resource->data.fixed_io.address_length; };
/* Complete the AML descriptor header */
acpi_rs_set_resource_header(ACPI_RESOURCE_NAME_FIXED_IO,
sizeof(struct aml_resource_fixed_io), aml);
return_ACPI_STATUS(AE_OK);
}
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_get_dma * acpi_rs_get_start_dpf
*
* PARAMETERS: Aml - Pointer to the AML resource descriptor
* aml_resource_length - Length of the resource from the AML header
* Resource - Where the internal resource is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert a raw AML resource descriptor to the corresponding
* internal resource descriptor, simplifying bitflags and handling
* alignment and endian issues if necessary.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_get_start_dpf[5] = {
acpi_rs_get_dma(union aml_resource *aml, {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_START_DEPENDENT,
u16 aml_resource_length, struct acpi_resource *resource) ACPI_RS_SIZE(struct acpi_resource_start_dependent),
{ ACPI_RSC_TABLE_SIZE(acpi_rs_get_start_dpf)},
u32 channel_count = 0;
u32 i;
u8 temp8;
ACPI_FUNCTION_TRACE("rs_get_dma"); /* Defaults for Compatibility and Performance priorities */
/* Decode the DMA channel bits */ {ACPI_RSC_SET8, ACPI_RS_OFFSET(data.start_dpf.compatibility_priority),
ACPI_ACCEPTABLE_CONFIGURATION,
2},
for (i = 0; i < 8; i++) { /* All done if there is no flag byte present in the descriptor */
if ((aml->dma.dma_channel_mask >> i) & 0x01) {
resource->data.dma.channels[channel_count] = i;
channel_count++;
}
}
resource->length = 0; {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 1},
resource->data.dma.channel_count = channel_count;
/* /* Flag byte is present, get the flags */
* Calculate the structure size based upon the number of channels
* Note: Zero DMA channels is valid
*/
if (channel_count > 0) {
resource->length = (u32) (channel_count - 1) * 4;
}
/* Get the flags: transfer preference, bus mastering, channel speed */
temp8 = aml->dma.flags; {ACPI_RSC_2BITFLAG,
resource->data.dma.transfer = temp8 & 0x03; ACPI_RS_OFFSET(data.start_dpf.compatibility_priority),
resource->data.dma.bus_master = (temp8 >> 2) & 0x01; AML_OFFSET(start_dpf.flags),
resource->data.dma.type = (temp8 >> 5) & 0x03; 0},
if (resource->data.dma.transfer == 0x03) { {ACPI_RSC_2BITFLAG,
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ACPI_RS_OFFSET(data.start_dpf.performance_robustness),
"Invalid DMA.Transfer preference (3)\n")); AML_OFFSET(start_dpf.flags),
return_ACPI_STATUS(AE_BAD_DATA); 2}
} };
/* Complete the resource header */
resource->type = ACPI_RESOURCE_TYPE_DMA;
resource->length += ACPI_SIZEOF_RESOURCE(struct acpi_resource_dma);
return_ACPI_STATUS(AE_OK);
}
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_set_dma * acpi_rs_set_start_dpf
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Aml - Where the AML descriptor is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert an internal resource descriptor to the corresponding
* external AML resource descriptor.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_set_start_dpf[6] = {
acpi_rs_set_dma(struct acpi_resource *resource, union aml_resource *aml) {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_START_DEPENDENT,
{ sizeof(struct aml_resource_start_dependent),
u8 i; ACPI_RSC_TABLE_SIZE(acpi_rs_set_start_dpf)},
ACPI_FUNCTION_TRACE("rs_set_dma");
/* Convert channel list to 8-bit DMA channel bitmask */ /* Set the default flag values */
aml->dma.dma_channel_mask = 0; {ACPI_RSC_2BITFLAG,
for (i = 0; i < resource->data.dma.channel_count; i++) { ACPI_RS_OFFSET(data.start_dpf.compatibility_priority),
aml->dma.dma_channel_mask |= AML_OFFSET(start_dpf.flags),
(1 << resource->data.dma.channels[i]); 0},
}
/* Set the DMA Flag bits */ {ACPI_RSC_2BITFLAG,
ACPI_RS_OFFSET(data.start_dpf.performance_robustness),
AML_OFFSET(start_dpf.flags),
2},
/*
* All done if flags byte is necessary -- if either priority value
* is not ACPI_ACCEPTABLE_CONFIGURATION
*/
{ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
ACPI_RS_OFFSET(data.start_dpf.compatibility_priority),
ACPI_ACCEPTABLE_CONFIGURATION},
aml->dma.flags = (u8) {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
(((resource->data.dma.type & 0x03) << 5) | ACPI_RS_OFFSET(data.start_dpf.performance_robustness),
((resource->data.dma.bus_master & 0x01) << 2) | ACPI_ACCEPTABLE_CONFIGURATION},
(resource->data.dma.transfer & 0x03));
/* Complete the AML descriptor header */ /* Flag byte is not necessary */
acpi_rs_set_resource_header(ACPI_RESOURCE_NAME_DMA, {ACPI_RSC_LENGTH, 0, 0,
sizeof(struct aml_resource_dma), aml); sizeof(struct aml_resource_start_dependent_noprio)}
return_ACPI_STATUS(AE_OK); };
}
...@@ -49,325 +49,182 @@ ACPI_MODULE_NAME("rsirq") ...@@ -49,325 +49,182 @@ ACPI_MODULE_NAME("rsirq")
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_get_irq * acpi_rs_get_irq
*
* PARAMETERS: Aml - Pointer to the AML resource descriptor
* aml_resource_length - Length of the resource from the AML header
* Resource - Where the internal resource is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert a raw AML resource descriptor to the corresponding
* internal resource descriptor, simplifying bitflags and handling
* alignment and endian issues if necessary.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_get_irq[7] = {
acpi_rs_get_irq(union aml_resource *aml, {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_IRQ,
u16 aml_resource_length, struct acpi_resource *resource) ACPI_RS_SIZE(struct acpi_resource_irq),
{ ACPI_RSC_TABLE_SIZE(acpi_rs_get_irq)},
u16 temp16 = 0;
u32 interrupt_count = 0;
u32 i;
u32 resource_length;
ACPI_FUNCTION_TRACE("rs_get_irq");
/* Get the IRQ mask (bytes 1:2) */ /* Get the IRQ mask (bytes 1:2) */
ACPI_MOVE_16_TO_16(&temp16, &aml->irq.irq_mask); {ACPI_RSC_BITMASK16, ACPI_RS_OFFSET(data.irq.interrupts[0]),
AML_OFFSET(irq.irq_mask),
/* Decode the IRQ bits (up to 16 possible) */ ACPI_RS_OFFSET(data.irq.interrupt_count)},
for (i = 0; i < 16; i++) {
if ((temp16 >> i) & 0x01) {
resource->data.irq.interrupts[interrupt_count] = i;
interrupt_count++;
}
}
/* Zero interrupts is valid */ /* Set default flags (others are zero) */
resource_length = 0; {ACPI_RSC_SET8, ACPI_RS_OFFSET(data.irq.triggering),
resource->data.irq.interrupt_count = interrupt_count; ACPI_EDGE_SENSITIVE,
if (interrupt_count > 0) { 1},
/* Calculate the structure size based upon the number of interrupts */
resource_length = (u32) (interrupt_count - 1) * 4; /* All done if no flag byte present in descriptor */
}
/* Get Flags (Byte 3) if it is used */ {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 3},
if (aml_resource_length == 3) {
/* Check for HE, LL interrupts */
switch (aml->irq.flags & 0x09) {
case 0x01: /* HE */
resource->data.irq.triggering = ACPI_EDGE_SENSITIVE;
resource->data.irq.polarity = ACPI_ACTIVE_HIGH;
break;
case 0x08: /* LL */
resource->data.irq.triggering = ACPI_LEVEL_SENSITIVE;
resource->data.irq.polarity = ACPI_ACTIVE_LOW;
break;
default:
/*
* Only _LL and _HE polarity/trigger interrupts
* are allowed (ACPI spec, section "IRQ Format")
* so 0x00 and 0x09 are illegal.
*/
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Invalid interrupt polarity/trigger in resource list, %X\n",
aml->irq.flags));
return_ACPI_STATUS(AE_BAD_DATA);
}
/* Get Sharing flag */ /* Get flags: Triggering[0], Polarity[3], Sharing[4] */
resource->data.irq.sharable = (aml->irq.flags >> 3) & 0x01; {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.triggering),
} else { AML_OFFSET(irq.flags),
/* 0},
* Default configuration: assume Edge Sensitive, Active High,
* Non-Sharable as per the ACPI Specification
*/
resource->data.irq.triggering = ACPI_EDGE_SENSITIVE;
resource->data.irq.polarity = ACPI_ACTIVE_HIGH;
resource->data.irq.sharable = ACPI_EXCLUSIVE;
}
/* Complete the resource header */ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.polarity),
AML_OFFSET(irq.flags),
3},
resource->type = ACPI_RESOURCE_TYPE_IRQ; {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.sharable),
resource->length = AML_OFFSET(irq.flags),
resource_length + ACPI_SIZEOF_RESOURCE(struct acpi_resource_irq); 4}
return_ACPI_STATUS(AE_OK); };
}
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_set_irq * acpi_rs_set_irq
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Aml - Where the AML descriptor is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert an internal resource descriptor to the corresponding
* external AML resource descriptor.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_set_irq[9] = {
acpi_rs_set_irq(struct acpi_resource *resource, union aml_resource *aml) {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_IRQ,
{ sizeof(struct aml_resource_irq),
acpi_size descriptor_length; ACPI_RSC_TABLE_SIZE(acpi_rs_set_irq)},
u16 irq_mask;
u8 i;
ACPI_FUNCTION_TRACE("rs_set_irq");
/* Convert interrupt list to 16-bit IRQ bitmask */ /* Convert interrupt list to 16-bit IRQ bitmask */
irq_mask = 0; {ACPI_RSC_BITMASK16, ACPI_RS_OFFSET(data.irq.interrupts[0]),
for (i = 0; i < resource->data.irq.interrupt_count; i++) { AML_OFFSET(irq.irq_mask),
irq_mask |= (1 << resource->data.irq.interrupts[i]); ACPI_RS_OFFSET(data.irq.interrupt_count)},
}
/* Set the interrupt mask */ /* Set the flags byte by default */
ACPI_MOVE_16_TO_16(&aml->irq.irq_mask, &irq_mask); {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.triggering),
AML_OFFSET(irq.flags),
0},
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.polarity),
AML_OFFSET(irq.flags),
3},
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.sharable),
AML_OFFSET(irq.flags),
4},
/* /*
* The descriptor field is set based upon whether a third byte is * Check if the flags byte is necessary. Not needed if the flags are:
* needed to contain the IRQ Information. * ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_HIGH, ACPI_EXCLUSIVE
*/ */
if ((resource->data.irq.triggering == ACPI_EDGE_SENSITIVE) && {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
(resource->data.irq.polarity == ACPI_ACTIVE_HIGH) && ACPI_RS_OFFSET(data.irq.triggering),
(resource->data.irq.sharable == ACPI_EXCLUSIVE)) { ACPI_EDGE_SENSITIVE},
/* irq_no_flags() descriptor can be used */
descriptor_length = sizeof(struct aml_resource_irq_noflags);
} else {
/* Irq() descriptor must be used */
descriptor_length = sizeof(struct aml_resource_irq); {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
ACPI_RS_OFFSET(data.irq.polarity),
ACPI_ACTIVE_HIGH},
/* Set the IRQ Info byte */ {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
ACPI_RS_OFFSET(data.irq.sharable),
ACPI_EXCLUSIVE},
aml->irq.flags = (u8) /* irq_no_flags() descriptor can be used */
((resource->data.irq.sharable & 0x01) << 4);
if (ACPI_LEVEL_SENSITIVE == resource->data.irq.triggering &&
ACPI_ACTIVE_LOW == resource->data.irq.polarity) {
aml->irq.flags |= 0x08;
} else {
aml->irq.flags |= 0x01;
}
}
/* Complete the AML descriptor header */
acpi_rs_set_resource_header(ACPI_RESOURCE_NAME_IRQ, descriptor_length, {ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq_noflags)}
aml); };
return_ACPI_STATUS(AE_OK);
}
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_get_ext_irq * acpi_rs_convert_ext_irq
*
* PARAMETERS: Aml - Pointer to the AML resource descriptor
* aml_resource_length - Length of the resource from the AML header
* Resource - Where the internal resource is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert a raw AML resource descriptor to the corresponding
* internal resource descriptor, simplifying bitflags and handling
* alignment and endian issues if necessary.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_convert_ext_irq[9] = {
acpi_rs_get_ext_irq(union aml_resource *aml, {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_EXTENDED_IRQ,
u16 aml_resource_length, struct acpi_resource *resource) ACPI_RS_SIZE(struct acpi_resource_extended_irq),
{ ACPI_RSC_TABLE_SIZE(acpi_rs_convert_ext_irq)},
char *out_resource_string;
u8 temp8;
ACPI_FUNCTION_TRACE("rs_get_ext_irq"); {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_EXTENDED_IRQ,
sizeof(struct aml_resource_extended_irq),
0},
/* Get the flag bits */ /* Flag bits */
temp8 = aml->extended_irq.flags;
resource->data.extended_irq.producer_consumer = temp8 & 0x01;
resource->data.extended_irq.polarity = (temp8 >> 2) & 0x01;
resource->data.extended_irq.sharable = (temp8 >> 3) & 0x01;
/*
* Check for Interrupt Mode
*
* The definition of an Extended IRQ changed between ACPI spec v1.0b
* and ACPI spec 2.0 (section 6.4.3.6 in both).
*
* - Edge/Level are defined opposite in the table vs the headers
*/
resource->data.extended_irq.triggering =
(temp8 & 0x2) ? ACPI_EDGE_SENSITIVE : ACPI_LEVEL_SENSITIVE;
/* Get the IRQ Table length (Byte4) */ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.producer_consumer),
AML_OFFSET(extended_irq.flags),
0},
temp8 = aml->extended_irq.table_length; {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.triggering),
resource->data.extended_irq.interrupt_count = temp8; AML_OFFSET(extended_irq.flags),
if (temp8 < 1) { 1},
/* Must have at least one IRQ */
return_ACPI_STATUS(AE_AML_BAD_RESOURCE_LENGTH); {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.polarity),
} AML_OFFSET(extended_irq.flags),
2},
/* {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.sharable),
* Add any additional structure size to properly calculate AML_OFFSET(extended_irq.flags),
* the next pointer at the end of this function 3},
*/
resource->length = (temp8 - 1) * 4;
out_resource_string = ACPI_CAST_PTR(char,
(&resource->data.extended_irq.
interrupts[0] + temp8));
/* Get every IRQ in the table, each is 32 bits */ /* IRQ Table length (Byte4) */
acpi_rs_move_data(resource->data.extended_irq.interrupts, {ACPI_RSC_COUNT, ACPI_RS_OFFSET(data.extended_irq.interrupt_count),
aml->extended_irq.interrupt_number, AML_OFFSET(extended_irq.interrupt_count),
(u16) temp8, ACPI_MOVE_TYPE_32_TO_32); sizeof(u32)}
,
/* Get the optional resource_source (index and string) */ /* Copy every IRQ in the table, each is 32 bits */
resource->length += {ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.extended_irq.interrupts[0]),
acpi_rs_get_resource_source(aml_resource_length, AML_OFFSET(extended_irq.interrupts[0]),
(acpi_size) resource->length + 0}
sizeof(struct ,
aml_resource_extended_irq),
&resource->data.extended_irq.
resource_source, aml,
out_resource_string);
/* Complete the resource header */ /* Optional resource_source (Index and String) */
resource->type = ACPI_RESOURCE_TYPE_EXTENDED_IRQ; {ACPI_RSC_SOURCEX, ACPI_RS_OFFSET(data.extended_irq.resource_source),
resource->length += ACPI_RS_OFFSET(data.extended_irq.interrupts[0]),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_extended_irq); sizeof(struct aml_resource_extended_irq)}
return_ACPI_STATUS(AE_OK); };
}
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_set_ext_irq * acpi_rs_convert_dma
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Aml - Where the AML descriptor is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert an internal resource descriptor to the corresponding
* external AML resource descriptor.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_convert_dma[6] = {
acpi_rs_set_ext_irq(struct acpi_resource *resource, union aml_resource *aml) {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_DMA,
{ ACPI_RS_SIZE(struct acpi_resource_dma),
acpi_size descriptor_length; ACPI_RSC_TABLE_SIZE(acpi_rs_convert_dma)},
ACPI_FUNCTION_TRACE("rs_set_ext_irq");
/* Set the Interrupt vector flags */
aml->extended_irq.flags = (u8)
((resource->data.extended_irq.producer_consumer & 0x01) |
((resource->data.extended_irq.sharable & 0x01) << 3) |
((resource->data.extended_irq.polarity & 0x1) << 2));
/*
* Set the Interrupt Mode
*
* The definition of an Extended IRQ changed between ACPI spec v1.0b
* and ACPI spec 2.0 (section 6.4.3.6 in both). This code does not
* implement the more restrictive definition of 1.0b
*
* - Edge/Level are defined opposite in the table vs the headers
*/
if (resource->data.extended_irq.triggering == ACPI_EDGE_SENSITIVE) {
aml->extended_irq.flags |= 0x02;
}
/* Set the Interrupt table length */
aml->extended_irq.table_length = (u8)
resource->data.extended_irq.interrupt_count;
descriptor_length = (sizeof(struct aml_resource_extended_irq) - 4) + {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_DMA,
((acpi_size) resource->data.extended_irq.interrupt_count * sizeof(struct aml_resource_dma),
sizeof(u32)); 0},
/* Set each interrupt value */ /* Flags: transfer preference, bus mastering, channel speed */
acpi_rs_move_data(aml->extended_irq.interrupt_number, {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.dma.transfer),
resource->data.extended_irq.interrupts, AML_OFFSET(dma.flags),
(u16) resource->data.extended_irq.interrupt_count, 0},
ACPI_MOVE_TYPE_32_TO_32);
/* Resource Source Index and Resource Source are optional */ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.dma.bus_master),
AML_OFFSET(dma.flags),
2},
descriptor_length = acpi_rs_set_resource_source(aml, descriptor_length, {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.dma.type),
&resource->data. AML_OFFSET(dma.flags),
extended_irq. 5},
resource_source);
/* Complete the AML descriptor header */ /* DMA channel mask bits */
acpi_rs_set_resource_header(ACPI_RESOURCE_NAME_EXTENDED_IRQ, {ACPI_RSC_BITMASK, ACPI_RS_OFFSET(data.dma.channels[0]),
descriptor_length, aml); AML_OFFSET(dma.dma_channel_mask),
return_ACPI_STATUS(AE_OK); ACPI_RS_OFFSET(data.dma.channel_count)}
} };
...@@ -48,7 +48,8 @@ ...@@ -48,7 +48,8 @@
ACPI_MODULE_NAME("rslist") ACPI_MODULE_NAME("rslist")
/* Local prototypes */ /* Local prototypes */
static ACPI_GET_RESOURCE_HANDLER acpi_rs_get_resource_handler(u8 resource_type); static struct acpi_rsconvert_info *acpi_rs_get_conversion_info(u8
resource_type);
static acpi_status acpi_rs_validate_resource_length(union aml_resource *aml); static acpi_status acpi_rs_validate_resource_length(union aml_resource *aml);
...@@ -83,7 +84,7 @@ static acpi_status acpi_rs_validate_resource_length(union aml_resource *aml) ...@@ -83,7 +84,7 @@ static acpi_status acpi_rs_validate_resource_length(union aml_resource *aml)
return (AE_AML_INVALID_RESOURCE_TYPE); return (AE_AML_INVALID_RESOURCE_TYPE);
} }
resource_length = acpi_rs_get_resource_length(aml); resource_length = acpi_ut_get_resource_length(aml);
minimum_aml_resource_length = minimum_aml_resource_length =
resource_info->minimum_aml_resource_length; resource_info->minimum_aml_resource_length;
...@@ -115,18 +116,17 @@ static acpi_status acpi_rs_validate_resource_length(union aml_resource *aml) ...@@ -115,18 +116,17 @@ static acpi_status acpi_rs_validate_resource_length(union aml_resource *aml)
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_get_resource_handler * FUNCTION: acpi_rs_get_conversion_info
* *
* PARAMETERS: resource_type - Byte 0 of a resource descriptor * PARAMETERS: resource_type - Byte 0 of a resource descriptor
* *
* RETURN: Pointer to the resource conversion handler * RETURN: Pointer to the resource conversion info table
* *
* DESCRIPTION: Extract the Resource Type/Name from the first byte of * DESCRIPTION: Get the conversion table associated with this resource type
* a resource descriptor.
* *
******************************************************************************/ ******************************************************************************/
static ACPI_GET_RESOURCE_HANDLER acpi_rs_get_resource_handler(u8 resource_type) static struct acpi_rsconvert_info *acpi_rs_get_conversion_info(u8 resource_type)
{ {
ACPI_FUNCTION_ENTRY(); ACPI_FUNCTION_ENTRY();
...@@ -174,33 +174,24 @@ acpi_rs_convert_aml_to_resources(u8 * aml_buffer, ...@@ -174,33 +174,24 @@ acpi_rs_convert_aml_to_resources(u8 * aml_buffer,
acpi_status status; acpi_status status;
acpi_size bytes_parsed = 0; acpi_size bytes_parsed = 0;
struct acpi_resource *resource; struct acpi_resource *resource;
u16 resource_length; acpi_rsdesc_size descriptor_length;
u32 descriptor_length; struct acpi_rsconvert_info *info;
ACPI_GET_RESOURCE_HANDLER handler;
ACPI_FUNCTION_TRACE("rs_convert_aml_to_resources"); ACPI_FUNCTION_TRACE("rs_convert_aml_to_resources");
/* Loop until end-of-buffer or an end_tag is found */ /* Loop until end-of-buffer or an end_tag is found */
while (bytes_parsed < aml_buffer_length) { while (bytes_parsed < aml_buffer_length) {
/* Get the handler associated with this Descriptor Type */ /* Get the conversion table associated with this Descriptor Type */
handler = acpi_rs_get_resource_handler(*aml_buffer); info = acpi_rs_get_conversion_info(*aml_buffer);
if (!handler) { if (!info) {
/* No handler indicates invalid resource type */ /* No table indicates an invalid resource type */
return_ACPI_STATUS(AE_AML_INVALID_RESOURCE_TYPE); return_ACPI_STATUS(AE_AML_INVALID_RESOURCE_TYPE);
} }
resource_length = descriptor_length = acpi_ut_get_descriptor_length(aml_buffer);
acpi_rs_get_resource_length(ACPI_CAST_PTR
(union aml_resource,
aml_buffer));
descriptor_length =
acpi_rs_get_descriptor_length(ACPI_CAST_PTR
(union aml_resource,
aml_buffer));
/* /*
* Perform limited validation of the resource length, based upon * Perform limited validation of the resource length, based upon
...@@ -214,11 +205,16 @@ acpi_rs_convert_aml_to_resources(u8 * aml_buffer, ...@@ -214,11 +205,16 @@ acpi_rs_convert_aml_to_resources(u8 * aml_buffer,
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
/* Convert a byte stream resource to local resource struct */ /* Convert the AML byte stream resource to a local resource struct */
status = handler(ACPI_CAST_PTR(union aml_resource, aml_buffer), status =
resource_length, acpi_rs_convert_aml_to_resource(ACPI_CAST_PTR
ACPI_CAST_PTR(struct acpi_resource, buffer)); (struct acpi_resource,
buffer),
ACPI_CAST_PTR(union
aml_resource,
aml_buffer),
info);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not convert AML resource (type %X) to resource, %s\n", *aml_buffer, acpi_format_exception(status))); ACPI_REPORT_ERROR(("Could not convert AML resource (type %X) to resource, %s\n", *aml_buffer, acpi_format_exception(status)));
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
...@@ -232,7 +228,7 @@ acpi_rs_convert_aml_to_resources(u8 * aml_buffer, ...@@ -232,7 +228,7 @@ acpi_rs_convert_aml_to_resources(u8 * aml_buffer,
/* Normal exit on completion of an end_tag resource descriptor */ /* Normal exit on completion of an end_tag resource descriptor */
if (acpi_rs_get_resource_type(*aml_buffer) == if (acpi_ut_get_resource_type(aml_buffer) ==
ACPI_RESOURCE_NAME_END_TAG) { ACPI_RESOURCE_NAME_END_TAG) {
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
...@@ -276,14 +272,15 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, ...@@ -276,14 +272,15 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource,
acpi_size aml_size_needed, u8 * output_buffer) acpi_size aml_size_needed, u8 * output_buffer)
{ {
u8 *aml_buffer = output_buffer; u8 *aml_buffer = output_buffer;
u8 *end_aml_buffer = output_buffer + aml_size_needed;
acpi_status status; acpi_status status;
ACPI_FUNCTION_TRACE("rs_convert_resources_to_aml"); ACPI_FUNCTION_TRACE("rs_convert_resources_to_aml");
/* Convert each resource descriptor in the list */ /* Walk the resource descriptor list, convert each descriptor */
while (1) { while (aml_buffer < end_aml_buffer) {
/* Validate Resource Descriptor Type before dispatch */ /* Validate the Resource Type */
if (resource->type > ACPI_RESOURCE_TYPE_MAX) { if (resource->type > ACPI_RESOURCE_TYPE_MAX) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
...@@ -292,14 +289,14 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, ...@@ -292,14 +289,14 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource,
return_ACPI_STATUS(AE_BAD_DATA); return_ACPI_STATUS(AE_BAD_DATA);
} }
/* Perform the conversion per resource type */ /* Perform the conversion */
status = status = acpi_rs_convert_resource_to_aml(resource,
acpi_gbl_set_resource_dispatch[resource->type] (resource, ACPI_CAST_PTR(union
ACPI_CAST_PTR
(union
aml_resource, aml_resource,
aml_buffer)); aml_buffer),
acpi_gbl_set_resource_dispatch
[resource->type]);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Could not convert resource (type %X) to AML, %s\n", resource->type, acpi_format_exception(status))); ACPI_REPORT_ERROR(("Could not convert resource (type %X) to AML, %s\n", resource->type, acpi_format_exception(status)));
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
...@@ -323,18 +320,23 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, ...@@ -323,18 +320,23 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource,
return_ACPI_STATUS(AE_OK); return_ACPI_STATUS(AE_OK);
} }
/* Extract the total length of the new descriptor */ /*
/* Set the aml_buffer to point to the next (output) resource descriptor */ * Extract the total length of the new descriptor and set the
* aml_buffer to point to the next (output) resource descriptor
aml_buffer += */
acpi_rs_get_descriptor_length(ACPI_CAST_PTR aml_buffer += acpi_ut_get_descriptor_length(aml_buffer);
(union aml_resource,
aml_buffer));
/* Point to the next input resource descriptor */ /* Point to the next input resource descriptor */
resource = resource =
ACPI_PTR_ADD(struct acpi_resource, resource, ACPI_PTR_ADD(struct acpi_resource, resource,
resource->length); resource->length);
/* Check for end-of-list, normal exit */
} }
/* Completed buffer, but did not find an end_tag resource descriptor */
return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG);
} }
...@@ -49,260 +49,187 @@ ACPI_MODULE_NAME("rsmemory") ...@@ -49,260 +49,187 @@ ACPI_MODULE_NAME("rsmemory")
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_get_memory24 * acpi_rs_convert_memory24
*
* PARAMETERS: Aml - Pointer to the AML resource descriptor
* aml_resource_length - Length of the resource from the AML header
* Resource - Where the internal resource is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert a raw AML resource descriptor to the corresponding
* internal resource descriptor, simplifying bitflags and handling
* alignment and endian issues if necessary.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_convert_memory24[4] = {
acpi_rs_get_memory24(union aml_resource * aml, {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_MEMORY24,
u16 aml_resource_length, struct acpi_resource * resource) ACPI_RS_SIZE(struct acpi_resource_memory24),
{ ACPI_RSC_TABLE_SIZE(acpi_rs_convert_memory24)},
ACPI_FUNCTION_TRACE("rs_get_memory24");
/* Get the Read/Write bit */ {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_MEMORY24,
sizeof(struct aml_resource_memory24),
0},
resource->data.memory24.read_write_attribute = /* Read/Write bit */
(aml->memory24.information & 0x01);
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.memory24.write_protect),
AML_OFFSET(memory24.flags),
0},
/* /*
* Get the following contiguous fields from the AML descriptor: * These fields are contiguous in both the source and destination:
* Minimum Base Address * Minimum Base Address
* Maximum Base Address * Maximum Base Address
* Address Base Alignment * Address Base Alignment
* Range Length * Range Length
*/ */
acpi_rs_move_data(&resource->data.memory24.minimum, {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.memory24.minimum),
&aml->memory24.minimum, 4, ACPI_MOVE_TYPE_16_TO_32); AML_OFFSET(memory24.minimum),
4}
/* Complete the resource header */ };
resource->type = ACPI_RESOURCE_TYPE_MEMORY24;
resource->length = ACPI_SIZEOF_RESOURCE(struct acpi_resource_memory24);
return_ACPI_STATUS(AE_OK);
}
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_set_memory24 * acpi_rs_convert_memory32
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Aml - Where the AML descriptor is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert an internal resource descriptor to the corresponding
* external AML resource descriptor.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_convert_memory32[4] = {
acpi_rs_set_memory24(struct acpi_resource *resource, union aml_resource *aml) {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_MEMORY32,
{ ACPI_RS_SIZE(struct acpi_resource_memory32),
ACPI_FUNCTION_TRACE("rs_set_memory24"); ACPI_RSC_TABLE_SIZE(acpi_rs_convert_memory32)},
/* Set the Information Byte */ {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_MEMORY32,
sizeof(struct aml_resource_memory32),
0},
aml->memory24.information = (u8) /* Read/Write bit */
(resource->data.memory24.read_write_attribute & 0x01);
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.memory32.write_protect),
AML_OFFSET(memory32.flags),
0},
/* /*
* Set the following contiguous fields in the AML descriptor: * These fields are contiguous in both the source and destination:
* Minimum Base Address * Minimum Base Address
* Maximum Base Address * Maximum Base Address
* Address Base Alignment * Address Base Alignment
* Range Length * Range Length
*/ */
acpi_rs_move_data(&aml->memory24.minimum, {ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.memory32.minimum),
&resource->data.memory24.minimum, 4, AML_OFFSET(memory32.minimum),
ACPI_MOVE_TYPE_32_TO_16); 4}
};
/* Complete the AML descriptor header */
acpi_rs_set_resource_header(ACPI_RESOURCE_NAME_MEMORY24,
sizeof(struct aml_resource_memory24), aml);
return_ACPI_STATUS(AE_OK);
}
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_get_memory32 * acpi_rs_convert_fixed_memory32
*
* PARAMETERS: Aml - Pointer to the AML resource descriptor
* aml_resource_length - Length of the resource from the AML header
* Resource - Where the internal resource is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert a raw AML resource descriptor to the corresponding
* internal resource descriptor, simplifying bitflags and handling
* alignment and endian issues if necessary.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_convert_fixed_memory32[4] = {
acpi_rs_get_memory32(union aml_resource *aml, {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_FIXED_MEMORY32,
u16 aml_resource_length, struct acpi_resource *resource) ACPI_RS_SIZE(struct acpi_resource_fixed_memory32),
{ ACPI_RSC_TABLE_SIZE(acpi_rs_convert_fixed_memory32)},
ACPI_FUNCTION_TRACE("rs_get_memory32");
/* Get the Read/Write bit */ {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_FIXED_MEMORY32,
sizeof(struct aml_resource_fixed_memory32),
0},
resource->data.memory32.read_write_attribute = /* Read/Write bit */
(aml->memory32.information & 0x01);
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.fixed_memory32.write_protect),
AML_OFFSET(fixed_memory32.flags),
0},
/* /*
* Get the following contiguous fields from the AML descriptor: * These fields are contiguous in both the source and destination:
* Minimum Base Address * Base Address
* Maximum Base Address
* Address Base Alignment
* Range Length * Range Length
*/ */
acpi_rs_move_data(&resource->data.memory32.minimum, {ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.fixed_memory32.address),
&aml->memory32.minimum, 4, ACPI_MOVE_TYPE_32_TO_32); AML_OFFSET(fixed_memory32.address),
2}
/* Complete the resource header */ };
resource->type = ACPI_RESOURCE_TYPE_MEMORY32;
resource->length = ACPI_SIZEOF_RESOURCE(struct acpi_resource_memory32);
return_ACPI_STATUS(AE_OK);
}
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_set_memory32 * acpi_rs_get_vendor_small
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Aml - Where the AML descriptor is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert an internal resource descriptor to the corresponding
* external AML resource descriptor.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_get_vendor_small[3] = {
acpi_rs_set_memory32(struct acpi_resource *resource, union aml_resource *aml) {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_VENDOR,
{ ACPI_RS_SIZE(struct acpi_resource_vendor),
ACPI_FUNCTION_TRACE("rs_set_memory32"); ACPI_RSC_TABLE_SIZE(acpi_rs_get_vendor_small)},
/* Set the Information Byte */
aml->memory32.information = (u8) /* Length of the vendor data (byte count) */
(resource->data.memory32.read_write_attribute & 0x01);
/* {ACPI_RSC_COUNT16, ACPI_RS_OFFSET(data.vendor.byte_length),
* Set the following contiguous fields in the AML descriptor: 0,
* Minimum Base Address sizeof(u8)}
* Maximum Base Address ,
* Address Base Alignment
* Range Length
*/
acpi_rs_move_data(&aml->memory32.minimum,
&resource->data.memory32.minimum, 4,
ACPI_MOVE_TYPE_32_TO_32);
/* Complete the AML descriptor header */ /* Vendor data */
acpi_rs_set_resource_header(ACPI_RESOURCE_NAME_MEMORY32, {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.vendor.byte_data[0]),
sizeof(struct aml_resource_memory32), aml); sizeof(struct aml_resource_small_header),
return_ACPI_STATUS(AE_OK); 0}
} };
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_get_fixed_memory32 * acpi_rs_get_vendor_large
*
* PARAMETERS: Aml - Pointer to the AML resource descriptor
* aml_resource_length - Length of the resource from the AML header
* Resource - Where the internal resource is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert a raw AML resource descriptor to the corresponding
* internal resource descriptor, simplifying bitflags and handling
* alignment and endian issues if necessary.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_get_vendor_large[3] = {
acpi_rs_get_fixed_memory32(union aml_resource *aml, {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_VENDOR,
u16 aml_resource_length, ACPI_RS_SIZE(struct acpi_resource_vendor),
struct acpi_resource *resource) ACPI_RSC_TABLE_SIZE(acpi_rs_get_vendor_large)},
{
ACPI_FUNCTION_TRACE("rs_get_fixed_memory32");
/* Get the Read/Write bit */ /* Length of the vendor data (byte count) */
resource->data.fixed_memory32.read_write_attribute = {ACPI_RSC_COUNT16, ACPI_RS_OFFSET(data.vendor.byte_length),
(aml->fixed_memory32.information & 0x01); 0,
sizeof(u8)}
/* ,
* Get the following contiguous fields from the AML descriptor:
* Base Address
* Range Length
*/
ACPI_MOVE_32_TO_32(&resource->data.fixed_memory32.address,
&aml->fixed_memory32.address);
ACPI_MOVE_32_TO_32(&resource->data.fixed_memory32.address_length,
&aml->fixed_memory32.address_length);
/* Complete the resource header */ /* Vendor data */
resource->type = ACPI_RESOURCE_TYPE_FIXED_MEMORY32; {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.vendor.byte_data[0]),
resource->length = sizeof(struct aml_resource_large_header),
ACPI_SIZEOF_RESOURCE(struct acpi_resource_fixed_memory32); 0}
return_ACPI_STATUS(AE_OK); };
}
/******************************************************************************* /*******************************************************************************
* *
* FUNCTION: acpi_rs_set_fixed_memory32 * acpi_rs_set_vendor
*
* PARAMETERS: Resource - Pointer to the resource descriptor
* Aml - Where the AML descriptor is returned
*
* RETURN: Status
*
* DESCRIPTION: Convert an internal resource descriptor to the corresponding
* external AML resource descriptor.
* *
******************************************************************************/ ******************************************************************************/
acpi_status struct acpi_rsconvert_info acpi_rs_set_vendor[7] = {
acpi_rs_set_fixed_memory32(struct acpi_resource *resource, /* Default is a small vendor descriptor */
union aml_resource *aml)
{ {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_VENDOR_SMALL,
ACPI_FUNCTION_TRACE("rs_set_fixed_memory32"); sizeof(struct aml_resource_small_header),
ACPI_RSC_TABLE_SIZE(acpi_rs_set_vendor)},
/* Set the Information Byte */ /* Get the length and copy the data */
aml->fixed_memory32.information = (u8) {ACPI_RSC_COUNT16, ACPI_RS_OFFSET(data.vendor.byte_length),
(resource->data.fixed_memory32.read_write_attribute & 0x01); 0,
0},
{ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.vendor.byte_data[0]),
sizeof(struct aml_resource_small_header),
0},
/* /*
* Set the following contiguous fields in the AML descriptor: * All done if the Vendor byte length is 7 or less, meaning that it will
* Base Address * fit within a small descriptor
* Range Length
*/ */
ACPI_MOVE_32_TO_32(&aml->fixed_memory32.address, {ACPI_RSC_EXIT_LE, 0, 0, 7},
&resource->data.fixed_memory32.address);
ACPI_MOVE_32_TO_32(&aml->fixed_memory32.address_length,
&resource->data.fixed_memory32.address_length);
/* Complete the AML descriptor header */ /* Must create a large vendor descriptor */
acpi_rs_set_resource_header(ACPI_RESOURCE_NAME_FIXED_MEMORY32, {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_VENDOR_LARGE,
sizeof(struct aml_resource_fixed_memory32), sizeof(struct aml_resource_large_header),
aml); 0},
return_ACPI_STATUS(AE_OK);
} {ACPI_RSC_COUNT16, ACPI_RS_OFFSET(data.vendor.byte_length),
0,
0},
{ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.vendor.byte_data[0]),
sizeof(struct aml_resource_large_header),
0}
};
此差异已折叠。
此差异已折叠。
...@@ -57,7 +57,7 @@ ACPI_MODULE_NAME("rsxface") ...@@ -57,7 +57,7 @@ ACPI_MODULE_NAME("rsxface")
ACPI_COPY_FIELD(out, in, decode); \ ACPI_COPY_FIELD(out, in, decode); \
ACPI_COPY_FIELD(out, in, min_address_fixed); \ ACPI_COPY_FIELD(out, in, min_address_fixed); \
ACPI_COPY_FIELD(out, in, max_address_fixed); \ ACPI_COPY_FIELD(out, in, max_address_fixed); \
ACPI_COPY_FIELD(out, in, attribute); \ ACPI_COPY_FIELD(out, in, info); \
ACPI_COPY_FIELD(out, in, granularity); \ ACPI_COPY_FIELD(out, in, granularity); \
ACPI_COPY_FIELD(out, in, minimum); \ ACPI_COPY_FIELD(out, in, minimum); \
ACPI_COPY_FIELD(out, in, maximum); \ ACPI_COPY_FIELD(out, in, maximum); \
......
...@@ -94,9 +94,8 @@ acpi_status acpi_tb_is_table_installed(struct acpi_table_desc *new_table_desc) ...@@ -94,9 +94,8 @@ acpi_status acpi_tb_is_table_installed(struct acpi_table_desc *new_table_desc)
new_table_desc->pointer->length) new_table_desc->pointer->length)
&& &&
(!ACPI_MEMCMP (!ACPI_MEMCMP
((const char *)table_desc->pointer, (table_desc->pointer, new_table_desc->pointer,
(const char *)new_table_desc->pointer, new_table_desc->pointer->length))) {
(acpi_size) new_table_desc->pointer->length))) {
/* Match: this table is already installed */ /* Match: this table is already installed */
ACPI_DEBUG_PRINT((ACPI_DB_TABLES, ACPI_DEBUG_PRINT((ACPI_DB_TABLES,
......
...@@ -866,7 +866,7 @@ void acpi_ut_dump_allocations(u32 component, char *module) ...@@ -866,7 +866,7 @@ void acpi_ut_dump_allocations(u32 component, char *module)
if (!num_outstanding) { if (!num_outstanding) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"No outstanding allocations.\n")); "No outstanding allocations\n"));
} else { } else {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"%d(%X) Outstanding allocations\n", "%d(%X) Outstanding allocations\n",
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -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 0x20050930 #define ACPI_CA_VERSION 0x20051021
/* /*
* 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,
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册