PERFORCE change 33995 for review
Peter Wemm
peter at FreeBSD.org
Wed Jul 2 11:20:58 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=33995
Change 33995 by peter at peter_daintree on 2003/07/02 11:20:03
IFC @33994
Affected files ...
.. //depot/projects/hammer/Makefile.inc1#21 integrate
.. //depot/projects/hammer/contrib/groff/tmac/tty-char.tmac#4 integrate
.. //depot/projects/hammer/lib/libc/stdio/vsnprintf.c#4 integrate
.. //depot/projects/hammer/lib/libc_r/Makefile#4 integrate
.. //depot/projects/hammer/lib/libc_r/arch/alpha/_atomic_lock.S#2 integrate
.. //depot/projects/hammer/lib/libpthread/thread/thr_cancel.c#8 integrate
.. //depot/projects/hammer/lib/libpthread/thread/thr_cond.c#11 integrate
.. //depot/projects/hammer/lib/libthr/thread/thr_mutex.c#10 integrate
.. //depot/projects/hammer/sbin/Makefile#13 integrate
.. //depot/projects/hammer/sbin/mount_nwfs/Makefile#2 delete
.. //depot/projects/hammer/sbin/mount_nwfs/mount_nwfs.8#3 delete
.. //depot/projects/hammer/sbin/mount_nwfs/mount_nwfs.c#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/Makefile#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/activate.c#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/conf.c#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/mount_portalfs.8#3 delete
.. //depot/projects/hammer/sbin/mount_portalfs/mount_portalfs.c#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/pathnames.h#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/portal.conf#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/portald.h#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/pt_conf.c#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/pt_exec.c#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/pt_file.c#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/pt_tcp.c#2 delete
.. //depot/projects/hammer/sbin/mount_portalfs/pt_tcplisten.c#2 delete
.. //depot/projects/hammer/sbin/mount_smbfs/Makefile#3 delete
.. //depot/projects/hammer/share/mk/bsd.dep.mk#5 integrate
.. //depot/projects/hammer/share/mk/bsd.lib.mk#9 integrate
.. //depot/projects/hammer/share/mk/sys.mk#7 integrate
.. //depot/projects/hammer/sys/alpha/alpha/mp_machdep.c#4 integrate
.. //depot/projects/hammer/sys/boot/efi/libefi/Makefile#3 integrate
.. //depot/projects/hammer/sys/boot/i386/libi386/Makefile#12 integrate
.. //depot/projects/hammer/sys/boot/ia64/libski/Makefile#3 integrate
.. //depot/projects/hammer/sys/boot/ia64/libski/pal_stub.S#1 branch
.. //depot/projects/hammer/sys/boot/ia64/libski/pal_stub.s#2 delete
.. //depot/projects/hammer/sys/boot/pc98/libpc98/Makefile#5 integrate
.. //depot/projects/hammer/sys/conf/files.ia64#10 integrate
.. //depot/projects/hammer/sys/dev/acpica/acpi.c#8 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-chipset.c#14 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-pci.c#11 integrate
.. //depot/projects/hammer/sys/dev/ata/ata-pci.h#9 integrate
.. //depot/projects/hammer/sys/dev/fatm/if_fatm.c#3 integrate
.. //depot/projects/hammer/sys/dev/ips/ips_pci.c#4 integrate
.. //depot/projects/hammer/sys/dev/kbd/atkbd.c#5 integrate
.. //depot/projects/hammer/sys/dev/ppc/ppc.c#1 branch
.. //depot/projects/hammer/sys/dev/ppc/ppcreg.h#1 branch
.. //depot/projects/hammer/sys/dev/random/randomdev.c#5 integrate
.. //depot/projects/hammer/sys/dev/sio/sio.c#17 integrate
.. //depot/projects/hammer/sys/geom/geom_ctl.c#13 integrate
.. //depot/projects/hammer/sys/i386/bios/apm.c#4 integrate
.. //depot/projects/hammer/sys/i386/isa/pcvt/pcvt_drv.c#4 integrate
.. //depot/projects/hammer/sys/ia64/ia64/busdma_machdep.c#10 integrate
.. //depot/projects/hammer/sys/ia64/ia64/context.S#1 branch
.. //depot/projects/hammer/sys/ia64/ia64/context.s#3 delete
.. //depot/projects/hammer/sys/ia64/ia64/exception.S#1 branch
.. //depot/projects/hammer/sys/ia64/ia64/exception.s#13 delete
.. //depot/projects/hammer/sys/ia64/ia64/locore.S#1 branch
.. //depot/projects/hammer/sys/ia64/ia64/locore.s#9 delete
.. //depot/projects/hammer/sys/ia64/ia64/pal.S#1 branch
.. //depot/projects/hammer/sys/ia64/ia64/pal.s#3 delete
.. //depot/projects/hammer/sys/ia64/ia64/setjmp.S#1 branch
.. //depot/projects/hammer/sys/ia64/ia64/setjmp.s#2 delete
.. //depot/projects/hammer/sys/ia64/ia64/support.S#1 branch
.. //depot/projects/hammer/sys/ia64/ia64/support.s#5 delete
.. //depot/projects/hammer/sys/ia64/ia64/syscall.S#1 branch
.. //depot/projects/hammer/sys/ia64/ia64/syscall.s#4 delete
.. //depot/projects/hammer/sys/isa/atkbdc_isa.c#4 integrate
.. //depot/projects/hammer/sys/isa/fd.c#9 integrate
.. //depot/projects/hammer/sys/isa/isahint.c#3 integrate
.. //depot/projects/hammer/sys/isa/syscons_isa.c#6 integrate
.. //depot/projects/hammer/sys/kern/kern_condvar.c#11 integrate
.. //depot/projects/hammer/sys/kern/kern_mutex.c#12 integrate
.. //depot/projects/hammer/sys/kern/kern_tc.c#9 integrate
.. //depot/projects/hammer/sys/kern/subr_hints.c#3 integrate
.. //depot/projects/hammer/sys/netgraph/atm/ng_atm.c#2 integrate
.. //depot/projects/hammer/sys/nfsclient/nfs_nfsiod.c#4 integrate
.. //depot/projects/hammer/sys/nfsserver/nfs_syscalls.c#7 integrate
.. //depot/projects/hammer/sys/pc98/pc98/fd.c#9 integrate
.. //depot/projects/hammer/sys/pc98/pc98/pc98kbd.c#4 integrate
.. //depot/projects/hammer/sys/pc98/pc98/sio.c#9 integrate
.. //depot/projects/hammer/sys/pc98/pc98/syscons_pc98.c#6 integrate
.. //depot/projects/hammer/sys/sys/bus.h#6 integrate
.. //depot/projects/hammer/sys/vm/vm_contig.c#7 integrate
.. //depot/projects/hammer/usr.sbin/Makefile#23 integrate
.. //depot/projects/hammer/usr.sbin/mount_nwfs/Makefile#1 branch
.. //depot/projects/hammer/usr.sbin/mount_nwfs/mount_nwfs.8#1 branch
.. //depot/projects/hammer/usr.sbin/mount_nwfs/mount_nwfs.c#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/Makefile#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/activate.c#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/conf.c#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/mount_portalfs.8#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/mount_portalfs.c#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/pathnames.h#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/portal.conf#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/portald.h#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/pt_conf.c#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/pt_exec.c#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/pt_file.c#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/pt_tcp.c#1 branch
.. //depot/projects/hammer/usr.sbin/mount_portalfs/pt_tcplisten.c#1 branch
.. //depot/projects/hammer/usr.sbin/mount_smbfs/Makefile#1 branch
Differences ...
==== //depot/projects/hammer/Makefile.inc1#21 (text+ko) ====
@@ -1,5 +1,5 @@
#
-# $FreeBSD: src/Makefile.inc1,v 1.372 2003/07/01 12:57:53 ru Exp $
+# $FreeBSD: src/Makefile.inc1,v 1.373 2003/07/01 23:10:39 gordon Exp $
#
# Make command line options:
# -DNO_KERBEROS Do not build Heimdal (Kerberos 5)
@@ -66,7 +66,7 @@
.if exists(${.CURDIR}/libexec)
SUBDIR+= libexec
.endif
-.if exists(${.CURDIR}/rescue) && !defined(NO_RESCUE)
+.if exists(${.CURDIR}/rescue) && defined(RESCUE)
SUBDIR+= rescue
.endif
.if exists(${.CURDIR}/sbin)
==== //depot/projects/hammer/contrib/groff/tmac/tty-char.tmac#4 (text+ko) ====
@@ -135,6 +135,12 @@
.tty-char \[rf] _|
.tty-char \[lc] |~
.tty-char \[rc] ~|
+.tty-char \[lb] `-
+.tty-char \[rb] -'
+.tty-char \[lk] {
+.tty-char \[rk] }
+.tty-char \[lt] ,-
+.tty-char \[rt] -.
.\" Latin-1 characters
.tty-char \[r!] \z,i
.tty-char \[Po] \z-L
==== //depot/projects/hammer/lib/libc/stdio/vsnprintf.c#4 (text+ko) ====
@@ -38,7 +38,7 @@
static char sccsid[] = "@(#)vsnprintf.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/vsnprintf.c,v 1.21 2002/09/17 11:28:24 maxim Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/vsnprintf.c,v 1.22 2003/07/02 07:08:44 jkh Exp $");
#include <limits.h>
#include <stdio.h>
@@ -50,7 +50,7 @@
{
size_t on;
int ret;
- char dummy;
+ char dummy[2];
FILE f;
struct __sFILEX ext;
@@ -61,8 +61,10 @@
n = INT_MAX;
/* Stdio internals do not deal correctly with zero length buffer */
if (n == 0) {
- str = &dummy;
- n = 1;
+ if (on > 0)
+ *str = '\0';
+ str = dummy;
+ n = 1;
}
f._file = -1;
f._flags = __SWR | __SSTR;
==== //depot/projects/hammer/lib/libc_r/Makefile#4 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libc_r/Makefile,v 1.33 2003/07/01 15:07:01 ru Exp $
+# $FreeBSD: src/lib/libc_r/Makefile,v 1.35 2003/07/02 13:27:54 ru Exp $
#
# All library objects contain FreeBSD revision strings by default; they may be
# excluded as a space-saving measure. To produce a library that does
==== //depot/projects/hammer/lib/libc_r/arch/alpha/_atomic_lock.S#2 (text+ko) ====
@@ -19,11 +19,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libc_r/arch/alpha/_atomic_lock.S,v 1.3 1999/08/28 00:03:00 peter Exp $
+ * $FreeBSD: src/lib/libc_r/arch/alpha/_atomic_lock.S,v 1.4 2003/07/02 13:27:54 ru Exp $
*
*/
-#include "SYS.h"
+#include <machine/asm.h>
/*
* Atomicly lock a location with an identifier provided the location
==== //depot/projects/hammer/lib/libpthread/thread/thr_cancel.c#8 (text+ko) ====
@@ -1,6 +1,6 @@
/*
* David Leonard <d at openbsd.org>, 1999. Public domain.
- * $FreeBSD: src/lib/libpthread/thread/thr_cancel.c,v 1.22 2003/06/28 09:39:35 davidxu Exp $
+ * $FreeBSD: src/lib/libpthread/thread/thr_cancel.c,v 1.23 2003/07/02 13:23:03 davidxu Exp $
*/
#include <sys/errno.h>
#include <pthread.h>
@@ -75,7 +75,7 @@
pthread->cancelflags |= THR_CANCELLING;
_thr_setrunnable_unlocked(pthread);
if ((joinee != NULL) &&
- (curthread->kseg == joinee->kseg)) {
+ (pthread->kseg == joinee->kseg)) {
/* Remove the joiner from the joinee. */
joinee->joiner = NULL;
joinee = NULL;
==== //depot/projects/hammer/lib/libpthread/thread/thr_cond.c#11 (text+ko) ====
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libpthread/thread/thr_cond.c,v 1.45 2003/06/28 09:40:57 davidxu Exp $
+ * $FreeBSD: src/lib/libpthread/thread/thr_cond.c,v 1.46 2003/07/02 14:12:37 davidxu Exp $
*/
#include <stdlib.h>
#include <errno.h>
@@ -539,8 +539,10 @@
/* The wait timedout. */
rval = ETIMEDOUT;
(void)_mutex_cv_lock(mutex);
- } else if (interrupted || done)
+ } else if (interrupted || done) {
rval = _mutex_cv_lock(mutex);
+ unlock_mutex = 1;
+ }
}
}
break;
@@ -738,7 +740,7 @@
while ((pthread = TAILQ_FIRST(&cond->c_queue)) != NULL) {
TAILQ_REMOVE(&cond->c_queue, pthread, sqe);
- THR_CONDQ_SET(pthread);
+ THR_CONDQ_CLEAR(pthread);
if ((pthread->timeout == 0) && (pthread->interrupted == 0))
/*
* Only exit the loop when we find a thread
==== //depot/projects/hammer/lib/libthr/thread/thr_mutex.c#10 (text+ko) ====
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.14 2003/07/01 15:52:09 mtm Exp $
+ * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.15 2003/07/02 02:05:23 mtm Exp $
*/
#include <stdlib.h>
#include <errno.h>
@@ -85,11 +85,11 @@
/* Single underscore versions provided for libc internal usage: */
__weak_reference(__pthread_mutex_trylock, pthread_mutex_trylock);
__weak_reference(__pthread_mutex_lock, pthread_mutex_lock);
+__weak_reference(__pthread_mutex_unlock, pthread_mutex_unlock);
/* No difference between libc and application usage of these: */
__weak_reference(_pthread_mutex_init, pthread_mutex_init);
__weak_reference(_pthread_mutex_destroy, pthread_mutex_destroy);
-__weak_reference(_pthread_mutex_unlock, pthread_mutex_unlock);
/*
@@ -505,6 +505,9 @@
return (ret);
}
+/*
+ * Libc internal.
+ */
int
_pthread_mutex_lock(pthread_mutex_t *mutex)
{
@@ -513,6 +516,8 @@
if (_thread_initial == NULL)
_thread_init();
+ _thread_sigblock();
+
if (mutex == NULL)
ret = EINVAL;
@@ -524,13 +529,28 @@
((ret = mutex_init(mutex, 1)) == 0))
ret = mutex_lock_common(mutex, 0);
+ if (ret != 0)
+ _thread_sigunblock();
+
return (ret);
}
int
+__pthread_mutex_unlock(pthread_mutex_t * mutex)
+{
+ return (mutex_unlock_common(mutex, /* add reference */ 0));
+}
+
+/*
+ * Libc internal
+ */
+int
_pthread_mutex_unlock(pthread_mutex_t * mutex)
{
- return (mutex_unlock_common(mutex, /* add reference */ 0));
+ int error;
+ if ((error = mutex_unlock_common(mutex, /* add reference */ 0)) == 0)
+ _thread_sigunblock();
+ return (error);
}
int
==== //depot/projects/hammer/sbin/Makefile#13 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile 8.5 (Berkeley) 3/31/94
-# $FreeBSD: src/sbin/Makefile,v 1.122 2003/06/17 09:12:42 phk Exp $
+# $FreeBSD: src/sbin/Makefile,v 1.123 2003/07/02 16:16:49 gordon Exp $
# XXX MISSING: icheck ncheck
@@ -47,7 +47,6 @@
mount_nfs \
mount_ntfs \
mount_nullfs \
- mount_portalfs \
mount_std \
mount_udf \
mount_umapfs \
@@ -93,9 +92,7 @@
.endif
.if ${MACHINE_ARCH} == "i386"
-SUBDIR+=cxconfig \
- mount_nwfs \
- mount_smbfs
+SUBDIR+=cxconfig
.if ${MACHINE} == "pc98"
SUBDIR+=fdisk_pc98
.else
==== //depot/projects/hammer/share/mk/bsd.dep.mk#5 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/share/mk/bsd.dep.mk,v 1.39 2003/07/01 15:15:45 ru Exp $
+# $FreeBSD: src/share/mk/bsd.dep.mk,v 1.40 2003/07/02 16:43:07 ru Exp $
#
# The include file <bsd.dep.mk> handles Makefile dependencies.
#
@@ -114,10 +114,10 @@
# Split up the sources, and filter out headers and non-applicable flags.
${DEPENDFILE}: ${SRCS}
rm -f ${DEPENDFILE}
-.if ${SRCS:M*.[cSs]} != ""
+.if ${SRCS:M*.[cS]} != ""
${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BID]*} \
- ${.ALLSRC:M*.[cSs]}
+ ${.ALLSRC:M*.[cS]}
.endif
.if ${SRCS:M*.cc} != "" || ${SRCS:M*.C} != "" || ${SRCS:M*.cpp} != "" || \
${SRCS:M*.cxx} != ""
==== //depot/projects/hammer/share/mk/bsd.lib.mk#9 (text+ko) ====
@@ -1,5 +1,5 @@
# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
-# $FreeBSD: src/share/mk/bsd.lib.mk,v 1.146 2003/07/01 15:15:45 ru Exp $
+# $FreeBSD: src/share/mk/bsd.lib.mk,v 1.148 2003/07/02 17:03:28 ru Exp $
#
.include <bsd.init.mk>
@@ -36,7 +36,7 @@
# prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
# .So used for PIC object files
.SUFFIXES:
-.SUFFIXES: .out .o .po .So .S .s .asm .c .cc .cpp .cxx .m .C .f .y .l .ln
+.SUFFIXES: .out .o .po .So .S .asm .s .c .cc .cpp .cxx .m .C .f .y .l .ln
.if !defined(PICFLAG)
.if ${MACHINE_ARCH} == "sparc64"
@@ -70,13 +70,13 @@
.m.So:
${OBJC} ${PICFLAG} -DPIC ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET}
-.s.o .asm.o:
- ${CC} -x assembler-with-cpp ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
+.s.po .s.So:
+ ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC}
-.s.po .asm.po:
+.asm.po:
${CC} -x assembler-with-cpp -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
-.s.So .asm.So:
+.asm.So:
${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} \
-c ${.IMPSRC} -o ${.TARGET}
==== //depot/projects/hammer/share/mk/sys.mk#7 (text+ko) ====
@@ -1,5 +1,5 @@
# from: @(#)sys.mk 8.2 (Berkeley) 3/21/94
-# $FreeBSD: src/share/mk/sys.mk,v 1.69 2003/07/01 15:15:45 ru Exp $
+# $FreeBSD: src/share/mk/sys.mk,v 1.70 2003/07/02 17:03:28 ru Exp $
unix ?= We run FreeBSD, not UNIX.
.FreeBSD ?= true
@@ -16,7 +16,7 @@
.if defined(%POSIX)
.SUFFIXES: .o .c .y .l .a .sh .f
.else
-.SUFFIXES: .out .a .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .s .asm .cl .p .h .sh
+.SUFFIXES: .out .a .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh
.endif
.LIBS: .a
@@ -208,7 +208,10 @@
.S.o:
${CC} ${CFLAGS} -c ${.IMPSRC}
-.s.o .asm.o:
+.asm.o:
+ ${CC} -x assembler-with-cpp ${CFLAGS} -c ${.IMPSRC}
+
+.s.o:
${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC}
# XXX not -j safe
==== //depot/projects/hammer/sys/alpha/alpha/mp_machdep.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.42 2003/06/10 16:50:43 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.43 2003/07/02 16:09:00 jhb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -349,7 +349,6 @@
mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN);
for (i = 0; i < hwrpb->rpb_pcs_cnt; i++) {
- int dv;
struct pcs *pcsp;
if (i == boot_cpu_id)
@@ -380,8 +379,7 @@
}
continue;
}
- dv = 0;
- if (resource_int_value("cpu", i, "disable", &dv) == 0 && dv) {
+ if (resource_disabled("cpu", i))
printf("CPU %d disabled by loader.\n", i);
continue;
}
==== //depot/projects/hammer/sys/boot/efi/libefi/Makefile#3 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/efi/libefi/Makefile,v 1.11 2002/12/10 06:22:25 marcel Exp $
+# $FreeBSD: src/sys/boot/efi/libefi/Makefile,v 1.12 2003/07/02 11:53:55 ru Exp $
.PATH: ${.CURDIR}/../../../${MACHINE_ARCH}/${MACHINE_ARCH}
@@ -6,7 +6,7 @@
INTERNALLIB= true
SRCS= libefi.c efi_console.c time.c copy.c devicename.c module.c
-SRCS+= delay.c efifs.c efinet.c elf_freebsd.c bootinfo.c pal.s
+SRCS+= delay.c efifs.c efinet.c elf_freebsd.c bootinfo.c pal.S
.if ${MACHINE_ARCH} == "ia64"
SRCS+= efifpswa.c
==== //depot/projects/hammer/sys/boot/i386/libi386/Makefile#12 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.31 2003/06/07 17:42:26 obrien Exp $
+# $FreeBSD: src/sys/boot/i386/libi386/Makefile,v 1.32 2003/07/02 12:45:45 ru Exp $
#
LIB= i386
INTERNALLIB= true
@@ -7,7 +7,7 @@
biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \
comconsole.c devicename.c elf32_freebsd.c \
elf64_freebsd.c gatea20.c \
- i386_copy.c i386_module.c nullconsole.c pxe.c \
+ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \
time.c vidconsole.c amd64_tramp.S
CFLAGS+= -ffreestanding
@@ -45,8 +45,4 @@
.endif
-OBJS+= pxetramp.o
-pxetramp.o: pxetramp.s
- ${AS} ${AFLAGS} -o ${.TARGET} ${.ALLSRC:M*pxetramp*}
-
.include <bsd.lib.mk>
==== //depot/projects/hammer/sys/boot/ia64/libski/Makefile#3 (text+ko) ====
@@ -1,11 +1,11 @@
-# $FreeBSD: src/sys/boot/ia64/libski/Makefile,v 1.9 2003/02/01 22:50:08 marcel Exp $
+# $FreeBSD: src/sys/boot/ia64/libski/Makefile,v 1.10 2003/07/02 11:47:33 ru Exp $
LIB= ski
INTERNALLIB= true
SRCS= skiconsole.c time.c copy.c devicename.c module.c exit.c
SRCS+= delay.c skifs.c elf_freebsd.c bootinfo.c ssc.c
-SRCS+= acpi_stub.c efi_stub.c pal_stub.s sal_stub.c
+SRCS+= acpi_stub.c efi_stub.c pal_stub.S sal_stub.c
CFLAGS+= -ffreestanding -fpic -g
CFLAGS+= -I${.CURDIR}/../include
==== //depot/projects/hammer/sys/boot/pc98/libpc98/Makefile#5 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/pc98/libpc98/Makefile,v 1.17 2003/06/08 03:16:59 nyan Exp $
+# $FreeBSD: src/sys/boot/pc98/libpc98/Makefile,v 1.18 2003/07/02 12:45:45 ru Exp $
#
LIB= pc98
INTERNALLIB= true
@@ -7,7 +7,7 @@
SRCS= bioscd.c biosdisk.c biosmem.c biospnp.c biospci.c biossmap.c \
bootinfo.c bootinfo32.c comconsole.c devicename.c elf32_freebsd.c \
- gatea20.c i386_copy.c i386_module.c nullconsole.c pxe.c \
+ gatea20.c i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \
time.c vidconsole.c
CFLAGS+= -ffreestanding
@@ -46,8 +46,4 @@
.endif
-OBJS+= pxetramp.o
-pxetramp.o: pxetramp.s
- ${AS} ${AFLAGS} -o ${.TARGET} ${.ALLSRC:M*pxetramp*}
-
.include <bsd.lib.mk>
==== //depot/projects/hammer/sys/conf/files.ia64#10 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.ia64,v 1.52 2003/05/16 21:26:40 marcel Exp $
+# $FreeBSD: src/sys/conf/files.ia64,v 1.53 2003/07/02 12:57:06 ru Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -75,7 +75,7 @@
ia64/ia64/busdma_machdep.c standard
ia64/ia64/clock.c standard
ia64/ia64/clock_if.m standard
-ia64/ia64/context.s standard
+ia64/ia64/context.S standard
ia64/ia64/critical.c standard
ia64/ia64/db_disasm.c optional ddb
ia64/ia64/db_interface.c optional ddb
@@ -84,26 +84,26 @@
ia64/ia64/efi.c standard
ia64/ia64/eficlock.c standard
ia64/ia64/elf_machdep.c standard
-ia64/ia64/exception.s standard
+ia64/ia64/exception.S standard
ia64/ia64/ia64-gdbstub.c optional ddb
ia64/ia64/in_cksum.c optional inet
ia64/ia64/interrupt.c standard
-ia64/ia64/locore.s standard no-obj
+ia64/ia64/locore.S standard no-obj
ia64/ia64/machdep.c standard
ia64/ia64/mca.c standard
ia64/ia64/mem.c standard
ia64/ia64/mp_machdep.c optional smp
ia64/ia64/nexus.c standard
-ia64/ia64/pal.s standard
+ia64/ia64/pal.S standard
ia64/ia64/pmap.c standard
ia64/ia64/sal.c standard
ia64/ia64/sapic.c standard
-ia64/ia64/setjmp.s standard
+ia64/ia64/setjmp.S standard
ia64/ia64/ssc.c optional ski
ia64/ia64/sscdisk.c optional ski
-ia64/ia64/support.s standard
+ia64/ia64/support.S standard
ia64/ia64/sys_machdep.c standard
-ia64/ia64/syscall.s standard
+ia64/ia64/syscall.S standard
ia64/ia64/trap.c standard
ia64/ia64/unaligned.c standard
ia64/ia64/unwind.c standard
==== //depot/projects/hammer/sys/dev/acpica/acpi.c#8 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.89 2003/05/01 18:51:43 jhb Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.90 2003/07/02 16:09:00 jhb Exp $
*/
#include "opt_acpi.h"
@@ -215,8 +215,7 @@
/*
* Check that we haven't been disabled with a hint.
*/
- if (!resource_int_value("acpi", 0, "disabled", &error) &&
- (error != 0))
+ if (resource_disabled("acpi", 0))
return_VOID;
/*
@@ -2175,13 +2174,11 @@
static void
acpi_pm_register(void *arg)
{
- int error;
if (!cold)
return;
- if (!resource_int_value("acpi", 0, "disabled", &error) &&
- (error != 0))
+ if (resource_disabled("acpi", 0))
return;
power_pm_register(POWER_PM_TYPE_ACPI, acpi_pm_func, NULL);
==== //depot/projects/hammer/sys/dev/ata/ata-chipset.c#14 (text+ko) ====
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.31 2003/06/27 10:11:54 grehan Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.32 2003/07/02 10:50:44 sos Exp $
*/
#include "opt_ata.h"
#include <sys/param.h>
@@ -93,6 +93,8 @@
static int ata_serverworks_chipinit(device_t);
static void ata_serverworks_setmode(struct ata_device *, int);
static int ata_sii_chipinit(device_t);
+static int ata_sii_mio_allocate(device_t, struct ata_channel *);
+static void ata_sii_intr(void *);
static void ata_cmd_intr(void *);
static void ata_sii_setmode(struct ata_device *, int);
static void ata_cmd_setmode(struct ata_device *, int);
@@ -838,11 +840,6 @@
mode = ata_limit_mode(atadev, mode, ctlr->chip->max_dma);
- if (mode >= ATA_SA150) {
- atadev->mode = mode;
- return;
- }
-
if (ctlr->chip->max_dma && mode > ATA_UDMA2 && !(reg54 & (0x10 << devno))) {
ata_prtdev(atadev,"DMA limited to UDMA33, non-ATA66 cable or device\n");
mode = ATA_UDMA2;
@@ -854,7 +851,10 @@
ata_prtdev(atadev, "%s setting %s on %s chip\n",
(error) ? "failed" : "success",
ata_mode2str(mode), ctlr->chip->text);
- if (!error) {
+ if (error)
+ return;
+
+ if (ctlr->chip->max_dma < ATA_SA150) {
if (mode >= ATA_UDMA0) {
pci_write_config(parent, 0x48, reg48 | (0x0001 << devno), 2);
pci_write_config(parent, 0x4a, (reg4a & ~(0x3 << (devno<<2))) |
@@ -894,8 +894,8 @@
}
pci_write_config(parent, 0x40, (reg40 & ~mask40) | new40, 4);
pci_write_config(parent, 0x44, (reg44 & ~mask44) | new44, 1);
- atadev->mode = mode;
}
+ atadev->mode = mode;
}
/*
@@ -1244,11 +1244,6 @@
break;
}
- if (mode >= ATA_SA150) {
- atadev->mode = mode;
- return;
- }
-
error = ata_command(atadev, ATA_C_SETFEATURES, 0, mode,
ATA_C_F_SETXFER, ATA_WAIT_READY);
if (bootverbose)
@@ -1458,11 +1453,12 @@
struct ata_pci_controller *ctlr = device_get_softc(dev);
struct ata_chip_id *idx;
static struct ata_chip_id ids[] =
- {{ ATA_SII0680, 0x00, 0, SII_SETCLK, ATA_UDMA6, "SiI 0680" },
- { ATA_CMD649, 0x00, 0, SII_INTR|SII_ENINTR, ATA_UDMA5, "CMD 649" },
- { ATA_CMD648, 0x00, 0, SII_INTR|SII_ENINTR, ATA_UDMA4, "CMD 648" },
- { ATA_CMD646, 0x07, 0, SII_ENINTR, ATA_UDMA2, "CMD 646U2" },
- { ATA_CMD646, 0x00, 0, SII_ENINTR, ATA_WDMA2, "CMD 646" },
+ {{ ATA_SII3112, 0x00, SIIMEMIO, 0, ATA_SA150, "SiI 3112" },
+ { ATA_SII0680, 0x00, SIIMEMIO, SIISETCLK, ATA_UDMA6, "SiI 0680" },
+ { ATA_CMD649, 0x00, 0, SIIINTR, ATA_UDMA5, "CMD 649" },
+ { ATA_CMD648, 0x00, 0, SIIINTR, ATA_UDMA4, "CMD 648" },
+ { ATA_CMD646, 0x07, 0, 0, ATA_UDMA2, "CMD 646U2" },
+ { ATA_CMD646, 0x00, 0, 0, ATA_WDMA2, "CMD 646" },
{ 0, 0, 0, 0, 0, 0}};
char buffer[64];
@@ -1487,38 +1483,105 @@
device_printf(dev, "unable to map interrupt\n");
return ENXIO;
}
- if ((bus_setup_intr(dev, ctlr->r_irq, INTR_TYPE_BIO | INTR_ENTROPY,
- ctlr->chip->cfg2 & SII_INTR ?
- ata_cmd_intr : ata_generic_intr,
- ctlr, &ctlr->handle))) {
- device_printf(dev, "unable to setup interrupt\n");
- return ENXIO;
+
+ if (ctlr->chip->cfg1 == SIIMEMIO) {
+ if ((bus_setup_intr(dev, ctlr->r_irq, INTR_TYPE_BIO | INTR_ENTROPY,
+ ata_sii_intr, ctlr, &ctlr->handle))) {
+ device_printf(dev, "unable to setup interrupt\n");
+ return ENXIO;
+ }
+ rid = 0x24;
+ if (!(ctlr->r_io2 = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid,
+ 0, ~0, 1, RF_ACTIVE)))
+ return ENXIO;
+
+ if (ctlr->chip->cfg2 & SIISETCLK) {
+ if ((pci_read_config(dev, 0x8a, 1) & 0x30) != 0x10)
+ pci_write_config(dev, 0x8a,
+ (pci_read_config(dev, 0x8a, 1) & 0x0F)|0x10,1);
+ if ((pci_read_config(dev, 0x8a, 1) & 0x30) != 0x10)
+ device_printf(dev, "%s could not set ATA133 clock\n",
+ ctlr->chip->text);
+ }
+ ctlr->allocate = ata_sii_mio_allocate;
+ ctlr->setmode = ata_sii_setmode;
}
+ else {
+ if ((bus_setup_intr(dev, ctlr->r_irq, INTR_TYPE_BIO | INTR_ENTROPY,
+ ctlr->chip->cfg2 & SIIINTR ?
+ ata_cmd_intr : ata_generic_intr,
+ ctlr, &ctlr->handle))) {
+ device_printf(dev, "unable to setup interrupt\n");
+ return ENXIO;
+ }
+
+ if ((pci_read_config(dev, 0x51, 1) & 0x08) != 0x08) {
+ device_printf(dev, "HW has secondary channel disabled\n");
+ ctlr->channels = 1;
+ }
- if (ctlr->chip->cfg2 & SII_ENINTR)
+ /* enable interrupt as BIOS might not */
pci_write_config(dev, 0x71, 0x01, 1);
- if (ctlr->chip->cfg2 & SII_SETCLK) {
- if ((pci_read_config(dev, 0x8a, 1) & 0x30) != 0x10)
- pci_write_config(dev, 0x8a,
- (pci_read_config(dev, 0x8a, 1) & 0x0F) | 0x10, 1);
- if ((pci_read_config(dev, 0x8a, 1) & 0x30) != 0x10)
- device_printf(dev, "%s could not set ATA133 clock\n",
- ctlr->chip->text);
- ctlr->setmode = ata_sii_setmode;
+ ctlr->setmode = ata_cmd_setmode;
}
- else
- ctlr->setmode = ata_cmd_setmode;
+ return 0;
+}
+
+static int
+ata_sii_mio_allocate(device_t dev, struct ata_channel *ch)
+{
+ struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
+ int i;
- if ((pci_read_config(dev, 0x51, 1) & 0x08) != 0x08) {
- device_printf(dev, "secondary channel disabled\n");
- ctlr->channels = 1;
- }
+ for (i = ATA_DATA; i <= ATA_STATUS; i++) {
+ ch->r_io[i].res = ctlr->r_io2;
+ ch->r_io[i].offset = 0x80 + i + (ch->unit << 6);
+ }
+ ch->r_io[ATA_ALTSTAT].res = ctlr->r_io2;
+ ch->r_io[ATA_ALTSTAT].offset = 0x8a + (ch->unit << 6);
+ ch->r_io[ATA_BMCMD_PORT].res = ctlr->r_io2;
+ ch->r_io[ATA_BMCMD_PORT].offset = 0x00 + (ch->unit << 3);
+ ch->r_io[ATA_BMSTAT_PORT].res = ctlr->r_io2;
+ ch->r_io[ATA_BMSTAT_PORT].offset = 0x02 + (ch->unit << 3);
+ ch->r_io[ATA_BMDTP_PORT].res = ctlr->r_io2;
+ ch->r_io[ATA_BMDTP_PORT].offset = 0x04 + (ch->unit << 3);
+ ch->r_io[ATA_BMDEVSPEC_0].res = ctlr->r_io2;
+ ch->r_io[ATA_BMDEVSPEC_0].offset = 0xa1 + (ch->unit << 6);
+ ch->r_io[ATA_IDX_ADDR].res = ctlr->r_io2;
+ if (ctlr->chip->max_dma >= ATA_SA150)
+ ch->flags |= ATA_NO_SLAVE;
+ ctlr->dmainit(ch);
return 0;
}
static void
+ata_sii_intr(void *data)
+{
+ struct ata_pci_controller *ctlr = data;
+ struct ata_channel *ch;
+ u_int8_t dmastat;
+ int unit;
+
+ /* implement this as a toggle instead to balance load XXX */
+ for (unit = 0; unit < 2; unit++) {
+ if (!(ch = ctlr->interrupt[unit].argument))
+ continue;
+ if (ATA_IDX_INB(ch, ATA_BMDEVSPEC_0) & 0x08) {
+ if (ch->dma->flags & ATA_DMA_ACTIVE) {
+ if (!((dmastat = (ATA_IDX_INB(ch, ATA_BMSTAT_PORT) &
+ ATA_BMSTAT_MASK)) & ATA_BMSTAT_INTERRUPT))
+ continue;
+ ATA_IDX_OUTB(ch, ATA_BMSTAT_PORT, dmastat|ATA_BMSTAT_INTERRUPT);
+ DELAY(1);
+ }
+ ctlr->interrupt[unit].function(ch);
+ }
+ }
+}
+
+static void
ata_cmd_intr(void *data)
{
struct ata_pci_controller *ctlr = data;
@@ -1551,7 +1614,7 @@
{
device_t parent = device_get_parent(atadev->channel->dev);
struct ata_pci_controller *ctlr = device_get_softc(parent);
- int devno = (atadev->channel->unit << 4) + (ATA_DEV(atadev->unit) << 1);
+ int rego = (atadev->channel->unit << 4) + (ATA_DEV(atadev->unit) << 1);
int mreg = atadev->channel->unit ? 0x84 : 0x80;
int mask = 0x03 << (ATA_DEV(atadev->unit) << 2);
int mval = pci_read_config(parent, mreg, 1) & ~mask;
@@ -1559,7 +1622,8 @@
mode = ata_limit_mode(atadev, mode, ctlr->chip->max_dma);
- mode = ata_check_80pin(atadev, mode);
+ if (ctlr->chip->max_dma < ATA_SA150)
+ mode = ata_check_80pin(atadev, mode);
error = ata_command(atadev, ATA_C_SETFEATURES, 0, mode,
ATA_C_F_SETXFER, ATA_WAIT_READY);
@@ -1567,20 +1631,24 @@
ata_prtdev(atadev, "%s setting %s on %s chip\n",
(error) ? "failed" : "success",
ata_mode2str(mode), ctlr->chip->text);
- if (!error) {
+
+ if (error)
+ return;
+
+ if (ctlr->chip->max_dma < ATA_SA150) {
if (mode >= ATA_UDMA0) {
u_int8_t udmatimings[] = { 0xf, 0xb, 0x7, 0x5, 0x3, 0x2, 0x1 };
- u_int8_t ureg = 0xac + devno;
+ u_int8_t ureg = 0xac + rego;
pci_write_config(parent, mreg,
mval | (0x03 << (ATA_DEV(atadev->unit) << 2)), 1);
pci_write_config(parent, ureg,
- (pci_read_config(parent, ureg, 1) & 0x3f) |
+ (pci_read_config(parent, ureg, 1) & ~0x3f) |
udmatimings[mode & ATA_MODE_MASK], 1);
}
else if (mode >= ATA_WDMA0) {
- u_int8_t dreg = 0xa8 + devno;
+ u_int8_t dreg = 0xa8 + rego;
u_int16_t dmatimings[] = { 0x2208, 0x10c2, 0x10c1 };
pci_write_config(parent, mreg,
@@ -1589,15 +1657,15 @@
}
else {
- u_int8_t preg = 0xa4 + devno;
+ u_int8_t preg = 0xa4 + rego;
u_int16_t piotimings[] = { 0x328a, 0x2283, 0x1104, 0x10c3, 0x10c1 };
pci_write_config(parent, mreg,
mval | (0x01 << (ATA_DEV(atadev->unit) << 2)), 1);
pci_write_config(parent, preg, piotimings[mode & ATA_MODE_MASK], 2);
}
- atadev->mode = mode;
}
+ atadev->mode = mode;
}
static void
==== //depot/projects/hammer/sys/dev/ata/ata-pci.c#11 (text+ko) ====
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.62 2003/06/07 15:19:16 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.63 2003/07/02 10:50:44 sos Exp $
*/
#include "opt_ata.h"
@@ -152,18 +152,13 @@
cmd = pci_read_config(dev, PCIR_COMMAND, 2);
}
#endif
- /* is busmastering supported and configured ? */
+ /* if busmastering configured get the I/O resource */
if ((cmd & PCIM_CMD_BUSMASTEREN) == PCIM_CMD_BUSMASTEREN) {
int rid = ATA_BMADDR_RID;
- if (!ctlr->r_io2) {
- if (!(ctlr->r_io1 = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
- 0, ~0, 1, RF_ACTIVE)))
- device_printf(dev, "Busmastering DMA not configured\n");
- }
+ ctlr->r_io1 = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
+ 0, ~0, 1, RF_ACTIVE);
}
- else
- device_printf(dev, "Busmastering DMA not supported\n");
ctlr->chipinit(dev);
==== //depot/projects/hammer/sys/dev/ata/ata-pci.h#9 (text+ko) ====
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.11 2003/05/18 16:45:48 sos Exp $
+ * $FreeBSD: src/sys/dev/ata/ata-pci.h,v 1.12 2003/07/02 10:50:44 sos Exp $
*/
/* structure holding chipset config info */
@@ -154,6 +154,7 @@
#define ATA_SILICON_IMAGE_ID 0x1095
#define ATA_SII0680 0x06801095
+#define ATA_SII3112 0x31121095
#define ATA_CMD646 0x06461095
#define ATA_CMD648 0x06481095
#define ATA_CMD649 0x06491095
@@ -242,9 +243,9 @@
#define SWKS66 1
#define SWKS100 2
-#define SII_INTR 0x01
-#define SII_SETCLK 0x02
-#define SII_ENINTR 0x04
+#define SIIMEMIO 1
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list