Subject: Re: Do LKMs work *at*all* on powerpc platforms?
To: Wolfgang Solfrank <>
From: gabriel rosenkoetter <>
List: port-powerpc
Date: 08/02/2000 12:07:25
On Wed, Aug 02, 2000 at 04:57:57PM +0200, Wolfgang Solfrank wrote:
> sorry for the delay.

And I'm sorry that I went on as if I hadn't seen any response. It's
only because I hadn't. (If you emailed me privately, you probably saw
the transient mail deliver errors. Situation is remedied now, and I
didn't even need my shotgun.)

> No, LKMs probably don't work on any powerpc platform.

That really blows. That means, to me, that we shouldn't even be
distributed as fully supporting the NetBSD API. It is a problem that
needs to be fixed.

> The reason is that the C compiler uses the "bl" instruction to do
> (ordinary, i.e. not through a function pointer) subroutine calls.  Those
> instructions have limitations in that they can only reach destinations
> less than 32MB apart from the current location.  Due to the way the kernel
> lays out its memory, any LKM is too far away from the kernel text to be
> reachable by this instruction :-(.

Is this IBM or Motorola's fault?

(... and why aren't we using AIX's ABI? Or are there other problems
with it?)

> We cannot use the dynamic linker in the kernel.  That one only supports
> userlevel programs.

Hrm. Could have sworn that random userland stuff I'd built was
statically linked without my having commanded it, but I seem to be
mistaken. Makes perfect sense that kernel stuff is static.

> Hope this explains things (albeit it probably doesn't help :-().

I'm not taking "you just can't do that" for an answer. Where do I
start to fix this? I have a long term project which absolutely
requires LKM support (in all NetBSD ports, actually; where else is it
broken?), so I might as well do the grunt work.

I can see that changing our API will only irritate/break other ports,
but I refuse to believe this is somehow impossible. The chip may be
dumb, but it can't be that dumb.

       ~ g r @