All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target/xtensa: xtfpga: provide default memory sizes
@ 2018-11-20 20:38 Max Filippov
  2018-11-21 12:00 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 4+ messages in thread
From: Max Filippov @ 2018-11-20 20:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Max Filippov

Provide default RAM sizes for all XTFPGA boards, so that when started
without -m option they do the right thing.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 hw/xtensa/xtfpga.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index b3161de32093..7c1421d5beb4 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -568,6 +568,7 @@ static void xtfpga_lx60_class_init(ObjectClass *oc, void *data)
     mc->init = xtfpga_lx60_init;
     mc->max_cpus = 4;
     mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
+    mc->default_ram_size = 64 * MiB;
 }
 
 static const TypeInfo xtfpga_lx60_type = {
@@ -584,6 +585,7 @@ static void xtfpga_lx60_nommu_class_init(ObjectClass *oc, void *data)
     mc->init = xtfpga_lx60_nommu_init;
     mc->max_cpus = 4;
     mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
+    mc->default_ram_size = 64 * MiB;
 }
 
 static const TypeInfo xtfpga_lx60_nommu_type = {
@@ -600,6 +602,7 @@ static void xtfpga_lx200_class_init(ObjectClass *oc, void *data)
     mc->init = xtfpga_lx200_init;
     mc->max_cpus = 4;
     mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
+    mc->default_ram_size = 96 * MiB;
 }
 
 static const TypeInfo xtfpga_lx200_type = {
@@ -616,6 +619,7 @@ static void xtfpga_lx200_nommu_class_init(ObjectClass *oc, void *data)
     mc->init = xtfpga_lx200_nommu_init;
     mc->max_cpus = 4;
     mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
+    mc->default_ram_size = 96 * MiB;
 }
 
 static const TypeInfo xtfpga_lx200_nommu_type = {
@@ -632,6 +636,7 @@ static void xtfpga_ml605_class_init(ObjectClass *oc, void *data)
     mc->init = xtfpga_ml605_init;
     mc->max_cpus = 4;
     mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
+    mc->default_ram_size = 256 * MiB;
 }
 
 static const TypeInfo xtfpga_ml605_type = {
@@ -648,6 +653,7 @@ static void xtfpga_ml605_nommu_class_init(ObjectClass *oc, void *data)
     mc->init = xtfpga_ml605_nommu_init;
     mc->max_cpus = 4;
     mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
+    mc->default_ram_size = 256 * MiB;
 }
 
 static const TypeInfo xtfpga_ml605_nommu_type = {
@@ -664,6 +670,7 @@ static void xtfpga_kc705_class_init(ObjectClass *oc, void *data)
     mc->init = xtfpga_kc705_init;
     mc->max_cpus = 4;
     mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
+    mc->default_ram_size = 1 * GiB;
 }
 
 static const TypeInfo xtfpga_kc705_type = {
@@ -680,6 +687,7 @@ static void xtfpga_kc705_nommu_class_init(ObjectClass *oc, void *data)
     mc->init = xtfpga_kc705_nommu_init;
     mc->max_cpus = 4;
     mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
+    mc->default_ram_size = 256 * MiB;
 }
 
 static const TypeInfo xtfpga_kc705_nommu_type = {
-- 
2.11.0

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

* Re: [Qemu-devel] [PATCH] target/xtensa: xtfpga: provide default memory sizes
  2018-11-20 20:38 [Qemu-devel] [PATCH] target/xtensa: xtfpga: provide default memory sizes Max Filippov
@ 2018-11-21 12:00 ` Philippe Mathieu-Daudé
  2018-11-21 12:21   ` Max Filippov
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-21 12:00 UTC (permalink / raw)
  To: Max Filippov, qemu-devel

Hi Max,

On 20/11/18 21:38, Max Filippov wrote:
> Provide default RAM sizes for all XTFPGA boards, so that when started
> without -m option they do the right thing.
> 
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
>   hw/xtensa/xtfpga.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
> index b3161de32093..7c1421d5beb4 100644
> --- a/hw/xtensa/xtfpga.c
> +++ b/hw/xtensa/xtfpga.c
> @@ -568,6 +568,7 @@ static void xtfpga_lx60_class_init(ObjectClass *oc, void *data)
>       mc->init = xtfpga_lx60_init;
>       mc->max_cpus = 4;
>       mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
> +    mc->default_ram_size = 64 * MiB;
>   }
>   
>   static const TypeInfo xtfpga_lx60_type = {
> @@ -584,6 +585,7 @@ static void xtfpga_lx60_nommu_class_init(ObjectClass *oc, void *data)
>       mc->init = xtfpga_lx60_nommu_init;
>       mc->max_cpus = 4;
>       mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
> +    mc->default_ram_size = 64 * MiB;
>   }
>   
>   static const TypeInfo xtfpga_lx60_nommu_type = {
> @@ -600,6 +602,7 @@ static void xtfpga_lx200_class_init(ObjectClass *oc, void *data)
>       mc->init = xtfpga_lx200_init;
>       mc->max_cpus = 4;
>       mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
> +    mc->default_ram_size = 96 * MiB;
>   }
>   
>   static const TypeInfo xtfpga_lx200_type = {
> @@ -616,6 +619,7 @@ static void xtfpga_lx200_nommu_class_init(ObjectClass *oc, void *data)
>       mc->init = xtfpga_lx200_nommu_init;
>       mc->max_cpus = 4;
>       mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
> +    mc->default_ram_size = 96 * MiB;
>   }
>   
>   static const TypeInfo xtfpga_lx200_nommu_type = {
> @@ -632,6 +636,7 @@ static void xtfpga_ml605_class_init(ObjectClass *oc, void *data)
>       mc->init = xtfpga_ml605_init;
>       mc->max_cpus = 4;
>       mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
> +    mc->default_ram_size = 256 * MiB;

Isn't it 512 MB for the ML605?

>   }
>   
>   static const TypeInfo xtfpga_ml605_type = {
> @@ -648,6 +653,7 @@ static void xtfpga_ml605_nommu_class_init(ObjectClass *oc, void *data)
>       mc->init = xtfpga_ml605_nommu_init;
>       mc->max_cpus = 4;
>       mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
> +    mc->default_ram_size = 256 * MiB;

Ditto.

>   }
>   
>   static const TypeInfo xtfpga_ml605_nommu_type = {
> @@ -664,6 +670,7 @@ static void xtfpga_kc705_class_init(ObjectClass *oc, void *data)
>       mc->init = xtfpga_kc705_init;
>       mc->max_cpus = 4;
>       mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
> +    mc->default_ram_size = 1 * GiB;
>   }
>   
>   static const TypeInfo xtfpga_kc705_type = {
> @@ -680,6 +687,7 @@ static void xtfpga_kc705_nommu_class_init(ObjectClass *oc, void *data)
>       mc->init = xtfpga_kc705_nommu_init;
>       mc->max_cpus = 4;
>       mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
> +    mc->default_ram_size = 256 * MiB;
>   }
>   
>   static const TypeInfo xtfpga_kc705_nommu_type = {
> 

Others looks OK.

Regards,

Phil.

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

* Re: [Qemu-devel] [PATCH] target/xtensa: xtfpga: provide default memory sizes
  2018-11-21 12:00 ` Philippe Mathieu-Daudé
@ 2018-11-21 12:21   ` Max Filippov
  2018-11-21 18:25     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 4+ messages in thread
From: Max Filippov @ 2018-11-21 12:21 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: qemu-devel

Hi Philippe,

thanks for your review.

On Wed, Nov 21, 2018 at 4:00 AM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
> On 20/11/18 21:38, Max Filippov wrote:
> >   static const TypeInfo xtfpga_lx200_nommu_type = {
> > @@ -632,6 +636,7 @@ static void xtfpga_ml605_class_init(ObjectClass *oc, void *data)
> >       mc->init = xtfpga_ml605_init;
> >       mc->max_cpus = 4;
> >       mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
> > +    mc->default_ram_size = 256 * MiB;
>
> Isn't it 512 MB for the ML605?

There's 512MB on the board, but the Tensilica prototyping
user's guide for the ML605 only documents 256MB in the memory
map section. But now that you've mentioned it I recall that in reality
both ML605 and KC705 had all onboard memory minus 128MB
mapped for cores with MMU.

> >   }
> >
> >   static const TypeInfo xtfpga_ml605_type = {
> > @@ -648,6 +653,7 @@ static void xtfpga_ml605_nommu_class_init(ObjectClass *oc, void *data)
> >       mc->init = xtfpga_ml605_nommu_init;
> >       mc->max_cpus = 4;
> >       mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
> > +    mc->default_ram_size = 256 * MiB;
>
> Ditto.

For noMMU cores there's only 256MB window available for
the system memory, so it's capped at 256MB.

I'll send an updated v2.

-- 
Thanks.
-- Max

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

* Re: [Qemu-devel] [PATCH] target/xtensa: xtfpga: provide default memory sizes
  2018-11-21 12:21   ` Max Filippov
@ 2018-11-21 18:25     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-11-21 18:25 UTC (permalink / raw)
  To: Max Filippov; +Cc: qemu-devel

On 21/11/18 13:21, Max Filippov wrote:
> Hi Philippe,
> 
> thanks for your review.
> 
> On Wed, Nov 21, 2018 at 4:00 AM Philippe Mathieu-Daudé
> <philmd@redhat.com> wrote:
>> On 20/11/18 21:38, Max Filippov wrote:
>>>    static const TypeInfo xtfpga_lx200_nommu_type = {
>>> @@ -632,6 +636,7 @@ static void xtfpga_ml605_class_init(ObjectClass *oc, void *data)
>>>        mc->init = xtfpga_ml605_init;
>>>        mc->max_cpus = 4;
>>>        mc->default_cpu_type = XTENSA_DEFAULT_CPU_TYPE;
>>> +    mc->default_ram_size = 256 * MiB;
>>
>> Isn't it 512 MB for the ML605?
> 
> There's 512MB on the board, but the Tensilica prototyping
> user's guide for the ML605 only documents 256MB in the memory
> map section. But now that you've mentioned it I recall that in reality
> both ML605 and KC705 had all onboard memory minus 128MB
> mapped for cores with MMU.
> 
>>>    }
>>>
>>>    static const TypeInfo xtfpga_ml605_type = {
>>> @@ -648,6 +653,7 @@ static void xtfpga_ml605_nommu_class_init(ObjectClass *oc, void *data)
>>>        mc->init = xtfpga_ml605_nommu_init;
>>>        mc->max_cpus = 4;
>>>        mc->default_cpu_type = XTENSA_DEFAULT_CPU_NOMMU_TYPE;
>>> +    mc->default_ram_size = 256 * MiB;
>>
>> Ditto.
> 
> For noMMU cores there's only 256MB window available for
> the system memory, so it's capped at 256MB.

This totally makes sense.

> 
> I'll send an updated v2.

Thanks!

Phil.

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

end of thread, other threads:[~2018-11-21 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20 20:38 [Qemu-devel] [PATCH] target/xtensa: xtfpga: provide default memory sizes Max Filippov
2018-11-21 12:00 ` Philippe Mathieu-Daudé
2018-11-21 12:21   ` Max Filippov
2018-11-21 18:25     ` 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.