NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-sparc/42186: sparc boot floppy "Data Access Exception" error



>Number:         42186
>Category:       port-sparc
>Synopsis:       sparc boot floppy "Data Access Exception" error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 15 15:35:00 +0000 2009
>Originator:     Izumi Tsutsui
>Release:        NetBSD 5.0.1
>Organization:
>Environment:
System: NetBSD 5.0.1
Architecture: sparc
Machine: sparc SPARCstation 1+ and SPARCstation 20 compatible
>Description:
Booting sparc installation floppy fetched from
pub/NetBSD/NetBSD-5.0.1/sparc/installation/floppy/disk1.gz
causes "Data Access Exception" error.
4.0.1 has the same problem.
3.0 works fine.

>How-To-Repeat:
On SS1+:
---
Type  help  for more information
ok boot fd()
Booting from: fd(0,0,0) 
>> NetBSD/sparc Secondary Boot, Revision 1.15
>> (builds%b8.netbsd.org@localhost, Thu Jul 30 00:08:01 UTC 2009)
Booting netbsd
Data Access Exception
ok 
---

On SS20:
---
Type  help  for more information
ok boot floppy
Boot device: /obio/SUNW,fdtwo  File and args:
>> NetBSD/sparc Secondary Boot, Revision 1.15
>> (builds%b8.netbsd.org@localhost, Thu Jul 30 00:08:01 UTC 2009)
Booting netbsd
Data Access Exception
ok
---

>Fix:
It looks support of booting from RAID in stand/common/promdev.c rev 1.19
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/sparc/stand/common/promdev.c#rev1.19
causes this problem and disabling disklabel read to check RAID partition
in promdev.c:devopen() fixes it.

Probably PROM routine is confused by opening the same floppy device
more than once?

The following patch checks boot device and skip RAID check on floppy boot,
and it fixes the problem.

---
Index: promdev.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/stand/common/promdev.c,v
retrieving revision 1.21
diff -u -r1.21 promdev.c
--- promdev.c   5 Apr 2008 06:39:08 -0000       1.21
+++ promdev.c   15 Oct 2009 15:21:48 -0000
@@ -215,6 +215,13 @@
 #endif
 
                /*
+                * Don't check disklabel on floppy boot.
+                */
+               if (strncmp(prom_bootdevice, "fd", 2) == 0 ||
+                   strstr(prom_bootdevice, "SUNW,fdtwo") != 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.

---

The GENERIC kernel still has another problem around floppy access
(it gets soft error or hard error even after floppy boot),
but I'll file another PR for it.

---
Izumi Tsutsui



Home | Main Index | Thread Index | Old Index