diff options
author | Laurent Dufour <ldufour@linux.vnet.ibm.com> | 2014-01-24 15:16:14 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2014-02-04 18:01:12 +0900 |
commit | d58ad564852c1dea9cbff3272df533a1bb078030 (patch) | |
tree | 2a8ffef4d821046d3b48b6801570d782e840da18 /purgatory | |
parent | d047cb716ee41ead450af5e8cc8e7190d2d04673 (diff) |
kexec/ppc64 Enable early kernel's OPAL calls
When the kernel is built with CONFIG_PPC_EARLY_DEBUG_OPAL set, it is
expecting to get r8 and r9 filled respectively with OPAL base address and
OPAL entry address (arc/power/head_64.S).
On the new powernv platform, having these 2 registers set allows the kernel
to perform OPAL calls before it parse the device tree.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Tested-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory')
-rw-r--r-- | purgatory/arch/ppc64/purgatory-ppc64.c | 2 | ||||
-rw-r--r-- | purgatory/arch/ppc64/v2wrap.S | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/purgatory/arch/ppc64/purgatory-ppc64.c b/purgatory/arch/ppc64/purgatory-ppc64.c index 0b6d326..7248ac8 100644 --- a/purgatory/arch/ppc64/purgatory-ppc64.c +++ b/purgatory/arch/ppc64/purgatory-ppc64.c @@ -29,6 +29,8 @@ unsigned long dt_offset = 0; unsigned long my_toc = 0; unsigned long kernel = 0; unsigned int debug = 0; +unsigned long opal_base = 0; +unsigned long opal_entry = 0; void setup_arch(void) { diff --git a/purgatory/arch/ppc64/v2wrap.S b/purgatory/arch/ppc64/v2wrap.S index 2761c14..6fc62e3 100644 --- a/purgatory/arch/ppc64/v2wrap.S +++ b/purgatory/arch/ppc64/v2wrap.S @@ -95,6 +95,10 @@ master: blt 80f stw 17,28(3) # save my cpu number as boot_cpu_phys 80: + LOADADDR(6,opal_base) # For OPAL early debug + ld 8,0(6) # load the OPAL base address in r8 + LOADADDR(6,opal_entry) # For OPAL early debug + ld 9,0(6) # load the OPAL entry address in r9 LOADADDR(6,kernel) ld 4,0(6) # load the kernel address LOADADDR(6,run_at_load) # the load flag |