Re: Calculating kernel logical address ..

David S. Miller
2002-09-09T05:03:04Z

From: Daniel Phillips <phillips@arcor.de>
Date: Sun, 8 Sep 2002 20:44:17 +0200

> For anything else you're in non-portablt land, including and
> in partiular:
>
> 1) kernel stack addresses

Could you elaborate on what bad things happen here?

Kernel stack allocation is defined per-architecture. On
sun4c sparc systems, we carve virtual pages out from the kernel
address space and hard map them into the TLB by hand.

> 2) addresses within the main kernel image text/data/bss

Yep. MIPS's KSEG0 (a stupid design if there ever was one)

Actually, KSEG0 the most Linux friendly design in the world
particularly in 64-bit mode. There is no need to have page tables at
all for the main kernel physical memory map. It would shave a lot of
code from the sparc64 TLB miss handlers if I didn't have to handle
PAGE_OFFSET pages, for example.

Alpha does something akin to KSEG0 as well.

I pine constantly for it appearing some day on a future UltraSPARC
revision :-)