diff mbox series

[1/2] external/mambo: Populate kernel-base-address in the DT

Message ID 20190325042929.27508-1-ruscur@russell.cc
State Accepted
Headers show
Series [1/2] external/mambo: Populate kernel-base-address in the DT | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (b392d785eb49630b9f00fef8d17944ed82b2c1fe)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Russell Currey March 25, 2019, 4:29 a.m. UTC
skiboot.tcl defines PAYLOAD_ADDR as 0x20000000, which is the default in
skiboot.  This is also the default in skiboot unless kernel-base-address
is set in the device tree.

If you change PAYLOAD_ADDR to something else for mambo, skiboot won't
see it because it doesn't set that DT property, so fix it so that it does.

Signed-off-by: Russell Currey <ruscur@russell.cc>
---
 external/mambo/skiboot.tcl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Michael Neuling March 25, 2019, 8:59 p.m. UTC | #1
On Mon, 2019-03-25 at 15:29 +1100, Russell Currey wrote:
> skiboot.tcl defines PAYLOAD_ADDR as 0x20000000, which is the default in
> skiboot.  This is also the default in skiboot unless kernel-base-address
> is set in the device tree.
> 
> If you change PAYLOAD_ADDR to something else for mambo, skiboot won't
> see it because it doesn't set that DT property, so fix it so that it does.
> 
> Signed-off-by: Russell Currey <ruscur@russell.cc>

Thanks for fixing this

Acked-by: Michael Neuling <mikey@neuling.org>


> ---
>  external/mambo/skiboot.tcl | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
> index 545a7cca..096f1c34 100644
> --- a/external/mambo/skiboot.tcl
> +++ b/external/mambo/skiboot.tcl
> @@ -221,6 +221,10 @@ lappend compat "ibm,power8-xscom"
>  set compat [of::encode_compat $compat]
>  mysim of addprop $xscom_node byte_array "compatible" $compat
>  
> +set chosen_node [mysim of find_device /chosen]
> +set base_addr [list $mconf(payload_addr)]
> +mysim of addprop $chosen_node array64 "kernel-base-address" base_addr
> +
>  # Load any initramfs
>  set cpio_start 0x80000000
>  set cpio_end $cpio_start
> @@ -236,7 +240,6 @@ if { [info exists env(SKIBOOT_INITRD)] } {
>  	    set cpio_end [expr $cpio_end + $cpio_size]
>      }
>  
> -    set chosen_node [mysim of find_device /chosen]
>      mysim of addprop $chosen_node int "linux,initrd-start" $cpio_start
>      mysim of addprop $chosen_node int "linux,initrd-end"   $cpio_end
>  }
Stewart Smith March 29, 2019, 4:47 a.m. UTC | #2
Russell Currey <ruscur@russell.cc> writes:
> skiboot.tcl defines PAYLOAD_ADDR as 0x20000000, which is the default in
> skiboot.  This is also the default in skiboot unless kernel-base-address
> is set in the device tree.
>
> If you change PAYLOAD_ADDR to something else for mambo, skiboot won't
> see it because it doesn't set that DT property, so fix it so that it does.
>
> Signed-off-by: Russell Currey <ruscur@russell.cc>
> ---
>  external/mambo/skiboot.tcl | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

I fixed a thing in core/init.c when merging this as there was the crazy
let's-have-a-stb-header-on-kernel-when-booting-in-mambo thing that
broke.

Series merged to master as of edf7e841ff9d7ff1aef5518317319936fa362f11
diff mbox series

Patch

diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index 545a7cca..096f1c34 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -221,6 +221,10 @@  lappend compat "ibm,power8-xscom"
 set compat [of::encode_compat $compat]
 mysim of addprop $xscom_node byte_array "compatible" $compat
 
+set chosen_node [mysim of find_device /chosen]
+set base_addr [list $mconf(payload_addr)]
+mysim of addprop $chosen_node array64 "kernel-base-address" base_addr
+
 # Load any initramfs
 set cpio_start 0x80000000
 set cpio_end $cpio_start
@@ -236,7 +240,6 @@  if { [info exists env(SKIBOOT_INITRD)] } {
 	    set cpio_end [expr $cpio_end + $cpio_size]
     }
 
-    set chosen_node [mysim of find_device /chosen]
     mysim of addprop $chosen_node int "linux,initrd-start" $cpio_start
     mysim of addprop $chosen_node int "linux,initrd-end"   $cpio_end
 }