[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: MMIO address changes
From: |
andrzej zaborowski |
Subject: |
Re: [Qemu-devel] Re: MMIO address changes |
Date: |
Thu, 25 Dec 2008 23:33:56 +0100 |
2008/12/11 Vladimir Prus <address@hidden>:
> Paul Brook wrote:
>
>> I've just committed a patch that changes the MMIO callback interface for
>> devices. Instead of being passed an absolute address these are now passed an
>> offset from the start[1] of the memory region that was registered.
> ...
>> [1] It's actually the offset from the start of the first page of that region.
>> In practice this difference doesn't matter, and makes the implementation a
>> lot simpler.
>
> This breaks something for me. I have:
>
> smc91c111_init(&nd_table[0], (0xb4000000 + 0x01800000 + 0x300) &
> 0x1fffffff,
> get_irq(s, 7));
>
> and smc91c111_init presently does:
>
> cpu_register_physical_memory(base, 16, iomemtype);
>
> and smc emulation promptly dies because an access with address of 0x30e is
> made,
> with 0x300 apparently being the offset from the page start, with 0xe being
> the desired
> offset. What is the cleanest way to address this? Reverting your change to
> sms91c111.c works, fwiw.
Masking the address with 15 should be acceptable for smc91c111.c I
think. The other possibility is reverting the change to keep
subtracting the base address, but which would be masked with
TARGET_PAGE_MASK.
Cheers
- Re: [Qemu-devel] Re: [PATCH] sh4: Followup to commit #5849 "Change MMIO callbacks...", (continued)