projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
070ce5e
)
Fix firmware word endianness for Malta.
author
ths
<ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 7 Jun 2007 12:17:52 +0000
(12:17 +0000)
committer
ths
<ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 7 Jun 2007 12:17:52 +0000
(12:17 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2950
c046a42c
-6fe2-441c-8c8c-
71466251a162
hw/mips_malta.c
patch
|
blob
|
history
diff --git
a/hw/mips_malta.c
b/hw/mips_malta.c
index f113e5611dda1bd1b70a5f99a7b2bb5c01d54476..7336b7b05f6f15537b92e4e84e8aa5707b3e62e9 100644
(file)
--- a/
hw/mips_malta.c
+++ b/
hw/mips_malta.c
@@
-791,6
+791,18
@@
void mips_malta_init (int ram_size, int vga_ram_size, int boot_device,
buf);
exit(1);
}
+ /* In little endian mode the 32bit words in the bios are swapped,
+ a neat trick which allows bi-endian firmware. */
+#ifndef TARGET_WORDS_BIGENDIAN
+ {
+ uint32_t *addr;
+ for (addr = (uint32_t *)(phys_ram_base + bios_offset);
+ addr < (uint32_t *)(phys_ram_base + bios_offset + ret);
+ addr++) {
+ *addr = bswap32(*addr);
+ }
+ }
+#endif
}
/* If a kernel image has been specified, write a small bootloader