Allocating kernel memory within a specific range.

Igor Grobman igor at
Sat Mar 6 11:27:46 EST 2004

On Sat, 6 Mar 2004, Benjamin Herrenschmidt wrote:

> Nothing that works after kernel mm is initialized. You can reserve
> memory early during boot though, using the lmb_ mecanism, which provides
> some alignement & limits for allocations. (in prom.c). But that's a bit
> scary, don't think about using that for more than in-house experiments.

I saw this too, but apart from being scary, what you suggest defeats the
purpose of my tool, since I want it to work on an otherwise unmodified kernel
(apart from the module itself).

> Another possibility is to play MMU mapping tricks and map the last page
> of the virtual address space & use absolute branches.

I really like this idea.  I completely forgot that addresses get sign
extended even in the absolute case.  Does anyone see pitfalls here?


** Sent via the linuxppc64-dev mail list. See

More information about the Linuxppc64-dev mailing list