Port-arm archive

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

Shark versus new config



Hi all,

Shark doesn't boot at the moment - it fails attaching ofisa with:

  panic: kernel diagnostic assertion "ifattr || cfdriver_iattr_count(parent->dv_cfdriver) < 2" failed: file "/usr/src/sys/kern/subr_autoconf.c", line 1130 

If I understand correctly, this is because src/sys/dev/ofisa/files.ofisa
has:

  device ofisa: ofisa, ofbus

i.e. both "ofisa" and "ofbus" attributes.  Removing "ofbus" seems logical
but that causes config failures because shark GENERIC contains:

  ofrtc*  at ofisa?
  ofbus*  at ofisa?

"ofrtc" is in src/sys/dev/ofw/files.ofw as:

  attach ofrtc at ofbus

but shark seems the only user, so we could move that to ofisa instead.  We
only use "ofbus at ofisa" for gpio@isa on shark, and all we do there is
print "no configured", so it's tempting to just remove this from GENERIC.

The attached patch makes ofisa attach, but we crash later in audio_attach_mi
from ess_ofisa_attach with the same kassert.  I guess that the problem is
with src/sys/dev/isa/files.isa:

  device  ess { } : audiobus, isadma, midibus

I'm not sure what's correct here - remove "audiobus" and "midibus"?

Do we need to check every device entry with > 1 attribute?

Regards,

Julian

PS.  The patch isn't great because ofrtc is now in both ofw and ofisa.
Index: src/sys/dev/ofw/files.ofw
===================================================================
RCS file: /cvsroot/src/sys/dev/ofw/files.ofw,v
retrieving revision 1.16
diff -u -r1.16 files.ofw
--- src/sys/dev/ofw/files.ofw	4 Feb 2021 20:19:09 -0000	1.16
+++ src/sys/dev/ofw/files.ofw	26 Apr 2021 18:31:52 -0000
@@ -32,11 +32,6 @@
 attach	ofcons at ofbus
 file	dev/ofw/ofcons.c		ofcons needs-flag
 
-# Generic RTC support
-device	ofrtc
-attach	ofrtc at ofbus
-file	dev/ofw/ofrtc.c			ofrtc needs-flag
-
 # Generic bus support
 device	ofbus: ofbus
 attach	ofbus at ofbus
Index: src/sys/dev/ofisa/files.ofisa
===================================================================
RCS file: /cvsroot/src/sys/dev/ofisa/files.ofisa,v
retrieving revision 1.14
diff -u -r1.14 files.ofisa
--- src/sys/dev/ofisa/files.ofisa	11 Dec 2005 12:22:48 -0000	1.14
+++ src/sys/dev/ofisa/files.ofisa	26 Apr 2021 18:31:52 -0000
@@ -3,7 +3,7 @@
 # OFW ISA bus support
 # XXX eventually we should do something with these locators
 define	ofisa { [i = -1], [it = -1], [iv = -1], [m = -1] }
-device	ofisa: ofisa, ofbus
+device	ofisa: ofisa
 attach	ofisa at ofbus
 file	dev/ofisa/ofisa.c		ofisa
 
@@ -41,3 +41,8 @@
 # attachment of ISA Game port driver
 attach	joy at ofisa with joy_ofisa
 file	dev/ofisa/joy_ofisa.c		joy_ofisa
+
+# Generic RTC support
+device	ofrtc
+attach	ofrtc at ofisa
+file	dev/ofw/ofrtc.c			ofrtc needs-flag
Index: src/sys/arch/shark/conf/GENERIC
===================================================================
RCS file: /cvsroot/src/sys/arch/shark/conf/GENERIC,v
retrieving revision 1.136
diff -u -r1.136 GENERIC
--- src/sys/arch/shark/conf/GENERIC	16 Aug 2020 10:27:47 -0000	1.136
+++ src/sys/arch/shark/conf/GENERIC	26 Apr 2021 18:31:52 -0000
@@ -207,7 +207,7 @@
 ofrom*		at ofbus?
 
 ofisa*		at ofbus?
-ofbus*		at ofisa?
+#ofbus*		at ofisa?
 
 # IDE/ATA disk
 wdc*		at ofisa?


Home | Main Index | Thread Index | Old Index