Port-arm archive

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

Re: Shark versus new config

> On Apr 26, 2021, at 11:45 AM, Julian Coleman <jdc%coris.org.uk@localhost> wrote:
> 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.

Looking at this right now.  What's gross is that ofisa previously got away with this because the "ofisa_attach_args" has an "ofbus_attach_args" at the front of it.

Anyway, ofrtc uses the firmware routines to manage read/write.  That's cool and all, but I'm going to skin this cat by just adding a standard ISA rtc driver attachment for ofisa.

> 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, midi-bus
> I'm not sure what's correct here - remove "audiobus" and "midibus"?

I fixed this already (as well as a few other problematic audio drivers).

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

With more than one *interface attribute*.

-- thorpej

Home | Main Index | Thread Index | Old Index