[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Davicom DM9000 emulation
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH] Davicom DM9000 emulation |
Date: |
Mon, 13 Oct 2008 15:53:24 +0100 |
User-agent: |
KMail/1.9.9 |
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
- [Qemu-devel] [PATCH] Davicom DM9000 emulation, Daniel Silverstone, 2008/10/13
- Re: [Qemu-devel] [PATCH] Davicom DM9000 emulation, Paul Brook, 2008/10/13
- Re: [Qemu-devel] [PATCH] Davicom DM9000 emulation, Daniel Silverstone, 2008/10/13
- Re: [Qemu-devel] [PATCH] Davicom DM9000 emulation, Daniel Silverstone, 2008/10/13
- Re: [Qemu-devel] [PATCH] Davicom DM9000 emulation, Paul Brook, 2008/10/13
- Re: [Qemu-devel] [PATCH] Davicom DM9000 emulation, Daniel Silverstone, 2008/10/13
- Re: [Qemu-devel] [PATCH] Davicom DM9000 emulation,
Paul Brook <=
- Re: [Qemu-devel] [PATCH] Davicom DM9000 emulation, Daniel Silverstone, 2008/10/13
- Re: [Qemu-devel] [PATCH] Davicom DM9000 emulation, Daniel Silverstone, 2008/10/21