- struct_size += (temp8 - 1) * 4;
-
- /* Point to Byte5 (First IRQ Number) */
-
- buffer += 1;
-
- /* Cycle through every IRQ in the table */
-
- for (index = 0; index < temp8; index++) {
- ACPI_MOVE_32_TO_32 (
- &output_struct->data.extended_irq.interrupts[index], buffer);
-
- /* Point to the next IRQ */
-
- buffer += 4;
- }
-
- /*
- * This will leave us pointing to the Resource Source Index
- * If it is present, then save it off and calculate the
- * pointer to where the null terminated string goes:
- * Each Interrupt takes 32-bits + the 5 bytes of the
- * stream that are default.
- *
- * Note: Some resource descriptors will have an additional null, so
- * we add 1 to the length.
- */
- if (*bytes_consumed >
- ((acpi_size) output_struct->data.extended_irq.number_of_interrupts * 4) +
- (5 + 1)) {
- /* Dereference the Index */
-
- temp8 = *buffer;
- output_struct->data.extended_irq.resource_source.index = (u32) temp8;
-
- /* Point to the String */
-
- buffer += 1;
-
- /* Point the String pointer to the end of this structure. */
-
- output_struct->data.extended_irq.resource_source.string_ptr =
- (char *)((char *) output_struct + struct_size);
-
- temp_ptr = (u8 *)
- output_struct->data.extended_irq.resource_source.string_ptr;
-
- /* Copy the string into the buffer */
-
- index = 0;
- while (0x00 != *buffer) {
- *temp_ptr = *buffer;
-
- temp_ptr += 1;
- buffer += 1;
- index += 1;
- }
-
- /* Add the terminating null */
-
- *temp_ptr = 0x00;
- output_struct->data.extended_irq.resource_source.string_length = index + 1;
-
- /*
- * In order for the struct_size to fall on a 32-bit boundary,
- * calculate the length of the string and expand the
- * struct_size to the next 32-bit boundary.
- */
- temp8 = (u8) (index + 1);
- struct_size += ACPI_ROUND_UP_to_32_bITS (temp8);
- }
- else {
- output_struct->data.extended_irq.resource_source.index = 0x00;
- output_struct->data.extended_irq.resource_source.string_length = 0;
- output_struct->data.extended_irq.resource_source.string_ptr = NULL;
- }
-
- /* Set the Length parameter */
-
- output_struct->length = (u32) struct_size;
-
- /* Return the final size of the structure */
-
- *structure_size = struct_size;
- return_ACPI_STATUS (AE_OK);
+ 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 */
+
+ acpi_rs_move_data(resource->data.extended_irq.interrupts,
+ aml->extended_irq.interrupt_number,
+ (u16) temp8, ACPI_MOVE_TYPE_32_TO_32);
+
+ /* Get the optional resource_source (index and string) */
+
+ resource->length +=
+ acpi_rs_get_resource_source(aml_resource_length,
+ (acpi_size) resource->length +
+ sizeof(struct
+ aml_resource_extended_irq),
+ &resource->data.extended_irq.
+ resource_source, aml,
+ out_resource_string);
+
+ /* Complete the resource header */
+
+ resource->type = ACPI_RESOURCE_TYPE_EXTENDED_IRQ;
+ resource->length +=
+ ACPI_SIZEOF_RESOURCE(struct acpi_resource_extended_irq);
+ return_ACPI_STATUS(AE_OK);