1. 29 7月, 2013 5 次提交
    • P
      mips_malta: correct reading MIPS revision at 0x1fc00010 · a427338b
      Paul Burton 提交于
      Rather than modifying the BIOS code at its original location, copy it
      for the 0x1fc00000 region & modify the copy. This means the original
      ROM code is correctly readable at 0x1e000010 whilst the MIPS revision
      is readable at 0x1fc00010.
      
      Additionally the code previously operated on target memory which would
      later be overwritten by the BIOS image upon CPU reset if the -bios
      argument was used to specify the BIOS image. This led to the written
      MIPS revision being lost. Copying using rom_copy when -bios is used
      fixes this issue.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      a427338b
    • P
      mips_malta: fix BIOS endianness swapping · a2b8813d
      Paul Burton 提交于
      If the target is little endian (mipsel) then the BIOS image endianness
      is swapped so that the big endian BIOS binaries commonly produced can be
      loaded correctly.
      
      When using the -bios argument the BIOS is loaded using
      load_image_targphys, however this doesn't perform the load to target
      memory immediately. Instead it loads the BIOS file into a struct Rom
      which will later be written to target memory upon reset. However the
      endianness conversion was being performed before this, on init, and
      operating on the target memory which at this point is blank & will later
      be overwritten by the (big endian) BIOS image. Correct this by operating
      on the data referenced by struct Rom rather than the target memory when
      the -bios argument is used.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      a2b8813d
    • A
      mips_malta: QOM cast cleanup · cba5cb67
      Andreas Färber 提交于
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      cba5cb67
    • J
      target-mips: fix branch in likely delay slot tcg assert · 240ce26a
      James Hogan 提交于
      When a branch delay slot contains another branch instruction, the code
      generated raises an exception, however since is_branch==1,
      handle_delay_slot() doesn't get called immediately. This means
      ctx->bstate isn't set to BS_BRANCH, and the decoder continues decoding
      until a non-branch instruction is found.
      
      If the first branch was a branch likely instruction then each
      instruction after it generates code for the unlikely case, to go to the
      next tb starting after the delay slot. This results in multiple goto_tb
      tcg ops being generated with the same exit number. When debug is enabled
      this hits:
      
      tcg-op.h:2589: tcg_gen_goto_tb: Assertion `(tcg_ctx.goto_tb_issue_mask & (1 << idx)) == 0' failed.
      
      This is fixed by removing is_branch entirely, and calling
      handle_delay_slot() if (ctx.hflags & MIPS_HFLAG_BMASK) was set prior to
      the current instruction being decoded. This still prevents
      handle_delay_slot() being called immediately after a branch but allows
      it to still be called after a branch within a delay slot.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Signed-off-by: NYongbok Kim <yongbok.kim@imgtec.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      240ce26a
    • P
      target-mips: fix multiplication in mipsdsp_rndq15_mul_q15_q15 · 4877866e
      Petar Jovanovic 提交于
      Multiplication of Q15 fractional halfword vectors was incorrect in the
      previous implementation of mipsdsp_rndq15_mul_q15_q15. It failed to take
      element signs into account. This change fixes it, and it adds a test case
      for it.
      
      The change also removes unnecessary cast in the function
      mipsdsp_mul_q15_q15_overflowflag21().
      Signed-off-by: NPetar Jovanovic <petar.jovanovic@imgtec.com>
      Reviewed-by: Richard Henderson  <rth@twiddle.net> 
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      4877866e
  2. 27 7月, 2013 35 次提交