2005-04-16 16:20:36 -06:00
|
|
|
#
|
|
|
|
# Makefile for the linux ppc64 kernel.
|
|
|
|
#
|
|
|
|
|
2005-09-30 00:16:52 -06:00
|
|
|
ifneq ($(CONFIG_PPC_MERGE),y)
|
2005-10-10 06:50:37 -06:00
|
|
|
|
|
|
|
EXTRA_CFLAGS += -mno-minimal-toc
|
2005-04-16 16:20:36 -06:00
|
|
|
extra-y := head.o vmlinux.lds
|
|
|
|
|
2005-10-27 20:51:45 -06:00
|
|
|
obj-y := misc.o prom.o
|
2005-10-11 23:55:09 -06:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2005-11-09 00:07:45 -07:00
|
|
|
obj-y += idle.o dma.o \
|
2005-11-08 19:38:01 -07:00
|
|
|
align.o \
|
2005-10-19 17:11:29 -06:00
|
|
|
rtc.o \
|
2005-11-11 03:15:21 -07:00
|
|
|
iommu.o
|
2005-04-16 16:20:36 -06:00
|
|
|
|
|
|
|
pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o
|
|
|
|
|
|
|
|
obj-$(CONFIG_PCI) += pci.o pci_iommu.o iomap.o $(pci-obj-y)
|
|
|
|
|
2005-10-26 00:47:42 -06:00
|
|
|
obj-$(CONFIG_PPC_MULTIPLATFORM) += nvram.o
|
2005-10-11 23:55:09 -06:00
|
|
|
ifneq ($(CONFIG_PPC_MERGE),y)
|
|
|
|
obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o
|
|
|
|
endif
|
2005-04-16 16:20:36 -06:00
|
|
|
|
[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 15:58:10 -06:00
|
|
|
obj-$(CONFIG_KEXEC) += machine_kexec.o
|
2005-10-11 23:55:09 -06:00
|
|
|
obj-$(CONFIG_MODULES) += module.o
|
|
|
|
ifneq ($(CONFIG_PPC_MERGE),y)
|
|
|
|
obj-$(CONFIG_MODULES) += ppc_ksyms.o
|
|
|
|
endif
|
2005-04-16 16:20:36 -06:00
|
|
|
obj-$(CONFIG_HVC_CONSOLE) += hvconsole.o
|
2005-10-11 23:55:09 -06:00
|
|
|
ifneq ($(CONFIG_PPC_MERGE),y)
|
2005-04-16 16:20:36 -06:00
|
|
|
obj-$(CONFIG_BOOTX_TEXT) += btext.o
|
2005-10-11 23:55:09 -06:00
|
|
|
endif
|
2005-04-16 16:20:36 -06:00
|
|
|
obj-$(CONFIG_HVCS) += hvcserver.o
|
2005-07-12 01:40:17 -06:00
|
|
|
|
2005-04-16 16:20:36 -06:00
|
|
|
obj-$(CONFIG_KPROBES) += kprobes.o
|
|
|
|
|
2005-10-11 23:55:09 -06:00
|
|
|
ifneq ($(CONFIG_PPC_MERGE),y)
|
2005-08-16 21:01:50 -06:00
|
|
|
ifeq ($(CONFIG_PPC_ISERIES),y)
|
2005-10-10 06:45:07 -06:00
|
|
|
arch/ppc64/kernel/head.o: arch/powerpc/kernel/lparmap.s
|
|
|
|
AFLAGS_head.o += -Iarch/powerpc/kernel
|
2005-08-16 21:01:50 -06:00
|
|
|
endif
|
2005-10-01 02:43:42 -06:00
|
|
|
endif
|