From: Jason Wessel <jason.wessel@windriver.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] MIPS64 problem with ethernet
Date: Sun, 27 May 2007 06:30:52 -0500 [thread overview]
Message-ID: <46596BEC.1090006@windriver.com> (raw)
In-Reply-To: <20070526211844.GB18476@amd64.aurel32.net>
Aurelien Jarno wrote:
> As discussed on IRC, the problem is only present on 32-bit hosts. It is
> due to the do_ddivu which is falsely implemented using lldiv and then by
> casting the result. The patch below uses / and % as on the 64-bit host
> code. It is maybe slower than lldiv, but at least it gives the correct
> result. This probably involves some libgcc code, so it is better to keep
> it in op_helper.c for 32-bit hosts.
>
>
With your change the ethernet does come up but it seems there is a
further problem, perhaps with ddivu. My host is a 32bit host, and this
does seem to work on a 64bit host or the real hardware. Doing something
like an ls /proc does not work in the emulated target. The reason is
that the compatibility syscalls are 32bit and there is some sign
extension problem somewhere.
I put the following code in kernel/main/init.c as an illustration of the
problem.
{
unsigned long v1 = 0xffffffff80731111;
unsigned int v2 = v1 + 1;
printk("v1 %lx v2 %08x\n", v1, v2);
}
On the real hw it prints correctly as:
v1 ffffffff80731111 v2 80731112
On the emulated 64 bit + 64bit kernel on a 32 bit host it prints as:
v1 ffffffff80731111 v2 ffffffff80731112
This might be due to the ddivu in printk, but it could be elsewhere...
Jason.
next prev parent reply other threads:[~2007-05-27 11:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-21 15:00 [Qemu-devel] MIPS64 problem with ethernet Jason Wessel
2007-05-21 15:39 ` Aurelien Jarno
2007-05-21 15:49 ` Jason Wessel
2007-05-26 21:18 ` Aurelien Jarno
2007-05-27 11:30 ` Jason Wessel [this message]
2007-05-27 23:07 ` Aurelien Jarno
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=46596BEC.1090006@windriver.com \
--to=jason.wessel@windriver.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.