Module Name: src
Committed By: bouyer
Date: Sat Jan 23 17:47:37 UTC 2010
Modified Files:
src/distrib/sparc/miniroot [netbsd-5]: Makefile.inc
src/distrib/sparc/ramdisk [netbsd-5]: dot.profile
src/sys/arch/sparc/dev [netbsd-5]: audioamd.c fd.c
src/sys/arch/sparc/sparc [netbsd-5]: auxreg.h
src/sys/arch/sparc/stand/common [netbsd-5]: promdev.c
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1251):
sys/arch/sparc/sparc/auxreg.h: revision 1.13
distrib/sparc/ramdisk/dot.profile: revision 1.20
sys/arch/sparc/dev/audioamd.c: revision 1.25
sys/arch/sparc/dev/fd.c: revision 1.147
sys/arch/sparc/stand/common/promdev.c: revision 1.23
distrib/sparc/miniroot/Makefile.inc: revision 1.16
Build miniroot binaries for sparc with -Os to shrink instfs.tgz
for the second boot floppy which use miniroot objects.
This is workaround for PR install/42146, and ok'ed by m...@.
Don't try to read disklabel to check FS_RAID on floppy boot since
reopening floppy could cause Data Access Exception later.
Fixes PR port-sparc/42186, ok'ed by m...@.
Disable "fast trap" handlers which invoke software interrupts
in sparc/amd7930intr.s and sparc/bsd_fdintr.s until they are
rewritten to adapt new MI softint(9) API.
No particular comments on PR port-sparc/42192, but
this fixes timeout problem on floppy access on my SPARCstation 1+.
XXX: floppy support on sun4m seems to have another problem (data overrun).
Use /dev/fd0a rather than /dev/rfd0a to read instfs.tgz image from floppy.
It looks newer (appearred after 1.6) gzip tries to read less than DEV_BSIZE
(to check header?) so we can't use raw device directly.
(note sparc bootfs ramdisk doesn't have dd(1))
Workaround for PR port-sparc/42193, and would also fix PR install/28734.
Explicitly clear AUXIO4M_FTC bit in FTC_FLIP macro used on
pseudo-dma for floppy, as well as AUXIO4C_FTC bit for sun4c.
A comment in the macro says AUXIO4M_FTC bit is auto-clear,
but my two SS20s (including compatible) with 150MHz hyperSPARCs
get data_overrun without it, and no bad side effect on SS5
(works with and without this change).
Closes PR port-sparc/42516, which is the last one of a bunch of
floppy issue on NetBSD/sparc since NetBSD 2.0 days. See
http://mail-index.NetBSD.org/port-sparc/2009/12/20/msg000484.html
for details.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.34.1 src/distrib/sparc/miniroot/Makefile.inc
cvs rdiff -u -r1.19 -r1.19.4.1 src/distrib/sparc/ramdisk/dot.profile
cvs rdiff -u -r1.23 -r1.23.28.1 src/sys/arch/sparc/dev/audioamd.c
cvs rdiff -u -r1.141 -r1.141.6.1 src/sys/arch/sparc/dev/fd.c
cvs rdiff -u -r1.12 -r1.12.88.1 src/sys/arch/sparc/sparc/auxreg.h
cvs rdiff -u -r1.21 -r1.21.14.1 src/sys/arch/sparc/stand/common/promdev.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sparc/miniroot/Makefile.inc
diff -u src/distrib/sparc/miniroot/Makefile.inc:1.12 src/distrib/sparc/miniroot/Makefile.inc:1.12.34.1
--- src/distrib/sparc/miniroot/Makefile.inc:1.12 Sun Jun 13 05:27:18 2004
+++ src/distrib/sparc/miniroot/Makefile.inc Sat Jan 23 17:47:37 2010
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile.inc,v 1.12 2004/06/13 05:27:18 sjg Exp $
+# $NetBSD: Makefile.inc,v 1.12.34.1 2010/01/23 17:47:37 bouyer Exp $
IMAGESIZE= 8192k
+DBG= -Os
MAKEFS_FLAGS= -o density=4k
IMAGEENDIAN= be
MAKEDEVTARGETS= all
Index: src/distrib/sparc/ramdisk/dot.profile
diff -u src/distrib/sparc/ramdisk/dot.profile:1.19 src/distrib/sparc/ramdisk/dot.profile:1.19.4.1
--- src/distrib/sparc/ramdisk/dot.profile:1.19 Wed Apr 30 13:10:49 2008
+++ src/distrib/sparc/ramdisk/dot.profile Sat Jan 23 17:47:36 2010
@@ -1,4 +1,4 @@
-# $NetBSD: dot.profile,v 1.19 2008/04/30 13:10:49 martin Exp $
+# $NetBSD: dot.profile,v 1.19.4.1 2010/01/23 17:47:36 bouyer Exp $
#
# Copyright (c) 2000 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -76,7 +76,7 @@
local dev rval
rval=0
- dev="/dev/rfd0a"
+ dev="/dev/fd0a"
echo "Ejecting floppy disk"
eject $dev
Index: src/sys/arch/sparc/dev/audioamd.c
diff -u src/sys/arch/sparc/dev/audioamd.c:1.23 src/sys/arch/sparc/dev/audioamd.c:1.23.28.1
--- src/sys/arch/sparc/dev/audioamd.c:1.23 Mon Dec 3 15:34:20 2007
+++ src/sys/arch/sparc/dev/audioamd.c Sat Jan 23 17:47:36 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: audioamd.c,v 1.23 2007/12/03 15:34:20 ad Exp $ */
+/* $NetBSD: audioamd.c,v 1.23.28.1 2010/01/23 17:47:36 bouyer Exp $ */
/* NetBSD: am7930_sparc.c,v 1.44 1999/03/14 22:29:00 jonathan Exp */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audioamd.c,v 1.23 2007/12/03 15:34:20 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audioamd.c,v 1.23.28.1 2010/01/23 17:47:36 bouyer Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -306,7 +306,13 @@
sc->sc_au.au_bt = sc->sc_bt;
sc->sc_au.au_bh = sc->sc_bh;
(void)bus_intr_establish2(sc->sc_bt, pri, IPL_HIGH,
- am7930hwintr, sc, amd7930_trap);
+ am7930hwintr, sc,
+#ifdef notyet /* XXX amd7930intr.s needs to be fixed for MI softint(9) */
+ amd7930_trap
+#else
+ NULL
+#endif
+ );
sc->sc_sicookie = softint_establish(SOFTINT_SERIAL, am7930swintr, sc);
if (sc->sc_sicookie == NULL) {
Index: src/sys/arch/sparc/dev/fd.c
diff -u src/sys/arch/sparc/dev/fd.c:1.141 src/sys/arch/sparc/dev/fd.c:1.141.6.1
--- src/sys/arch/sparc/dev/fd.c:1.141 Wed Jun 11 21:25:31 2008
+++ src/sys/arch/sparc/dev/fd.c Sat Jan 23 17:47:36 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.141 2008/06/11 21:25:31 drochner Exp $ */
+/* $NetBSD: fd.c,v 1.141.6.1 2010/01/23 17:47:36 bouyer Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.141 2008/06/11 21:25:31 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.141.6.1 2010/01/23 17:47:36 bouyer Exp $");
#include "opt_ddb.h"
#include "opt_md.h"
@@ -639,7 +639,13 @@
fdciop = &fdc->sc_io;
if (bus_intr_establish2(fdc->sc_bustag, pri, 0,
- fdc_c_hwintr, fdc, fdchwintr) == NULL) {
+ fdc_c_hwintr, fdc,
+#ifdef notyet /* XXX bsd_fdintr.s needs to be fixed for MI softint(9) */
+ fdchwintr
+#else
+ NULL
+#endif
+ ) == NULL) {
printf("\n%s: cannot register interrupt handler\n",
fdc->sc_dev.dv_xname);
return (-1);
Index: src/sys/arch/sparc/sparc/auxreg.h
diff -u src/sys/arch/sparc/sparc/auxreg.h:1.12 src/sys/arch/sparc/sparc/auxreg.h:1.12.88.1
--- src/sys/arch/sparc/sparc/auxreg.h:1.12 Wed Nov 16 03:00:23 2005
+++ src/sys/arch/sparc/sparc/auxreg.h Sat Jan 23 17:47:36 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: auxreg.h,v 1.12 2005/11/16 03:00:23 uwe Exp $ */
+/* $NetBSD: auxreg.h,v 1.12.88.1 2010/01/23 17:47:36 bouyer Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -105,6 +105,9 @@
if (CPU_ISSUN4M) { \
/* AUXIO4M_FTC bit is auto-clear */ \
*AUXIO4M_REG = auxio_regval | AUXIO4M_FTC; \
+ /* XXX we need to clear it on hyperSPARC SS20 */ \
+ DELAY(10); \
+ *AUXIO4M_REG = auxio_regval; \
} else { \
auxio_regval |= AUXIO4C_FTC; \
*AUXIO4C_REG = auxio_regval; \
Index: src/sys/arch/sparc/stand/common/promdev.c
diff -u src/sys/arch/sparc/stand/common/promdev.c:1.21 src/sys/arch/sparc/stand/common/promdev.c:1.21.14.1
--- src/sys/arch/sparc/stand/common/promdev.c:1.21 Sat Apr 5 06:39:08 2008
+++ src/sys/arch/sparc/stand/common/promdev.c Sat Jan 23 17:47:36 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: promdev.c,v 1.21 2008/04/05 06:39:08 tsutsui Exp $ */
+/* $NetBSD: promdev.c,v 1.21.14.1 2010/01/23 17:47:36 bouyer Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -215,6 +215,15 @@
#endif
/*
+ * Don't check disklabel on floppy boot since
+ * reopening it could cause Data Access Exception later.
+ */
+ if (strncmp(prom_bootdevice, "fd", 2) == 0 ||
+ strstr(prom_bootdevice, "SUNW,fdtwo") != NULL ||
+ strstr(prom_bootdevice, "fdthree") != NULL)
+ return 0;
+
+ /*
* We need to read from the raw partition (i.e. the
* beginning of the disk in order to check the NetBSD
* disklabel to see if the boot partition is type RAID.