From: Thomas Petazzoni <thomas.petazzoni@enix.org>
To: Thiemo Seufer <ths@networkno.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] MIPS kernel hanging when loaded through U-Boot in qemu
Date: Wed, 3 Sep 2008 14:03:37 +0200 [thread overview]
Message-ID: <20080903140337.78afd030@surf> (raw)
In-Reply-To: <20080903105447.GA17474@networkno.de>
[-- Attachment #1: Type: text/plain, Size: 1805 bytes --]
Le Wed, 3 Sep 2008 12:54:47 +0200,
Thiemo Seufer <ths@networkno.de> a écrit :
> 'Interrupt' at this point should be the normal timer interrupt,
> "syscall" are the execve() calls which start kernel threads. On
> classic mips, both types of exceptions use the general exception
> vector at 0x80000180.
What's strange about these "syscall" interrupts is that we don't see
them in the kernel-only boot
(http://toulibre.org/~thomas/qemu/qemu-interrupt-log-kernel-only).
Are you sure that the syscall interrupt is used to run do_fork() inside
the kernel ? I'm not so sure.
> The difference here is that the timer interrupt goes to 0x80000200,
> this is controlled by the IV bit in the Cause register. This feature
> isn't available on all CPUs. In the kernel the relevant check to test
> for it is cpu_has_divec. I figure U-Boot and the Kernel disagree
> on the setting.
Hehe, it seems that you're correct.
In U-Boot board/qemu-mips/lowlevel_init.S, we have:
/*
* Step 7) Establish Cause
* (set IV bit)
*/
li t1, 0x00800000
mtc0 t1, CP0_CAUSE
In the kernel include/asm-mips/mach-qemu/cpu-feature-overrides.h, we
have:
#define cpu_has_divec 0
> Qemu always allows to set this Cause bit, independent of the CPU type.
> So I figure we have two bugs:
> - The kernel should try to clear the IV bit if it doesn't intend to
> use it
> - Qemu should ignore attempts to set the IV bit when emulating CPUs
> without divec.
Probably :-)
Thomas
--
Thomas Petazzoni, thomas.petazzoni@enix.org, http://thomas.enix.org
Jabber, thomas.petazzoni@jabber.dk
Toulibre, http://www.toulibre.org - APRIL, http://www.april.org
Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E 1624 F653 CB30 98D3 F7A7
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-09-03 12:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-28 9:00 [Qemu-devel] MIPS kernel hanging when loaded through U-Boot in qemu Thomas Petazzoni
2008-08-28 15:14 ` Thiemo Seufer
2008-09-03 7:25 ` Thomas Petazzoni
2008-09-03 10:54 ` Thiemo Seufer
2008-09-03 12:03 ` Thomas Petazzoni [this message]
2008-09-03 12:20 ` Thomas Petazzoni
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=20080903140337.78afd030@surf \
--to=thomas.petazzoni@enix.org \
--cc=qemu-devel@nongnu.org \
--cc=ths@networkno.de \
/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).