[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 18/20] hw/core/generic-loader: Use cpu_datapath_is_big_endian()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 18/20] hw/core/generic-loader: Use cpu_datapath_is_big_endian() |
Date: |
Wed, 4 Dec 2024 21:26:00 +0100 |
Rather that using the binary endianness, use the vCPU one.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/core/generic-loader.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c
index abdd4c08a38..7b3b5f06565 100644
--- a/hw/core/generic-loader.c
+++ b/hw/core/generic-loader.c
@@ -31,7 +31,6 @@
*/
#include "qemu/osdep.h"
-#include "exec/tswap.h"
#include "sysemu/dma.h"
#include "sysemu/reset.h"
#include "hw/boards.h"
@@ -66,7 +65,6 @@ static void generic_loader_realize(DeviceState *dev, Error
**errp)
{
GenericLoaderState *s = GENERIC_LOADER(dev);
hwaddr entry;
- int big_endian;
ssize_t size = 0;
s->set_pc = false;
@@ -134,14 +132,13 @@ static void generic_loader_realize(DeviceState *dev,
Error **errp)
s->cpu = first_cpu;
}
- big_endian = qemu_binary_is_bigendian();
-
if (s->file) {
AddressSpace *as = s->cpu ? s->cpu->as : NULL;
if (!s->force_raw) {
size = load_elf_as(s->file, NULL, NULL, NULL, &entry, NULL, NULL,
- NULL, big_endian, 0, 0, 0, as);
+ NULL, cpu_datapath_is_big_endian(s->cpu),
+ 0, 0, 0, as);
if (size < 0) {
size = load_uimage_as(s->file, &entry, NULL, NULL, NULL, NULL,
--
2.45.2
- [PATCH 11/20] target/mips: Implement CPUClass::datapath_is_big_endian, (continued)
- [PATCH 11/20] target/mips: Implement CPUClass::datapath_is_big_endian, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 12/20] target/xtensa: Implement xtensa_isa_is_big_endian(), Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 13/20] target/xtensa: Implement CPUClass::datapath_is_big_endian, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 14/20] target: Implement CPUClass::datapath_is_big_endian (little-endian), Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 15/20] target: Implement CPUClass::datapath_is_big_endian (big-endian), Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 16/20] hw/core/cpu: Expose cpu_datapath_is_big_endian() method, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 17/20] disas: Use cpu_datapath_is_big_endian(), Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 18/20] hw/core/generic-loader: Use cpu_datapath_is_big_endian(),
Philippe Mathieu-Daudé <=
- [RFC PATCH 19/20] hw/virtio: Use cpu_datapath_is_big_endian(), Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 20/20] hw/core/cpu: Remove cpu_virtio_is_big_endian(), Philippe Mathieu-Daudé, 2024/12/04