|
@@ -418,22 +418,21 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
|
|
|
*
|
|
|
* FUNCTION: acpi_rs_create_aml_resources
|
|
|
*
|
|
|
- * PARAMETERS: linked_list_buffer - Pointer to the resource linked list
|
|
|
- * output_buffer - Pointer to the user's buffer
|
|
|
+ * PARAMETERS: resource_list - Pointer to the resource list buffer
|
|
|
+ * output_buffer - Where the AML buffer is returned
|
|
|
*
|
|
|
* RETURN: Status AE_OK if okay, else a valid acpi_status code.
|
|
|
* If the output_buffer is too small, the error will be
|
|
|
* AE_BUFFER_OVERFLOW and output_buffer->Length will point
|
|
|
* to the size buffer needed.
|
|
|
*
|
|
|
- * DESCRIPTION: Takes the linked list of device resources and
|
|
|
- * creates a bytestream to be used as input for the
|
|
|
- * _SRS control method.
|
|
|
+ * DESCRIPTION: Converts a list of device resources to an AML bytestream
|
|
|
+ * to be used as input for the _SRS control method.
|
|
|
*
|
|
|
******************************************************************************/
|
|
|
|
|
|
acpi_status
|
|
|
-acpi_rs_create_aml_resources(struct acpi_resource *linked_list_buffer,
|
|
|
+acpi_rs_create_aml_resources(struct acpi_buffer *resource_list,
|
|
|
struct acpi_buffer *output_buffer)
|
|
|
{
|
|
|
acpi_status status;
|
|
@@ -441,16 +440,16 @@ acpi_rs_create_aml_resources(struct acpi_resource *linked_list_buffer,
|
|
|
|
|
|
ACPI_FUNCTION_TRACE(rs_create_aml_resources);
|
|
|
|
|
|
- ACPI_DEBUG_PRINT((ACPI_DB_INFO, "LinkedListBuffer = %p\n",
|
|
|
- linked_list_buffer));
|
|
|
+ /* Params already validated, no need to re-validate here */
|
|
|
|
|
|
- /*
|
|
|
- * Params already validated, so we don't re-validate here
|
|
|
- *
|
|
|
- * Pass the linked_list_buffer into a module that calculates
|
|
|
- * the buffer size needed for the byte stream.
|
|
|
- */
|
|
|
- status = acpi_rs_get_aml_length(linked_list_buffer, &aml_size_needed);
|
|
|
+ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "ResourceList Buffer = %p\n",
|
|
|
+ resource_list->pointer));
|
|
|
+
|
|
|
+ /* Get the buffer size needed for the AML byte stream */
|
|
|
+
|
|
|
+ status = acpi_rs_get_aml_length(resource_list->pointer,
|
|
|
+ resource_list->length,
|
|
|
+ &aml_size_needed);
|
|
|
|
|
|
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "AmlSizeNeeded=%X, %s\n",
|
|
|
(u32)aml_size_needed, acpi_format_exception(status)));
|
|
@@ -467,10 +466,9 @@ acpi_rs_create_aml_resources(struct acpi_resource *linked_list_buffer,
|
|
|
|
|
|
/* Do the conversion */
|
|
|
|
|
|
- status =
|
|
|
- acpi_rs_convert_resources_to_aml(linked_list_buffer,
|
|
|
- aml_size_needed,
|
|
|
- output_buffer->pointer);
|
|
|
+ status = acpi_rs_convert_resources_to_aml(resource_list->pointer,
|
|
|
+ aml_size_needed,
|
|
|
+ output_buffer->pointer);
|
|
|
if (ACPI_FAILURE(status)) {
|
|
|
return_ACPI_STATUS(status);
|
|
|
}
|