Skip to content

Commit

Permalink
s390x: fix -initrd in virtio machine
Browse files Browse the repository at this point in the history
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>
(cherry picked from commit 235a3f0)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
agraf authored and mdroth committed Nov 30, 2012
1 parent 0dfd821 commit 7817b8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/s390-virtio.c
Expand Up @@ -284,8 +284,8 @@ static void s390_init(ram_addr_t my_ram_size,
}

/* 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)) {
Expand Down

0 comments on commit 7817b8d

Please sign in to comment.