Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 2002 19:19:16 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 15888 for review
Message-ID:  <200208130219.g7D2JGqi066450@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=15888

Change 15888 by peter@peter_daintree on 2002/08/12 19:18:50

	un-destroy IFC botch

Affected files ...

.. //depot/projects/ia64/sys/contrib/dev/acpica/rsirq.c#8 integrate

Differences ...

==== //depot/projects/ia64/sys/contrib/dev/acpica/rsirq.c#8 (text+ko) ====

@@ -75,60 +75,57 @@
  *
  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
  * Intel shall be used in advertising or otherwise to promote the sale, use or
- * other dealings in products derived from ;
-    }
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government.  In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
 
-    Buffer += 1;
-    Temp16 = 0;
+#define __RSIRQ_C__
 
-    /*
-     * Loop through all of the interrupts and set the mask bits
-     */
-    for(Index = 0;
-        Index < LinkedList->Data.Irq.NumberOfInterrupts;
-        Index++)
-    {
-        Temp8 = (UINT8) LinkedList->Data.Irq.Interrupts[Index];
-        Temp16 |= 0x1 << Temp8;
-    }
+#include "acpi.h"
+#include "acresrc.h"
 
-    ACPI_MOVE_UNALIGNED16_TO_16 (Buffer, &Temp16);
-    Buffer += 2;
-
-    /*
-     * Set the IRQ Info byte if needed.
-     */
-    if (IRQInfoByteNeeded)
-    {
-        Temp8 = 0;
-        Temp8 = (UINT8) ((LinkedList->Data.Irq.SharedExclusive &
-                          0x01) << 4);
-
-        if (ACPI_LEVEL_SENSITIVE == LinkedList->Data.Irq.EdgeLevel &&
-            ACPI_ACTIVE_LOW == LinkedList->Data.Irq.ActiveHighLow)
-        {
-            Temp8 |= 0x08;
-        }
-        else
-        {
-            Temp8 |= 0x01;
-        }
-
-        *Buffer = Temp8;
-        Buffer += 1;
-    }
-
-    /*
-     * Return the number of bytes consumed in this operation
-     */
-    *BytesConsumed = ACPI_PTR_DIFF (Buffer, *OutputBuffer);
-    return_ACPI_STATUS (AE_OK);
-}
+#define _COMPONENT          ACPI_RESOURCES
+        ACPI_MODULE_NAME    ("rsirq")
 
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiRsExtendedIrqResource
+ * FUNCTION:    AcpiRsIrqResource
  *
  * PARAMETERS:  ByteStreamBuffer        - Pointer to the resource input byte
  *                                        stream
@@ -148,7 +145,7 @@
  ******************************************************************************/
 
 ACPI_STATUS
-AcpiRsExtendedIrqResource (
+AcpiRsIrqResource (
     UINT8                   *ByteStreamBuffer,
     ACPI_SIZE               *BytesConsumed,
     UINT8                   **OutputBuffer,
@@ -158,68 +155,16 @@
     ACPI_RESOURCE           *OutputStruct = (void *) *OutputBuffer;
     UINT16                  Temp16 = 0;
     UINT8                   Temp8 = 0;
-    UINT8                   *TempPtr;
     UINT8                   Index;
-    ACPI_SIZE               StructSize = ACPI_SIZEOF_RESOURCE (ACPI_RESOURCE_EXT_IRQ);
+    UINT8                   i;
+    ACPI_SIZE               StructSize = ACPI_SIZEOF_RESOURCE (ACPI_RESOURCE_IRQ);
 
 
-    ACPI_FUNCTION_TRACE ("RsExtendedIrqResource");
+    ACPI_FUNCTION_TRACE ("RsIrqResource");
 
 
     /*
-     * Point past the Descriptor to get the number of bytes consumed
-     */
-    Buffer += 1;
-    ACPI_MOVE_UNALIGNED16_TO_16 (&Temp16, Buffer);
-
-    *BytesConsumed = Temp16 + 3;
-    OutputStruct->Id = ACPI_RSTYPE_EXT_IRQ;
-
-    /*
-     * Point to the Byte3
-     */
-    Buffer += 2;
-    Temp8 = *Buffer;
-
-    OutputStruct->Data.ExtendedIrq.ProducerConsumer = Temp8 & 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
-     */
-    OutputStruct->Data.ExtendedIrq.EdgeLevel =
-                        (Temp8 & 0x2) ? ACPI_EDGE_SENSITIVE : ACPI_LEVEL_SENSITIVE;
-
-    /*
-     * Check Interrupt Polarity
-     */
-    OutputStruct->Data.ExtendedIrq.ActiveHighLow = (Temp8 >> 2) & 0x1;
-
-    /*
-     * Check for sharable
-     */
-    OutputStruct->Data.ExtendedIrq.SharedExclusive = (Temp8 >> 3) & 0x01;
-
-    /*
-     * Point to Byte4 (IRQ Table length)
-     */
-    Buffer += 1;
-    Temp8 = *Buffer;
-
-    OutputStruct->Data.ExtendedIrq.NumberOfInterrupts = Temp8;
-
-    /*
-     * Add any additional structure size to properly calculate
-     * the next pointer at the end of this function
-     */
-    StructSize += (Temp8 - 1) * 4;
-
-    /*
-     * Point to Byte5 (First IRed are contained in the descriptor
+     * The number of bytes consumed are contained in the descriptor
      *  (Bits:0-1)
      */
     Temp8 = *Buffer;
@@ -654,35 +599,73 @@
      * 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 from or relating to the Covered Code
- * without prior written authorization from Intel.
- *
- * 4. Disclaimer and Export Compliance
- *
- * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
- * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
- * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
- * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
- * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
- * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
- * PARTICULAR PURPOSE.
- *
- * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
- * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
- * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
- * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
- * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
- * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
- * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
- * LIMITED REMEDY.
- *
- * 4.3. Licensee shall not export, either directly or indirectly, any of this
- * software or system incorporating such software without first obtaining any
- * required license or other approval from the U. S. Department of Commerce or
- * any other agency or department of the United States Government.  In the
- * event Licensee exports any such software from the United States or
- * re-exports any such software from a foreign destination, Licensee shall
- * ensure that the distribution and export/re-export of the software is in
- * compliance with all laws, regulations, orders, or other restrictions of the
- * U.S. Export Administration Regulations. Licensee agrees that neither it nor
- *+     * 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 (ACPI_EDGE_SENSITIVE == LinkedList->Data.ExtendedIrq.EdgeLevel)
+    {
+        Temp8 |= 0x2;
+    }
+
+    /*
+     * Set the Interrupt Polarity
+     */
+    Temp8 |= ((LinkedList->Data.ExtendedIrq.ActiveHighLow & 0x1) << 2);
+
+    *Buffer = Temp8;
+    Buffer += 1;
+
+    /*
+     * Set the Interrupt table length
+     */
+    Temp8 = (UINT8) LinkedList->Data.ExtendedIrq.NumberOfInterrupts;
+
+    *Buffer = Temp8;
+    Buffer += 1;
+
+    for (Index = 0; Index < LinkedList->Data.ExtendedIrq.NumberOfInterrupts;
+         Index++)
+    {
+        ACPI_MOVE_UNALIGNED32_TO_32 (Buffer,
+                        &LinkedList->Data.ExtendedIrq.Interrupts[Index]);
+        Buffer += 4;
+    }
+
+    /*
+     * Resource Source Index and Resource Source are optional
+     */
+    if (0 != LinkedList->Data.ExtendedIrq.ResourceSource.StringLength)
+    {
+        *Buffer = (UINT8) LinkedList->Data.ExtendedIrq.ResourceSource.Index;
+        Buffer += 1;
+
+        TempPointer = (NATIVE_CHAR *) Buffer;
+
+        /*
+         * Copy the string
+         */
+        ACPI_STRCPY (TempPointer,
+            LinkedList->Data.ExtendedIrq.ResourceSource.StringPtr);
+
+        /*
+         * Buffer needs to be set to the length of the sting + one for the
+         * terminating null
+         */
+        Buffer += (ACPI_STRLEN (LinkedList->Data.ExtendedIrq.ResourceSource.StringPtr) + 1);
+    }
+
+    /*
+     * Return the number of bytes consumed in this operation
+     */
+    *BytesConsumed = ACPI_PTR_DIFF (Buffer, *OutputBuffer);
+
+    /*
+     * Set the length field to the number of bytes consumed
+     * minus the header size (3 bytes)
+     */
+    *LengthField = (UINT16) (*BytesConsumed - 3);
+    return_ACPI_STATUS (AE_OK);
+}
+

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208130219.g7D2JGqi066450>