qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 3/4] m68k: Add NeXTcube machine


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH v2 3/4] m68k: Add NeXTcube machine
Date: Wed, 3 Jul 2019 19:00:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 02/07/2019 19.43, Thomas Huth wrote:
> On 29/06/2019 14.26, Philippe Mathieu-Daudé wrote:
>> On 6/28/19 8:15 PM, Thomas Huth wrote:
[...]
>>> +static uint32_t mmio_readb(NeXTState *s, hwaddr addr)
>>> +{
>>> +    switch (addr) {
>>> +    case 0xc000:
>>> +        return (s->scr1 >> 24) & 0xFF;
>>> +    case 0xc001:
>>> +        return (s->scr1 >> 16) & 0xFF;
>>> +    case 0xc002:
>>> +        return (s->scr1 >> 8)  & 0xFF;
>>> +    case 0xc003:
>>> +        return (s->scr1 >> 0)  & 0xFF;
>>
>> So you have a 32-bit implementation (DMA accessed device?).
>>
>> memory::access_with_adjusted_size() already does this work
>> for you if you use:
>>
>>    .impl.min_access_size = 4,
>>    .valid.min_access_size = 1,
>>    .valid.max_access_size = 4,
> 
> Yeah, it's old code from 2011 ... I'll try to rework it as you suggested.

That does not really seem to work. I'm then still seeing accesses to
0xc002 in my "readl" handler. Looks like access_with_adjusted_size() is
not really ready for that yet (see the FIXME in that function - it does
not take care of unaligned accesses yet).

 Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]