kernel-ark/include/asm-ppc64
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
..
iSeries [PATCH] ppc64 iSeries: tidy up irq code after merge 2005-06-21 18:46:30 -07:00
8253pit.h
a.out.h [PATCH] ppc64: remove unnecessary include 2005-05-01 08:58:46 -07:00
abs_addr.h
agp.h [PATCH] AGP fix for Xen VMM 2005-06-07 12:35:43 -07:00
atomic.h
bitops.h
bootinfo.h
btext.h
bug.h [PATCH] remove all kernel BUGs 2005-05-01 08:59:01 -07:00
bugs.h
byteorder.h
cache.h
cacheflush.h
checksum.h
compat.h [PATCH] compat: introduce compat_time_t 2005-06-23 09:45:32 -07:00
cputable.h
cputime.h
current.h
dbdma.h
delay.h
div64.h
dma-mapping.h
dma.h [PATCH] ppc64 iSeries: allow build with no PCI 2005-06-21 18:46:31 -07:00
eeh.h
elf.h [PATCH] ppc64: Fix PER_LINUX32 behaviour 2005-06-08 16:24:15 -07:00
errno.h
fcntl.h
floppy.h
hardirq.h
hdreg.h
hvcall.h
hvconsole.h
hvcserver.h
hw_irq.h
ide.h
imalloc.h [PATCH] ppc64: Abolish ioremap_mm 2005-06-21 18:46:26 -07:00
io.h
ioctl.h
ioctls.h
iommu.h [PATCH] ppc64 iSeries: allow build with no PCI 2005-06-21 18:46:31 -07:00
ipc.h
ipcbuf.h
irq.h
kdebug.h [PATCH] RCU: clean up a few remaining synchronize_kernel() calls 2005-06-25 16:24:38 -07:00
kexec.h [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
keylargo.h
kmap_types.h
kprobes.h
linkage.h
lmb.h
local.h
lppaca.h
machdep.h [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
macio.h
mc146818rtc.h
memory.h
mman.h
mmu_context.h [PATCH] ppc64: pgtable.h and other header cleanups 2005-05-05 16:36:32 -07:00
mmu.h [PATCH] ppc64 kexec: native hash clear 2005-06-25 16:24:51 -07:00
mmzone.h [PATCH] ppc64: sparsemem memory model 2005-06-23 09:45:06 -07:00
module.h
msgbuf.h
naca.h
namei.h
numnodes.h
nvram.h [PATCH] ppc64: add a minimal nvram driver 2005-06-23 09:43:31 +10:00
of_device.h
paca.h [PATCH] ppc64 iSeries: tidy up some includes and HvCall.h 2005-06-21 18:46:28 -07:00
page.h [PATCH] ppc64: sparsemem memory model 2005-06-23 09:45:06 -07:00
param.h
parport.h
pci-bridge.h
pci.h
percpu.h
pgalloc.h [PATCH] ppc64: update to use the new 4L headers 2005-05-01 08:58:44 -07:00
pgtable.h [PATCH] ppc64: Abolish ioremap_mm 2005-06-21 18:46:26 -07:00
plpar_wrappers.h
pmac_feature.h
pmac_low_i2c.h
pmc.h
poll.h
posix_types.h
ppc32.h [PATCH] compat: introduce compat_time_t 2005-06-23 09:45:32 -07:00
ppc_asm.h
ppcdebug.h
processor.h [PATCH] ppc64: add BPA platform type 2005-06-23 09:43:37 +10:00
prom.h [PATCH] ppc32/ppc64: cleanup /proc/device-tree 2005-06-01 07:54:14 -07:00
pSeries_reconfig.h
ptrace-common.h
ptrace.h
resource.h
rtas.h [PATCH] ppc64: pSeries_progress -> rtas_progress 2005-06-23 09:43:28 +10:00
rwsem.h
scatterlist.h
seccomp.h
sections.h
segment.h
semaphore.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h [PATCH] asm/signal.h unification 2005-05-04 07:33:15 -07:00
smp.h [PATCH] ppc64: add BPA platform type 2005-06-23 09:43:37 +10:00
smu.h
socket.h
sockios.h
sparsemem.h [PATCH] ppc64: sparsemem memory model 2005-06-23 09:45:06 -07:00
spinlock.h [PATCH] ppc64: reverse prediction on spinlock busy loop code 2005-05-01 08:58:47 -07:00
sstep.h
stat.h
statfs.h
string.h
system.h
systemcfg.h
termbits.h
termios.h
thread_info.h [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
time.h [PATCH] ppc64: consolidate calibrate_decr implementations 2005-06-23 09:43:07 +10:00
timex.h
tlb.h
tlbflush.h
topology.h [PATCH] ppc64: pcibus_to_node fix 2005-06-23 09:45:08 -07:00
types.h
uaccess.h
ucontext.h
udbg.h
unaligned.h
uninorth.h
unistd.h
user.h
vdso.h
vga.h
vio.h
xics.h [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
xor.h