[Linux-ia64] [patch 2.5.39] allow kernel to be virtually mapped from any physi cal address

From: Luck, Tony <tony.luck_at_intel.com>
Date: 2002-10-16 08:12:39
The current ia64 kernel expects to be loaded at physical 68MB
(KERNEL_START in asm-ia64/system.h).  This is a problem for
machines that do not guarantee the presence of memory at that
address (e.g. ccNUMA platforms that configure memory based on
which nodes exist).

I bundled a solution to this in my earlier discontig patch (and
included other features like kernel text replication, which made
the patch far to large to be accepted).

This patch provides just the code needed to virtually map the
kernel to a fixed virtual address from whatever physical address
it happened to be loaded at (it is assumed that the bootloader
handled the issue of finding a suitably aligned piece of memory).

Almost all of the code is inside CONFIG_IA64_VMAP_KERNEL, there
are a few exceptions:

1) the "switch_mode" routine in head.S (which toggles between
running in virtual and physical mode) has been split into
separate "switch_mode_phys" and "switch_mode_virt" and the
callers changed to use the appropriate one.

2) There are new macros "__tpa()" and "__imva()" defined in
pgtable.h, versions are provided for the both the 'Y' and 'N'
state of CONFIG_IA64_VMAP_KERNEL, so that these may be used
freely in code without adding a zillion extra #ifdefs

3) fs/proc/kcore.c is currently broken (and has been for a long
time) because ia64 defines VMALLOC_START at a lower address that
PAGE_START. Try to access a vmalloc'd address to see the breakage.
This patch fixes that in changes *not* bracketed with
CONFIG_IA64_VMAP_KERNEL as well as providing the extra ELF Phdr
for the virtually mapped kernel inside the #ifdef.

4) I put the empty_zero_page changes inside #ifdef, but they
could be generic (avoids calling virt_to_page() a lot, which
may be a good thing).


Received on Tue Oct 15 15:12:44 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:10 EST