rom->name, strerror(errno));
>
> > +goto err;
>
> > +}
>
> > +sz += rc;
>
> > +} while (sz != rom->datasize);
>
> I think we can use load_image_size() instead.
>
>
>
>
>
>
>
>
>
> *From:* Gregor
ad_image_size() instead.
From: Gregor Haas
Sent: Friday, June 28, 2024 1:35 AM
To: Yao, Xingtao/姚 幸涛
Cc: qemu-devel@nongnu.org; phi...@linaro.org; richard.hender...@linaro.org
Subject: Re: [PATCH] hw/core/loader: allow loading larger ROMs
Hi Xingtao,
> Can you reproduce this issue?
Absolu
Hi Xingtao,
> Can you reproduce this issue?
Absolutely! I encountered this when trying to load an OpenSBI payload
firmware using the bios option for the QEMU RISC-V virt board. These
payload firmwares bundle the entire next boot stage, which in my case is a
build of the Linux kernel (which is a st
Hi, Gregor
>
> The read() syscall is not guaranteed to return all data from a file. The
> default ROM loader implementation currently does not take this into account,
> instead failing if all bytes are not read at once. This change wraps the
> read() syscall in a do/while loop to ensure all bytes
The read() syscall is not guaranteed to return all data from a file. The
default ROM loader implementation currently does not take this into account,
instead failing if all bytes are not read at once. This change wraps the
read() syscall in a do/while loop to ensure all bytes of the ROM are read.