qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <berlios@weilnetz.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Choose emulated MIPS CPU at runtime
Date: Tue, 06 Mar 2007 22:44:55 -0000	[thread overview]
Message-ID: <45EDEEDD.60608@weilnetz.de> (raw)
In-Reply-To: <20070306210501.GC16210@networkno.de>

Thiemo Seufer schrieb:
> Stefan Weil wrote:
>> There exists also an older 4KEc version which only supports
>>
>> MIPS32R1. AR7 (a SoC from TI) is based on this older version.
> This can't be correct. 4KEc is defined as a MIPS32R2 core by MIPS
> Technologies. A MIPS32R1 4KEc would be redundant since that's what
> the 4Kc is.
Until last week, I had the same opinion. Documentation says
that AR7 is based on 4KEc, 4KEc is MIPS32R2, so I compiled Linux
using MIPS32R2 settings. It crashed.

Then I detected this extract from the Linux source code (2.6.20):

./include/asm-mips/cpu.h:#define PRID_IMP_4KEC          0x8400
./include/asm-mips/cpu.h:#define PRID_IMP_4KECR2        0x9000

So Linux knows two variants of 4KEc!
And AR7 has CP0_PRid == 0x00018448 - the first variant without "R2"!

Perhaps some readers of the list have more information?
>> I noticed this because some code using DI worked well with QEMU,
>> but my AR7 based DSL router crashed...
> Did it die with an RI exception? If not then it sounds more like
> a missing ehb barrier. Qemu doesn't emulate pipeline hazards...
The Linux code was ehb, then di. It crashed at the di statement.
The kernel did not show the reason for the crash, and I have
neither kgdb nor a hardware debugger for my router...
>> AR7, it would be nice to switch between MIPS32R1 / MIPS32R2
>> instruction sets.
>
> It would be nice to see a AR7 router emulation as a separate
> machine type in Qemu. *hint* *hint* :-)
I agree. The URL of the AR7 emulation code was published earlier on
this list. It has grown to more than 100 KB, so I don't
want to send it as a mail appendix to the list.
May I send you a patch for integration? Are there any special
requirements for this kind of patch to get acceptance?

Stefan

  parent reply	other threads:[~2007-03-06 22:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06 15:47 [Qemu-devel] [PATCH] Choose emulated MIPS CPU at runtime Hervé Poussineau
2007-03-06 17:09 ` Daniel Jacobowitz
2007-03-06 17:37 ` Thiemo Seufer
2007-03-06 19:18   ` Stefan Weil
2007-03-06 21:05     ` Thiemo Seufer
2007-03-06 21:13       ` Thiemo Seufer
2007-03-06 22:44       ` Stefan Weil [this message]
2007-03-25 16:46         ` Thiemo Seufer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45EDEEDD.60608@weilnetz.de \
    --to=berlios@weilnetz.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).