Subject: Re: Bummer - NetBSD 2.1 panic - si_refs - update
To: Allen Briggs <briggs@netbsd.org>
From: Michael Lorenz <macallan@netbsd.org>
List: port-macppc
Date: 01/31/2007 16:44:40
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Jan 31, 2007, at 16:24, Allen Briggs wrote:

> On Wed, Jan 31, 2007 at 02:11:50PM -0500, Michael Lorenz wrote:
>> I had a further look at macppc's interrupt handling ( pretty much the
>> last non-OpenPIC part I didn't mess with yet ) - first, splhigh 
>> doesn't
>> block all interrupts, it explicitly allows IPL_SERIAL and I'm not 
>> quite
>> sure what else, the hierarchy enforcement looks weird to say the 
>> least.
>
> IPL_SERIAL is an exception to the rule so that serial ports with
> very small FIFOs have a prayer of working at high speeds on slower
> systems.  Serial drivers (often?) have two portions: the minimal
> parts that run at IPL_SERIAL to service the hardware and load/drain
> software queues, and the more extensive bits that run at IPL_SOFTSERIAL
> and service the software queues.  So IPL_SERIAL is really high 
> priority,
> but what you do at IPL_SERIAL is supposed to be ~trivial.
>
> So it's a hack whose function outweighs its lack of form.

Yeah, I know what it's for - should probably be mentioned in spl(9) 
since that man page claims that IPL_HIGH blocks all hard and soft 
interrupts.
Hmm, pretty much all PowerMacs should support some sort of DMA at least 
with the onboard serial ports anyway, and I've seen some unused code to 
deal with that - any idea what's wrong with it?

>> I think in a couple days I'll have something ready that makes
>> interrupts on macppc behave as described in spl(9). If there's any
>> additional documentation on this please let me know. I had a look at
>> other archs' interrupt hierarchies ( sparc(64), shark, prep and a few
>> others ) and they all differ from spl(9) in more or less creative 
>> ways,
>> many appear to be derived from macppc. So which one is considered
>> canonical if any?
>
> i386, alpha, and hp300 are some that I'd consider more or less 
> canonical
> for different reasons.  Generally, I think you want to follow the
> general structure in spl(9), but with exceptions as necessary for
> function--like the hard-serial priority.

Ok, I'll look at those. At least hp300 should be somewhat familiar :)

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRcENyMpnzkX8Yg2nAQIxyAgAlpb95BjrPbNyaEpWJQjX5N4Xy2k7NMgO
YHkO5mGBGMF3NLe6T9bkC6J68CHhfC55O2+9wWTR/8uOaC5WpaqmTocNySFWj1nC
pSuGm1N0Rzo2Ti+bMrbAWK4NTIK7ZfhcmT9StkgG+ffpOHcPhThoSbEyRRpm7q06
hlm423bRX43ZqmmthUPqIY5paLdtw6zbeDFS/RSqi2mx7Nf9+VBgRiIf4JSUUMp1
zQ6DHHzGVQ8yK6xgWjal54MARfwEuHXzre8fNLQ31bDz2vkJO9pieT7ra9OCvQ98
xMWc3TGxKjOQMcc8gWaY8hzaeOL9Z4ExftqDE5cAKeFyyJDs3YySUg==
=VTOU
-----END PGP SIGNATURE-----