Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Dec 2004 01:02:14 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 66289 for review
Message-ID:  <200412030102.iB312EIX024484@repoman.freebsd.org>

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

Change 66289 by peter@peter_overcee on 2004/12/03 01:01:14

	IFC @66287 (pick up acpi merges)

Affected files ...

.. //depot/projects/hammer/bin/sh/jobs.c#11 integrate
.. //depot/projects/hammer/bin/sh/sh.1#12 integrate
.. //depot/projects/hammer/sbin/dump/dump.h#8 integrate
.. //depot/projects/hammer/sbin/dump/itime.c#4 integrate
.. //depot/projects/hammer/share/man/man9/style.9#17 integrate
.. //depot/projects/hammer/share/zoneinfo/europe#5 integrate
.. //depot/projects/hammer/share/zoneinfo/northamerica#5 integrate
.. //depot/projects/hammer/share/zoneinfo/southamerica#6 integrate
.. //depot/projects/hammer/sys/amd64/amd64/pmap.c#118 integrate
.. //depot/projects/hammer/sys/arm/arm/trap.c#6 integrate
.. //depot/projects/hammer/sys/contrib/dev/acpica/dbcmds.c#13 integrate
.. //depot/projects/hammer/sys/contrib/dev/acpica/hwregs.c#11 integrate
.. //depot/projects/hammer/sys/contrib/dev/acpica/hwsleep.c#11 integrate
.. //depot/projects/hammer/sys/contrib/dev/acpica/osunixxf.c#5 integrate
.. //depot/projects/hammer/sys/contrib/dev/acpica/uteval.c#10 integrate
.. //depot/projects/hammer/sys/contrib/dev/acpica/utglobal.c#12 integrate
.. //depot/projects/hammer/sys/dev/acpica/Osd/OsdInterrupt.c#8 integrate
.. //depot/projects/hammer/sys/dev/acpica/Osd/OsdSchedule.c#10 integrate
.. //depot/projects/hammer/sys/dev/acpica/acpi.c#49 integrate
.. //depot/projects/hammer/sys/dev/acpica/acpi_acad.c#16 integrate
.. //depot/projects/hammer/sys/dev/acpica/acpi_cmbat.c#20 integrate
.. //depot/projects/hammer/sys/dev/acpica/acpi_if.m#3 integrate
.. //depot/projects/hammer/sys/dev/drm/drm_os_freebsd.h#14 integrate
.. //depot/projects/hammer/sys/dev/pci/pci.c#28 integrate
.. //depot/projects/hammer/sys/fs/msdosfs/denode.h#7 integrate
.. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_denode.c#15 integrate
.. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_vnops.c#18 integrate
.. //depot/projects/hammer/sys/i386/i386/pmap.c#63 integrate
.. //depot/projects/hammer/sys/kern/kern_descrip.c#39 integrate
.. //depot/projects/hammer/sys/kern/uipc_domain.c#12 integrate
.. //depot/projects/hammer/sys/sys/filedesc.h#12 integrate
.. //depot/projects/hammer/tools/regression/usr.bin/make/Makefile#13 integrate
.. //depot/projects/hammer/tools/regression/usr.bin/make/shell_test#2 delete
.. //depot/projects/hammer/tools/regression/usr.bin/make/shell_test.sh#1 branch

Differences ...

==== //depot/projects/hammer/bin/sh/jobs.c#11 (text+ko) ====

@@ -36,7 +36,7 @@
 #endif
 #endif /* not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/sh/jobs.c,v 1.67 2004/04/06 20:06:51 markm Exp $");
+__FBSDID("$FreeBSD: src/bin/sh/jobs.c,v 1.68 2004/12/02 13:12:43 maxim Exp $");
 
 #include <fcntl.h>
 #include <signal.h>
@@ -926,7 +926,8 @@
 	in_dowait--;
 	if (breakwaitcmd != 0) {
 		breakwaitcmd = 0;
-		return -1;
+		if (pid <= 0)
+			return -1;
 	}
 	if (pid <= 0)
 		return pid;

==== //depot/projects/hammer/bin/sh/sh.1#12 (text+ko) ====

@@ -29,7 +29,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	from: @(#)sh.1	8.6 (Berkeley) 5/4/95
-.\" $FreeBSD: src/bin/sh/sh.1,v 1.93 2004/11/01 19:05:04 alfred Exp $
+.\" $FreeBSD: src/bin/sh/sh.1,v 1.94 2004/12/02 13:13:27 maxim Exp $
 .\"
 .Dd July 3, 2004
 .Dt SH 1
@@ -269,7 +269,7 @@
 If this option is not set,
 traps are executed after the child exits,
 as specified in
-.St -p1003.2
+.St -p1003.2 .
 This nonstandard option is useful for putting guarding shells around
 children that block signals.
 The surrounding shell may kill the child

==== //depot/projects/hammer/sbin/dump/dump.h#8 (text+ko) ====

@@ -28,7 +28,7 @@
  *
  *	@(#)dump.h	8.2 (Berkeley) 4/28/95
  *
- * $FreeBSD: src/sbin/dump/dump.h,v 1.26 2004/04/13 02:58:06 green Exp $
+ * $FreeBSD: src/sbin/dump/dump.h,v 1.27 2004/12/02 13:56:53 maxim Exp $
  */
 
 /*
@@ -164,13 +164,13 @@
 	time_t	dd_ddate;
 };
 int	nddates;		/* number of records (might be zero) */
-int	ddates_in;		/* we have read the increment file */
 struct	dumpdates **ddatev;	/* the arrayfied version */
 void	initdumptimes(void);
 void	getdumptime(void);
 void	putdumptime(void);
 #define	ITITERATE(i, ddp) \
-	for (ddp = ddatev[i = 0]; i < nddates; ddp = ddatev[++i])
+    	if (ddatev != NULL) \
+		for (ddp = ddatev[i = 0]; i < nddates; ddp = ddatev[++i])
 
 void	sig(int signo);
 

==== //depot/projects/hammer/sbin/dump/itime.c#4 (text+ko) ====

@@ -32,7 +32,7 @@
 static char sccsid[] = "@(#)itime.c	8.1 (Berkeley) 6/5/93";
 #endif
 static const char rcsid[] =
-  "$FreeBSD: src/sbin/dump/itime.c,v 1.15 2004/04/09 19:58:27 markm Exp $";
+  "$FreeBSD: src/sbin/dump/itime.c,v 1.16 2004/12/02 13:56:53 maxim Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -60,7 +60,6 @@
 SLIST_HEAD(dthead, dumptime) dthead = SLIST_HEAD_INITIALIZER(dthead);
 struct	dumpdates **ddatev = 0;
 int	nddates = 0;
-int	ddates_in = 0;
 
 static	void dumprecout(FILE *, const struct dumpdates *);
 static	int getrecord(FILE *, struct dumpdates *);
@@ -113,7 +112,6 @@
 		SLIST_INSERT_HEAD(&dthead, dtwalk, dt_list);
 	}
 
-	ddates_in = 1;
 	/*
 	 *	arrayify the list, leaving enough room for the additional
 	 *	record that we may have to add to the ddate structure
@@ -177,7 +175,6 @@
 	free((char *)ddatev);
 	ddatev = 0;
 	nddates = 0;
-	ddates_in = 0;
 	readdumptimes(df);
 	if (fseek(df, 0L, 0) < 0)
 		quit("fseek: %s\n", strerror(errno));

==== //depot/projects/hammer/share/man/man9/style.9#17 (text+ko) ====

@@ -43,7 +43,7 @@
  * Style guide for FreeBSD.  Based on the CSRG's KNF (Kernel Normal Form).
  *
  *	@(#)style	1.14 (Berkeley) 4/28/95
- * $FreeBSD: src/share/man/man9/style.9,v 1.110 2004/07/03 18:29:24 ru Exp $
+ * $FreeBSD: src/share/man/man9/style.9,v 1.111 2004/12/02 23:20:17 dds Exp $
  */
 
 /*
@@ -86,7 +86,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/share/man/man9/style.9,v 1.110 2004/07/03 18:29:24 ru Exp $");
+__FBSDID("$FreeBSD: src/share/man/man9/style.9,v 1.111 2004/12/02 23:20:17 dds Exp $");
 .Ed
 .Pp
 Leave another blank line before the header files.
@@ -278,7 +278,7 @@
 Separate these identifiers from asterisks using a single space.
 .Pp
 When declaring variables in structures, declare them sorted by use, then
-by size, and then in alphabetical order.
+by size (largest to smallest), and then in alphabetical order.
 The first category normally does not apply, but there are exceptions.
 Each one gets its own line.
 Try to make the structure

==== //depot/projects/hammer/share/zoneinfo/europe#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# @(#)europe	7.88
+# @(#)europe	7.90
 
 # This data is by no means authoritative; if you think you know better,
 # go ahead and edit the file (and please send any changes to
@@ -708,7 +708,7 @@
 # see Serbia and Montenegro
 
 # Cyprus
-# See the `asia' file.
+# Please see the `asia' file for Asia/Nicosia.
 
 # Czech Republic
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -1055,6 +1055,11 @@
 			1:00	Germany	CE%sT	1980
 			1:00	EU	CE%sT
 
+# Georgia
+# Please see the "asia" file for Asia/Tbilisi.
+# Herodotus (Histories, IV.45) says Georgia north of the Phasis (now Rioni)
+# is in Europe.  Our reference location Tbilisi is in the Asian part.
+
 # Gibraltar
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Europe/Gibraltar	-0:21:24 -	LMT	1880 Aug  2
@@ -1611,7 +1616,7 @@
 # From Paul Eggert (2001-05-01):
 #
 # Actually, Jan Mayen was never occupied by Germany during World War II,
-# so it must have diverged from Oslo time during the war, as Olso was
+# so it must have diverged from Oslo time during the war, as Oslo was
 # keeping Berlin time.
 #
 # <http://home.no.net/janmayen/history.htm>; says that the meteorologists

==== //depot/projects/hammer/share/zoneinfo/northamerica#5 (text+ko) ====

@@ -1,4 +1,4 @@
-# @(#)northamerica	7.69
+# @(#)northamerica	7.70
 # also includes Central America and the Caribbean
 
 # This data is by no means authoritative; if you think you know better,
@@ -1731,6 +1731,15 @@
 # to DST--and one more hour on 1999-04-04--when the announcers will have
 # returned to Baltimore, which switches on that date.)
 
+# From Evert van der Veer via Steffen Thorsen (2004-10-28):
+# Cuba is not going back to standard time this year.
+# From Paul Eggert (2004-10-28):
+# http://www.granma.cu/ingles/2004/septiembre/juev30/41medid-i.html
+# says that it's due to a problem at the Antonio Guiteras
+# thermoelectric plant, and says "This October there will be no return
+# to normal hours (after daylight saving time)".
+# For now, let's assume that it's a one-year temporary measure.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Cuba	1928	only	-	Jun	10	0:00	1:00	D
 Rule	Cuba	1928	only	-	Oct	10	0:00	0	S
@@ -1759,8 +1768,9 @@
 Rule	Cuba	1996	only	-	Oct	 6	0:00s	0	S
 Rule	Cuba	1997	only	-	Oct	12	0:00s	0	S
 Rule	Cuba	1998	1999	-	Mar	lastSun	0:00s	1:00	D
-Rule	Cuba	1998	max	-	Oct	lastSun	0:00s	0	S
+Rule	Cuba	1998	2003	-	Oct	lastSun	0:00s	0	S
 Rule	Cuba	2000	max	-	Apr	Sun>=1	0:00s	1:00	D
+Rule	Cuba	2005	max	-	Oct	lastSun	0:00s	0	S
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Havana	-5:29:28 -	LMT	1890

==== //depot/projects/hammer/share/zoneinfo/southamerica#6 (text+ko) ====

@@ -1,4 +1,4 @@
-# @(#)southamerica	7.54
+# @(#)southamerica	7.55
 
 # This data is by no means authoritative; if you think you know better,
 # go ahead and edit the file (and please send any changes to
@@ -671,7 +671,7 @@
 # Mato Grosso (MT)
 Zone America/Cuiaba	-3:44:20 -	LMT	1914
 			-4:00	Brazil	AM%sT	2003 Sep 24
-			-4:00	-	AMT	2004 Oct  4
+			-4:00	-	AMT	2004 Oct  1
 			-4:00	Brazil	AM%sT
 #
 # west Para (PA), Rondonia (RO)

==== //depot/projects/hammer/sys/amd64/amd64/pmap.c#118 (text+ko) ====

@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.509 2004/11/27 06:51:33 das Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.510 2004/12/02 04:06:40 alc Exp $");
 
 /*
  *	Manages physical address maps.
@@ -318,18 +318,26 @@
 
 /* Return a pointer to the PT slot that corresponds to a VA */
 static __inline pt_entry_t *
+pmap_pde_to_pte(pd_entry_t *pde, vm_offset_t va)
+{
+	pt_entry_t *pte;
+
+	pte = (pt_entry_t *)PHYS_TO_DMAP(*pde & PG_FRAME);
+	return (&pte[pmap_pte_index(va)]);
+}
+
+/* Return a pointer to the PT slot that corresponds to a VA */
+static __inline pt_entry_t *
 pmap_pte(pmap_t pmap, vm_offset_t va)
 {
 	pd_entry_t *pde;
-	pt_entry_t *pte;
 
 	pde = pmap_pde(pmap, va);
 	if (pde == NULL || (*pde & PG_V) == 0)
 		return NULL;
 	if ((*pde & PG_PS) != 0)	/* compat with i386 pmap_pte() */
 		return ((pt_entry_t *)pde);
-	pte = (pt_entry_t *)PHYS_TO_DMAP(*pde & PG_FRAME);
-	return (&pte[pmap_pte_index(va)]);
+	return (pmap_pde_to_pte(pde, va));
 }
 
 
@@ -337,7 +345,6 @@
 pmap_pte_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *ptepde)
 {
 	pd_entry_t *pde;
-	pt_entry_t *pte;
 
 	pde = pmap_pde(pmap, va);
 	if (pde == NULL || (*pde & PG_V) == 0)
@@ -345,8 +352,7 @@
 	*ptepde = *pde;
 	if ((*pde & PG_PS) != 0)	/* compat with i386 pmap_pte() */
 		return ((pt_entry_t *)pde);
-	pte = (pt_entry_t *)PHYS_TO_DMAP(*pde & PG_FRAME);
-	return (&pte[pmap_pte_index(va)]);
+	return (pmap_pde_to_pte(pde, va));
 }
 
 
@@ -1630,9 +1636,9 @@
 		if (va_next > eva)
 			va_next = eva;
 
-		for (; sva != va_next; sva += PAGE_SIZE) {
-			pte = pmap_pte(pmap, sva);
-			if (pte == NULL || *pte == 0)
+		for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++,
+		    sva += PAGE_SIZE) {
+			if (*pte == 0)
 				continue;
 			anyvalid = 1;
 			if (pmap_remove_pte(pmap, pte, sva, ptpaddr))
@@ -1722,6 +1728,7 @@
 	pml4_entry_t *pml4e;
 	pdp_entry_t *pdpe;
 	pd_entry_t ptpaddr, *pde;
+	pt_entry_t *pte;
 	int anychanged;
 
 	if ((prot & VM_PROT_READ) == VM_PROT_NONE) {
@@ -1777,14 +1784,11 @@
 		if (va_next > eva)
 			va_next = eva;
 
-		for (; sva != va_next; sva += PAGE_SIZE) {
+		for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++,
+		    sva += PAGE_SIZE) {
 			pt_entry_t obits, pbits;
-			pt_entry_t *pte;
 			vm_page_t m;
 
-			pte = pmap_pte(pmap, sva);
-			if (pte == NULL)
-				continue;
 retry:
 			obits = pbits = *pte;
 			if (pbits & PG_MANAGED) {

==== //depot/projects/hammer/sys/arm/arm/trap.c#6 (text+ko) ====

@@ -82,7 +82,7 @@
 #include "opt_ktrace.h"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.5 2004/11/27 06:51:34 das Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.6 2004/12/02 23:31:48 cognet Exp $");
 
 #include <sys/types.h>
 
@@ -94,6 +94,7 @@
 #include <sys/mutex.h>
 #include <sys/syscall.h>
 #include <sys/sysent.h>
+#include <sys/signalvar.h>
 #ifdef KTRACE
 #include <sys/uio.h>
 #include <sys/ktrace.h>

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

@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: dbcmds - debug commands and output routines
- *              $Revision: 113 $
+ *              $Revision: 115 $
  *
  ******************************************************************************/
 
@@ -124,6 +124,9 @@
 #include "acresrc.h"
 #include "acdisasm.h"
 
+
+#include "acparser.h"
+
 #ifdef ACPI_DEBUGGER
 
 #define _COMPONENT          ACPI_CA_DEBUGGER
@@ -157,6 +160,18 @@
 };
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbSleep
+ *
+ * PARAMETERS:  ObjectArg       - Desired sleep state (0-5)
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Simulate a sleep/wake sequence
+ *
+ ******************************************************************************/
+
 ACPI_STATUS
 AcpiDbSleep (
     char                    *ObjectArg)
@@ -507,6 +522,71 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDbDisassembleMethod
+ *
+ * PARAMETERS:  Method              - Name of control method
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Display disassembled AML (ASL) starting from Op for the number
+ *              of statements specified.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDbDisassembleMethod (
+    char                    *Name)
+{
+    ACPI_STATUS             Status;
+    ACPI_PARSE_OBJECT       *Op;
+    ACPI_WALK_STATE         *WalkState;
+    ACPI_OPERAND_OBJECT     *ObjDesc;
+    ACPI_NAMESPACE_NODE     *Method;
+
+
+    Method = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ACPI_STRTOUL (Name, NULL, 16));
+    if (!Method)
+    {
+        return (AE_BAD_PARAMETER);
+    }
+
+    ObjDesc = Method->Object;
+
+    Op = AcpiPsCreateScopeOp ();
+    if (!Op)
+    {
+        return (AE_NO_MEMORY);
+    }
+
+    /* Create and initialize a new walk state */
+
+    WalkState = AcpiDsCreateWalkState (0, Op, NULL, NULL);
+    if (!WalkState)
+    {
+        return (AE_NO_MEMORY);
+    }
+
+    Status = AcpiDsInitAmlWalk (WalkState, Op, NULL,
+                    ObjDesc->Method.AmlStart,
+                    ObjDesc->Method.AmlLength, NULL, 1);
+    if (ACPI_FAILURE (Status))
+    {
+        return (Status);
+    }
+
+    /* Parse the AML */
+
+    WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
+    Status = AcpiPsParseAml (WalkState);
+
+    AcpiDmDisassemble (NULL, Op, 0);
+    AcpiPsDeleteParseTree (Op);
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDbDumpNamespace
  *
  * PARAMETERS:  StartArg        - Node to begin namespace dump
@@ -838,6 +918,8 @@
 
     if (ObjDesc)
     {
+        AcpiOsPrintf ("  %p/%p", ObjHandle, ObjDesc);
+
         switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
         {
         case ACPI_TYPE_METHOD:

==== //depot/projects/hammer/sys/contrib/dev/acpica/hwregs.c#11 (text+ko) ====

@@ -3,7 +3,7 @@
  *
  * Module Name: hwregs - Read/write access functions for the various ACPI
  *                       control and status registers.
- *              $Revision: 156 $
+ *              $Revision: 162 $
  *
  ******************************************************************************/
 
@@ -135,6 +135,7 @@
  * RETURN:      none
  *
  * DESCRIPTION: Clears all fixed and general purpose status bits
+ *              THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
  *
  ******************************************************************************/
 
@@ -182,7 +183,7 @@
 
     /* Clear the GPE Bits in all GPE registers in all GPE blocks */
 
-    Status = AcpiEvWalkGpeList (AcpiHwClearGpeBlock);
+    Status = AcpiEvWalkGpeList (AcpiHwClearGpeBlock, ACPI_ISR);
 
 UnlockAndExit:
     if (Flags & ACPI_MTX_LOCK)
@@ -337,8 +338,8 @@
  *              ReturnValue     - Value that was read from the register
  *              Flags           - Lock the hardware or not
  *
- * RETURN:      Value is read from specified Register.  Value returned is
- *              normalized to bit0 (is shifted all the way right)
+ * RETURN:      Status and the value read from specified Register.  Value
+ *              returned is normalized to bit0 (is shifted all the way right)
  *
  * DESCRIPTION: ACPI BitRegister read function.
  *
@@ -375,6 +376,8 @@
         }
     }
 
+    /* Read from the register */
+
     Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
                     BitRegInfo->ParentRegister, &RegisterValue);
 
@@ -406,10 +409,10 @@
  *
  * PARAMETERS:  RegisterId      - ID of ACPI BitRegister to access
  *              Value           - (only used on write) value to write to the
- *                                Register, NOT pre-normalized to the bit pos.
+ *                                Register, NOT pre-normalized to the bit pos
  *              Flags           - Lock the hardware or not
  *
- * RETURN:      None
+ * RETURN:      Status
  *
  * DESCRIPTION: ACPI Bit Register write function.
  *
@@ -562,10 +565,11 @@
  *
  * FUNCTION:    AcpiHwRegisterRead
  *
- * PARAMETERS:  UseLock                - Mutex hw access.
- *              RegisterId             - RegisterID + Offset.
+ * PARAMETERS:  UseLock             - Mutex hw access
+ *              RegisterId          - RegisterID + Offset
+ *              ReturnValue         - Value that was read from the register
  *
- * RETURN:      Value read or written.
+ * RETURN:      Status and the value read.
  *
  * DESCRIPTION: Acpi register read function.  Registers are read at the
  *              given offset.
@@ -681,10 +685,11 @@
  *
  * FUNCTION:    AcpiHwRegisterWrite
  *
- * PARAMETERS:  UseLock                - Mutex hw access.
- *              RegisterId             - RegisterID + Offset.
+ * PARAMETERS:  UseLock             - Mutex hw access
+ *              RegisterId          - RegisterID + Offset
+ *              Value               - The value to write
  *
- * RETURN:      Value read or written.
+ * RETURN:      Status
  *
  * DESCRIPTION: Acpi register Write function.  Registers are written at the
  *              given offset.
@@ -807,11 +812,11 @@
  *
  * PARAMETERS:  Width               - 8, 16, or 32
  *              Value               - Where the value is returned
- *              Register            - GAS register structure
+ *              Reg                 - GAS register structure
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Read from either memory, IO, or PCI config space.
+ * DESCRIPTION: Read from either memory or IO space.
  *
  ******************************************************************************/
 
@@ -821,8 +826,7 @@
     UINT32                  *Value,
     ACPI_GENERIC_ADDRESS    *Reg)
 {
-    ACPI_PCI_ID             PciId;
-    UINT16                  PciRegister;
+    UINT64                  Address;
     ACPI_STATUS             Status;
 
 
@@ -834,47 +838,41 @@
      * a non-zero address within. However, don't return an error
      * because the PM1A/B code must not fail if B isn't present.
      */
-    if ((!Reg) ||
-        (!ACPI_VALID_ADDRESS (Reg->Address)))
+    if (!Reg)
+    {
+        return (AE_OK);
+    }
+
+    /* Get a local copy of the address.  Handles possible alignment issues */
+
+    ACPI_MOVE_64_TO_64 (&Address, &Reg->Address);
+    if (!ACPI_VALID_ADDRESS (Address))
     {
         return (AE_OK);
     }
     *Value = 0;
 
     /*
-     * Three address spaces supported:
-     * Memory, IO, or PCI_Config.
+     * Two address spaces supported: Memory or IO.
+     * PCI_Config is not supported here because the GAS struct is insufficient
      */
     switch (Reg->AddressSpaceId)
     {
     case ACPI_ADR_SPACE_SYSTEM_MEMORY:
 
         Status = AcpiOsReadMemory (
-                    (ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (Reg->Address),
+                    (ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (Address),
                     Value, Width);
         break;
 
 
     case ACPI_ADR_SPACE_SYSTEM_IO:
 
-        Status = AcpiOsReadPort ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (Reg->Address),
+        Status = AcpiOsReadPort ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (Address),
                     Value, Width);
         break;
 
 
-    case ACPI_ADR_SPACE_PCI_CONFIG:
-
-        PciId.Segment  = 0;
-        PciId.Bus      = 0;
-        PciId.Device   = ACPI_PCI_DEVICE (ACPI_GET_ADDRESS (Reg->Address));
-        PciId.Function = ACPI_PCI_FUNCTION (ACPI_GET_ADDRESS (Reg->Address));
-        PciRegister    = (UINT16) ACPI_PCI_REGISTER (ACPI_GET_ADDRESS (Reg->Address));
-
-        Status = AcpiOsReadPciConfiguration  (&PciId, PciRegister,
-                    Value, Width);
-        break;
-
-
     default:
         ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
             "Unsupported address space: %X\n", Reg->AddressSpaceId));
@@ -883,7 +881,7 @@
 
     ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Read:  %8.8X width %2d from %8.8X%8.8X (%s)\n",
             *Value, Width,
-            ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Reg->Address)),
+            ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Address)),
             AcpiUtGetRegionName (Reg->AddressSpaceId)));
 
     return (Status);
@@ -896,11 +894,11 @@
  *
  * PARAMETERS:  Width               - 8, 16, or 32
  *              Value               - To be written
- *              Register            - GAS register structure
+ *              Reg                 - GAS register structure
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Write to either memory, IO, or PCI config space.
+ * DESCRIPTION: Write to either memory or IO space.
  *
  ******************************************************************************/
 
@@ -910,8 +908,7 @@
     UINT32                  Value,
     ACPI_GENERIC_ADDRESS    *Reg)
 {
-    ACPI_PCI_ID             PciId;
-    UINT16                  PciRegister;
+    UINT64                  Address;
     ACPI_STATUS             Status;
 
 
@@ -923,46 +920,40 @@
      * a non-zero address within. However, don't return an error
      * because the PM1A/B code must not fail if B isn't present.
      */
-    if ((!Reg) ||
-        (!ACPI_VALID_ADDRESS (Reg->Address)))
+    if (!Reg)
+    {
+        return (AE_OK);
+    }
+
+    /* Get a local copy of the address.  Handles possible alignment issues */
+
+    ACPI_MOVE_64_TO_64 (&Address, &Reg->Address);
+    if (!ACPI_VALID_ADDRESS (Address))
     {
         return (AE_OK);
     }
 
     /*
-     * Three address spaces supported:
-     * Memory, IO, or PCI_Config.
+     * Two address spaces supported: Memory or IO.
+     * PCI_Config is not supported here because the GAS struct is insufficient
      */
     switch (Reg->AddressSpaceId)
     {
     case ACPI_ADR_SPACE_SYSTEM_MEMORY:
 
         Status = AcpiOsWriteMemory (
-                    (ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (Reg->Address),
+                    (ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (Address),
                     Value, Width);
         break;
 
 
     case ACPI_ADR_SPACE_SYSTEM_IO:
 
-        Status = AcpiOsWritePort ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (Reg->Address),
+        Status = AcpiOsWritePort ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (Address),
                     Value, Width);
         break;
 
 
-    case ACPI_ADR_SPACE_PCI_CONFIG:
-
-        PciId.Segment  = 0;
-        PciId.Bus      = 0;
-        PciId.Device   = ACPI_PCI_DEVICE (ACPI_GET_ADDRESS (Reg->Address));
-        PciId.Function = ACPI_PCI_FUNCTION (ACPI_GET_ADDRESS (Reg->Address));
-        PciRegister    = (UINT16) ACPI_PCI_REGISTER (ACPI_GET_ADDRESS (Reg->Address));
-
-        Status = AcpiOsWritePciConfiguration (&PciId, PciRegister,
-                    (ACPI_INTEGER) Value, Width);
-        break;
-
-
     default:
         ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
             "Unsupported address space: %X\n", Reg->AddressSpaceId));
@@ -971,7 +962,7 @@
 
     ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Wrote: %8.8X width %2d   to %8.8X%8.8X (%s)\n",
             Value, Width,
-            ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Reg->Address)),
+            ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Address)),
             AcpiUtGetRegionName (Reg->AddressSpaceId)));
 
     return (Status);

==== //depot/projects/hammer/sys/contrib/dev/acpica/hwsleep.c#11 (text+ko) ====

@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
- *              $Revision: 69 $
+ *              $Revision: 70 $
  *
  *****************************************************************************/
 
@@ -381,14 +381,14 @@
      * 1) Disable/Clear all GPEs
      * 2) Enable all wakeup GPEs
      */
-    Status = AcpiHwDisableAllGpes ();
+    Status = AcpiHwDisableAllGpes (ACPI_ISR);
     if (ACPI_FAILURE (Status))
     {
         return_ACPI_STATUS (Status);
     }
     AcpiGbl_SystemAwakeAndRunning = FALSE;
 
-    Status = AcpiHwEnableAllWakeupGpes ();
+    Status = AcpiHwEnableAllWakeupGpes (ACPI_ISR);
     if (ACPI_FAILURE (Status))
     {
         return_ACPI_STATUS (Status);
@@ -543,14 +543,14 @@
      * 1) Disable/Clear all GPEs
      * 2) Enable all wakeup GPEs
      */
-    Status = AcpiHwDisableAllGpes ();
+    Status = AcpiHwDisableAllGpes (ACPI_ISR);
     if (ACPI_FAILURE (Status))
     {
         return_ACPI_STATUS (Status);
     }
     AcpiGbl_SystemAwakeAndRunning = FALSE;
 
-    Status = AcpiHwEnableAllWakeupGpes ();
+    Status = AcpiHwEnableAllWakeupGpes (ACPI_ISR);
     if (ACPI_FAILURE (Status))
     {
         return_ACPI_STATUS (Status);
@@ -582,6 +582,7 @@
  * RETURN:      Status
  *
  * DESCRIPTION: Perform OS-independent ACPI cleanup after a sleep
+ *              Called with interrupts ENABLED.
  *
  ******************************************************************************/
 
@@ -677,14 +678,14 @@
      * 1) Disable/Clear all GPEs
      * 2) Enable all runtime GPEs
      */
-    Status = AcpiHwDisableAllGpes ();
+    Status = AcpiHwDisableAllGpes (ACPI_NOT_ISR);
     if (ACPI_FAILURE (Status))
     {
         return_ACPI_STATUS (Status);
     }
     AcpiGbl_SystemAwakeAndRunning = TRUE;
 
-    Status = AcpiHwEnableAllRuntimeGpes ();
+    Status = AcpiHwEnableAllRuntimeGpes (ACPI_NOT_ISR);
     if (ACPI_FAILURE (Status))
     {
         return_ACPI_STATUS (Status);

==== //depot/projects/hammer/sys/contrib/dev/acpica/osunixxf.c#5 (text+ko) ====

@@ -185,7 +185,15 @@
     ACPI_POINTER           *Address)
 {
 
+#if 0
+    /* The supporting code for this is not yet available.
+     * Return to the old situation for now.
+     */
     return (AeLocalGetRootPointer(Flags, Address));
+#else
+    return (AE_OK);
+#endif
+
 }
 
 

==== //depot/projects/hammer/sys/contrib/dev/acpica/uteval.c#10 (text+ko) ====

@@ -771,7 +771,7 @@
             {
                 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
                     "%s on Device %4.4s, %s\n",
-                    (char *) (uintptr_t)AcpiGbl_HighestDstateNames[i],
+                    (char *) (uintptr_t) AcpiGbl_HighestDstateNames[i],
                     AcpiUtGetNodeName (DeviceNode),
                     AcpiFormatException (Status)));
 

==== //depot/projects/hammer/sys/contrib/dev/acpica/utglobal.c#12 (text+ko) ====

@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: utglobal - Global variables for the ACPI subsystem
- *              $Revision: 201 $
+ *              $Revision: 202 $
  *
  *****************************************************************************/
 
@@ -947,6 +947,7 @@
 
     AcpiGbl_SystemNotify.Handler        = NULL;
     AcpiGbl_DeviceNotify.Handler        = NULL;
+    AcpiGbl_ExceptionHandler            = NULL;
     AcpiGbl_InitHandler                 = NULL;
 
     /* Global "typed" ACPI table pointers */

==== //depot/projects/hammer/sys/dev/acpica/Osd/OsdInterrupt.c#8 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/Osd/OsdInterrupt.c,v 1.18 2004/08/13 06:22:24 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/Osd/OsdInterrupt.c,v 1.19 2004/12/02 00:25:35 marks Exp $
  */
 
 /*
@@ -48,7 +48,7 @@
 
 ACPI_STATUS
 AcpiOsInstallInterruptHandler(UINT32 InterruptNumber,
-    OSD_HANDLER ServiceRoutine, void *Context)
+    ACPI_OSD_HANDLER ServiceRoutine, void *Context)
 {
     struct acpi_softc	*sc;
 
@@ -105,7 +105,7 @@
 }
 
 ACPI_STATUS
-AcpiOsRemoveInterruptHandler(UINT32 InterruptNumber, OSD_HANDLER ServiceRoutine)
+AcpiOsRemoveInterruptHandler(UINT32 InterruptNumber, ACPI_OSD_HANDLER ServiceRoutine)
 {
     struct acpi_softc	*sc;
 

==== //depot/projects/hammer/sys/dev/acpica/Osd/OsdSchedule.c#10 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/acpica/Osd/OsdSchedule.c,v 1.29 2004/08/13 06:22:26 njl Exp $
+ *	$FreeBSD: src/sys/dev/acpica/Osd/OsdSchedule.c,v 1.30 2004/12/02 00:25:35 marks Exp $
  */
 
 /*
@@ -60,7 +60,7 @@
 
 struct acpi_task {
     struct task			at_task;
-    OSD_EXECUTION_CALLBACK	at_function;
+    ACPI_OSD_EXEC_CALLBACK	at_function;
     void			*at_context;
 };
 
@@ -98,7 +98,7 @@
 acpi_task_thread(void *arg)
 {
     struct acpi_task_queue	*atq;
-    OSD_EXECUTION_CALLBACK	Function;
+    ACPI_OSD_EXEC_CALLBACK	Function;
     void			*Context;
 
     ACPI_LOCK(taskq);
@@ -108,7 +108,7 @@
 	STAILQ_REMOVE_HEAD(&acpi_task_queue, at_q);
 	ACPI_UNLOCK(taskq);
 
-	Function = (OSD_EXECUTION_CALLBACK)atq->at->at_function;
+	Function = (ACPI_OSD_EXEC_CALLBACK)atq->at->at_function;
 	Context = atq->at->at_context;
 
 	Function(Context);
@@ -143,7 +143,7 @@
 
 /* This function is called in interrupt context. */
 ACPI_STATUS
-AcpiOsQueueForExecution(UINT32 Priority, OSD_EXECUTION_CALLBACK Function,
+AcpiOsQueueForExecution(UINT32 Priority, ACPI_OSD_EXEC_CALLBACK Function,
     void *Context)
 {
     struct acpi_task	*at;
@@ -188,7 +188,7 @@
 AcpiOsExecuteQueue(void *arg, int pending)
 {
     struct acpi_task_queue	*atq;
-    OSD_EXECUTION_CALLBACK	Function;
+    ACPI_OSD_EXEC_CALLBACK	Function;
     void			*Context;
 
     ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);

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



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