From: Scott Wood <scottwood@freescale.com>
To: "Chen, Tiejun" <Tiejun.Chen@windriver.com>
Cc: "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
"agraf@suse.de" <agraf@suse.de>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size
Date: Tue, 30 Apr 2013 18:08:49 -0500 [thread overview]
Message-ID: <1367363329.24133.12@snotra> (raw)
In-Reply-To: <82C960D7DF4A1F47B94FC1C67A29BEE3669305D1@ALA-MBB.corp.ad.wrs.com> (from Tiejun.Chen@windriver.com on Tue Apr 30 18:03:54 2013)
On 04/30/2013 06:03:54 PM, Chen, Tiejun wrote:
> > -----Original Message-----
> > From: Scott Wood [mailto:scottwood@freescale.com]
> > Sent: Tuesday, April 30, 2013 3:19 AM
> > To: Chen, Tiejun
> > Cc: agraf@suse.de; qemu-ppc@nongnu.org; qemu-devel@nongnu.org
> > Subject: Re: [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct
> > params->ram_size with ram_size
> >
> > On 04/28/2013 05:30:09 AM, Tiejun Chen wrote:
> > > We should sync params->ram_size after we fixup memory size on a
> > > alignment boundary. Otherwise Guest would exceed the actual memory
> > > region.
> > >
> > > Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
> > > ---
> > > hw/ppc/e500.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index c1bdb6b..145da0e
> > > 100644
> > > --- a/hw/ppc/e500.c
> > > +++ b/hw/ppc/e500.c
> > > @@ -523,6 +523,8 @@ void ppce500_init(PPCE500Params *params)
> > >
> > > /* Fixup Memory size on a alignment boundary */
> > > ram_size &= ~(RAM_SIZES_ALIGN - 1);
> > > + /* Sync this for the system. */
> > > + params->ram_size = ram_size;
> >
> > Could you explain this further? When does params->ram_size
> > ever get used after this point?
>
> In that case we have to create a dtb without passing an extra dtb, we
> always use params->ram_size inside ppce500_load_device_tree(),
>
> ppce500_load_device_tree()
> {
> ...
> uint64_t mem_reg_property[] = { 0, cpu_to_be64(params->ram_size) };
OK, from reading the patch it looked like this was happening before you
modify params->ram_size, but it's a separate function that gets called
later. The comment doesn't make much sense to me -- it's not passing
any information back to "the system" (which I'd interpret as generic
QEMU code, if anything, which is why I thought you were trying to do
this for the benefit of the caller), just making sure later e500
platform code does the right thing when generating the device tree.
-Scott
next prev parent reply other threads:[~2013-04-30 23:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-28 10:30 [Qemu-devel] [v1][Qemu-ppc][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size Tiejun Chen
2013-04-29 19:18 ` [Qemu-devel] [Qemu-ppc] [v1][PATCH " Scott Wood
2013-04-30 9:53 ` Alexander Graf
2013-04-30 12:04 ` Andreas Färber
2013-04-30 23:54 ` Chen, Tiejun
2013-05-01 0:29 ` Alexander Graf
2013-04-30 23:03 ` Chen, Tiejun
2013-04-30 23:08 ` Scott Wood [this message]
2013-04-30 23:31 ` Chen, Tiejun
2013-04-30 23:36 ` Scott Wood
2013-04-30 23:46 ` Chen, Tiejun
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=1367363329.24133.12@snotra \
--to=scottwood@freescale.com \
--cc=Tiejun.Chen@windriver.com \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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.