remarkable-linux/include
R Sharada fce0d57403 [PATCH] ppc64: kexec support for ppc64
This patch implements the kexec support for ppc64 platforms.

A couple of notes:

1)  We copy the pages in virtual mode, using the full base kernel
    and a statically allocated stack.   At kexec_prepare time we
    scan the pages and if any overlap our (0, _end[]) range we
    return -ETXTBSY.

    On PowerPC 64 systems running in LPAR (logical partitioning)
    mode, only a small region of memory, referred to as the RMO,
    can be accessed in real mode.  Since Linux runs with only one
    zone of memory in the memory allocator, and it can be orders of
    magnitude more memory than the RMO, looping until we allocate
    pages in the source region is not feasible.  Copying in virtual
    means we don't have to write a hash table generation and call
    hypervisor to insert translations, instead we rely on the pinned
    kernel linear mapping.  The kernel already has move to linked
    location built in, so there is no requirement to load it at 0.

    If we want to load something other than a kernel, then a stub
    can be written to copy a linear chunk in real mode.

2)  The start entry point gets passed parameters from the kernel.
    Slaves are started at a fixed address after copying code from
    the entry point.

    All CPUs get passed their firmware assigned physical id in r3
    (most calling conventions use this register for the first
    argument).

    This is used to distinguish each CPU from all other CPUs.
    Since firmware is not around, there is no other way to obtain
    this information other than to pass it somewhere.

    A single CPU, referred to here as the master and the one executing
    the kexec call, branches to start with the address of start in r4.
    While this can be calculated, we have to load it through a gpr to
    branch to this point so defining the register this is contained
    in is free.  A stack of unspecified size is available at r1
    (also common calling convention).

    All remaining running CPUs are sent to start at absolute address
    0x60 after copying the first 0x100 bytes from start to address 0.
    This convention was chosen because it matches what the kernel
    has been doing itself.  (only gpr3 is defined).

    Note: This is not quite the convention of the kexec bootblock v2
    in the kernel.  A stub has been written to convert between them,
    and we may adjust the kernel in the future to allow this directly
    without any stub.

3)  Destination pages can be placed anywhere, even where they
    would not be accessible in real mode.  This will allow us to
    place ram disks above the RMO if we choose.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: R Sharada <sharada@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-25 16:24:51 -07:00
..
acpi Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
asm-alpha [PATCH] remove non-DISCONTIG use of pgdat->node_mem_map 2005-06-23 09:45:00 -07:00
asm-arm [PATCH] sched: cleanup context switch locking 2005-06-25 16:24:43 -07:00
asm-arm26 [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-cris [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-frv [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-generic [PATCH] kexec: vmlinux: fix physical addresses 2005-06-25 16:24:47 -07:00
asm-h8300 [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-i386 [PATCH] kexec: x86 kexec core 2005-06-25 16:24:49 -07:00
asm-ia64 [PATCH] sched: cleanup context switch locking 2005-06-25 16:24:43 -07:00
asm-m32r [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-m68k [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-m68knommu [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-mips [PATCH] sched: cleanup context switch locking 2005-06-25 16:24:43 -07:00
asm-parisc [PATCH] compat: introduce compat_time_t 2005-06-23 09:45:32 -07:00
asm-ppc [PATCH] kexec: kexec ppc support 2005-06-25 16:24:51 -07:00
asm-ppc64 [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
asm-s390 [PATCH] sched: cleanup context switch locking 2005-06-25 16:24:43 -07:00
asm-sh [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-sh64 [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-sparc [PATCH] sched: cleanup context switch locking 2005-06-25 16:24:43 -07:00
asm-sparc64 [PATCH] sched: cleanup context switch locking 2005-06-25 16:24:43 -07:00
asm-um [PATCH] uml: add profile_pc for i386 2005-06-25 16:24:36 -07:00
asm-v850 [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-x86_64 [PATCH] kexec: x86_64 kexec implementation 2005-06-25 16:24:50 -07:00
asm-xtensa [PATCH] xtensa: Architecture support for Tensilica Xtensa Part 8 2005-06-24 00:05:22 -07:00
linux [PATCH] kexec: add kexec syscalls 2005-06-25 16:24:48 -07:00
math-emu Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
media [PATCH] v4l: update for SAA7134 cards 2005-06-24 00:06:39 -07:00
mtd Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
net Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2005-06-24 00:31:46 -07:00
pcmcia [PATCH] yenta TI: turn off interrupts during card power-on #2 2005-06-23 09:45:31 -07:00
rxrpc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
scsi [PATCH] I2O: Adaptec specific SG_IO access, firmware access through sysfs and 2400A workaround 2005-06-24 00:05:28 -07:00
sound [PATCH] create a kstrdup library function 2005-06-23 09:45:18 -07:00
video [PATCH] Clean-up and bug fix for tdfxfb framebuffer size detection 2005-05-01 08:59:25 -07:00