Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jul 2004 19:16:44 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 56321 for review
Message-ID:  <200407021916.i62JGieJ038379@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=56321

Change 56321 by jhb@jhb_slimer on 2004/07/02 19:16:11

	IFC @56320 to get first preemption merge.

Affected files ...

.. //depot/projects/smpng/sys/compat/linux/linux_ioctl.c#33 integrate
.. //depot/projects/smpng/sys/compat/linux/linux_ioctl.h#10 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/CHANGES.txt#10 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/acconfig.h#22 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/acfreebsd.h#15 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/acinterp.h#15 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/acmacros.h#19 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/compiler/aslcompiler.y#5 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/dbcmds.c#19 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/dbdisply.c#19 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/dsopcode.c#18 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/evgpe.c#8 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/evgpeblk.c#7 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/exconfig.c#17 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/exfldio.c#18 integrate
.. //depot/projects/smpng/sys/contrib/dev/acpica/tbxfroot.c#14 integrate
.. //depot/projects/smpng/sys/dev/bfe/if_bfe.c#8 integrate
.. //depot/projects/smpng/sys/dev/em/if_em.c#34 integrate
.. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#53 integrate
.. //depot/projects/smpng/sys/dev/lnc/if_lnc.c#16 integrate
.. //depot/projects/smpng/sys/dev/pci/pci.c#41 integrate
.. //depot/projects/smpng/sys/dev/sound/pcm/dsp.c#22 integrate
.. //depot/projects/smpng/sys/kern/kern_idle.c#21 integrate
.. //depot/projects/smpng/sys/kern/kern_intr.c#47 integrate
.. //depot/projects/smpng/sys/kern/kern_mutex.c#78 integrate
.. //depot/projects/smpng/sys/kern/kern_shutdown.c#41 integrate
.. //depot/projects/smpng/sys/kern/kern_sig.c#91 integrate
.. //depot/projects/smpng/sys/kern/kern_subr.c#33 integrate
.. //depot/projects/smpng/sys/kern/kern_synch.c#71 integrate
.. //depot/projects/smpng/sys/kern/kern_thread.c#59 integrate
.. //depot/projects/smpng/sys/kern/sched_4bsd.c#27 integrate
.. //depot/projects/smpng/sys/kern/sched_ule.c#31 integrate
.. //depot/projects/smpng/sys/kern/subr_sleepqueue.c#9 integrate
.. //depot/projects/smpng/sys/kern/subr_trap.c#66 integrate
.. //depot/projects/smpng/sys/kern/subr_turnstile.c#13 integrate
.. //depot/projects/smpng/sys/kern/sys_process.c#37 integrate
.. //depot/projects/smpng/sys/kern/uipc_usrreq.c#37 integrate
.. //depot/projects/smpng/sys/net/if_tun.c#34 integrate
.. //depot/projects/smpng/sys/pci/if_de.c#17 integrate
.. //depot/projects/smpng/sys/pci/if_rl.c#50 integrate
.. //depot/projects/smpng/sys/pci/if_sis.c#43 integrate
.. //depot/projects/smpng/sys/pci/if_xl.c#46 integrate
.. //depot/projects/smpng/sys/sys/proc.h#117 integrate
.. //depot/projects/smpng/sys/sys/sched.h#11 integrate
.. //depot/projects/smpng/sys/vm/vm_zeroidle.c#16 integrate

Differences ...

==== //depot/projects/smpng/sys/compat/linux/linux_ioctl.c#33 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.119 2004/06/18 14:36:24 bms Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.120 2004/07/02 15:31:44 netchild Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1799,6 +1799,10 @@
 		args->cmd = SNDCTL_DSP_GETOPTR;
 		return (ioctl(td, (struct ioctl_args *)args));
 
+	case LINUX_SNDCTL_DSP_SETDUPLEX:
+		args->cmd = SNDCTL_DSP_SETDUPLEX;
+		return (ioctl(td, (struct ioctl_args *)args));
+
 	case LINUX_SNDCTL_DSP_GETODELAY:
 		args->cmd = SNDCTL_DSP_GETODELAY;
 		return (ioctl(td, (struct ioctl_args *)args));

==== //depot/projects/smpng/sys/compat/linux/linux_ioctl.h#10 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/compat/linux/linux_ioctl.h,v 1.20 2004/06/18 14:36:24 bms Exp $
+ * $FreeBSD: src/sys/compat/linux/linux_ioctl.h,v 1.21 2004/07/02 15:31:44 netchild Exp $
  */
 
 #ifndef _LINUX_IOCTL_H_
@@ -254,6 +254,7 @@
 #define	LINUX_SNDCTL_DSP_SETTRIGGER	LINUX_SNDCTL_DSP_GETTRIGGER
 #define	LINUX_SNDCTL_DSP_GETIPTR	0x5011
 #define	LINUX_SNDCTL_DSP_GETOPTR	0x5012
+#define	LINUX_SNDCTL_DSP_SETDUPLEX	0x5016
 #define	LINUX_SNDCTL_DSP_GETODELAY	0x5017
 #define	LINUX_SNDCTL_SEQ_RESET		0x5100
 #define	LINUX_SNDCTL_SEQ_SYNC		0x5101

==== //depot/projects/smpng/sys/contrib/dev/acpica/CHANGES.txt#10 (text+ko) ====

@@ -1,4 +1,51 @@
 ----------------------------------------
+27 May 2004.  Summary of changes for version 20040527:
+
+1) ACPI CA Core Subsystem:
+
+Completed a new design and implementation for EBDA (Extended BIOS
+Data Area) support in the RSDP scan code.  The original code
+improperly scanned for the EBDA by simply scanning from memory
+location 0 to 0x400.  The correct method is to first obtain the
+EBDA pointer from within the BIOS data area, then scan 1K of
+memory starting at the EBDA pointer.  There appear to be few if
+any machines that place the RSDP in the EBDA, however.
+
+Integrated a fix for a possible fault during evaluation of
+BufferField arguments.  Obsolete code that was causing the
+problem was removed.
+
+Found and fixed a problem in the Field Support Code where data
+could be corrupted on a bit field read that starts on an aligned
+boundary but does not end on an aligned boundary.  Merged the
+read/write "datum length" calculation code into a common
+procedure.
+
+Rolled in a couple of changes to the FreeBSD-specific header.
+
+Code and Data Size: Current and previous core subsystem library
+sizes are shown below.  These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
+these values do not include any ACPI driver or OSPM code.  The
+debug version of the code includes the debug output trace
+mechanism and has a much larger code and data size.  Note that
+these values will vary depending on the efficiency of the
+compiler and the compiler options used during generation.
+
+  Previous Release:
+    Non-Debug Version:  77.6K Code,  11.5K Data,   89.1K Total
+    Debug Version:     163.2K Code,  67.2K Data,  230.4K Total
+  Current Release:
+    Non-Debug Version:  77.7K Code,  11.5K Data,   89.2K Total
+    Debug Version:     163.3K Code,  67.2K Data,  230.5K Total
+
+
+2) iASL Compiler/Disassembler:
+
+Fixed a generation warning produced by some overly-verbose
+compilers for a 64-bit constant.
+
+----------------------------------------
 14 May 2004.  Summary of changes for version 20040514:
 
 1) ACPI CA Core Subsystem:

==== //depot/projects/smpng/sys/contrib/dev/acpica/acconfig.h#22 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acconfig.h - Global configuration constants
- *       $Revision: 156 $
+ *       $Revision: 158 $
  *
  *****************************************************************************/
 
@@ -137,7 +137,7 @@
 
 /* Version string */
 
-#define ACPI_CA_VERSION                 0x20040514
+#define ACPI_CA_VERSION                 0x20040527
 
 /*
  * OS name, used for the _OS object.  The _OS object is essentially obsolete,
@@ -151,7 +151,7 @@
 
 /* Maximum objects in the various object caches */
 
-#define ACPI_MAX_STATE_CACHE_DEPTH      64          /* State objects for stacks */
+#define ACPI_MAX_STATE_CACHE_DEPTH      64          /* State objects */
 #define ACPI_MAX_PARSE_CACHE_DEPTH      96          /* Parse tree objects */
 #define ACPI_MAX_EXTPARSE_CACHE_DEPTH   64          /* Parse tree objects */
 #define ACPI_MAX_OBJECT_CACHE_DEPTH     64          /* Interpreter operand objects */
@@ -235,10 +235,11 @@
 
 /* Constants used in searching for the RSDP in low memory */
 
-#define ACPI_LO_RSDP_WINDOW_BASE        0           /* Physical Address */
-#define ACPI_HI_RSDP_WINDOW_BASE        0xE0000     /* Physical Address */
-#define ACPI_LO_RSDP_WINDOW_SIZE        0x400
-#define ACPI_HI_RSDP_WINDOW_SIZE        0x20000
+#define ACPI_EBDA_PTR_LOCATION          0x0000040E     /* Physical Address */
+#define ACPI_EBDA_PTR_LENGTH            2
+#define ACPI_EBDA_WINDOW_SIZE           1024
+#define ACPI_HI_RSDP_WINDOW_BASE        0x000E0000     /* Physical Address */
+#define ACPI_HI_RSDP_WINDOW_SIZE        0x00020000
 #define ACPI_RSDP_SCAN_STEP             16
 
 /* Operation regions */

==== //depot/projects/smpng/sys/contrib/dev/acpica/acfreebsd.h#15 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acfreebsd.h - OS specific defines, etc.
- *       $Revision: 15 $
+ *       $Revision: 17 $
  *
  *****************************************************************************/
 
@@ -156,6 +156,7 @@
 /* Not building kernel code, so use libc */
 #define ACPI_USE_STANDARD_HEADERS
 #define ACPI_FLUSH_CPU_CACHE()
+
 #if __STDC_HOSTED__
 #include <ctype.h>
 #endif

==== //depot/projects/smpng/sys/contrib/dev/acpica/acinterp.h#15 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acinterp.h - Interpreter subcomponent prototypes and defines
- *       $Revision: 148 $
+ *       $Revision: 149 $
  *
  *****************************************************************************/
 
@@ -191,6 +191,12 @@
  */
 
 ACPI_STATUS
+AcpiExCommonBufferSetup (
+    ACPI_OPERAND_OBJECT     *ObjDesc,
+    UINT32                  BufferLength,
+    UINT32                  *DatumCount);
+
+ACPI_STATUS
 AcpiExExtractFromField (
     ACPI_OPERAND_OBJECT     *ObjDesc,
     void                    *Buffer,

==== //depot/projects/smpng/sys/contrib/dev/acpica/acmacros.h#19 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acmacros.h - C macros for the entire subsystem.
- *       $Revision: 150 $
+ *       $Revision: 151 $
  *
  *****************************************************************************/
 
@@ -126,6 +126,9 @@
 #define ACPI_LOBYTE(l)                  ((UINT8)(UINT16)(l))
 #define ACPI_HIBYTE(l)                  ((UINT8)((((UINT16)(l)) >> 8) & 0xFF))
 
+#define ACPI_SET_BIT(target,bit)        ((target) |= (bit))
+#define ACPI_CLEAR_BIT(target,bit)      ((target) &= ~(bit))
+
 
 #if ACPI_MACHINE_WIDTH == 16
 

==== //depot/projects/smpng/sys/contrib/dev/acpica/compiler/aslcompiler.y#5 (text+ko) ====

@@ -2252,7 +2252,7 @@
 ConstExprTerm
     : PARSEOP_ZERO                  {$$ = TrCreateValuedLeafNode (PARSEOP_ZERO, 0);}
     | PARSEOP_ONE                   {$$ = TrCreateValuedLeafNode (PARSEOP_ONE, 1);}
-    | PARSEOP_ONES                  {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, 0xFFFFFFFFFFFFFFFFull);}
+    | PARSEOP_ONES                  {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_INTEGER_MAX);}
     ;
 
 /* OptionalCount must appear before ByteList or an incorrect reduction will result */

==== //depot/projects/smpng/sys/contrib/dev/acpica/dbcmds.c#19 (text+ko) ====

@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: dbcmds - debug commands and output routines
- *              $Revision: 112 $
+ *              $Revision: 113 $
  *
  ******************************************************************************/
 
@@ -161,6 +161,9 @@
 AcpiDbSleep (
     char                    *ObjectArg)
 {
+#if ACPI_MACHINE_WIDTH == 16
+    return (AE_OK);
+#else
     ACPI_STATUS             Status;
     UINT8                   SleepState;
 
@@ -185,6 +188,7 @@
     Status = AcpiLeaveSleepState (SleepState);
 
     return (Status);
+#endif
 }
 
 

==== //depot/projects/smpng/sys/contrib/dev/acpica/dbdisply.c#19 (text+ko) ====

@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: dbdisply - debug display commands
- *              $Revision: 105 $
+ *              $Revision: 106 $
  *
  ******************************************************************************/
 
@@ -824,8 +824,8 @@
                         (GpeBlock->RegisterCount * 8) -1);
             AcpiOsPrintf ("    RegisterInfo: %p  Status %8.8X%8.8X Enable %8.8X%8.8X\n",
                     GpeBlock->RegisterInfo,
-                    ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->StatusAddress.Address),
-                    ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->EnableAddress.Address));
+                    ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeBlock->RegisterInfo->StatusAddress.Address)),
+                    ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeBlock->RegisterInfo->EnableAddress.Address)));
             AcpiOsPrintf ("    EventInfo:    %p\n", GpeBlock->EventInfo);
 
             /* Examine each GPE Register within the block */
@@ -838,8 +838,8 @@
                         "    Reg %u:  WakeEnable %2.2X, RunEnable %2.2X  Status %8.8X%8.8X Enable %8.8X%8.8X\n",
                         i, GpeRegisterInfo->EnableForWake,
                         GpeRegisterInfo->EnableForRun,
-                        ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address),
-                        ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address));
+                        ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeRegisterInfo->StatusAddress.Address)),
+                        ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeRegisterInfo->EnableAddress.Address)));
 
                 /* Now look at the individual GPEs in this byte register */
 

==== //depot/projects/smpng/sys/contrib/dev/acpica/dsopcode.c#18 (text+ko) ====

@@ -2,7 +2,7 @@
  *
  * Module Name: dsopcode - Dispatcher Op Region support and handling of
  *                         "control" opcodes
- *              $Revision: 94 $
+ *              $Revision: 95 $
  *
  *****************************************************************************/
 
@@ -153,7 +153,6 @@
     ACPI_STATUS             Status;
     ACPI_PARSE_OBJECT       *Op;
     ACPI_WALK_STATE         *WalkState;
-    ACPI_PARSE_OBJECT       *Arg;
 
 
     ACPI_FUNCTION_TRACE ("DsExecuteArguments");
@@ -204,9 +203,7 @@
 
     /* Get and init the Op created above */
 
-    Arg = Op->Common.Value.Arg;
     Op->Common.Node = Node;
-    Arg->Common.Node = Node;
     AcpiPsDeleteParseTree (Op);
 
     /* Evaluate the deferred arguments */

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

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: evgpe - General Purpose Event handling and dispatch
- *              $Revision: 40 $
+ *              $Revision: 42 $
  *
  *****************************************************************************/
 
@@ -206,28 +206,28 @@
 
     if (Type == ACPI_GPE_DISABLE)
     {
-        GpeRegisterInfo->EnableForWake &= ~RegisterBit;
-        GpeRegisterInfo->EnableForRun  &= ~RegisterBit;
+        ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit);
+        ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit);
         return_ACPI_STATUS (AE_OK);
     }
 
-    /* 2) Enable case.  Set the appropriate enable bits */
+    /* 2) Enable case.  Set/Clear the appropriate enable bits */
 
     switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK)
     {
     case ACPI_GPE_TYPE_WAKE:
-        GpeRegisterInfo->EnableForWake |= RegisterBit;
-        GpeRegisterInfo->EnableForRun  &= ~RegisterBit;
+        ACPI_SET_BIT   (GpeRegisterInfo->EnableForWake, RegisterBit);
+        ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForRun, RegisterBit);
         break;
 
     case ACPI_GPE_TYPE_RUNTIME:
-        GpeRegisterInfo->EnableForWake &= ~RegisterBit;
-        GpeRegisterInfo->EnableForRun  |= RegisterBit;
+        ACPI_CLEAR_BIT (GpeRegisterInfo->EnableForWake, RegisterBit);
+        ACPI_SET_BIT   (GpeRegisterInfo->EnableForRun, RegisterBit);
         break;
 
     case ACPI_GPE_TYPE_WAKE_RUN:
-        GpeRegisterInfo->EnableForWake |= RegisterBit;
-        GpeRegisterInfo->EnableForRun  |= RegisterBit;
+        ACPI_SET_BIT   (GpeRegisterInfo->EnableForWake, RegisterBit);
+        ACPI_SET_BIT   (GpeRegisterInfo->EnableForRun, RegisterBit);
         break;
 
     default:
@@ -274,17 +274,19 @@
     switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK)
     {
     case ACPI_GPE_TYPE_WAKE:
-        GpeEventInfo->Flags |= ACPI_GPE_WAKE_ENABLED;
+
+        ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED);
         break;
 
     case ACPI_GPE_TYPE_WAKE_RUN:
-        GpeEventInfo->Flags |= ACPI_GPE_WAKE_ENABLED;
+
+        ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED);
 
         /*lint -fallthrough */
 
     case ACPI_GPE_TYPE_RUNTIME:
 
-        GpeEventInfo->Flags |= ACPI_GPE_RUN_ENABLED;
+        ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED);
 
         if (WriteToHardware)
         {
@@ -350,11 +352,11 @@
     switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK)
     {
     case ACPI_GPE_TYPE_WAKE:
-        GpeEventInfo->Flags &= ~ACPI_GPE_WAKE_ENABLED;
+        ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED);
         break;
 
     case ACPI_GPE_TYPE_WAKE_RUN:
-        GpeEventInfo->Flags &= ~ACPI_GPE_WAKE_ENABLED;
+        ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED);
 
         /*lint -fallthrough */
 
@@ -362,7 +364,7 @@
 
         /* Disable the requested runtime GPE */
 
-        GpeEventInfo->Flags &= ~ACPI_GPE_RUN_ENABLED;
+        ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED);
         Status = AcpiHwWriteGpeEnableReg (GpeEventInfo);
         break;
 
@@ -721,11 +723,11 @@
 
     if (AcpiGbl_SystemAwakeAndRunning)
     {
-        GpeEventInfo->Flags |= ACPI_GPE_SYSTEM_RUNNING;
+        ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_SYSTEM_RUNNING);
     }
     else
     {
-        GpeEventInfo->Flags &= ~ACPI_GPE_SYSTEM_RUNNING;
+        ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_SYSTEM_RUNNING);
     }
 
     /*
@@ -739,9 +741,11 @@
     {
     case ACPI_GPE_DISPATCH_HANDLER:
 
-        /* Invoke the installed handler (at interrupt level) */
-
-        GpeEventInfo->Dispatch.Handler->Address ((void *)
+        /*
+         * Invoke the installed handler (at interrupt level)
+         * Ignore return status for now.  TBD: leave GPE disabled on error?
+         */
+        (void) GpeEventInfo->Dispatch.Handler->Address (
                         GpeEventInfo->Dispatch.Handler->Context);
 
         /* It is now safe to clear level-triggered events. */

==== //depot/projects/smpng/sys/contrib/dev/acpica/evgpeblk.c#7 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: evgpeblk - GPE block creation and initialization.
- *              $Revision: 34 $
+ *              $Revision: 36 $
  *
  *****************************************************************************/
 
@@ -1102,8 +1102,8 @@
     /* Dump info about this GPE block */
 
     ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
-        "GPE %02d to %02d [%4.4s] %d regs at %8.8X%8.8X on int %d\n",
-        GpeBlock->BlockBaseNumber,
+        "GPE %02X to %02X [%4.4s] %u regs at %8.8X%8.8X on int 0x%X\n",
+        (UINT32) GpeBlock->BlockBaseNumber,
         (UINT32) (GpeBlock->BlockBaseNumber +
                 ((GpeBlock->RegisterCount * ACPI_GPE_REGISTER_WIDTH) -1)),
         GpeDevice->Name.Ascii,

==== //depot/projects/smpng/sys/contrib/dev/acpica/exconfig.c#17 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
- *              $Revision: 77 $
+ *              $Revision: 78 $
  *
  *****************************************************************************/
 
@@ -415,7 +415,7 @@
         for (i = 0; i < 8; i++)
         {
             Status = AcpiEvAddressSpaceDispatch (ObjDesc, ACPI_READ,
-                                (ACPI_PHYSICAL_ADDRESS) i + Address, 8,
+                                (ACPI_PHYSICAL_ADDRESS) (i + Address), 8,
                                 ((UINT8 *) &TableHeader) + i);
             if (ACPI_FAILURE (Status))
             {
@@ -443,7 +443,7 @@
         for (i = 0; i < TableHeader.Length; i++)
         {
             Status = AcpiEvAddressSpaceDispatch (ObjDesc, ACPI_READ,
-                                (ACPI_PHYSICAL_ADDRESS) i + Address, 8,
+                                (ACPI_PHYSICAL_ADDRESS) (i + Address), 8,
                                 ((UINT8 *) TablePtr + i));
             if (ACPI_FAILURE (Status))
             {

==== //depot/projects/smpng/sys/contrib/dev/acpica/exfldio.c#18 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exfldio - Aml Field I/O
- *              $Revision: 104 $
+ *              $Revision: 106 $
  *
  *****************************************************************************/
 
@@ -865,14 +865,84 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiExCommonBufferSetup
+ *
+ * PARAMETERS:  ObjDesc             - Field object
+ *              BufferLength        - Length of caller's buffer
+ *              DatumCount          - Where the DatumCount is returned
+ *
+ * RETURN:      Status, DatumCount
+ *
+ * DESCRIPTION: Common code to validate the incoming buffer size and compute
+ *              the number of field "datums" that must be read or written.
+ *              A "datum" is the smallest unit that can be read or written
+ *              to the field, it is either 1,2,4, or 8 bytes.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiExCommonBufferSetup (
+    ACPI_OPERAND_OBJECT     *ObjDesc,
+    UINT32                  BufferLength,
+    UINT32                  *DatumCount)
+{
+    UINT32                  ByteFieldLength;
+    UINT32                  ActualByteFieldLength;
+
+
+    ACPI_FUNCTION_TRACE ("ExCommonBufferSetup");
+
+
+    /*
+     * Incoming buffer must be at least as long as the field, we do not
+     * allow "partial" field reads/writes.  We do not care if the buffer is
+     * larger than the field, this typically happens when an integer is
+     * read/written to a field that is actually smaller than an integer.
+     */
+    ByteFieldLength = ACPI_ROUND_BITS_UP_TO_BYTES (
+                            ObjDesc->CommonField.BitLength);
+    if (ByteFieldLength > BufferLength)
+    {
+        ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
+            "Field size %X (bytes) is too large for buffer (%X)\n",
+            ByteFieldLength, BufferLength));
+
+        return_ACPI_STATUS (AE_BUFFER_OVERFLOW);
+    }
+
+    /* 
+     * Create "actual" field byte count (minimum number of bytes that
+     * must be read), then convert to datum count (minimum number
+     * of datum-sized units that must be read)
+     */
+    ActualByteFieldLength = ACPI_ROUND_BITS_UP_TO_BYTES (
+                                ObjDesc->CommonField.StartFieldBitOffset +
+                                ObjDesc->CommonField.BitLength);
+
+
+    *DatumCount = ACPI_ROUND_UP_TO (ActualByteFieldLength,
+                        ObjDesc->CommonField.AccessByteWidth);
+
+    ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
+        "BufferBytes %X, ActualBytes %X, Datums %X, ByteGran %X\n",
+        ByteFieldLength, ActualByteFieldLength,
+        *DatumCount, ObjDesc->CommonField.AccessByteWidth));
+
+    return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiExExtractFromField
  *
- * PARAMETERS:  *ObjDesc            - Field to be read
- *              *Value              - Where to store value
+ * PARAMETERS:  ObjDesc             - Field to be read
+ *              Buffer              - Where to store the field data
+ *              BufferLength        - Length of Buffer
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Retrieve the value of the given field
+ * DESCRIPTION: Retrieve the current value of the given field
  *
  ******************************************************************************/
 
@@ -888,7 +958,6 @@
     ACPI_INTEGER            PreviousRawDatum = 0;
     ACPI_INTEGER            ThisRawDatum = 0;
     ACPI_INTEGER            MergedDatum = 0;
-    UINT32                  ByteFieldLength;
     UINT32                  DatumCount;
     UINT32                  i;
 
@@ -896,41 +965,14 @@
     ACPI_FUNCTION_TRACE ("ExExtractFromField");
 
 
-    /*
-     * The field must fit within the caller's buffer
-     */
-    ByteFieldLength = ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->CommonField.BitLength);
-    if (ByteFieldLength > BufferLength)
-    {
-        ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-            "Field size %X (bytes) too large for buffer (%X)\n",
-            ByteFieldLength, BufferLength));
+    /* Validate buffer, compute number of datums */
 
-        return_ACPI_STATUS (AE_BUFFER_OVERFLOW);
-    }
-
-    /* Convert field byte count to datum count, round up if necessary */
-
-    DatumCount = ACPI_ROUND_UP_TO (ByteFieldLength,
-                              ObjDesc->CommonField.AccessByteWidth);
-
-    /*
-     * If the field is not aligned on a datum boundary and does not
-     * fit within a single datum, we must read an extra datum.
-     *
-     * We could just split the aligned and non-aligned cases since the
-     * aligned case is so very simple, but this would require more code.
-     */
-    if ((ObjDesc->CommonField.EndFieldValidBits != 0)         &&
-        (!(ObjDesc->CommonField.Flags & AOPOBJ_SINGLE_DATUM)))
+    Status = AcpiExCommonBufferSetup (ObjDesc, BufferLength, &DatumCount);
+    if (ACPI_FAILURE (Status))
     {
-        DatumCount++;
+        return_ACPI_STATUS (Status);
     }
 
-    ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-        "ByteLen %X, DatumLen %X, ByteGran %X\n",
-        ByteFieldLength, DatumCount,ObjDesc->CommonField.AccessByteWidth));
-
     /*
      * Clear the caller's buffer (the whole buffer length as given)
      * This is very important, especially in the cases where the buffer
@@ -1052,12 +1094,13 @@
  *
  * FUNCTION:    AcpiExInsertIntoField
  *
- * PARAMETERS:  *ObjDesc            - Field to be set
- *              Buffer              - Value to store
+ * PARAMETERS:  ObjDesc             - Field to be written
+ *              Buffer              - Data to be written
+ *              BufferLength        - Length of Buffer
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Store the value into the given field
+ * DESCRIPTION: Store the Buffer contents into the given field
  *
  ******************************************************************************/
 
@@ -1074,43 +1117,20 @@
     ACPI_INTEGER            MergedDatum;
     ACPI_INTEGER            PreviousRawDatum;
     ACPI_INTEGER            ThisRawDatum;
-    UINT32                  ByteFieldLength;
     UINT32                  DatumCount;
 
 
     ACPI_FUNCTION_TRACE ("ExInsertIntoField");
 
 
-    /*
-     * Incoming buffer must be at least as long as the field, we do not
-     * allow "partial" field writes.  We do not care if the buffer is
-     * larger than the field, this typically happens when an integer is
-     * written to a field that is actually smaller than an integer.
-     */
-    ByteFieldLength = ACPI_ROUND_BITS_UP_TO_BYTES (
-                            ObjDesc->CommonField.BitLength);
-    if (BufferLength < ByteFieldLength)
+    /* Validate buffer, compute number of datums */
+
+    Status = AcpiExCommonBufferSetup (ObjDesc, BufferLength, &DatumCount);
+    if (ACPI_FAILURE (Status))
     {
-        ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-            "Buffer length %X too small for field %X\n",
-            BufferLength, ByteFieldLength));
-
-        return_ACPI_STATUS (AE_BUFFER_OVERFLOW);
+        return_ACPI_STATUS (Status);
     }
 
-    ByteFieldLength = ACPI_ROUND_BITS_UP_TO_BYTES (
-                            ObjDesc->CommonField.StartFieldBitOffset +
-                            ObjDesc->CommonField.BitLength);
-
-    /* Convert byte count to datum count, round up if necessary */
-
-    DatumCount = ACPI_ROUND_UP_TO (ByteFieldLength,
-                                   ObjDesc->CommonField.AccessByteWidth);
-
-    ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
-        "Bytes %X, Datums %X, ByteGran %X\n",
-        ByteFieldLength, DatumCount, ObjDesc->CommonField.AccessByteWidth));
-
     /*
      * Break the request into up to three parts (similar to an I/O request):
      * 1) non-aligned part at start

==== //depot/projects/smpng/sys/contrib/dev/acpica/tbxfroot.c#14 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: tbxfroot - Find the root ACPI table (RSDT)
- *              $Revision: 72 $
+ *              $Revision: 73 $
  *
  *****************************************************************************/
 
@@ -486,14 +486,17 @@
  *              Flags                   - Current memory mode (logical vs.
  *                                        physical addressing)
  *
- * RETURN:      Status
+ * RETURN:      Status, RSDP physical address
  *
  * DESCRIPTION: Search lower 1Mbyte of memory for the root system descriptor
  *              pointer structure.  If it is found, set *RSDP to point to it.
  *
- *              NOTE: The RSDP must be either in the first 1K of the Extended
- *              BIOS Data Area or between E0000 and FFFFF (ACPI 1.0 section
- *              5.2.2; assertion #421).
+ *              NOTE1: The RSDP must be either in the first 1K of the Extended
+ *              BIOS Data Area or between E0000 and FFFFF (From ACPI Spec.)
+ *              Only a 32-bit physical address is necessary.
+ *
+ *              NOTE2: This function is always available, regardless of the
+ *              initialization state of the rest of ACPI.
  *
  ******************************************************************************/
 
@@ -504,8 +507,8 @@
 {
     UINT8                   *TablePtr;
     UINT8                   *MemRover;
-    UINT64                  PhysAddr;
-    ACPI_STATUS             Status = AE_OK;
+    UINT32                  PhysicalAddress;
+    ACPI_STATUS             Status;
 
 
     ACPI_FUNCTION_TRACE ("TbFindRsdp");
@@ -517,39 +520,62 @@
     if ((Flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING)
     {
         /*
-         * 1) Search EBDA (low memory) paragraphs
+         * 1a) Get the location of the EBDA
          */
-        Status = AcpiOsMapMemory ((UINT64) ACPI_LO_RSDP_WINDOW_BASE, ACPI_LO_RSDP_WINDOW_SIZE,
+        Status = AcpiOsMapMemory ((ACPI_PHYSICAL_ADDRESS) ACPI_EBDA_PTR_LOCATION,
+                                    ACPI_EBDA_PTR_LENGTH,
                                     (void *) &TablePtr);
         if (ACPI_FAILURE (Status))
         {
-            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %X for length %X\n",
-                ACPI_LO_RSDP_WINDOW_BASE, ACPI_LO_RSDP_WINDOW_SIZE));
+            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %8.8X for length %X\n",
+                ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
             return_ACPI_STATUS (Status);
         }
 
-        MemRover = AcpiTbScanMemoryForRsdp (TablePtr, ACPI_LO_RSDP_WINDOW_SIZE);
-        AcpiOsUnmapMemory (TablePtr, ACPI_LO_RSDP_WINDOW_SIZE);
+        ACPI_MOVE_16_TO_32 (&PhysicalAddress, TablePtr);
+        PhysicalAddress <<= 4;                  /* Convert segment to physical address */
+        AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_PTR_LENGTH);
+
+        /* EBDA present? */
 
-        if (MemRover)
+        if (PhysicalAddress > 0x400)
         {
-            /* Found it, return the physical address */
+            /*
+             * 1b) Search EBDA paragraphs (EBDA is required to be a minimum of 1K length)
+             */
+            Status = AcpiOsMapMemory ((ACPI_PHYSICAL_ADDRESS) PhysicalAddress,
+                                        ACPI_EBDA_WINDOW_SIZE,
+                                        (void *) &TablePtr);
+            if (ACPI_FAILURE (Status))
+            {
+                ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %8.8X for length %X\n",
+                    PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
+                return_ACPI_STATUS (Status);
+            }
+
+            MemRover = AcpiTbScanMemoryForRsdp (TablePtr, ACPI_EBDA_WINDOW_SIZE);
+            AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_WINDOW_SIZE);
+
+            if (MemRover)
+            {
+                /* Found it, return the physical address */
 
-            PhysAddr = ACPI_LO_RSDP_WINDOW_BASE;
-            PhysAddr += ACPI_PTR_DIFF (MemRover,TablePtr);
+                PhysicalAddress += ACPI_PTR_DIFF (MemRover, TablePtr);
 
-            TableInfo->PhysicalAddress = PhysAddr;
-            return_ACPI_STATUS (AE_OK);
+                TableInfo->PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
+                return_ACPI_STATUS (AE_OK);
+            }
         }
 
         /*
-         * 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
+         * 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh
          */
-        Status = AcpiOsMapMemory ((UINT64) ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE,
+        Status = AcpiOsMapMemory ((ACPI_PHYSICAL_ADDRESS) ACPI_HI_RSDP_WINDOW_BASE,
+                                    ACPI_HI_RSDP_WINDOW_SIZE,
                                     (void *) &TablePtr);
         if (ACPI_FAILURE (Status))
         {
-            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %X for length %X\n",
+            ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not map memory at %8.8X for length %X\n",
                 ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
             return_ACPI_STATUS (Status);
         }
@@ -561,10 +587,9 @@
         {
             /* Found it, return the physical address */
 
-            PhysAddr = ACPI_HI_RSDP_WINDOW_BASE;
-            PhysAddr += ACPI_PTR_DIFF (MemRover, TablePtr);
+            PhysicalAddress = ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF (MemRover, TablePtr);
 
-            TableInfo->PhysicalAddress = PhysAddr;
+            TableInfo->PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
             return_ACPI_STATUS (AE_OK);
         }
     }
@@ -575,20 +600,31 @@
     else
     {
         /*
-         * 1) Search EBDA (low memory) paragraphs
+         * 1a) Get the location of the EBDA
          */
-        MemRover = AcpiTbScanMemoryForRsdp (ACPI_PHYSADDR_TO_PTR (ACPI_LO_RSDP_WINDOW_BASE),
-                        ACPI_LO_RSDP_WINDOW_SIZE);
-        if (MemRover)
+        ACPI_MOVE_16_TO_32 (&PhysicalAddress, ACPI_EBDA_PTR_LOCATION);
+        PhysicalAddress <<= 4;      /* Convert segment to physical address */
+
+        /* EBDA present? */
+
+        if (PhysicalAddress > 0x400)
         {
-            /* Found it, return the physical address */
+            /*
+             * 1b) Search EBDA paragraphs (EBDA is required to be a minimum of 1K length)
+             */
+            MemRover = AcpiTbScanMemoryForRsdp (ACPI_PHYSADDR_TO_PTR (PhysicalAddress),
+                            ACPI_EBDA_WINDOW_SIZE);
+            if (MemRover)
+            {
+                /* Found it, return the physical address */
 
-            TableInfo->PhysicalAddress = ACPI_TO_INTEGER (MemRover);
-            return_ACPI_STATUS (AE_OK);
+                TableInfo->PhysicalAddress = ACPI_TO_INTEGER (MemRover);
+                return_ACPI_STATUS (AE_OK);
+            }
         }
 
         /*
-         * 2) Search upper memory: 16-byte boundaries in E0000h-F0000h
+         * 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh
          */
         MemRover = AcpiTbScanMemoryForRsdp (ACPI_PHYSADDR_TO_PTR (ACPI_HI_RSDP_WINDOW_BASE),
                         ACPI_HI_RSDP_WINDOW_SIZE);

==== //depot/projects/smpng/sys/dev/bfe/if_bfe.c#8 (text+ko) ====

@@ -28,7 +28,7 @@
 
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/bfe/if_bfe.c,v 1.13 2004/05/30 20:08:27 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/bfe/if_bfe.c,v 1.14 2004/07/02 12:16:01 mlaier Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -402,7 +402,9 @@
 	ifp->if_init = bfe_init;
 	ifp->if_mtu = ETHERMTU;
 	ifp->if_baudrate = 100000000;
-	ifp->if_snd.ifq_maxlen = BFE_TX_QLEN;
+	IFQ_SET_MAXLEN(&ifp->if_snd, BFE_TX_QLEN);
+	ifp->if_snd.ifq_drv_maxlen = BFE_TX_QLEN;
+	IFQ_SET_READY(&ifp->if_snd);
 
 	bfe_get_config(sc);
 
@@ -1256,7 +1258,7 @@
 		bfe_txeof(sc);
 
 	/* We have packets pending, fire them out */ 
-	if (ifp->if_flags & IFF_RUNNING && ifp->if_snd.ifq_head != NULL)
+	if (ifp->if_flags & IFF_RUNNING && !IFQ_DRV_IS_EMPTY(&ifp->if_snd))
 		bfe_start(ifp);
 
 	BFE_UNLOCK(sc);
@@ -1375,7 +1377,7 @@
 	}
 
 	while(sc->bfe_tx_ring[idx].bfe_mbuf == NULL) {
-		IF_DEQUEUE(&ifp->if_snd, m_head);
+		IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
 		if(m_head == NULL)
 			break;
 
@@ -1384,7 +1386,7 @@
 		 * enough room, let the chip drain the ring.
 		 */
 		if(bfe_encap(sc, m_head, &idx)) {
-			IF_PREPEND(&ifp->if_snd, m_head);
+			IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
 			ifp->if_flags |= IFF_OACTIVE;
 			break;
 		}

==== //depot/projects/smpng/sys/dev/em/if_em.c#34 (text+ko) ====

@@ -31,7 +31,7 @@
 
 ***************************************************************************/

>>> TRUNCATED FOR MAIL (1000 lines) <<<



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