qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Rob Landley <rob@landley.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] arm1136 CPU emulation won't run current kernels?
Date: Wed, 8 Jun 2011 14:03:40 +0100	[thread overview]
Message-ID: <BANLkTiksvKd-FwNuEs6SB6WYnDFacr6EVw@mail.gmail.com> (raw)
In-Reply-To: <4DEEC307.40103@landley.net>

On 8 June 2011 01:32, Rob Landley <rob@landley.net> wrote:
> QEMU's -cpu arm1136 emulation stopped working in the 2.6.35 and later
> kernels, now QEMU dies early in the kernel boot with:
>
>  qemu: fatal: Unimplemented cp15 register write (c13, c0, {0, 3})

> The CPUID for arm1136 QEMU emulates a process that should have hardware
> TLS (target-arm/cpu.h):
>
> #define ARM_CPUID_ARM1136     0x4117b363
>
> Meaning the above "switch it off" test doesn't trigger, the kernel tries
> to access a hardware feature QEMU doesn't emulate, and QEMU aborts.
>
> Note: I can work around this with -cpu arm1136-r2 (0x4107b363),

The QEMU bug here is that we provide the TLS cp15 registers only
if ARM_FEATURE_V6K, which is almost right except that they are also
available on the ARM1136 r1p0 and above. (I note in passing that the
QEMU CPU name "arm1136-r2" is rather misleading because in fact it's
providing an r0p2. The only difference to "arm1136" in the QEMU model
currently is the CPUID register value.)

1136r1p0 and above are a kind of halfway-house between v6 and v6K:
they have TLS regs, CLREX, load-store-exclusive for non-word sizes
and the NOP instruction, but are missing the v6K VA-PA translation,
SEV, WFE, WFI and YIELD.

I guess we need some more finegrained feature switches here
(also I think some actual code which implements "V7 implies
V6K, V6, V5, V4T" and so on rather than having each CPU set
them all by hand).

> (Is there a data sheet somewhere...?)

CPU-specific manuals (TRMs) are available from http://infocenter.arm.com/
The architecture reference manual is also available if you register as
a user on the website, which I'm told is a fairly hassle-free process.

-- PMM

      reply	other threads:[~2011-06-08 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-08  0:32 [Qemu-devel] arm1136 CPU emulation won't run current kernels? Rob Landley
2011-06-08 13:03 ` Peter Maydell [this message]

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=BANLkTiksvKd-FwNuEs6SB6WYnDFacr6EVw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rob@landley.net \
    /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).