mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 15:42:09 -06:00
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: Alexander Graf <agraf@suse.de> Acked-by: Richard Henderson <rth@twiddle.net> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
parent
b308c82cbd
commit
235a3f0bed
1 changed files with 2 additions and 2 deletions
|
@ -285,8 +285,8 @@ static void s390_init(QEMUMachineInitArgs *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we have to overwrite values in the kernel image, which are "rom" */
|
/* we have to overwrite values in the kernel image, which are "rom" */
|
||||||
memcpy(rom_ptr(INITRD_PARM_START), &initrd_offset, 8);
|
stq_p(rom_ptr(INITRD_PARM_START), initrd_offset);
|
||||||
memcpy(rom_ptr(INITRD_PARM_SIZE), &initrd_size, 8);
|
stq_p(rom_ptr(INITRD_PARM_SIZE), initrd_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rom_ptr(KERN_PARM_AREA)) {
|
if (rom_ptr(KERN_PARM_AREA)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue