diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-19 12:54:31 +0100 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-21 12:51:16 +0100 |
| commit | 134ab17fffb32a3f86debb4eec9df12f7f833a3b (patch) | |
| tree | 46f26c5fff8280a3a17ce4ca4a7723b76d60cba9 /hw/sparc/sun4m.c | |
| parent | cc3d262aa93a42e19c38f6acb6d0f6012a71eb4b (diff) | |
| download | focaccia-qemu-134ab17fffb32a3f86debb4eec9df12f7f833a3b.tar.gz focaccia-qemu-134ab17fffb32a3f86debb4eec9df12f7f833a3b.zip | |
load_aout: replace bswap_needed with big_endian
Targets know whether they are big-endian more than they know if the endianness is different from the host: the former is mostly a constant, at least in machine creation code, while the latter has to be computed with TARGET_BIG_ENDIAN != HOST_BIG_ENDIAN or something like that. load_aout, however, takes a "bswap_needed" argument. Replace it with a "big_endian" argument; even though all users are big-endian, it is cheap enough to keep the optional swapping functionality even for little-endian boards. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/sparc/sun4m.c')
| -rw-r--r-- | hw/sparc/sun4m.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index a48d3622c5..5aaafb40da 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -233,20 +233,13 @@ static unsigned long sun4m_load_kernel(const char *kernel_filename, kernel_size = 0; if (linux_boot) { - int bswap_needed; - -#ifdef BSWAP_NEEDED - bswap_needed = 1; -#else - bswap_needed = 0; -#endif kernel_size = load_elf(kernel_filename, NULL, translate_kernel_address, NULL, NULL, NULL, NULL, NULL, ELFDATA2MSB, EM_SPARC, 0, 0); if (kernel_size < 0) kernel_size = load_aout(kernel_filename, KERNEL_LOAD_ADDR, - RAM_size - KERNEL_LOAD_ADDR, bswap_needed, + RAM_size - KERNEL_LOAD_ADDR, true, TARGET_PAGE_SIZE); if (kernel_size < 0) kernel_size = load_image_targphys(kernel_filename, |