From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org, dsilvers@simtec.co.uk
Subject: Re: [Qemu-devel] [PATCH] Davicom DM9000 emulation
Date: Mon, 13 Oct 2008 15:53:24 +0100 [thread overview]
Message-ID: <200810131553.24669.paul@codesourcery.com> (raw)
In-Reply-To: <1223908623.30000.45.camel@petitemort>
On Monday 13 October 2008, Daniel Silverstone wrote:
> On Mon, 2008-10-13 at 15:34 +0100, Paul Brook wrote:
> > > Also, it appears that some devices don't have the headers required for
> > > target_phys_addr_t included before they include devices.h so I had to
> > > use an #ifdef around the dm9000_init declaration. If this isn't right
> > > then I need to know what the right thing to include in such drivers is.
> > > It seems a bit unfortunate to force other drivers to include headers
> > > they were otherwise managing without.
> >
> > Using target_phys_addr_t is a lie. Your device only implements 32 bits of
> > address space.
>
> The implementation only allows for the two registers to be up to a
> 32-bit address space apart, but it allows for the base of the device to
> be at any part of the target's physical address space.
No it doesn't.
+typedef struct {
+ uint32_t addr; /* address port */
[...]
+ state->addr = base_addr + addr_offset;
Will truncate the address to 32 bits.
On closer inspection I notice that the data member of the state structure is
never used, and the device will respond to any accesses within the range you
reserve, not just the data address.
Paul
next prev parent reply other threads:[~2008-10-13 14:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-13 10:12 [Qemu-devel] [PATCH] Davicom DM9000 emulation Daniel Silverstone
2008-10-13 12:47 ` Paul Brook
2008-10-13 14:01 ` Daniel Silverstone
2008-10-13 14:20 ` Daniel Silverstone
2008-10-13 14:34 ` Paul Brook
2008-10-13 14:37 ` Daniel Silverstone
2008-10-13 14:53 ` Paul Brook [this message]
2008-10-13 15:13 ` Daniel Silverstone
2008-10-21 8:43 ` Daniel Silverstone
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=200810131553.24669.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=dsilvers@simtec.co.uk \
--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.