All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH-for-5.1] hw/misc/milkymist-pfpu: Fix pFPU region size
@ 2020-07-18  9:37 Philippe Mathieu-Daudé
  2020-07-19 17:23 ` Michael Walle
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-07-18  9:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Michael Walle, Philippe Mathieu-Daudé

The last microcode word (address 0x6000.6ffc) is not reachable.
Correct the programmable FPU I/O size (which is 4 KiB) to be
able to use all the microcode area.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/misc/milkymist-pfpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/misc/milkymist-pfpu.c b/hw/misc/milkymist-pfpu.c
index 516825e83d..4fbe3e8971 100644
--- a/hw/misc/milkymist-pfpu.c
+++ b/hw/misc/milkymist-pfpu.c
@@ -507,7 +507,7 @@ static void milkymist_pfpu_realize(DeviceState *dev, Error **errp)
     sysbus_init_irq(sbd, &s->irq);
 
     memory_region_init_io(&s->regs_region, OBJECT(dev), &pfpu_mmio_ops, s,
-            "milkymist-pfpu", MICROCODE_END * 4);
+                          "milkymist-pfpu", 0x1000);
     sysbus_init_mmio(sbd, &s->regs_region);
 }
 
-- 
2.21.3



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH-for-5.1] hw/misc/milkymist-pfpu: Fix pFPU region size
  2020-07-18  9:37 [PATCH-for-5.1] hw/misc/milkymist-pfpu: Fix pFPU region size Philippe Mathieu-Daudé
@ 2020-07-19 17:23 ` Michael Walle
  2020-09-01  6:57   ` Laurent Vivier
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Walle @ 2020-07-19 17:23 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: qemu-trivial, qemu-devel

Hi Philippe,

Am 2020-07-18 11:37, schrieb Philippe Mathieu-Daudé:
> The last microcode word (address 0x6000.6ffc) is not reachable.
> Correct the programmable FPU I/O size (which is 4 KiB) to be
> able to use all the microcode area.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/misc/milkymist-pfpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/misc/milkymist-pfpu.c b/hw/misc/milkymist-pfpu.c
> index 516825e83d..4fbe3e8971 100644
> --- a/hw/misc/milkymist-pfpu.c
> +++ b/hw/misc/milkymist-pfpu.c
> @@ -507,7 +507,7 @@ static void milkymist_pfpu_realize(DeviceState
> *dev, Error **errp)
>      sysbus_init_irq(sbd, &s->irq);
> 
>      memory_region_init_io(&s->regs_region, OBJECT(dev), 
> &pfpu_mmio_ops, s,
> -            "milkymist-pfpu", MICROCODE_END * 4);
> +                          "milkymist-pfpu", 0x1000);

Could you use one of the MICROCODE_ macros instead? maybe 
(MICROCODE_WORDS * 2)?

With that fixed:
Reviewed-by: Michael Walle <michael@walle.cc>

-michael

>      sysbus_init_mmio(sbd, &s->regs_region);
>  }


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH-for-5.1] hw/misc/milkymist-pfpu: Fix pFPU region size
  2020-07-19 17:23 ` Michael Walle
@ 2020-09-01  6:57   ` Laurent Vivier
  2020-09-01 15:24     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 4+ messages in thread
From: Laurent Vivier @ 2020-09-01  6:57 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: qemu-trivial, Michael Walle, qemu-devel

Le 19/07/2020 à 19:23, Michael Walle a écrit :
> Hi Philippe,
> 
> Am 2020-07-18 11:37, schrieb Philippe Mathieu-Daudé:
>> The last microcode word (address 0x6000.6ffc) is not reachable.
>> Correct the programmable FPU I/O size (which is 4 KiB) to be
>> able to use all the microcode area.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>  hw/misc/milkymist-pfpu.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/misc/milkymist-pfpu.c b/hw/misc/milkymist-pfpu.c
>> index 516825e83d..4fbe3e8971 100644
>> --- a/hw/misc/milkymist-pfpu.c
>> +++ b/hw/misc/milkymist-pfpu.c
>> @@ -507,7 +507,7 @@ static void milkymist_pfpu_realize(DeviceState
>> *dev, Error **errp)
>>      sysbus_init_irq(sbd, &s->irq);
>>
>>      memory_region_init_io(&s->regs_region, OBJECT(dev),
>> &pfpu_mmio_ops, s,
>> -            "milkymist-pfpu", MICROCODE_END * 4);
>> +                          "milkymist-pfpu", 0x1000);
> 
> Could you use one of the MICROCODE_ macros instead? maybe
> (MICROCODE_WORDS * 2)?
> 
> With that fixed:
> Reviewed-by: Michael Walle <michael@walle.cc>
> 

Philippe,

do you plan to repost with the change suggested by Michael?

Thanks,
Laurent


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH-for-5.1] hw/misc/milkymist-pfpu: Fix pFPU region size
  2020-09-01  6:57   ` Laurent Vivier
@ 2020-09-01 15:24     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-01 15:24 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: qemu-trivial, Michael Walle, qemu-devel

On 9/1/20 8:57 AM, Laurent Vivier wrote:
> Le 19/07/2020 à 19:23, Michael Walle a écrit :
>> Hi Philippe,
>>
>> Am 2020-07-18 11:37, schrieb Philippe Mathieu-Daudé:
>>> The last microcode word (address 0x6000.6ffc) is not reachable.
>>> Correct the programmable FPU I/O size (which is 4 KiB) to be
>>> able to use all the microcode area.
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>> ---
>>>  hw/misc/milkymist-pfpu.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/hw/misc/milkymist-pfpu.c b/hw/misc/milkymist-pfpu.c
>>> index 516825e83d..4fbe3e8971 100644
>>> --- a/hw/misc/milkymist-pfpu.c
>>> +++ b/hw/misc/milkymist-pfpu.c
>>> @@ -507,7 +507,7 @@ static void milkymist_pfpu_realize(DeviceState
>>> *dev, Error **errp)
>>>      sysbus_init_irq(sbd, &s->irq);
>>>
>>>      memory_region_init_io(&s->regs_region, OBJECT(dev),
>>> &pfpu_mmio_ops, s,
>>> -            "milkymist-pfpu", MICROCODE_END * 4);
>>> +                          "milkymist-pfpu", 0x1000);
>>
>> Could you use one of the MICROCODE_ macros instead? maybe
>> (MICROCODE_WORDS * 2)?
>>
>> With that fixed:
>> Reviewed-by: Michael Walle <michael@walle.cc>
>>
> 
> Philippe,
> 
> do you plan to repost with the change suggested by Michael?

Unfortunately I won't :( I spent 3h trying to do that, then found
myself rewriting half of the pfpu because this is not that easy, and
this code is now scheduled for deprecation. Not worth my time :(

> 
> Thanks,
> Laurent
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-01 15:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-18  9:37 [PATCH-for-5.1] hw/misc/milkymist-pfpu: Fix pFPU region size Philippe Mathieu-Daudé
2020-07-19 17:23 ` Michael Walle
2020-09-01  6:57   ` Laurent Vivier
2020-09-01 15:24     ` Philippe Mathieu-Daudé

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.