aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-07-13 12:48:37 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-07-13 12:48:37 +0100
commitf0d2ead97cddf622a0478086886cc70a8ed6aeaf (patch)
tree4a818b8bdad7838493d200a1059d9a79ccc535e6 /hw
parent6e2c46334385c7e295ac883c801c81b4925fb54f (diff)
parent9768e2abf7ca3ef181f7cec134d7305c1643f78a (diff)
Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170711' into staging
MIPS patches 2017-07-11 Changes: * Fix MSA copy_[s|u]_df corner case of rd = 0 * Update malta to load the initrd at the end of the low memory # gpg: Signature made Tue 11 Jul 2017 15:42:20 BST # gpg: using RSA key 0x2238EB86D5F797C2 # gpg: Good signature from "Yongbok Kim <yongbok.kim@imgtec.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 8600 4CF5 3415 A5D9 4CFA 2B5C 2238 EB86 D5F7 97C2 * remotes/yongbok/tags/mips-20170711: mips/malta: load the initrd at the end of the low memory target/mips: fix msa copy_[s|u]_df rd = 0 corner case Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/mips/mips_malta.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 95cdabb2dd..dad2f37fb1 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -841,8 +841,9 @@ static int64_t load_kernel (void)
if (loaderparams.initrd_filename) {
initrd_size = get_image_size (loaderparams.initrd_filename);
if (initrd_size > 0) {
- initrd_offset = (kernel_high + ~INITRD_PAGE_MASK) & INITRD_PAGE_MASK;
- if (initrd_offset + initrd_size > ram_size) {
+ initrd_offset = (loaderparams.ram_low_size - initrd_size
+ - ~INITRD_PAGE_MASK) & INITRD_PAGE_MASK;
+ if (kernel_high >= initrd_offset) {
fprintf(stderr,
"qemu: memory too small for initial ram disk '%s'\n",
loaderparams.initrd_filename);