- output_struct->data.extended_irq.number_of_interrupts = temp8;
-
- /*
- * Add any additional structure size to properly calculate
- * the next pointer at the end of this function
- */
- 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);
-}