kernel-ark/arch/ppc64/kernel
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
..
vdso32
vdso64
align.c
asm-offsets.c [PATCH] ppc64 iSeries: tidy up some includes and HvCall.h 2005-06-21 18:46:28 -07:00
binfmt_elf32.c
bitops.c
bpa_iic.c [PATCH] ppc64: Add driver for BPA interrupt controllers 2005-06-23 09:43:43 +10:00
bpa_iic.h [PATCH] ppc64: Add driver for BPA interrupt controllers 2005-06-23 09:43:43 +10:00
bpa_iommu.c [PATCH] ppc64: Add driver for BPA iommu 2005-06-23 09:43:54 +10:00
bpa_iommu.h [PATCH] ppc64: Add driver for BPA iommu 2005-06-23 09:43:54 +10:00
bpa_nvram.c [PATCH] ppc64: add a minimal nvram driver 2005-06-23 09:43:31 +10:00
bpa_setup.c [PATCH] ppc64: Add driver for BPA iommu 2005-06-23 09:43:54 +10:00
btext.c
cpu_setup_power4.S [PATCH] ppc64: add BPA platform type 2005-06-23 09:43:37 +10:00
cputable.c [PATCH] ppc64: add BPA platform type 2005-06-23 09:43:37 +10:00
dma.c [PATCH] ppc64 iSeries: allow build with no PCI 2005-06-21 18:46:31 -07:00
eeh.c [PATCH] ppc64: Abolish ioremap_mm 2005-06-21 18:46:26 -07:00
entry.S [PATCH] ppc64: cleanup iseries runlight support 2005-06-02 15:12:30 -07:00
head.S [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
HvCall.c
hvCall.S
hvconsole.c
hvcserver.c
HvLpConfig.c
HvLpEvent.c [PATCH] ppc64 iSeries: remove LparData.h 2005-06-21 18:46:27 -07:00
i8259.c
i8259.h
idle_power4.S
idle.c [PATCH] ppc64 iSeries: cleanup ItLpQueue.h 2005-06-21 18:46:28 -07:00
init_task.c
ioctl32.c
iomap.c
iommu.c [PATCH] initialize TCE tables 2005-06-20 21:43:48 +10:00
irq.c [PATCH] ppc64: add BPA platform type 2005-06-23 09:43:37 +10:00
iSeries_htab.c
iSeries_iommu.c [PATCH] ppc64 iSeries: allow build with no PCI 2005-06-21 18:46:31 -07:00
iSeries_irq.c [PATCH] ppc64 iSeries: tidy up irq code after merge 2005-06-21 18:46:30 -07:00
iSeries_pci.c [PATCH] ppc64 iSeries: remove some more members of iSeries_Device_Node 2005-06-21 18:46:30 -07:00
iSeries_proc.c [PATCH] ppc64 iSeries: remove LparData.h 2005-06-21 18:46:27 -07:00
iSeries_setup.c [PATCH] ppc64: consolidate calibrate_decr implementations 2005-06-23 09:43:07 +10:00
iSeries_setup.h
iSeries_smp.c [PATCH] ppc64 iSeries: eliminate some unused inline functions 2005-06-21 18:46:28 -07:00
iSeries_VpdInfo.c [PATCH] ppc64 iSeries: remove some more members of iSeries_Device_Node 2005-06-21 18:46:30 -07:00
ItLpQueue.c [PATCH] ppc64 iSeries: remove LparData.h 2005-06-21 18:46:27 -07:00
kprobes.c [PATCH] kprobes: Temporary disarming of reentrant probe for ppc64 2005-06-23 09:45:25 -07:00
lmb.c
lparcfg.c [PATCH] ppc64: Fix compile warnings in arch/ppc64/kernel/lparcfg.c 2005-06-25 16:24:27 -07:00
LparData.c
machine_kexec.c [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
Makefile [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
maple_pci.c
maple_setup.c [PATCH] Maple powerdown patch 2005-06-23 17:14:39 +10:00
maple_time.c [PATCH] ppc64: consolidate calibrate_decr implementations 2005-06-23 09:43:07 +10:00
mf.c [PATCH] ppc64 iSeries: tidy up some includes and HvCall.h 2005-06-21 18:46:28 -07:00
misc.S [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
module.c
mpic.c [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
mpic.h [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
nvram.c
of_device.c [PATCH] Driver Core: arch: update device attribute callbacks 2005-06-20 15:15:32 -07:00
pacaData.c
pci_direct_iommu.c
pci_dn.c
pci_iommu.c
pci.c [PATCH] pSeries - read irqs dynamically 2005-06-23 17:09:54 +10:00
pci.h [PATCH] pSeries - read irqs dynamically 2005-06-23 17:09:54 +10:00
pmac_feature.c
pmac_low_i2c.c
pmac_nvram.c
pmac_pci.c
pmac_setup.c
pmac_smp.c
pmac_time.c [PATCH] ppc64: consolidate calibrate_decr implementations 2005-06-23 09:43:07 +10:00
pmac.h
pmc.c
ppc_ksyms.c
proc_ppc64.c [PATCH] ppc64: add BPA platform type 2005-06-23 09:43:37 +10:00
process.c [PATCH] ppc64: Abolish ioremap_mm 2005-06-21 18:46:26 -07:00
prom_init.c [PATCH] ppc64: add BPA platform type 2005-06-23 09:43:37 +10:00
prom.c [PATCH] ppc64: set/clear SMT capable bit at boot 2005-06-21 18:46:31 -07:00
pSeries_hvCall.S
pSeries_iommu.c
pSeries_lpar.c
pSeries_nvram.c
pSeries_pci.c [PATCH] pSeries - read irqs dynamically 2005-06-23 17:09:54 +10:00
pSeries_reconfig.c [PATCH] ppc32/ppc64: cleanup /proc/device-tree 2005-06-01 07:54:14 -07:00
pSeries_setup.c [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
pSeries_smp.c [PATCH] i386 CPU hotplug 2005-06-25 16:24:29 -07:00
ptrace32.c
ptrace.c [PATCH] ppc64: fix seccomp with 32-bit userland 2005-06-24 00:05:18 -07:00
ras.c [PATCH] ppc64 iSeries: remove LparData.h 2005-06-21 18:46:27 -07:00
rtas_flash.c
rtas_pci.c [PATCH] ppc64: Split out generic rtas code from pSeries_pci.c. 2005-06-23 09:43:23 +10:00
rtas-proc.c [PATCH] ppc64: pSeries_progress -> rtas_progress 2005-06-23 09:43:28 +10:00
rtas.c [PATCH] correct printing to operator panel 2005-06-23 16:09:41 +10:00
rtasd.c [PATCH] ppc64: quieten RTAS printks 2005-06-20 21:43:07 +10:00
rtc.c [PATCH] ppc64: rename pSeries rtc functions into rtas_* 2005-06-23 09:43:18 +10:00
scanlog.c
semaphore.c
setup.c [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00
signal32.c
signal.c
smp-tbsync.c
smp.c [PATCH] ppc64: Add driver for BPA interrupt controllers 2005-06-23 09:43:43 +10:00
spider-pic.c [PATCH] ppc64: Add driver for BPA interrupt controllers 2005-06-23 09:43:43 +10:00
sys_ppc32.c [PATCH] ppc64 iSeries: allow build with no PCI 2005-06-21 18:46:31 -07:00
syscalls.c [PATCH] ppc64: Fix PER_LINUX32 behaviour 2005-06-08 16:24:15 -07:00
sysfs.c [PATCH] ppc64: cleanup iseries runlight support 2005-06-02 15:12:30 -07:00
time.c [PATCH] ppc64: consolidate calibrate_decr implementations 2005-06-23 09:43:07 +10:00
traps.c [PATCH] ppc64: add BPA platform type 2005-06-23 09:43:37 +10:00
u3_iommu.c
udbg.c
vdso.c
vecemu.c
vector.S
vio.c [PATCH] ppc64: tidy up vio devices fake parent 2005-06-21 18:46:31 -07:00
viopath.c [PATCH] ppc64 iSeries: misc header cleanups 2005-06-21 18:46:28 -07:00
vmlinux.lds.S
xics.c [PATCH] ppc64: kexec support for ppc64 2005-06-25 16:24:51 -07:00