qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/armv7m_nvic: Correctly register GIC region when setting up NVIC
@ 2012-08-27 23:41 Meador Inge
  2012-08-28 12:32 ` Peter Maydell
  2012-08-31 17:45 ` [Qemu-devel] [PATCH for-1.2] " Peter Maydell
  0 siblings, 2 replies; 5+ messages in thread
From: Meador Inge @ 2012-08-27 23:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, paul

When setting up the NVIC memory regions the memory range
0x100..0xcff is aliased to an IO memory region that belongs
to the ARM GIC.  This aliased region should be added to the
NVIC memory container, but the actual GIC IO memory region
was being added instead.  This mixup was causing the wrong
IO memory access functions to be called when accessing parts
of the NVIC memory.

Signed-off-by: Meador Inge <meadori@codesourcery.com>
---
 hw/armv7m_nvic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/armv7m_nvic.c b/hw/armv7m_nvic.c
index 6a0832e..5c09116 100644
--- a/hw/armv7m_nvic.c
+++ b/hw/armv7m_nvic.c
@@ -489,7 +489,8 @@ static int armv7m_nvic_init(SysBusDevice *dev)
      */
     memory_region_init_alias(&s->gic_iomem_alias, "nvic-gic", &s->gic.iomem,
                              0x100, 0xc00);
-    memory_region_add_subregion_overlap(&s->container, 0x100, &s->gic.iomem, 1);
+    memory_region_add_subregion_overlap(&s->container, 0x100,
+                                        &s->gic_iomem_alias, 1);
     /* Map the whole thing into system memory at the location required
      * by the v7M architecture.
      */
-- 
1.7.7.6

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

* Re: [Qemu-devel] [PATCH] hw/armv7m_nvic: Correctly register GIC region when setting up NVIC
  2012-08-27 23:41 [Qemu-devel] [PATCH] hw/armv7m_nvic: Correctly register GIC region when setting up NVIC Meador Inge
@ 2012-08-28 12:32 ` Peter Maydell
  2012-08-31 17:45 ` [Qemu-devel] [PATCH for-1.2] " Peter Maydell
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2012-08-28 12:32 UTC (permalink / raw)
  To: Meador Inge; +Cc: qemu-devel, paul

On 28 August 2012 00:41, Meador Inge <meadori@codesourcery.com> wrote:
> When setting up the NVIC memory regions the memory range
> 0x100..0xcff is aliased to an IO memory region that belongs
> to the ARM GIC.  This aliased region should be added to the
> NVIC memory container, but the actual GIC IO memory region
> was being added instead.  This mixup was causing the wrong
> IO memory access functions to be called when accessing parts
> of the NVIC memory.
>
> Signed-off-by: Meador Inge <meadori@codesourcery.com>

Whoops.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

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

* Re: [Qemu-devel] [PATCH for-1.2] hw/armv7m_nvic: Correctly register GIC region when setting up NVIC
  2012-08-27 23:41 [Qemu-devel] [PATCH] hw/armv7m_nvic: Correctly register GIC region when setting up NVIC Meador Inge
  2012-08-28 12:32 ` Peter Maydell
@ 2012-08-31 17:45 ` Peter Maydell
  2012-08-31 18:16   ` Anthony Liguori
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2012-08-31 17:45 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Meador Inge, qemu-devel, paul

Hi Anthony; I realised somewhat belatedly that this bugfix
should probably go into 1.2 if possible. Can we still
squeeze it in or is it too late?

Patchwork url: http://patchwork.ozlabs.org/patch/180315/

thanks
-- PMM

On 28 August 2012 00:41, Meador Inge <meadori@codesourcery.com> wrote:
> When setting up the NVIC memory regions the memory range
> 0x100..0xcff is aliased to an IO memory region that belongs
> to the ARM GIC.  This aliased region should be added to the
> NVIC memory container, but the actual GIC IO memory region
> was being added instead.  This mixup was causing the wrong
> IO memory access functions to be called when accessing parts
> of the NVIC memory.
>
> Signed-off-by: Meador Inge <meadori@codesourcery.com>
> ---
>  hw/armv7m_nvic.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/hw/armv7m_nvic.c b/hw/armv7m_nvic.c
> index 6a0832e..5c09116 100644
> --- a/hw/armv7m_nvic.c
> +++ b/hw/armv7m_nvic.c
> @@ -489,7 +489,8 @@ static int armv7m_nvic_init(SysBusDevice *dev)
>       */
>      memory_region_init_alias(&s->gic_iomem_alias, "nvic-gic", &s->gic.iomem,
>                               0x100, 0xc00);
> -    memory_region_add_subregion_overlap(&s->container, 0x100, &s->gic.iomem, 1);
> +    memory_region_add_subregion_overlap(&s->container, 0x100,
> +                                        &s->gic_iomem_alias, 1);
>      /* Map the whole thing into system memory at the location required
>       * by the v7M architecture.
>       */
> --
> 1.7.7.6
>

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

* Re: [Qemu-devel] [PATCH for-1.2] hw/armv7m_nvic: Correctly register GIC region when setting up NVIC
  2012-08-31 17:45 ` [Qemu-devel] [PATCH for-1.2] " Peter Maydell
@ 2012-08-31 18:16   ` Anthony Liguori
  2012-09-01  1:52     ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2012-08-31 18:16 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Meador Inge, qemu-devel, paul

Peter Maydell <peter.maydell@linaro.org> writes:

> Hi Anthony; I realised somewhat belatedly that this bugfix
> should probably go into 1.2 if possible. Can we still
> squeeze it in or is it too late?
>
> Patchwork url: http://patchwork.ozlabs.org/patch/180315/

It's too late for GA.  Can go in via stable though.

Regards,

Anthony Liguori

>
> thanks
> -- PMM
>
> On 28 August 2012 00:41, Meador Inge <meadori@codesourcery.com> wrote:
>> When setting up the NVIC memory regions the memory range
>> 0x100..0xcff is aliased to an IO memory region that belongs
>> to the ARM GIC.  This aliased region should be added to the
>> NVIC memory container, but the actual GIC IO memory region
>> was being added instead.  This mixup was causing the wrong
>> IO memory access functions to be called when accessing parts
>> of the NVIC memory.
>>
>> Signed-off-by: Meador Inge <meadori@codesourcery.com>
>> ---
>>  hw/armv7m_nvic.c |    3 ++-
>>  1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/hw/armv7m_nvic.c b/hw/armv7m_nvic.c
>> index 6a0832e..5c09116 100644
>> --- a/hw/armv7m_nvic.c
>> +++ b/hw/armv7m_nvic.c
>> @@ -489,7 +489,8 @@ static int armv7m_nvic_init(SysBusDevice *dev)
>>       */
>>      memory_region_init_alias(&s->gic_iomem_alias, "nvic-gic", &s->gic.iomem,
>>                               0x100, 0xc00);
>> -    memory_region_add_subregion_overlap(&s->container, 0x100, &s->gic.iomem, 1);
>> +    memory_region_add_subregion_overlap(&s->container, 0x100,
>> +                                        &s->gic_iomem_alias, 1);
>>      /* Map the whole thing into system memory at the location required
>>       * by the v7M architecture.
>>       */
>> --
>> 1.7.7.6
>>

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

* Re: [Qemu-devel] [PATCH for-1.2] hw/armv7m_nvic: Correctly register GIC region when setting up NVIC
  2012-08-31 18:16   ` Anthony Liguori
@ 2012-09-01  1:52     ` Peter Maydell
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2012-09-01  1:52 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Meador Inge, qemu-devel, paul

On 31 August 2012 19:16, Anthony Liguori <aliguori@us.ibm.com> wrote:
> Peter Maydell <peter.maydell@linaro.org> writes:
>> Hi Anthony; I realised somewhat belatedly that this bugfix
>> should probably go into 1.2 if possible. Can we still
>> squeeze it in or is it too late?
>>
>> Patchwork url: http://patchwork.ozlabs.org/patch/180315/
>
> It's too late for GA.  Can go in via stable though.

Oh well, never mind. (I don't generally bother to feed
ARM patches to stable; I figure people can wait til the
next mainline release.)

-- PMM

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

end of thread, other threads:[~2012-09-01  1:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-27 23:41 [Qemu-devel] [PATCH] hw/armv7m_nvic: Correctly register GIC region when setting up NVIC Meador Inge
2012-08-28 12:32 ` Peter Maydell
2012-08-31 17:45 ` [Qemu-devel] [PATCH for-1.2] " Peter Maydell
2012-08-31 18:16   ` Anthony Liguori
2012-09-01  1:52     ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).