aboutsummaryrefslogtreecommitdiff
path: root/external/mambo
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-05-19 16:16:48 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-08 16:02:12 +1000
commit52aed80bddd5eed94c537f2bb0b846e4b5683728 (patch)
tree9bf11c11b44b896b5cd5e1693fd77ed2663d75a8 /external/mambo
parent50c4c89c5dc0ae2a9adf0fc4cebbacb5cddac334 (diff)
downloadskiboot-52aed80bddd5eed94c537f2bb0b846e4b5683728.zip
skiboot-52aed80bddd5eed94c537f2bb0b846e4b5683728.tar.gz
skiboot-52aed80bddd5eed94c537f2bb0b846e4b5683728.tar.bz2
mambo: Add a reservation for the initramfs
On most systems the initramfs is loaded inside the part of memory reserved for the OS [0x0-0x30000000] and skiboot will never touch it. On mambo it's loaded at 0x80000000 and if you're unlucky skiboot can allocate over the top of it and corrupt the initramfs blob. There might be the downside that the kernel cannot re-use the initramfs memory since it's marked as reserved, but the kernel might also free it anyway. Fixes: 65612f120735 Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Tested-by: Michael Ellerman <mpe@ellerman.id.au> [stewart@linux.vnet.ibm.com: add Fixes] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external/mambo')
-rw-r--r--external/mambo/skiboot.tcl5
1 files changed, 5 insertions, 0 deletions
diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index f4068fa..5a5176f 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -222,6 +222,11 @@ mysim of addprop $reserved_memory int "#size-cells" 2
mysim of addprop $reserved_memory int "#address-cells" 2
mysim of addprop $reserved_memory empty "ranges" ""
+set initramfs_res [mysim of addchild $reserved_memory "initramfs" ""]
+set reg [list $cpio_start $cpio_size ]
+mysim of addprop $initramfs_res array64 "reg" reg
+mysim of addprop $initramfs_res empty "name" "initramfs"
+
set fake_nvram_node [mysim of addchild $reserved_memory "ibm,fake-nvram" ""]
set reg [list $fake_nvram_start $fake_nvram_size ]
mysim of addprop $fake_nvram_node array64 "reg" reg