qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Hongbo Zhang" <hongbo.zhang@linaro.org>,
	"Radoslaw Biernacki" <radoslaw.biernacki@linaro.org>,
	"Ard Biesheuvel" <ard.biesheuvel@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Leif Lindholm" <leif.lindholm@linaro.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v5 2/2] hw/arm: add Arm SBSA reference machine, devices part
Date: Wed, 30 Jan 2019 09:23:21 +0100	[thread overview]
Message-ID: <20190130092321.1ddbd29a@Igors-MacBook-Pro.local> (raw)
In-Reply-To: <CAFEAcA_+UhU56D7Yx5K8+=DbtUiiV8V7sX2UgxFKSkScUypxFg@mail.gmail.com>

On Tue, 29 Jan 2019 15:26:29 +0000
Peter Maydell <peter.maydell@linaro.org> wrote:

> On Mon, 28 Jan 2019 at 09:46, Hongbo Zhang <hongbo.zhang@linaro.org> wrote:
> >
> > On Tue, 22 Jan 2019 at 19:49, Peter Maydell <peter.maydell@linaro.org> wrote:
> > >
> > > On Fri, 7 Dec 2018 at 09:08, Hongbo Zhang <hongbo.zhang@linaro.org> wrote:
> > > > +static void sbsa_ref_machine_done(Notifier *notifier, void *data)
> > > > +{
> > > > +    VirtMachineState *vms = container_of(notifier, VirtMachineState,
> > > > +                                         machine_done);
> > > > +    ARMCPU *cpu = ARM_CPU(first_cpu);
> > > > +    struct arm_boot_info *info = &vms->bootinfo;
> > > > +    AddressSpace *as = arm_boot_address_space(cpu, info);
> > > > +
> > > > +    if (arm_load_dtb(info->dtb_start, info, info->dtb_limit, as) < 0) {
> > > > +        exit(1);
> > > > +    }
> > > > +}
> > >
> > > I still don't understand why we need this -- it doesn't seem
> > > to be doing anything different from the default behaviour that
> > > boot.c implements if skip_dtb_autoload is false.
> > >
> >
> > According to the process of arm_load_kernel() in boot.c, If only
> > kernel loaded via -kernel but without any firmware, it works fine.
> > While in this case, we have have firmware loaded but no kernel (eg
> > firmware loads kernel from storage, firmware never come back to qemu
> > again), so the arm_load_kernel() returns in the middle before calling
> > arm_load_dtb(),  because arm_load_dtb() is the final step in
> > arm_load_kernel(), so there is no chance for the arm_load_dtb() to be
> > called, then we get error message and qemu quits.
> 
> Oh, I see now. I think this is a bug in boot.c and we should
> fix it by making the "this is a firmware boot" code path also
> do the arm_load_dtb() call. I'll send a patch.
pls, CC me on it as well.

I'm interested in it from hotplug + reboot perspective,
where we have a changed/bigger DTB on reboot as it contains new devices (cpus|memory)

loading rom like now doesn't work nice in case of reboot.

> 
> thanks
> -- PMM
> 

  parent reply	other threads:[~2019-01-30  8:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07  9:07 [Qemu-devel] [PATCH v5 0/2] [PATCH v4] Add arm SBSA reference machine Hongbo Zhang
2018-12-07  9:07 ` [Qemu-devel] [PATCH v5 1/2] hw/arm: Add arm SBSA reference machine, skeleton part Hongbo Zhang
2019-01-22 11:41   ` Peter Maydell
2019-01-28 10:16     ` Hongbo Zhang
2019-01-28 10:42       ` Peter Maydell
2019-01-28 10:43       ` Peter Maydell
2019-01-30  8:59     ` Hongbo Zhang
2019-01-31 12:01       ` Peter Maydell
2019-02-01  9:29         ` Hongbo Zhang
2018-12-07  9:07 ` [Qemu-devel] [PATCH v5 2/2] hw/arm: add Arm SBSA reference machine, devices part Hongbo Zhang
2019-01-22 11:49   ` Peter Maydell
2019-01-28  9:46     ` Hongbo Zhang
2019-01-29 15:26       ` Peter Maydell
2019-01-30  7:44         ` Hongbo Zhang
2019-01-30  8:23         ` Igor Mammedov [this message]
2019-01-31  9:48           ` Peter Maydell
2018-12-07  9:21 ` [Qemu-devel] [PATCH v5 0/2] [PATCH v4] Add arm SBSA reference machine Hongbo Zhang
2018-12-07 10:57 ` no-reply
2018-12-07 11:01 ` no-reply

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=20190130092321.1ddbd29a@Igors-MacBook-Pro.local \
    --to=imammedo@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=hongbo.zhang@linaro.org \
    --cc=leif.lindholm@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=radoslaw.biernacki@linaro.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 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).