diff options
| author | Gregor Haas <gregorhaas1997@gmail.com> | 2024-06-28 11:27:06 -0700 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-07-16 19:49:55 +0200 |
| commit | c88d07488c7d9cfdb755d460c63ca80aba323465 (patch) | |
| tree | 9b85b8fe92932554a91c310d45f27383219e2d15 /include/hw/core/cpu.h | |
| parent | 959269e910944c03bc13f300d65bf08b060d5d0f (diff) | |
| download | focaccia-qemu-c88d07488c7d9cfdb755d460c63ca80aba323465.tar.gz focaccia-qemu-c88d07488c7d9cfdb755d460c63ca80aba323465.zip | |
hw/core/loader: allow loading larger ROMs
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 loads the ROM using g_file_get_contents() instead, which correctly reads all data using multiple calls to read() while also returning the loaded ROM size. Signed-off-by: Gregor Haas <gregorhaas1997@gmail.com> Reviewed-by: Xingtao Yao <yaoxt.fnst@fujitsu.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240628182706.99525-1-gregorhaas1997@gmail.com> [PMD: Use gsize with g_file_get_contents()] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include/hw/core/cpu.h')
0 files changed, 0 insertions, 0 deletions