[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [Qemu-commits] [COMMIT e813376] Sparc32: fix fdc io_bas
From: |
Blue Swirl |
Subject: |
[Qemu-devel] Re: [Qemu-commits] [COMMIT e813376] Sparc32: fix fdc io_base |
Date: |
Fri, 17 Jul 2009 20:28:52 +0300 |
On Fri, Jul 17, 2009 at 5:24 PM, Anthony Liguori<address@hidden> wrote:
> Anthony Liguori wrote:
>>
>> From: Blue Swirl <address@hidden>
>>
>> On some Sparc32 machines, fdc is located above 4G limit, so uint32_t is
>> not
>> appropriate type for io_base.
>>
>> Signed-off-by: Blue Swirl <address@hidden>
>>
>> diff --git a/hw/fdc.c b/hw/fdc.c
>> index fa154a3..4ad5e5e 100644
>> --- a/hw/fdc.c
>> +++ b/hw/fdc.c
>> @@ -33,6 +33,7 @@
>> #include "qemu-timer.h"
>> #include "isa.h"
>> #include "sysbus.h"
>> +#include "qdev-addr.h"
>> /********************************************************/
>> /* debug Floppy devices */
>> @@ -1972,7 +1973,7 @@ static SysBusDeviceInfo fdc_info = {
>> .qdev.props = (Property[]) {
>> {
>> .name = "io_base",
>> - .info = &qdev_prop_uint32,
>> + .info = &qdev_prop_taddr,
>>
>
> fdc probably shouldn't use target_phys_addr_t and instead should just use a
> uint64_t for io_base. target_phys is a CPU type, devices shouldn't depend
> on it.
>
> What do you think?
Actually, currently target_phys_addr_t is used by most devices as the
machine bus address type. It's tied to CPU type but not as tightly as
for example TARGET_PAGE_SIZE or target_ulong.
In this case, uint64_t would work too.