Philippe Mathieu-Daudé
9176a58018
hw/sparc/leon3: Allow load of uImage firmwares
Currently the Leon3 machine doesn't allow to load legacy u-boot images:
$ qemu-system-sparc -M leon3_generic -d in_asm \
-kernel HelenOS-0.6.0-sparc32-leon3.bin
qemu-system-sparc: could not load kernel 'HelenOS-0.6.0-sparc32-leon3.bin'
$ file HelenOS-0.6.0-sparc32-leon3.bin
HelenOS-0.6.0-sparc32-leon3.bin: u-boot legacy uImage, HelenOS-0.6.0,\
Linux/ARM, OS Kernel Image (Not compressed), 2424229 bytes,\
Sun Dec 21 19:18:09 2014,\
Load Address: 0x40000000, Entry Point: 0x40000000,\
Header CRC: 0x8BCFA236, Data CRC: 0x37AD87DF
Since QEMU can load uImages, add the necessary code,
so the Leon3 machine can load these images:
$ qemu-system-sparc -M leon3_generic -d in_asm \
-kernel HelenOS-0.6.0-sparc32-leon3.bin
----------------
IN:
0x40000000: b 0x400007a8
0x40000004: nop
----------------
IN:
0x400007a8: save %sp, -136, %sp
0x400007ac: call 0x40000020
0x400007b0: sethi %hi(0x4000b800), %i1
...
Tested with the following firmware:
http://www.helenos.org/releases/HelenOS-0.6.0-sparc32-leon3.bin
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: KONRAD Frederic <frederic.konrad@adacore.com>
Tested-by: KONRAD Frederic <frederic.konrad@adacore.com>
Message-Id: <20190427162922.4207-1-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-05-03 13:03:04 +02:00
..
2019-03-22 16:18:07 +00:00
2019-04-02 11:49:14 -04:00
2019-03-28 09:18:53 +00:00
2019-04-29 17:57:21 +01:00
2019-04-01 08:53:40 +02:00
2019-04-04 18:00:07 +01:00
2019-03-28 09:18:53 +00:00
2019-04-25 14:16:41 -03:00
2019-04-29 17:57:21 +01:00
2019-04-29 17:36:03 +01:00
2019-03-25 17:01:10 +00:00
2019-03-28 09:18:53 +00:00
2019-03-22 16:18:07 +00:00
2019-04-26 16:38:04 +01:00
2019-03-22 16:18:07 +00:00
2019-04-29 17:57:21 +01:00
2019-04-29 17:36:02 +01:00
2019-03-28 09:18:53 +00:00
2019-03-22 16:18:07 +00:00
2019-04-17 21:21:49 +02:00
2019-04-29 17:57:21 +01:00
2019-05-02 18:12:58 +02:00
2019-04-29 16:09:51 +01:00
2019-03-22 16:18:07 +00:00
2019-04-26 11:37:57 +10:00
2019-03-28 09:18:53 +00:00
2019-04-27 21:34:46 +01:00
2019-03-28 09:18:53 +00:00
2019-04-04 16:36:21 -07:00
2019-04-26 14:30:18 +01:00
2019-03-22 16:18:07 +00:00
2019-03-22 16:18:07 +00:00
2019-03-20 11:44:13 +01:00
2019-05-03 13:03:04 +02:00
2019-03-28 09:18:53 +00:00
2019-04-29 17:35:57 +01:00
2019-04-17 21:21:49 +02:00
2019-03-22 16:18:07 +00:00
2019-04-16 20:43:39 +01:00
2019-04-27 21:34:46 +01:00
2019-03-22 16:18:07 +00:00
2019-03-22 16:18:07 +00:00
2019-03-22 16:18:07 +00:00