PERFORCE change 49292 for review

Robert Watson rwatson at FreeBSD.org
Fri Mar 19 02:32:09 PST 2004


http://perforce.freebsd.org/chv.cgi?CH=49292

Change 49292 by rwatson at rwatson_paprika on 2004/03/19 02:31:15

	Integrate netperf_socket:
	
	ACPI import.
	Remove GDB_AUTO_ENTER.
	USB debugging tweaks.
	Loop back clone_cleanup() fix for if_tap.
	Loop back fix to EBUSY with if_tap.
	Appletalk breakout of ddp_usrreq.c pcb functions into ddp_pcb.c.
	Can no longer mmap files as executable from noexec file systems.

Affected files ...

.. //depot/projects/netperf_socket/sys/amd64/amd64/mp_machdep.c#4 integrate
.. //depot/projects/netperf_socket/sys/amd64/conf/GENERIC.hints#2 integrate
.. //depot/projects/netperf_socket/sys/conf/NOTES#8 integrate
.. //depot/projects/netperf_socket/sys/conf/files#10 integrate
.. //depot/projects/netperf_socket/sys/conf/kern.pre.mk#5 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/CHANGES.txt#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/acconfig.h#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/acglobal.h#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/acmacros.h#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/acobject.h#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/actbl2.h#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/actypes.h#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/acutils.h#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/amlcode.h#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/compiler/aslutils.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/dbexec.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/dsmethod.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/evgpe.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/excreate.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/exmutex.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/nsaccess.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/nsalloc.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/nseval.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/psparse.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/psscope.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/uteval.c#3 integrate
.. //depot/projects/netperf_socket/sys/contrib/dev/acpica/utglobal.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi.c#7 integrate
.. //depot/projects/netperf_socket/sys/dev/acpica/acpi_pcib.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/md/md.c#8 integrate
.. //depot/projects/netperf_socket/sys/dev/ppbus/if_plip.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/ppbus/lpbb.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/ppbus/lpt.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/ppbus/pcfclock.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/ppbus/ppi.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/ppbus/pps.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/ppbus/vpo.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/sio/sio.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/syscons/syscons.c#3 integrate
.. //depot/projects/netperf_socket/sys/dev/usb/ehci.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/usb/ehcireg.h#2 integrate
.. //depot/projects/netperf_socket/sys/dev/usb/uftdi.c#4 integrate
.. //depot/projects/netperf_socket/sys/dev/usb/usb_subr.c#2 integrate
.. //depot/projects/netperf_socket/sys/dev/usb/usbdevs#8 integrate
.. //depot/projects/netperf_socket/sys/dev/usb/usbdevs.h#8 integrate
.. //depot/projects/netperf_socket/sys/dev/usb/usbdevs_data.h#8 integrate
.. //depot/projects/netperf_socket/sys/geom/geom_subr.c#5 integrate
.. //depot/projects/netperf_socket/sys/i386/isa/ic/scd1400.h#2 delete
.. //depot/projects/netperf_socket/sys/kern/imgact_elf.c#3 integrate
.. //depot/projects/netperf_socket/sys/kern/kern_exit.c#6 integrate
.. //depot/projects/netperf_socket/sys/modules/arl/Makefile#2 integrate
.. //depot/projects/netperf_socket/sys/net/if_tap.c#6 integrate
.. //depot/projects/netperf_socket/sys/netatalk/ddp_pcb.c#1 branch
.. //depot/projects/netperf_socket/sys/netatalk/ddp_pcb.h#1 branch
.. //depot/projects/netperf_socket/sys/netatalk/ddp_usrreq.c#5 integrate
.. //depot/projects/netperf_socket/sys/netgraph/ng_pppoe.h#3 integrate
.. //depot/projects/netperf_socket/sys/vm/vm_mmap.c#6 integrate

Differences ...

==== //depot/projects/netperf_socket/sys/amd64/amd64/mp_machdep.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.235 2004/03/08 00:25:03 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.236 2004/03/18 02:53:38 obrien Exp $");
 
 #include "opt_cpu.h"
 #include "opt_kstack_pages.h"
@@ -1016,7 +1016,8 @@
 	return (error);
 }
 SYSCTL_PROC(_machdep, OID_AUTO, hlt_cpus, CTLTYPE_INT|CTLFLAG_RW,
-    0, 0, sysctl_hlt_cpus, "IU", "");
+    0, 0, sysctl_hlt_cpus, "IU",
+    "Bitmap of CPUs to halt.  101 (binary) will halt CPUs 0 and 2.");
 
 static int
 sysctl_hlt_logical_cpus(SYSCTL_HANDLER_ARGS)

==== //depot/projects/netperf_socket/sys/amd64/conf/GENERIC.hints#2 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/amd64/conf/GENERIC.hints,v 1.12 2003/05/01 01:05:22 peter Exp $
+# $FreeBSD: src/sys/amd64/conf/GENERIC.hints,v 1.14 2004/03/19 03:28:38 obrien Exp $
 hint.fdc.0.at="isa"
 hint.fdc.0.port="0x3F0"
 hint.fdc.0.irq="6"
@@ -7,20 +7,6 @@
 hint.fd.0.drive="0"
 hint.fd.1.at="fdc0"
 hint.fd.1.drive="1"
-hint.ata.0.at="isa"
-hint.ata.0.port="0x1F0"
-hint.ata.0.irq="14"
-hint.ata.1.at="isa"
-hint.ata.1.port="0x170"
-hint.ata.1.irq="15"
-hint.adv.0.at="isa"
-hint.adv.0.disabled="1"
-hint.bt.0.at="isa"
-hint.bt.0.disabled="1"
-hint.aha.0.at="isa"
-hint.aha.0.disabled="1"
-hint.aic.0.at="isa"
-hint.aic.0.disabled="1"
 hint.atkbdc.0.at="isa"
 hint.atkbdc.0.port="0x060"
 hint.atkbd.0.at="atkbdc"
@@ -31,8 +17,6 @@
 hint.vga.0.at="isa"
 hint.sc.0.at="isa"
 hint.sc.0.flags="0x100"
-hint.vt.0.at="isa"
-hint.vt.0.disabled="1"
 hint.pcic.0.at="isa"
 # hint.pcic.0.irq="10"	# Default to polling
 hint.pcic.0.port="0x3e0"
@@ -59,33 +43,3 @@
 hint.sio.3.irq="9"
 hint.ppc.0.at="isa"
 hint.ppc.0.irq="7"
-hint.ed.0.at="isa"
-hint.ed.0.disabled="1"
-hint.ed.0.port="0x280"
-hint.ed.0.irq="10"
-hint.ed.0.maddr="0xd8000"
-hint.cs.0.at="isa"
-hint.cs.0.disabled="1"
-hint.cs.0.port="0x300"
-hint.sn.0.at="isa"
-hint.sn.0.disabled="1"
-hint.sn.0.port="0x300"
-hint.sn.0.irq="10"
-hint.ie.0.at="isa"
-hint.ie.0.disabled="1"
-hint.ie.0.port="0x300"
-hint.ie.0.irq="10"
-hint.ie.0.maddr="0xd0000"
-hint.fe.0.at="isa"
-hint.fe.0.disabled="1"
-hint.fe.0.port="0x300"
-hint.le.0.at="isa"
-hint.le.0.disabled="1"
-hint.le.0.port="0x300"
-hint.le.0.irq="5"
-hint.le.0.maddr="0xd0000"
-hint.lnc.0.at="isa"
-hint.lnc.0.disabled="1"
-hint.lnc.0.port="0x280"
-hint.lnc.0.irq="10"
-hint.lnc.0.drq="0"

==== //depot/projects/netperf_socket/sys/conf/NOTES#8 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1206 2004/03/16 12:23:38 scottl Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1207 2004/03/18 12:22:31 brueffer Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
@@ -2088,7 +2088,7 @@
 options 	BOOTP_WIRED_TO=fxp0 # Use interface fxp0 for BOOTP
 
 #
-# Add tie-ins for a hardware watchdog.  This only enable the hooks;
+# Add tie-ins for a hardware watchdog.  This only enables the hooks;
 # the user must still supply the actual driver.
 #
 options 	HW_WDOG

==== //depot/projects/netperf_socket/sys/conf/files#10 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.875 2004/03/16 12:23:38 scottl Exp $
+# $FreeBSD: src/sys/conf/files,v 1.876 2004/03/19 07:21:22 rwatson Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -1237,6 +1237,7 @@
 netatalk/at_rmx.c	optional netatalkdebug
 netatalk/ddp_input.c	optional netatalk
 netatalk/ddp_output.c	optional netatalk
+netatalk/ddp_pcb.c	optional netatalk
 netatalk/ddp_usrreq.c	optional netatalk
 netatm/atm_aal5.c		optional atm_core
 netatm/atm_cm.c			optional atm_core

==== //depot/projects/netperf_socket/sys/conf/kern.pre.mk#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.44 2004/03/14 01:29:05 trhodes Exp $
+# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.45 2004/03/18 18:05:08 obrien Exp $
 
 # Part of a unified Makefile for building kernels.  This part contains all
 # of the definitions that need to be before %BEFORE_DEPEND.
@@ -18,6 +18,8 @@
 
 .if ${CC} == "icc"
 COPTFLAGS?=-O
+.elif ${MACHINE_ARCH} == "amd64"
+COPTFLAGS?=-O2 -fno-strict-aliasing -frename-registers -pipe
 .else
 COPTFLAGS?=-O -pipe
 . if ${COPTFLAGS:M-O[23s]} != ""

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

@@ -1,4 +1,66 @@
 ----------------------------------------
+11 March 2004.  Summary of changes for version 20040311:
+
+1) ACPI CA Core Subsystem:
+
+Fixed a problem where errors occurring during the parse phase of
+control method execution did not abort cleanly.  For example,
+objects created and installed in the namespace were not deleted.
+This caused all subsequent invocations of the method to return
+the AE_ALREADY_EXISTS exception.
+
+Implemented a mechanism to force a control method to "Serialized"
+execution if the method attempts to create namespace objects.
+(The root of the AE_ALREADY_EXISTS problem.)
+
+Implemented support for the predefined _OSI "internal" control
+method.  Initial supported strings are "Linux", "Windows 2000",
+"Windows 2001", and "Windows 2001.1", and can be easily upgraded
+for new strings as necessary.  This feature will allow "other"
+operating systems to execute the fully tested, "Windows" code
+path through the ASL code
+
+Global Lock Support:  Now allows multiple acquires and releases
+with any internal thread.  Removed concept of "owning thread" for
+this special mutex.
+
+Fixed two functions that were inappropriately declaring large
+objects on the CPU stack:  PsParseLoop, NsEvaluateRelative.
+Reduces the stack usage during method execution considerably.
+
+Fixed a problem in the ACPI 2.0 FACS descriptor (actbl2.h) where
+the S4Bios_f field was incorrectly defined as UINT32 instead of
+UINT32_BIT.
+
+Fixed a problem where AcpiEvGpeDetect would fault if there were
+no GPEs defined on the machine.
+
+Implemented two runtime options:  One to force all control method
+execution to "Serialized" to mimic Windows behavior, another to
+disable _OSI support if it causes problems on a given machine.
+
+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:  74.8K Code,  10.1K Data,   84.9K Total
+    Debug Version:     158.7K Code,  65.1K Data,  223.8K Total
+  Current Release:
+    Non-Debug Version:  76.5K Code,  11.3K Data,   87.8K Total
+    Debug Version:     160.3K Code,  66.0K Data,  226.3K Total
+
+2) iASL Compiler/Disassembler:
+
+Fixed an array size problem for FreeBSD that would cause the
+compiler to fault.
+
+----------------------------------------
 20 February 2004.  Summary of changes for version 20040220:
 
 1) ACPI CA Core Subsystem:

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

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acconfig.h - Global configuration constants
- *       $Revision: 149 $
+ *       $Revision: 150 $
  *
  *****************************************************************************/
 
@@ -137,7 +137,7 @@
 
 /* Version string */
 
-#define ACPI_CA_VERSION                 0x20040220
+#define ACPI_CA_VERSION                 0x20040311
 
 /* Maximum objects in the various object caches */
 
@@ -258,6 +258,10 @@
 
 #define ACPI_SMBUS_BUFFER_SIZE          34
 
+/* Number of strings associated with the _OSI reserved method */
+
+#define ACPI_NUM_OSI_STRINGS            4
+
 
 /******************************************************************************
  *

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/acglobal.h#3 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acglobal.h - Declarations for global variables
- *       $Revision: 147 $
+ *       $Revision: 148 $
  *
  *****************************************************************************/
 
@@ -152,7 +152,15 @@
 
 extern      UINT32                      AcpiGbl_NestingLevel;
 
+/*****************************************************************************
+ *
+ * Runtime configuration
+ *
+ ****************************************************************************/
 
+ACPI_EXTERN UINT8                       AcpiGbl_CreateOsiMethod;
+ACPI_EXTERN UINT8                       AcpiGbl_AllMethodsSerialized;
+
 /*****************************************************************************
  *
  * ACPI Table globals
@@ -242,6 +250,7 @@
 extern const char                      *AcpiGbl_HighestDstateNames[4];
 extern const ACPI_OPCODE_INFO           AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
 extern const char                      *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
+extern const char                      *AcpiGbl_ValidOsiStrings[ACPI_NUM_OSI_STRINGS];
 
 
 /*****************************************************************************
@@ -252,7 +261,7 @@
 
 #define NUM_NS_TYPES                    ACPI_TYPE_INVALID+1
 
-#if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
+#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
 #define NUM_PREDEFINED_NAMES            10
 #else
 #define NUM_PREDEFINED_NAMES            9

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

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acmacros.h - C macros for the entire subsystem.
- *       $Revision: 148 $
+ *       $Revision: 149 $
  *
  *****************************************************************************/
 
@@ -754,7 +754,4 @@
 
 #endif /* ACPI_DBG_TRACK_ALLOCATIONS */
 
-
-#define ACPI_GET_STACK_POINTER          _asm {mov eax, ebx}
-
 #endif /* ACMACROS_H */

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/acobject.h#3 (text+ko) ====

@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT  (Internal object only)
- *       $Revision: 123 $
+ *       $Revision: 124 $
  *
  *****************************************************************************/
 
@@ -259,7 +259,11 @@
 } ACPI_OBJECT_EVENT;
 
 
-#define INFINITE_CONCURRENCY        0xFF
+#define ACPI_INFINITE_CONCURRENCY   0xFF
+
+typedef
+ACPI_STATUS (*ACPI_INTERNAL_METHOD) (
+    struct acpi_walk_state  *WalkState);
 
 typedef struct acpi_object_method
 {
@@ -269,6 +273,7 @@
     UINT32                          AmlLength;
     void                            *Semaphore;
     UINT8                           *AmlStart;
+    ACPI_INTERNAL_METHOD            Implementation;
     UINT8                           Concurrency;
     UINT8                           ThreadCount;
     ACPI_OWNER_ID                   OwningId;

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/actbl2.h#3 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: actbl2.h - ACPI Specification Revision 2.0 Tables
- *       $Revision: 35 $
+ *       $Revision: 36 $
  *
  *****************************************************************************/
 
@@ -171,7 +171,7 @@
     UINT32                  HardwareSignature;      /* Hardware configuration signature */
     UINT32                  FirmwareWakingVector;   /* 32bit physical address of the Firmware Waking Vector. */
     UINT32                  GlobalLock;             /* Global Lock used to synchronize access to shared hardware resources */
-    UINT32                  S4Bios_f        : 1;    /* S4Bios_f - Indicates if S4BIOS support is present */
+    UINT32_BIT              S4Bios_f        : 1;    /* S4Bios_f - Indicates if S4BIOS support is present */
     UINT32_BIT              Reserved1       : 31;   /* Must be 0 */
     UINT64                  XFirmwareWakingVector;  /* 64bit physical address of the Firmware Waking Vector. */
     UINT8                   Version;                /* Version of this table */

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/actypes.h#3 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: actypes.h - Common data types for the entire ACPI subsystem
- *       $Revision: 264 $
+ *       $Revision: 265 $
  *
  *****************************************************************************/
 
@@ -428,7 +428,6 @@
 /*
  * Power state values
  */
-
 #define ACPI_STATE_UNKNOWN              (UINT8) 0xFF
 
 #define ACPI_STATE_S0                   (UINT8) 0
@@ -472,7 +471,6 @@
 #define ACPI_NOTIFY_BUS_MODE_MISMATCH   (UINT8) 6
 #define ACPI_NOTIFY_POWER_FAULT         (UINT8) 7
 
-
 /*
  *  Table types.  These values are passed to the table related APIs
  */
@@ -488,7 +486,6 @@
 #define ACPI_TABLE_MAX                  6
 #define NUM_ACPI_TABLE_TYPES            (ACPI_TABLE_MAX+1)
 
-
 /*
  * Types associated with ACPI names and objects.  The first group of
  * values (up to ACPI_TYPE_EXTERNAL_MAX) correspond to the definition
@@ -878,7 +875,7 @@
 #define ACPI_INIT_DEVICE_INI        1
 
 
-/* Address Spaces (Operation Regions */
+/* Address Spaces (For Operation Regions) */
 
 typedef
 ACPI_STATUS (*ACPI_ADR_SPACE_HANDLER) (

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/acutils.h#3 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
- *       $Revision: 159 $
+ *       $Revision: 160 $
  *
  *****************************************************************************/
 
@@ -125,7 +125,6 @@
     ACPI_GENERIC_STATE      *State,
     void                    *Context);
 
-
 ACPI_STATUS
 AcpiUtWalkPackageTree (
     ACPI_OPERAND_OBJECT     *SourceObject,
@@ -133,7 +132,6 @@
     ACPI_PKG_CALLBACK       WalkCallback,
     void                    *Context);
 
-
 typedef struct acpi_pkg_info
 {
     UINT8                   *FreeSpace;
@@ -550,6 +548,10 @@
 
 
 ACPI_STATUS
+AcpiUtOsiImplementation (
+    ACPI_WALK_STATE         *WalkState);
+
+ACPI_STATUS
 AcpiUtEvaluateObject (
     ACPI_NAMESPACE_NODE     *PrefixNode,
     char                    *Path,

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/amlcode.h#3 (text+ko) ====

@@ -3,7 +3,7 @@
  * Name: amlcode.h - Definitions for AML, as included in "definition blocks"
  *                   Declarations and definitions contained herein are derived
  *                   directly from the ACPI specification.
- *       $Revision: 74 $
+ *       $Revision: 75 $
  *
  *****************************************************************************/
 
@@ -569,11 +569,17 @@
 } AML_ACCESS_ATTRIBUTE;
 
 
-/* bit fields in MethodFlags byte */
+/* Bit fields in MethodFlags byte */
+
+#define AML_METHOD_ARG_COUNT        0x07
+#define AML_METHOD_SERIALIZED       0x08
+#define AML_METHOD_SYNCH_LEVEL      0xF0
+
+/* METHOD_FLAGS_ARG_COUNT is not used internally, define additional flags */
 
-#define METHOD_FLAGS_ARG_COUNT      0x07
-#define METHOD_FLAGS_SERIALIZED     0x08
-#define METHOD_FLAGS_SYNCH_LEVEL    0xF0
+#define AML_METHOD_INTERNAL_ONLY    0x01
+#define AML_METHOD_RESERVED1        0x02
+#define AML_METHOD_RESERVED2        0x04
 
 
 #endif /* __AMLCODE_H__ */

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/compiler/aslutils.c#3 (text+ko) ====

@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: aslutils -- compiler utilities
- *              $Revision: 57 $
+ *              $Revision: 58 $
  *
  *****************************************************************************/
 

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/dbexec.c#3 (text+ko) ====

@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: dbexec - debugger control method execution
- *              $Revision: 57 $
+ *              $Revision: 59 $
  *
  ******************************************************************************/
 
@@ -474,12 +474,14 @@
 #endif
 
         Status = AcpiDbExecuteMethod (Info, &ReturnObj);
-
         if (ACPI_FAILURE (Status))
         {
             AcpiOsPrintf ("%s During execution of %s at iteration %X\n",
                 AcpiFormatException (Status), Info->Pathname, i);
-            break;
+            if (Status == AE_ABORT_METHOD)
+            {
+                break;
+            }
         }
 
         if ((i % 1000) == 0)

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/dsmethod.c#3 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: dsmethod - Parser/Interpreter interface - control method parsing
- *              $Revision: 93 $
+ *              $Revision: 94 $
  *
  *****************************************************************************/
 
@@ -182,7 +182,7 @@
 
     /* Create a mutex for the method if there is a concurrency limit */
 
-    if ((ObjDesc->Method.Concurrency != INFINITE_CONCURRENCY) &&
+    if ((ObjDesc->Method.Concurrency != ACPI_INFINITE_CONCURRENCY) &&
         (!ObjDesc->Method.Semaphore))
     {
         Status = AcpiOsCreateSemaphore (ObjDesc->Method.Concurrency,
@@ -389,37 +389,41 @@
         return_ACPI_STATUS (Status);
     }
 
-    /* 1) Parse: Create a new walk state for the preempting walk */
+    if (!(ObjDesc->Method.MethodFlags & AML_METHOD_INTERNAL_ONLY))
+    {
+        /* 1) Parse: Create a new walk state for the preempting walk */
+
+        NextWalkState = AcpiDsCreateWalkState (ObjDesc->Method.OwningId,
+                                                Op, ObjDesc, NULL);
+        if (!NextWalkState)
+        {
+            return_ACPI_STATUS (AE_NO_MEMORY);
+        }
 
-    NextWalkState = AcpiDsCreateWalkState (ObjDesc->Method.OwningId,
-                                            Op, ObjDesc, NULL);
-    if (!NextWalkState)
-    {
-        return_ACPI_STATUS (AE_NO_MEMORY);
-    }
 
-    /* Create and init a Root Node */
+        /* Create and init a Root Node */
 
-    Op = AcpiPsCreateScopeOp ();
-    if (!Op)
-    {
-        Status = AE_NO_MEMORY;
-        goto Cleanup;
-    }
+        Op = AcpiPsCreateScopeOp ();
+        if (!Op)
+        {
+            Status = AE_NO_MEMORY;
+            goto Cleanup;
+        }
 
-    Status = AcpiDsInitAmlWalk (NextWalkState, Op, MethodNode,
-                    ObjDesc->Method.AmlStart,  ObjDesc->Method.AmlLength,
-                    NULL, NULL, 1);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiDsDeleteWalkState (NextWalkState);
-        goto Cleanup;
-    }
+        Status = AcpiDsInitAmlWalk (NextWalkState, Op, MethodNode,
+                        ObjDesc->Method.AmlStart,  ObjDesc->Method.AmlLength,
+                        NULL, NULL, 1);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiDsDeleteWalkState (NextWalkState);
+            goto Cleanup;
+        }
 
-    /* Begin AML parse */
+        /* Begin AML parse */
 
-    Status = AcpiPsParseAml (NextWalkState);
-    AcpiPsDeleteParseTree (Op);
+        Status = AcpiPsParseAml (NextWalkState);
+        AcpiPsDeleteParseTree (Op);
+    }
 
     /* 2) Execute: Create a new state for the preempting walk */
 
@@ -430,7 +434,6 @@
         Status = AE_NO_MEMORY;
         goto Cleanup;
     }
-
     /*
      * The resolved arguments were put on the previous walk state's operand
      * stack.  Operands on the previous walk state stack always
@@ -464,16 +467,27 @@
     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
         "Starting nested execution, newstate=%p\n", NextWalkState));
 
+    if (ObjDesc->Method.MethodFlags & AML_METHOD_INTERNAL_ONLY)
+    {
+        Status = ObjDesc->Method.Implementation (NextWalkState);
+        return_ACPI_STATUS (Status);
+    }
+
     return_ACPI_STATUS (AE_OK);
 
 
     /* On error, we must delete the new walk state */
 
 Cleanup:
+    if (NextWalkState->MethodDesc)
+    {
+        /* Decrement the thread count on the method parse tree */
+
+       NextWalkState->MethodDesc->Method.ThreadCount--;
+    }
     (void) AcpiDsTerminateControlMethod (NextWalkState);
     AcpiDsDeleteWalkState (NextWalkState);
     return_ACPI_STATUS (Status);
-
 }
 
 
@@ -604,12 +618,34 @@
         }
     }
 
-    /* Decrement the thread count on the method parse tree */
+    if (WalkState->MethodDesc->Method.ThreadCount)
+    {
+        ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+            "*** Not deleting method namespace, there are still %d threads\n",
+            WalkState->MethodDesc->Method.ThreadCount));
+    }
 
-    WalkState->MethodDesc->Method.ThreadCount--;
     if (!WalkState->MethodDesc->Method.ThreadCount)
     {
         /*
+         * Support to dynamically change a method from NotSerialized to
+         * Serialized if it appears that the method is written foolishly and
+         * does not support multiple thread execution.  The best example of this
+         * is if such a method creates namespace objects and blocks.  A second
+         * thread will fail with an AE_ALREADY_EXISTS exception
+         *
+         * This code is here because we must wait until the last thread exits
+         * before creating the synchronization semaphore.
+         */
+        if ((WalkState->MethodDesc->Method.Concurrency == 1) &&
+            (!WalkState->MethodDesc->Method.Semaphore))
+        {
+            Status = AcpiOsCreateSemaphore (1,
+                                    1,
+                                    &WalkState->MethodDesc->Method.Semaphore);
+        }
+
+        /*
          * There are no more threads executing this method.  Perform
          * additional cleanup.
          *

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

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: evgpe - General Purpose Event handling and dispatch
- *              $Revision: 33 $
+ *              $Revision: 34 $
  *
  *****************************************************************************/
 
@@ -228,6 +228,12 @@
 
     ACPI_FUNCTION_NAME ("EvGpeDetect");
 
+    /* Check for the case where there are no GPEs */
+
+    if (!GpeXruptList)
+    {
+        return (IntStatus);
+    }
 
     /* Examine all GPE blocks attached to this interrupt level */
 

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/excreate.c#3 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: excreate - Named object creation
- *              $Revision: 101 $
+ *              $Revision: 102 $
  *
  *****************************************************************************/
 
@@ -681,29 +681,36 @@
     ObjDesc->Method.AmlStart  = AmlStart;
     ObjDesc->Method.AmlLength = AmlLength;
 
-    /* disassemble the method flags */
-
+    /*
+     * Disassemble the method flags.  Split off the Arg Count
+     * for efficiency
+     */
     MethodFlags = (UINT8) Operand[1]->Integer.Value;
 
-    ObjDesc->Method.MethodFlags = MethodFlags;
-    ObjDesc->Method.ParamCount  = (UINT8) (MethodFlags & METHOD_FLAGS_ARG_COUNT);
+    ObjDesc->Method.MethodFlags = (UINT8) (MethodFlags & ~AML_METHOD_ARG_COUNT);
+    ObjDesc->Method.ParamCount  = (UINT8) (MethodFlags & AML_METHOD_ARG_COUNT);
 
     /*
      * Get the concurrency count.  If required, a semaphore will be
      * created for this method when it is parsed.
      */
-    if (MethodFlags & METHOD_FLAGS_SERIALIZED)
+    if (AcpiGbl_AllMethodsSerialized)
+    {
+        ObjDesc->Method.Concurrency = 1;
+        ObjDesc->Method.MethodFlags |= AML_METHOD_SERIALIZED;
+    }
+    else if (MethodFlags & AML_METHOD_SERIALIZED)
     {
         /*
          * ACPI 1.0: Concurrency = 1
          * ACPI 2.0: Concurrency = (SyncLevel (in method declaration) + 1)
          */
         ObjDesc->Method.Concurrency = (UINT8)
-                        (((MethodFlags & METHOD_FLAGS_SYNCH_LEVEL) >> 4) + 1);
+                        (((MethodFlags & AML_METHOD_SYNCH_LEVEL) >> 4) + 1);
     }
     else
     {
-        ObjDesc->Method.Concurrency = INFINITE_CONCURRENCY;
+        ObjDesc->Method.Concurrency = ACPI_INFINITE_CONCURRENCY;
     }
 
     /* Attach the new object to the method Node */

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/exmutex.c#3 (text+ko) ====

@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exmutex - ASL Mutex Acquire/Release functions
- *              $Revision: 20 $
+ *              $Revision: 21 $
  *
  *****************************************************************************/
 
@@ -258,16 +258,20 @@
     /*
      * Support for multiple acquires by the owning thread
      */
+    if (ObjDesc->Mutex.OwnerThread)
+    {
+        /* Special case for Global Lock, allow all threads */
 
-    if ((ObjDesc->Mutex.OwnerThread) &&
-        (ObjDesc->Mutex.OwnerThread->ThreadId == WalkState->Thread->ThreadId))
-    {
-        /*
-         * The mutex is already owned by this thread,
-         * just increment the acquisition depth
-         */
-        ObjDesc->Mutex.AcquisitionDepth++;
-        return_ACPI_STATUS (AE_OK);
+        if ((ObjDesc->Mutex.OwnerThread->ThreadId == WalkState->Thread->ThreadId) ||
+            (ObjDesc->Mutex.Semaphore == AcpiGbl_GlobalLockSemaphore))
+        {
+            /*
+             * The mutex is already owned by this thread,
+             * just increment the acquisition depth
+             */
+            ObjDesc->Mutex.AcquisitionDepth++;
+            return_ACPI_STATUS (AE_OK);
+        }
     }
 
     /* Acquire the mutex, wait if necessary */
@@ -341,9 +345,13 @@
         return_ACPI_STATUS (AE_AML_INTERNAL);
     }
 
-    /* The Mutex is owned, but this thread must be the owner */
+    /* 
+     * The Mutex is owned, but this thread must be the owner.
+     * Special case for Global Lock, any thread can release
+     */
+    if ((ObjDesc->Mutex.OwnerThread->ThreadId != WalkState->Thread->ThreadId) &&
+        (ObjDesc->Mutex.Semaphore != AcpiGbl_GlobalLockSemaphore))
 
-    if (ObjDesc->Mutex.OwnerThread->ThreadId != WalkState->Thread->ThreadId)
     {
         ACPI_REPORT_ERROR ((
             "Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n",

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/nsaccess.c#3 (text+ko) ====

@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: nsaccess - Top-level functions for accessing ACPI namespace
- *              $Revision: 177 $
+ *              $Revision: 179 $
  *
  ******************************************************************************/
 
@@ -182,8 +182,16 @@
 
     for (InitVal = AcpiGbl_PreDefinedNames; InitVal->Name; InitVal++)
     {
+        /* _OSI is optional for now, will be permanent later */
+
+        if (!ACPI_STRCMP (InitVal->Name, "_OSI") && !AcpiGbl_CreateOsiMethod)
+        {
+            continue;
+        }
+
         Status = AcpiNsLookup (NULL, InitVal->Name, InitVal->Type,
-                        ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH, NULL, &NewNode);
+                        ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH, 
+                        NULL, &NewNode);
 
         if (ACPI_FAILURE (Status) || (!NewNode)) /* Must be on same line for code converter */
         {
@@ -202,7 +210,8 @@
             Status = AcpiOsPredefinedOverride (InitVal, &Val);
             if (ACPI_FAILURE (Status))
             {
-                ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not override predefined %s\n",
+                ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 
+                    "Could not override predefined %s\n",
                     InitVal->Name));
             }
 
@@ -230,15 +239,20 @@
             switch (InitVal->Type)
             {
             case ACPI_TYPE_METHOD:
-                ObjDesc->Method.ParamCount =
-                        (UINT8) ACPI_STRTOUL (Val, NULL, 10);
+                ObjDesc->Method.ParamCount = (UINT8) ACPI_STRTOUL 
+                                                        (Val, NULL, 10);
                 ObjDesc->Common.Flags |= AOPOBJ_DATA_VALID;
 
-#if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
+#if defined (_ACPI_ASL_COMPILER) || defined (_ACPI_DUMP_APP)
 
-                /* Compiler cheats by putting parameter count in the OwnerID */
+                /* iASL Compiler cheats by putting parameter count in the OwnerID */
 
                 NewNode->OwnerId = ObjDesc->Method.ParamCount;
+#else
+                /* Mark this as a very SPECIAL method */
+
+                ObjDesc->Method.MethodFlags = AML_METHOD_INTERNAL_ONLY;
+                ObjDesc->Method.Implementation = AcpiUtOsiImplementation;
 #endif
                 break;
 
@@ -263,8 +277,8 @@
             case ACPI_TYPE_MUTEX:
 
                 ObjDesc->Mutex.Node = NewNode;
-                ObjDesc->Mutex.SyncLevel =
-                            (UINT16) ACPI_STRTOUL (Val, NULL, 10);
+                ObjDesc->Mutex.SyncLevel = (UINT16) ACPI_STRTOUL 
+                                                        (Val, NULL, 10);
 
                 if (ACPI_STRCMP (InitVal->Name, "_GL_") == 0)
                 {
@@ -300,6 +314,7 @@
 
 
             default:
+
                 ACPI_REPORT_ERROR (("Unsupported initial type value %X\n",
                     InitVal->Type));
                 AcpiUtRemoveReference (ObjDesc);

==== //depot/projects/netperf_socket/sys/contrib/dev/acpica/nsalloc.c#3 (text+ko) ====

@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: nsalloc - Namespace allocation and deletion utilities
- *              $Revision: 84 $
+ *              $Revision: 85 $
  *
  ******************************************************************************/
 
@@ -428,10 +428,11 @@
     Node->OwnerId = OwnerId;

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


More information about the p4-projects mailing list