Skip to content
Snippets Groups Projects
Commit 235a3f0b authored by Alexander Graf's avatar Alexander Graf
Browse files

s390x: fix -initrd in virtio machine


When using -initrd in the virtio machine, we need to indicate the initrd
start and size inside the kernel image. These parameters need to be stored
in native endianness.

Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
Acked-by: default avatarRichard Henderson <rth@twiddle.net>
Acked-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
parent b308c82c
No related branches found
No related tags found
No related merge requests found
......@@ -285,8 +285,8 @@ static void s390_init(QEMUMachineInitArgs *args)
}
/* we have to overwrite values in the kernel image, which are "rom" */
memcpy(rom_ptr(INITRD_PARM_START), &initrd_offset, 8);
memcpy(rom_ptr(INITRD_PARM_SIZE), &initrd_size, 8);
stq_p(rom_ptr(INITRD_PARM_START), initrd_offset);
stq_p(rom_ptr(INITRD_PARM_SIZE), initrd_size);
}
if (rom_ptr(KERN_PARM_AREA)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment