svn commit: r209545 - in projects/ppc64: .
cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts
etc/mtree games/fortune/datfiles gnu/usr.bin/binutils/ld
lib/libc/mips/sys lib/libc/sys libexec/rtld-...
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sat Jun 26 22:26:54 UTC 2010
Author: nwhitehorn
Date: Sat Jun 26 22:26:53 2010
New Revision: 209545
URL: http://svn.freebsd.org/changeset/base/209545
Log:
IFC @ r209544
Added:
projects/ppc64/Makefile.mips
- copied unchanged from r209511, head/Makefile.mips
projects/ppc64/share/man/man4/aibs.4
- copied unchanged from r209544, head/share/man/man4/aibs.4
projects/ppc64/sys/dev/acpi_support/atk0110.c
- copied unchanged from r209544, head/sys/dev/acpi_support/atk0110.c
projects/ppc64/sys/modules/acpi/aibs/
- copied from r209544, head/sys/modules/acpi/aibs/
projects/ppc64/usr.sbin/pc-sysinstall/
- copied from r209544, head/usr.sbin/pc-sysinstall/
Modified:
projects/ppc64/Makefile.inc1
projects/ppc64/etc/mtree/BSD.usr.dist
projects/ppc64/games/fortune/datfiles/fortunes-o.real
projects/ppc64/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh
projects/ppc64/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh
projects/ppc64/lib/libc/mips/sys/brk.S
projects/ppc64/lib/libc/mips/sys/sbrk.S
projects/ppc64/lib/libc/sys/getgroups.2
projects/ppc64/libexec/rtld-elf/rtld.c
projects/ppc64/share/man/man4/Makefile
projects/ppc64/sys/conf/files
projects/ppc64/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
projects/ppc64/sys/dev/e1000/if_igb.c
projects/ppc64/sys/geom/part/g_part.c
projects/ppc64/sys/geom/part/g_part.h
projects/ppc64/sys/geom/part/g_part_mbr.c
projects/ppc64/sys/i386/conf/NOTES
projects/ppc64/sys/kern/uipc_syscalls.c
projects/ppc64/sys/kern/vfs_vnops.c
projects/ppc64/sys/modules/acpi/Makefile
projects/ppc64/sys/sys/diskmbr.h
projects/ppc64/usr.sbin/Makefile
Directory Properties:
projects/ppc64/ (props changed)
projects/ppc64/cddl/contrib/opensolaris/ (props changed)
projects/ppc64/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl (props changed)
projects/ppc64/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl (props changed)
projects/ppc64/contrib/ee/ (props changed)
projects/ppc64/contrib/expat/ (props changed)
projects/ppc64/contrib/file/ (props changed)
projects/ppc64/contrib/gdb/ (props changed)
projects/ppc64/contrib/gnu-sort/ (props changed)
projects/ppc64/contrib/groff/ (props changed)
projects/ppc64/contrib/less/ (props changed)
projects/ppc64/contrib/libpcap/ (props changed)
projects/ppc64/contrib/ncurses/ (props changed)
projects/ppc64/contrib/one-true-awk/ (props changed)
projects/ppc64/contrib/openbsm/ (props changed)
projects/ppc64/contrib/openpam/ (props changed)
projects/ppc64/contrib/pf/ (props changed)
projects/ppc64/contrib/tcpdump/ (props changed)
projects/ppc64/contrib/tcsh/ (props changed)
projects/ppc64/contrib/tzcode/stdtime/ (props changed)
projects/ppc64/contrib/tzcode/zic/ (props changed)
projects/ppc64/contrib/tzdata/ (props changed)
projects/ppc64/contrib/wpa/ (props changed)
projects/ppc64/lib/libutil/ (props changed)
projects/ppc64/lib/libz/ (props changed)
projects/ppc64/sbin/ (props changed)
projects/ppc64/sbin/ipfw/ (props changed)
projects/ppc64/share/mk/bsd.arch.inc.mk (props changed)
projects/ppc64/sys/ (props changed)
projects/ppc64/sys/amd64/include/xen/ (props changed)
projects/ppc64/sys/arm/conf/SHEEVAPLUG (props changed)
projects/ppc64/sys/cddl/contrib/opensolaris/ (props changed)
projects/ppc64/sys/contrib/dev/acpica/ (props changed)
projects/ppc64/sys/contrib/x86emu/ (props changed)
projects/ppc64/sys/dev/xen/xenpci/ (props changed)
projects/ppc64/usr.bin/csup/ (props changed)
projects/ppc64/usr.bin/procstat/ (props changed)
Modified: projects/ppc64/Makefile.inc1
==============================================================================
--- projects/ppc64/Makefile.inc1 Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/Makefile.inc1 Sat Jun 26 22:26:53 2010 (r209545)
@@ -30,9 +30,7 @@
.include <bsd.own.mk>
-.if ${MACHINE_ARCH} == "mips"
-MK_RESCUE=no # not yet
-.endif
+.include <bsd.arch.inc.mk>
# We must do share/info early so that installation of info `dir'
# entries works correctly. Do it first since it is less likely to
@@ -167,7 +165,7 @@ BUILD_ARCH!= uname -p
.if ${MACHINE} == ${TARGET} && !defined(CROSS_BUILD_TESTING)
OBJTREE= ${MAKEOBJDIRPREFIX}
.else
-OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}
+OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH}
.endif
WORLDTMP= ${OBJTREE}${.CURDIR}/tmp
# /usr/games added for fortune which depend on strfile
@@ -1126,8 +1124,12 @@ _prereq_libs= gnu/lib/libssp/libssp_nons
_startup_libs= gnu/lib/csu
.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf)
_startup_libs+= lib/csu/${MACHINE_ARCH}-elf
-.else
+.elif exists(${.CURDIR}/lib/csu/${MACHINE_CPUARCH}-elf)
+_startup_libs+= lib/csu/${MACHINE_CPUARCH}-elf
+.elif exists(${.CURDIR}/lib/csu/${MACHINE_ARCH})
_startup_libs+= lib/csu/${MACHINE_ARCH}
+.else
+_startup_libs+= lib/csu/${MACHINE_CPUARCH}
.endif
_startup_libs+= gnu/lib/libgcc
_startup_libs+= lib/libc
Copied: projects/ppc64/Makefile.mips (from r209511, head/Makefile.mips)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ppc64/Makefile.mips Sat Jun 26 22:26:53 2010 (r209545, copy of r209511, head/Makefile.mips)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+# A bug in binutils prevents rescue from building, so override the user's
+# choice.
+MK_RESCUE=no
Modified: projects/ppc64/etc/mtree/BSD.usr.dist
==============================================================================
--- projects/ppc64/etc/mtree/BSD.usr.dist Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/etc/mtree/BSD.usr.dist Sat Jun 26 22:26:53 2010 (r209545)
@@ -261,6 +261,8 @@
..
nwclient
..
+ pc-sysinstall
+ ..
perfmon
..
pf
@@ -1226,6 +1228,20 @@
..
..
..
+ pc-sysinstall
+ backend
+ ..
+ backend-partmanager
+ ..
+ backend-query
+ ..
+ conf
+ license
+ ..
+ ..
+ doc
+ ..
+ ..
security
..
sendmail
Modified: projects/ppc64/games/fortune/datfiles/fortunes-o.real
==============================================================================
--- projects/ppc64/games/fortune/datfiles/fortunes-o.real Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/games/fortune/datfiles/fortunes-o.real Sat Jun 26 22:26:53 2010 (r209545)
@@ -12433,6 +12433,39 @@ And sure enough she'll take you home and
(chorus)
-- Crosby, Stills, Nash, "Fair Game"
%
+Taken from actual police car videos:
+
+(15) Relax! The handcuffs are tight because they're new. They'll
+ stretch out after you wear them awhile.
+(14) Take your hands off the car and I'll make your birth certificate
+ a worthless document.
+(13) If you run you'll only go to jail tired.
+(12) Can you run faster than 1200 feet per second? In case you didn't
+ know that's the average speed of a 9 mm bullet fired from my gun.
+(11) So you don't know how fast you were going. I guess that means I
+ can write anything I want on the ticket, huh?
+(10) Yes, sir, you can talk to the shift supervisor, but I don't think
+ it will help. Oh, did I mention that I AM the shift supervisor?
+(9) Warning? You want a warning? OK, I'm warning you not to do that
+ again or I'll give you another ticket.
+(8) The answer to this last question will determine whether you are
+ drunk or not. Is Mickey Mouse a cat or a dog?
+%
+Taken from actual police car videos:
+
+(7) Fair? You want me to be fair? Listen, fair is a place where you
+ go to ride on rides, eat cotton candy, and step in monkey poop.
+(6) Yeah, we have a quota. Two more tickets and my wife gets a toaster
+ oven.
+(5) No, sir, we don't have quotas anymore. We used to have quotas but
+ now we're allowed to write as many tickets as we want.
+(4) Just how big were those two beers?
+(3) In God we trust, all others we run through CPIC/NCIC.
+(2) I'm glad to hear the Chief of Police is a good personal friend of
+ yours. At least you know someone who can post your bail.
+(1) You didn't think we gave pretty women tickets?
+ You're right, we don't -- sign here.
+%
Taoism: Shit Happens.
Confucianism: Confucius say, "Shit Happens".
Buddhism: If shit happens, it isn't really shit.
Modified: projects/ppc64/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh
==============================================================================
--- projects/ppc64/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/gnu/usr.bin/binutils/ld/elf32btsmipn32_fbsd.sh Sat Jun 26 22:26:53 2010 (r209545)
@@ -2,3 +2,4 @@
. ${srcdir}/emulparams/elf32btsmipn32.sh
. ${srcdir}/emulparams/elf_fbsd.sh
GENERATE_PIE_SCRIPT=yes
+ALIGNMENT=8
Modified: projects/ppc64/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh
==============================================================================
--- projects/ppc64/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/gnu/usr.bin/binutils/ld/elf32ltsmipn32_fbsd.sh Sat Jun 26 22:26:53 2010 (r209545)
@@ -2,3 +2,4 @@
. ${srcdir}/emulparams/elf32ltsmipn32.sh
. ${srcdir}/emulparams/elf_fbsd.sh
GENERATE_PIE_SCRIPT=yes
+ALIGNMENT=8
Modified: projects/ppc64/lib/libc/mips/sys/brk.S
==============================================================================
--- projects/ppc64/lib/libc/mips/sys/brk.S Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/lib/libc/mips/sys/brk.S Sat Jun 26 22:26:53 2010 (r209545)
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$");
.data
_C_LABEL(minbrk):
- .word _C_LABEL(_end)
+ PTR_WORD _C_LABEL(_end)
.text
LEAF(__sys_brk)
Modified: projects/ppc64/lib/libc/mips/sys/sbrk.S
==============================================================================
--- projects/ppc64/lib/libc/mips/sys/sbrk.S Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/lib/libc/mips/sys/sbrk.S Sat Jun 26 22:26:53 2010 (r209545)
@@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
.data
_C_LABEL(__curbrk):
- .word _C_LABEL(_end)
+ PTR_WORD _C_LABEL(_end)
.text
LEAF(__sys_sbrk)
Modified: projects/ppc64/lib/libc/sys/getgroups.2
==============================================================================
--- projects/ppc64/lib/libc/sys/getgroups.2 Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/lib/libc/sys/getgroups.2 Sat Jun 26 22:26:53 2010 (r209545)
@@ -37,7 +37,7 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
-.In sys/types.h
+.In sys/param.h
.In unistd.h
.Ft int
.Fn getgroups "int gidsetlen" "gid_t *gidset"
Modified: projects/ppc64/libexec/rtld-elf/rtld.c
==============================================================================
--- projects/ppc64/libexec/rtld-elf/rtld.c Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/libexec/rtld-elf/rtld.c Sat Jun 26 22:26:53 2010 (r209545)
@@ -3443,9 +3443,13 @@ locate_dependency(const Obj_Entry *obj,
if (object_match_name(needed->obj, name))
return needed->obj;
}
- _rtld_error("%s: Unexpected inconsistency: dependency %s not found",
- obj->path, name);
- die();
+
+ /*
+ * GNU LD sometimes refers to version dependencies on objects to which
+ * it does not actually link. Treat this as a non-fatal error, and
+ * ignore this dependency.
+ */
+ return NULL;
}
static int
@@ -3567,6 +3571,9 @@ rtld_verify_object_versions(Obj_Entry *o
vn = obj->verneed;
while (vn != NULL) {
depobj = locate_dependency(obj, obj->strtab + vn->vn_file);
+ if (depobj == NULL)
+ break;
+
vna = (const Elf_Vernaux *) ((char *)vn + vn->vn_aux);
for (;;) {
if (check_object_provided_version(obj, depobj, vna))
Modified: projects/ppc64/share/man/man4/Makefile
==============================================================================
--- projects/ppc64/share/man/man4/Makefile Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/share/man/man4/Makefile Sat Jun 26 22:26:53 2010 (r209545)
@@ -26,6 +26,7 @@ MAN= aac.4 \
ahc.4 \
ahci.4 \
ahd.4 \
+ ${_aibs.4} \
aio.4 \
alc.4 \
ale.4 \
@@ -633,6 +634,7 @@ _acpi_panasonic.4=acpi_panasonic.4
_acpi_sony.4= acpi_sony.4
_acpi_toshiba.4=acpi_toshiba.4
_acpi_wmi.4= acpi_wmi.4
+_aibs.4= aibs.4
_amdsbwd.4= amdsbwd.4
_amdsmb.4= amdsmb.4
_amdtemp.4= amdtemp.4
Copied: projects/ppc64/share/man/man4/aibs.4 (from r209544, head/share/man/man4/aibs.4)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ppc64/share/man/man4/aibs.4 Sat Jun 26 22:26:53 2010 (r209545, copy of r209544, head/share/man/man4/aibs.4)
@@ -0,0 +1,209 @@
+.\" $FreeBSD$
+.\" $NetBSD: aibs.4,v 1.2 2010/02/09 05:37:25 cnst Exp $
+.\" $OpenBSD: aibs.4,v 1.4 2009/07/30 06:30:45 jmc Exp $
+.\"
+.\" Copyright (c) 2009/2010 Constantine A. Murenin <cnst++ at FreeBSD.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd April 4, 2010
+.Dt AIBS 4
+.Os
+.Sh NAME
+.Nm aibs
+.Nd "ASUSTeK AI Booster ACPI ATK0110 voltage, temperature and fan sensor"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device acpi"
+.Cd "device aibs"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following lines in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+acpi_load="YES"
+aibs_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the voltage, temperature and fan sensors
+available through the
+.Tn ATK0110
+.Tn ASOC
+.Tn ACPI
+device
+on
+.Tn ASUSTeK
+motherboards.
+The number of sensors of each type,
+as well as the description of each sensor,
+varies according to the motherboard.
+.Pp
+The driver supports an arbitrary set of sensors,
+provides descriptions regarding what each sensor is used for,
+and reports the current values as well as
+the supposed range specifications of each sensor's input
+as defined by the motherboard manufacturer through
+.Tn ACPI .
+.Pp
+The range specifications are as follows:
+.Bl -bullet
+.It
+Voltage sensors have a lower and an upper range specification.
+.It
+Temperature sensors have two upper specifications.
+.It
+Fan sensors may either have only the lower specification,
+or, depending on the
+.Tn DSDT ,
+one lower and one upper specification.
+.El
+.Pp
+Sensor readings and the range specifications are made available through the
+.Xr sysctl 3
+interface,
+and can be monitored with
+.Xr sysctl 8 .
+For example, on an ASUS V3-P5G965 barebone:
+.Bd -literal -offset indent
+> sysctl dev.aibs.0.{volt,temp,fan}
+dev.aibs.0.volt.0: 1192 850 1600
+dev.aibs.0.volt.1: 3312 2970 3630
+dev.aibs.0.volt.2: 5017 4500 5500
+dev.aibs.0.volt.3: 12302 10200 13800
+dev.aibs.0.temp.0: 28.0C 80.0C 95.0C
+dev.aibs.0.temp.1: 55.0C 60.0C 95.0C
+dev.aibs.0.fan.0: 878 600 7200
+dev.aibs.0.fan.1: 0 700 7200
+.Pp
+> sysctl -d dev.aibs.0.{volt,temp,fan}
+dev.aibs.0.volt:
+dev.aibs.0.volt.0: Vcore Voltage
+dev.aibs.0.volt.1: +3.3 Voltage
+dev.aibs.0.volt.2: +5 Voltage
+dev.aibs.0.volt.3: +12 Voltage
+dev.aibs.0.temp:
+dev.aibs.0.temp.0: CPU Temperature
+dev.aibs.0.temp.1: MB Temperature
+dev.aibs.0.fan:
+dev.aibs.0.fan.0: CPU FAN Speed
+dev.aibs.0.fan.1: CHASSIS FAN Speed
+.Ed
+.Pp
+Generally, sensors provided by the
+.Nm
+driver may also be supported by certain other drivers or utilities
+that access the
+.Tn ISA /
+.Tn LPC
+or
+.Tn I2C /
+.Tn SMBus
+devices directly.
+The precise collection of
+.Nm
+sensors is comprised of the sensors
+specifically utilised in the motherboard
+design, which may be supported through
+a combination of one or more physical hardware monitoring chips.
+.Pp
+The
+.Nm
+driver, however, provides the following advantages
+when compared to the native hardware monitoring drivers or other utilities:
+.Bl -bullet
+.It
+Sensor values from
+.Nm
+are expected to be more reliable.
+For example, voltage sensors in many hardware monitoring chips
+can only sense voltage from 0 to 2 or 4 volts, and the excessive
+voltage is removed by the resistors, which may vary with the motherboard
+and with the voltage that is being sensed.
+In
+.Nm ,
+the required resistor factors are provided by
+the motherboard manufacturer through
+.Tn ACPI ;
+in the native drivers, the resistor factors
+are encoded into the driver based on the chip manufacturer's recommendations.
+In essence, sensor values from
+.Nm
+are very likely to be identical to the readings from the
+Hardware Monitor screen in the BIOS.
+.It
+Sensor descriptions from
+.Nm
+are more likely to match the markings on the motherboard.
+.It
+Sensor range specifications are supported by
+.Nm .
+The range specification is reported
+for each individual sensor as suggested by the motherboard manufacturer.
+For example, the threshold for the CPU temperature sensor is likely
+to be significantly higher than that for the chassis temperature sensor.
+.It
+Support for newer chips in
+.Nm .
+Newer chips may miss a native driver,
+but should be supported through
+.Nm
+regardless.
+.El
+.Sh SEE ALSO
+.Xr sysctl 3 ,
+.Xr acpi 4 ,
+.Xr sysctl 8
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 4.7 ,
+.Dx 2.5 ,
+.Nx 6.0
+and
+.Fx 9.0 .
+.Pp
+An earlier version of the driver,
+.Nm acpi_aiboost ,
+first appeared in
+.Fx 7.0
+and
+.Nx 5.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written for
+.Ox ,
+.Dx ,
+.Nx
+and
+.Fx
+by
+.An Constantine A. Murenin Aq cnst at FreeBSD.org ,
+Raouf Boutaba Research Group,
+David R. Cheriton School of Computer Science,
+University of Waterloo.
+.Pp
+An earlier version of the driver, named
+.Nm acpi_aiboost ,
+was written for
+.Fx
+by
+.An Takanori Watanabe .
Modified: projects/ppc64/sys/conf/files
==============================================================================
--- projects/ppc64/sys/conf/files Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/sys/conf/files Sat Jun 26 22:26:53 2010 (r209545)
@@ -436,6 +436,7 @@ dev/acpi_support/acpi_ibm.c optional acp
dev/acpi_support/acpi_panasonic.c optional acpi_panasonic acpi
dev/acpi_support/acpi_sony.c optional acpi_sony acpi
dev/acpi_support/acpi_toshiba.c optional acpi_toshiba acpi
+dev/acpi_support/atk0110.c optional aibs acpi
dev/acpica/Osd/OsdDebug.c optional acpi
dev/acpica/Osd/OsdHardware.c optional acpi
dev/acpica/Osd/OsdInterrupt.c optional acpi
Copied: projects/ppc64/sys/dev/acpi_support/atk0110.c (from r209544, head/sys/dev/acpi_support/atk0110.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ppc64/sys/dev/acpi_support/atk0110.c Sat Jun 26 22:26:53 2010 (r209545, copy of r209544, head/sys/dev/acpi_support/atk0110.c)
@@ -0,0 +1,358 @@
+/* $NetBSD: atk0110.c,v 1.4 2010/02/11 06:54:57 cnst Exp $ */
+/* $OpenBSD: atk0110.c,v 1.1 2009/07/23 01:38:16 cnst Exp $ */
+
+/*
+ * Copyright (c) 2009, 2010 Constantine A. Murenin <cnst++ at FreeBSD.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <machine/_inttypes.h>
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/bus.h>
+#include <sys/module.h>
+#include <sys/malloc.h>
+#include <sys/sysctl.h>
+
+#include <contrib/dev/acpica/include/acpi.h>
+#include <dev/acpica/acpivar.h>
+
+/*
+ * ASUSTeK AI Booster (ACPI ASOC ATK0110).
+ *
+ * This code was originally written for OpenBSD after the techniques
+ * described in the Linux's asus_atk0110.c and FreeBSD's Takanori Watanabe's
+ * acpi_aiboost.c were verified to be accurate on the actual hardware kindly
+ * provided by Sam Fourman Jr. It was subsequently ported from OpenBSD to
+ * DragonFly BSD, to NetBSD's sysmon_envsys(9) and to FreeBSD's sysctl(9).
+ *
+ * -- Constantine A. Murenin <http://cnst.su/>
+ */
+
+#define _COMPONENT ACPI_OEM
+ACPI_MODULE_NAME("aibs");
+ACPI_SERIAL_DECL(aibs, "aibs");
+
+#define AIBS_MORE_SENSORS
+#define AIBS_VERBOSE
+
+enum aibs_type {
+ AIBS_VOLT,
+ AIBS_TEMP,
+ AIBS_FAN
+};
+
+struct aibs_sensor {
+ ACPI_INTEGER v;
+ ACPI_INTEGER i;
+ ACPI_INTEGER l;
+ ACPI_INTEGER h;
+ enum aibs_type t;
+};
+
+struct aibs_softc {
+ struct device *sc_dev;
+ ACPI_HANDLE sc_ah;
+
+ struct aibs_sensor *sc_asens_volt;
+ struct aibs_sensor *sc_asens_temp;
+ struct aibs_sensor *sc_asens_fan;
+};
+
+static int aibs_probe(device_t);
+static int aibs_attach(device_t);
+static int aibs_detach(device_t);
+static int aibs_sysctl(SYSCTL_HANDLER_ARGS);
+
+static void aibs_attach_sif(struct aibs_softc *, enum aibs_type);
+
+static device_method_t aibs_methods[] = {
+ DEVMETHOD(device_probe, aibs_probe),
+ DEVMETHOD(device_attach, aibs_attach),
+ DEVMETHOD(device_detach, aibs_detach),
+ { NULL, NULL }
+};
+
+static driver_t aibs_driver = {
+ "aibs",
+ aibs_methods,
+ sizeof(struct aibs_softc)
+};
+
+static devclass_t aibs_devclass;
+
+DRIVER_MODULE(aibs, acpi, aibs_driver, aibs_devclass, NULL, NULL);
+
+
+static char* aibs_hids[] = {
+ "ATK0110",
+ NULL
+};
+
+static int
+aibs_probe(device_t dev)
+{
+ if (acpi_disabled("aibs") ||
+ ACPI_ID_PROBE(device_get_parent(dev), dev, aibs_hids) == NULL)
+ return ENXIO;
+
+ device_set_desc(dev, "ASUSTeK AI Booster (ACPI ASOC ATK0110)");
+ return 0;
+}
+
+static int
+aibs_attach(device_t dev)
+{
+ struct aibs_softc *sc = device_get_softc(dev);
+
+ sc->sc_dev = dev;
+ sc->sc_ah = acpi_get_handle(dev);
+
+ aibs_attach_sif(sc, AIBS_VOLT);
+ aibs_attach_sif(sc, AIBS_TEMP);
+ aibs_attach_sif(sc, AIBS_FAN);
+
+ return 0;
+}
+
+static void
+aibs_attach_sif(struct aibs_softc *sc, enum aibs_type st)
+{
+ ACPI_STATUS s;
+ ACPI_BUFFER b;
+ ACPI_OBJECT *bp, *o;
+ int i, n;
+ const char *node;
+ char name[] = "?SIF";
+ struct aibs_sensor *as;
+ struct sysctl_oid *so;
+
+ switch (st) {
+ case AIBS_VOLT:
+ node = "volt";
+ name[0] = 'V';
+ break;
+ case AIBS_TEMP:
+ node = "temp";
+ name[0] = 'T';
+ break;
+ case AIBS_FAN:
+ node = "fan";
+ name[0] = 'F';
+ break;
+ default:
+ return;
+ }
+
+ b.Length = ACPI_ALLOCATE_BUFFER;
+ s = AcpiEvaluateObjectTyped(sc->sc_ah, name, NULL, &b,
+ ACPI_TYPE_PACKAGE);
+ if (ACPI_FAILURE(s)) {
+ device_printf(sc->sc_dev, "%s not found\n", name);
+ return;
+ }
+
+ bp = b.Pointer;
+ o = bp->Package.Elements;
+ if (o[0].Type != ACPI_TYPE_INTEGER) {
+ device_printf(sc->sc_dev, "%s[0]: invalid type\n", name);
+ AcpiOsFree(b.Pointer);
+ return;
+ }
+
+ n = o[0].Integer.Value;
+ if (bp->Package.Count - 1 < n) {
+ device_printf(sc->sc_dev, "%s: invalid package\n", name);
+ AcpiOsFree(b.Pointer);
+ return;
+ } else if (bp->Package.Count - 1 > n) {
+ int on = n;
+
+#ifdef AIBS_MORE_SENSORS
+ n = bp->Package.Count - 1;
+#endif
+ device_printf(sc->sc_dev, "%s: malformed package: %i/%i"
+ ", assume %i\n", name, on, bp->Package.Count - 1, n);
+ }
+ if (n < 1) {
+ device_printf(sc->sc_dev, "%s: no members in the package\n",
+ name);
+ AcpiOsFree(b.Pointer);
+ return;
+ }
+
+ as = malloc(sizeof(*as) * n, M_DEVBUF, M_NOWAIT | M_ZERO);
+ if (as == NULL) {
+ device_printf(sc->sc_dev, "%s: malloc fail\n", name);
+ AcpiOsFree(b.Pointer);
+ return;
+ }
+ switch (st) {
+ case AIBS_VOLT:
+ sc->sc_asens_volt = as;
+ break;
+ case AIBS_TEMP:
+ sc->sc_asens_temp = as;
+ break;
+ case AIBS_FAN:
+ sc->sc_asens_fan = as;
+ break;
+ }
+
+ /* sysctl subtree for sensors of this type */
+ so = SYSCTL_ADD_NODE(device_get_sysctl_ctx(sc->sc_dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev)), st,
+ node, CTLFLAG_RD, NULL, NULL);
+
+ for (i = 0, o++; i < n; i++, o++) {
+ ACPI_OBJECT *oi;
+ char si[3];
+ const char *desc;
+
+ /* acpica5 automatically evaluates the referenced package */
+ if (o[0].Type != ACPI_TYPE_PACKAGE) {
+ device_printf(sc->sc_dev,
+ "%s: %i: not a package: %i type\n",
+ name, i, o[0].Type);
+ continue;
+ }
+ oi = o[0].Package.Elements;
+ if (o[0].Package.Count != 5 ||
+ oi[0].Type != ACPI_TYPE_INTEGER ||
+ oi[1].Type != ACPI_TYPE_STRING ||
+ oi[2].Type != ACPI_TYPE_INTEGER ||
+ oi[3].Type != ACPI_TYPE_INTEGER ||
+ oi[4].Type != ACPI_TYPE_INTEGER) {
+ device_printf(sc->sc_dev,
+ "%s: %i: invalid package\n",
+ name, i);
+ continue;
+ }
+ as[i].i = oi[0].Integer.Value;
+ desc = oi[1].String.Pointer;
+ as[i].l = oi[2].Integer.Value;
+ as[i].h = oi[3].Integer.Value;
+ as[i].t = st;
+#ifdef AIBS_VERBOSE
+ device_printf(sc->sc_dev, "%c%i: "
+ "0x%08"PRIx64" %20s %5"PRIi64" / %5"PRIi64" "
+ "0x%"PRIx64"\n",
+ name[0], i,
+ as[i].i, desc, (int64_t)as[i].l, (int64_t)as[i].h,
+ oi[4].Integer.Value);
+#endif
+ snprintf(si, sizeof(si), "%i", i);
+ SYSCTL_ADD_PROC(device_get_sysctl_ctx(sc->sc_dev),
+ SYSCTL_CHILDREN(so), i, si, CTLTYPE_OPAQUE | CTLFLAG_RD,
+ sc, st, aibs_sysctl, st == AIBS_TEMP ? "IK" : "I", desc);
+ }
+
+ AcpiOsFree(b.Pointer);
+}
+
+static int
+aibs_detach(device_t dev)
+{
+ struct aibs_softc *sc = device_get_softc(dev);
+
+ if (sc->sc_asens_volt != NULL)
+ free(sc->sc_asens_volt, M_DEVBUF);
+ if (sc->sc_asens_temp != NULL)
+ free(sc->sc_asens_temp, M_DEVBUF);
+ if (sc->sc_asens_fan != NULL)
+ free(sc->sc_asens_fan, M_DEVBUF);
+ return 0;
+}
+
+#ifdef AIBS_VERBOSE
+#define ddevice_printf(x...) device_printf(x)
+#else
+#define ddevice_printf(x...)
+#endif
+
+static int
+aibs_sysctl(SYSCTL_HANDLER_ARGS)
+{
+ struct aibs_softc *sc = arg1;
+ enum aibs_type st = arg2;
+ int i = oidp->oid_number;
+ ACPI_STATUS rs;
+ ACPI_OBJECT p, *bp;
+ ACPI_OBJECT_LIST mp;
+ ACPI_BUFFER b;
+ char *name;
+ struct aibs_sensor *as;
+ ACPI_INTEGER v, l, h;
+ int so[3];
+
+ switch (st) {
+ case AIBS_VOLT:
+ name = "RVLT";
+ as = sc->sc_asens_volt;
+ break;
+ case AIBS_TEMP:
+ name = "RTMP";
+ as = sc->sc_asens_temp;
+ break;
+ case AIBS_FAN:
+ name = "RFAN";
+ as = sc->sc_asens_fan;
+ break;
+ default:
+ return ENOENT;
+ }
+ if (as == NULL)
+ return ENOENT;
+ l = as[i].l;
+ h = as[i].h;
+ p.Type = ACPI_TYPE_INTEGER;
+ p.Integer.Value = as[i].i;
+ mp.Count = 1;
+ mp.Pointer = &p;
+ b.Length = ACPI_ALLOCATE_BUFFER;
+ ACPI_SERIAL_BEGIN(aibs);
+ rs = AcpiEvaluateObjectTyped(sc->sc_ah, name, &mp, &b,
+ ACPI_TYPE_INTEGER);
+ if (ACPI_FAILURE(rs)) {
+ ddevice_printf(sc->sc_dev,
+ "%s: %i: evaluation failed\n",
+ name, i);
+ ACPI_SERIAL_END(aibs);
+ return EIO;
+ }
+ bp = b.Pointer;
+ v = bp->Integer.Value;
+ AcpiOsFree(b.Pointer);
+ ACPI_SERIAL_END(aibs);
+
+ switch (st) {
+ case AIBS_VOLT:
+ break;
+ case AIBS_TEMP:
+ v += 2732;
+ l += 2732;
+ h += 2732;
+ break;
+ case AIBS_FAN:
+ break;
+ }
+ so[0] = v;
+ so[1] = l;
+ so[2] = h;
+ return sysctl_handle_opaque(oidp, &so, sizeof(so), req);
+}
Modified: projects/ppc64/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
==============================================================================
--- projects/ppc64/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sat Jun 26 22:26:53 2010 (r209545)
@@ -612,7 +612,7 @@
AH_PRIVATE((_ah))->ah_macRev == AR_XSREV_REVISION_MERLIN_20)
#define AR_SREV_MERLIN_20_OR_LATER(_ah) \
(AR_SREV_MERLIN_20(_ah) || \
- AH_PRIVATE((_ah))->ah_macVersion > AR_XSREV_VERSION_MERLIN)
+ AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_MERLIN_20)
#define AR_SREV_KITE(_ah) \
(AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_KITE)
Modified: projects/ppc64/sys/dev/e1000/if_igb.c
==============================================================================
--- projects/ppc64/sys/dev/e1000/if_igb.c Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/sys/dev/e1000/if_igb.c Sat Jun 26 22:26:53 2010 (r209545)
@@ -4814,6 +4814,18 @@ igb_update_stats_counters(struct adapter
/* Tx Errors */
ifp->if_oerrors = adapter->stats.ecol +
adapter->stats.latecol + adapter->watchdog_events;
+
+ /* Driver specific counters */
+ adapter->device_control = E1000_READ_REG(&adapter->hw, E1000_CTRL);
+ adapter->rx_control = E1000_READ_REG(&adapter->hw, E1000_RCTL);
+ adapter->int_mask = E1000_READ_REG(&adapter->hw, E1000_IMS);
+ adapter->eint_mask = E1000_READ_REG(&adapter->hw, E1000_EIMS);
+ adapter->packet_buf_alloc_tx = ((E1000_READ_REG(&adapter->hw, E1000_PBA)
+ & 0xffff0000) >> 16);
+
+ adapter->packet_buf_alloc_rx = (E1000_READ_REG(&adapter->hw, E1000_PBA)
+ & 0xffff);
+
}
@@ -4897,6 +4909,11 @@ igb_add_hw_stats(struct adapter *adapter
}
for (int i = 0; i < adapter->num_queues; i++, rxr++) {
+ snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);
+ queue_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, namebuf,
+ CTLFLAG_RD, NULL, "Queue Name");
+ queue_list = SYSCTL_CHILDREN(queue_node);
+
struct lro_ctrl *lro = &rxr->lro;
snprintf(namebuf, QUEUE_NAME_LEN, "queue%d", i);
Modified: projects/ppc64/sys/geom/part/g_part.c
==============================================================================
--- projects/ppc64/sys/geom/part/g_part.c Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/sys/geom/part/g_part.c Sat Jun 26 22:26:53 2010 (r209545)
@@ -91,6 +91,7 @@ struct g_part_alias_list {
{ "ms-ldm-data", G_PART_ALIAS_MS_LDM_DATA },
{ "ms-ldm-metadata", G_PART_ALIAS_MS_LDM_METADATA },
{ "ms-reserved", G_PART_ALIAS_MS_RESERVED },
+ { "ntfs", G_PART_ALIAS_MS_NTFS },
{ "netbsd-ccd", G_PART_ALIAS_NETBSD_CCD },
{ "netbsd-cgd", G_PART_ALIAS_NETBSD_CGD },
{ "netbsd-ffs", G_PART_ALIAS_NETBSD_FFS },
Modified: projects/ppc64/sys/geom/part/g_part.h
==============================================================================
--- projects/ppc64/sys/geom/part/g_part.h Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/sys/geom/part/g_part.h Sat Jun 26 22:26:53 2010 (r209545)
@@ -59,6 +59,7 @@ enum g_part_alias {
G_PART_ALIAS_MS_LDM_DATA, /* A Microsoft LDM Data part. entry. */
G_PART_ALIAS_MS_LDM_METADATA, /* A Microsoft LDM Metadata entry. */
G_PART_ALIAS_MS_RESERVED, /* A Microsoft Reserved part. entry. */
+ G_PART_ALIAS_MS_NTFS, /* A Microsoft NTFS partition entry */
G_PART_ALIAS_NETBSD_CCD, /* A NetBSD CCD partition entry. */
G_PART_ALIAS_NETBSD_CGD, /* A NetBSD CGD partition entry. */
G_PART_ALIAS_NETBSD_FFS, /* A NetBSD FFS partition entry. */
Modified: projects/ppc64/sys/geom/part/g_part_mbr.c
==============================================================================
--- projects/ppc64/sys/geom/part/g_part_mbr.c Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/sys/geom/part/g_part_mbr.c Sat Jun 26 22:26:53 2010 (r209545)
@@ -127,6 +127,11 @@ mbr_parse_type(const char *type, u_char
*dp_typ = DOSPTYP_386BSD;
return (0);
}
+ alias = g_part_alias_name(G_PART_ALIAS_MS_NTFS);
+ if (!strcasecmp(type, alias)) {
+ *dp_typ = DOSPTYP_NTFS;
+ return (0);
+ }
return (EINVAL);
}
@@ -509,9 +514,14 @@ g_part_mbr_type(struct g_part_table *bas
entry = (struct g_part_mbr_entry *)baseentry;
type = entry->ent.dp_typ;
- if (type == DOSPTYP_386BSD)
+ switch (type) {
+ case DOSPTYP_386BSD:
return (g_part_alias_name(G_PART_ALIAS_FREEBSD));
- snprintf(buf, bufsz, "!%d", type);
+ case DOSPTYP_NTFS:
+ return (g_part_alias_name(G_PART_ALIAS_MS_NTFS));
+ default:
+ snprintf(buf, bufsz, "!%d", type);
+ }
return (buf);
}
Modified: projects/ppc64/sys/i386/conf/NOTES
==============================================================================
--- projects/ppc64/sys/i386/conf/NOTES Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/sys/i386/conf/NOTES Sat Jun 26 22:26:53 2010 (r209545)
@@ -512,6 +512,9 @@ device acpi_video
# ACPI Docking Station
device acpi_dock
+# ACPI ASOC ATK0110 ASUSTeK AI Booster (voltage, temperature and fan sensors)
+device aibs
+
# The cpufreq(4) driver provides support for non-ACPI CPU frequency control
device cpufreq
Modified: projects/ppc64/sys/kern/uipc_syscalls.c
==============================================================================
--- projects/ppc64/sys/kern/uipc_syscalls.c Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/sys/kern/uipc_syscalls.c Sat Jun 26 22:26:53 2010 (r209545)
@@ -2409,7 +2409,7 @@ sctp_generic_sendmsg (td, uap)
if (error)
goto sctp_bad;
#ifdef KTRACE
- if (KTRPOINT(td, KTR_STRUCT))
+ if (to && (KTRPOINT(td, KTR_STRUCT)))
ktrsockaddr(to);
#endif
@@ -2523,7 +2523,7 @@ sctp_generic_sendmsg_iov(td, uap)
if (error)
goto sctp_bad1;
#ifdef KTRACE
- if (KTRPOINT(td, KTR_STRUCT))
+ if (to && (KTRPOINT(td, KTR_STRUCT)))
ktrsockaddr(to);
#endif
@@ -2677,6 +2677,7 @@ sctp_generic_recvmsg(td, uap)
if (KTRPOINT(td, KTR_GENIO))
ktruio = cloneuio(&auio);
#endif /* KTRACE */
+ memset(&sinfo, 0, sizeof(struct sctp_sndrcvinfo));
CURVNET_SET(so->so_vnet);
error = sctp_sorecvmsg(so, &auio, (struct mbuf **)NULL,
fromsa, fromlen, &msg_flags,
Modified: projects/ppc64/sys/kern/vfs_vnops.c
==============================================================================
--- projects/ppc64/sys/kern/vfs_vnops.c Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/sys/kern/vfs_vnops.c Sat Jun 26 22:26:53 2010 (r209545)
@@ -506,8 +506,8 @@ vn_read(fp, uio, active_cred, flags, td)
struct file *fp;
struct uio *uio;
struct ucred *active_cred;
- struct thread *td;
int flags;
+ struct thread *td;
{
struct vnode *vp;
int error, ioflag;
@@ -572,8 +572,8 @@ vn_write(fp, uio, active_cred, flags, td
struct file *fp;
struct uio *uio;
struct ucred *active_cred;
- struct thread *td;
int flags;
+ struct thread *td;
{
struct vnode *vp;
struct mount *mp;
Modified: projects/ppc64/sys/modules/acpi/Makefile
==============================================================================
--- projects/ppc64/sys/modules/acpi/Makefile Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/sys/modules/acpi/Makefile Sat Jun 26 22:26:53 2010 (r209545)
@@ -6,6 +6,6 @@ SUBDIR= acpi
SUBDIR+= acpi_aiboost acpi_asus acpi_fujitsu acpi_hp acpi_ibm \
acpi_panasonic acpi_sony acpi_toshiba acpi_video \
- acpi_dock acpi_wmi
+ acpi_dock acpi_wmi aibs
.include <bsd.subdir.mk>
Modified: projects/ppc64/sys/sys/diskmbr.h
==============================================================================
--- projects/ppc64/sys/sys/diskmbr.h Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/sys/sys/diskmbr.h Sat Jun 26 22:26:53 2010 (r209545)
@@ -49,6 +49,7 @@
#define DOSPTYP_PMBR 0xee /* GPT Protective MBR */
#define DOSPTYP_EXT 5 /* DOS extended partition */
#define DOSPTYP_EXTLBA 15 /* DOS extended partition */
+#define DOSPTYP_NTFS 0x07 /* NTFS partition */
struct dos_partition {
unsigned char dp_flag; /* bootstrap flags */
Modified: projects/ppc64/usr.sbin/Makefile
==============================================================================
--- projects/ppc64/usr.sbin/Makefile Sat Jun 26 22:04:52 2010 (r209544)
+++ projects/ppc64/usr.sbin/Makefile Sat Jun 26 22:26:53 2010 (r209545)
@@ -125,6 +125,7 @@ SUBDIR= ${_ac} \
${_ntp} \
${_nvram} \
${_ofwdump} \
+ pc-sysinstall \
pciconf \
periodic \
${_pkg_install} \
More information about the svn-src-projects
mailing list