Patchwork mips: Fix incorrect jump instruction in YAMON mini-bootloader print function.

login
register
mail settings
Submitter Andrew Drake
Date Sept. 6, 2011, 8:41 p.m.
Message ID <4E668594.4060207@adrake.org>
Download mbox | patch
Permalink /patch/113669/
State New
Headers show

Comments

Andrew Drake - Sept. 6, 2011, 8:41 p.m.
The print function is listed in the vector table as 0xbfc00808. The backedge
of the loop is improperly encoded, and so jumps to 0xb0000814 instead of the
desired 0xbfc00814.

Signed-off-by: Andrew Drake <adrake@adrake.org>
---
  hw/mips_malta.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index a0adb56..d4820c3 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -605,7 +605,7 @@  static void write_bootloader (CPUState *env, uint8_t *base,
      stl_raw(p++, 0x00000000);                                     /* nop */
      stl_raw(p++, 0x0ff0021c);                                     /* jal 870 */
      stl_raw(p++, 0x00000000);                                     /* nop */
-    stl_raw(p++, 0x08000205);                                     /* j 814 */
+    stl_raw(p++, 0x0bf00205);                                     /* j 814 */
      stl_raw(p++, 0x00000000);                                     /* nop */
      stl_raw(p++, 0x01a00008);                                     /* jr t5 */
      stl_raw(p++, 0x01602021);                                     /* move a0,t3 */