All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Delevoryas <pdel@fb.com>
Cc: "Peter Delevoryas" <pdel@fb.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Cameron Esfahani via" <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.org>, "Cédric Le Goater" <clg@kaod.org>
Subject: Re: [PATCH v2 1/8] aspeed: Set CPU memory property explicitly
Date: Fri, 24 Jun 2022 14:00:19 +0000	[thread overview]
Message-ID: <A7819461-C494-4B06-80CB-21473A3C6E28@fb.com> (raw)
In-Reply-To: <9093f275-8062-7992-293e-1c5c129fd228@kaod.org>



> On Jun 23, 2022, at 11:55 PM, Cédric Le Goater <clg@kaod.org> wrote:
> 
> On 6/24/22 08:36, Cédric Le Goater wrote:
>> On 6/24/22 02:36, Peter Delevoryas wrote:
>>> Signed-off-by: Peter Delevoryas <pdel@fb.com>
>> Please merge this patch with patch 2 in which the "memory" property
>> is defined.
> 
> Ah no. That's another link. I don't understand where that was done
> before.

Yeah, sorry if this was confusing:

In the AST1030, we set the memory property on the armv7m core explicitly.

In the AST2400, AST2500, and AST2600, we have been relying on the
CPU init code implicitly setting it to get_system_memory().

The goal of this patch was just to make it consistent across all of the
Aspeed SoC’s, so that the next patch (2/8) can introduce an SoC
memory property at the machine:SoC level without changing anything
at the SoC:CPU level.

> 
> C.
> 
> 
>> Thanks,
>> C.
>>> ---
>>>   hw/arm/aspeed_ast2600.c | 2 ++
>>>   hw/arm/aspeed_soc.c     | 2 ++
>>>   2 files changed, 4 insertions(+)
>>> 
>>> diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
>>> index f70b17d3f9..f950fff070 100644
>>> --- a/hw/arm/aspeed_ast2600.c
>>> +++ b/hw/arm/aspeed_ast2600.c
>>> @@ -294,6 +294,8 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
>>>           object_property_set_int(OBJECT(&s->cpu[i]), "cntfrq", 1125000000,
>>>                                   &error_abort);
>>> +        object_property_set_link(OBJECT(&s->cpu[i]), "memory",
>>> +                                 OBJECT(get_system_memory()), &error_abort);
>>>           if (!qdev_realize(DEVICE(&s->cpu[i]), NULL, errp)) {
>>>               return;
>>> diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
>>> index f530028874..06e5629800 100644
>>> --- a/hw/arm/aspeed_soc.c
>>> +++ b/hw/arm/aspeed_soc.c
>>> @@ -247,6 +247,8 @@ static void aspeed_soc_realize(DeviceState *dev, Error **errp)
>>>       /* CPU */
>>>       for (i = 0; i < sc->num_cpus; i++) {
>>> +        object_property_set_link(OBJECT(&s->cpu[i]), "memory",
>>> +                                 OBJECT(get_system_memory()), &error_abort);
>>>           if (!qdev_realize(DEVICE(&s->cpu[i]), NULL, errp)) {
>>>               return;
>>>           }
> 


  reply	other threads:[~2022-06-24 14:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24  0:36 [PATCH v2 0/8] aspeed: Add multi-SoC machine Peter Delevoryas
2022-06-24  0:36 ` [PATCH v2 1/8] aspeed: Set CPU memory property explicitly Peter Delevoryas
2022-06-24  6:36   ` Cédric Le Goater
2022-06-24  6:55     ` Cédric Le Goater
2022-06-24 14:00       ` Peter Delevoryas [this message]
2022-06-24  0:36 ` [PATCH v2 2/8] aspeed: Add memory property to Aspeed SoC Peter Delevoryas
2022-06-24  6:40   ` Cédric Le Goater
2022-06-24  0:36 ` [PATCH v2 3/8] aspeed: Remove usage of sysbus_mmio_map Peter Delevoryas
2022-06-24  6:56   ` Cédric Le Goater
2022-06-24  0:36 ` [PATCH v2 4/8] aspeed: Map unimplemented devices in SoC memory Peter Delevoryas
2022-06-24  6:58   ` Cédric Le Goater
2022-06-24  0:36 ` [PATCH v2 5/8] aspeed: Remove use of qemu_get_cpu Peter Delevoryas
2022-06-24  6:58   ` Cédric Le Goater
2022-06-24  0:36 ` [PATCH v2 6/8] aspeed: Add fby35 skeleton Peter Delevoryas
2022-06-24  7:00   ` Cédric Le Goater
2022-06-24  0:37 ` [PATCH v2 7/8] aspeed: Make aspeed_board_init_flashes public Peter Delevoryas
2022-06-28  5:03   ` Cédric Le Goater
2022-06-24  0:37 ` [PATCH v2 8/8] aspeed: Add AST2600 (BMC) to fby35 Peter Delevoryas
2022-06-28  5:01   ` Cédric Le Goater
2022-06-28  6:55     ` Peter Delevoryas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A7819461-C494-4B06-80CB-21473A3C6E28@fb.com \
    --to=pdel@fb.com \
    --cc=clg@kaod.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.