aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2020-11-26 13:01:51 +1100
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2020-11-27 14:37:54 +0530
commit3e2ad44e09bdee7e9445296cd00aec195dff9022 (patch)
tree6fca84f561c7b5c1cafa2d3f580490e4caace5a9 /external
parent3f65437bb367ccf479fa6b9e905bf50ede359e9d (diff)
downloadskiboot-3e2ad44e09bdee7e9445296cd00aec195dff9022.zip
skiboot-3e2ad44e09bdee7e9445296cd00aec195dff9022.tar.gz
skiboot-3e2ad44e09bdee7e9445296cd00aec195dff9022.tar.bz2
external/mambo: 4 byte align chained CPIOs
Linux requires chained CPIOs to be 4 byte aligned otherwise they are ignored. This aligns them. Signed-off-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Dan HorĂ¡k <dan@danny.cz> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/mambo/skiboot.tcl3
1 files changed, 2 insertions, 1 deletions
diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index 76d29f6..3a8e194 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -274,13 +274,14 @@ if { [info exists env(SKIBOOT_INITRD)] } {
set cpio_size [file size $cpio_file]
mysim mcm 0 memory fread $cpio_end $cpio_size $cpio_file
set cpio_end [expr $cpio_end + $cpio_size]
+ # Linux requires cpios are 4 byte aligned
+ set cpio_end [expr $cpio_end + 3 & 0xfffffffffffffffc]
}
mysim of addprop $chosen_node int "linux,initrd-start" $cpio_start
mysim of addprop $chosen_node int "linux,initrd-end" $cpio_end
}
-
# Map persistent memory disks
proc pmem_node_add { root start size } {
set start_hex [format %x $start]