From: Antti P Miettinen <ananaza@iki.fi>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] ARM page crossing inside insn? (Re: ARM ethernet fixes)
Date: Mon, 19 Dec 2005 00:29:42 +0200 [thread overview]
Message-ID: <p2g64pmf38p.fsf_-_@doris.dna.fi> (raw)
In-Reply-To: p2gaceyf4pn.fsf@doris.dna.fi
Antti P Miettinen <ananaza@iki.fi> writes:
> Looks like the kernel somehow ends up thinking that we are loading
> something from zero. Hmm.. the value being loaded to r1 is zero. So
> could this be related to crossing a page boundary in the middle of an
> instruction? But anyway - I'll try to debug this further..
Looks like it might be the page crossing. The below little program is
a bit smaller test case. Without args, no segfault, with arg it
segfaults (inside ARM sysemu - at least for me):
#include <stdio.h>
#include <string.h>
long buf[8192/4];
int
main(int ac, char **av)
{
unsigned long base = (unsigned long)(void *)(buf + 4096/4);
unsigned long dummy;
if (ac > 1)
{
base &= ~0xfff;
base -= 4;
}
printf("buf: %p, base: 0x%08lx, dummy: 0x%08lx\n", buf, base, dummy);
__asm__ __volatile__ ("ldmia %0,{%1,%2}"
: "=r" (base) : "0" (base), "r" (dummy));
printf("base: 0x%08lx, dummy: 0x%08lx\n", base, dummy);
return 0;
}
--
http://www.iki.fi/~ananaza/
next prev parent reply other threads:[~2005-12-18 22:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-14 22:17 [Qemu-devel] ARM ethernet fixes Daniel Jacobowitz
2005-12-15 0:00 ` Paul Brook
2005-12-18 16:51 ` Paul Brook
2005-12-18 17:25 ` Daniel Jacobowitz
2005-12-18 17:42 ` M. Warner Losh
2005-12-18 17:53 ` Paul Brook
2005-12-18 20:31 ` M. Warner Losh
2005-12-18 17:54 ` Daniel Jacobowitz
2005-12-18 18:50 ` Dave Feustel
2005-12-18 21:57 ` [Qemu-devel] " Antti P Miettinen
2005-12-18 22:29 ` Antti P Miettinen [this message]
2005-12-19 9:40 ` [Qemu-devel] Re: ARM page crossing inside insn? (Re: ARM ethernet fixes) Antti P Miettinen
2005-12-19 15:24 ` Antti P Miettinen
2005-12-19 16:53 ` Daniel Jacobowitz
2005-12-19 19:25 ` Antti P Miettinen
2005-12-26 2:30 ` Antti P Miettinen
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=p2g64pmf38p.fsf_-_@doris.dna.fi \
--to=ananaza@iki.fi \
--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.