qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Niek Linnenbank <nieklinnenbank@gmail.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Beniamino Galvani <b.galvani@gmail.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v1 4/4] hw/arm/cubieboard: report error when using unsupported -bios argument
Date: Mon, 2 Mar 2020 23:30:30 +0100	[thread overview]
Message-ID: <CAPan3Wpcfrf9PcaPEbWQvagKJbaOnSnumk9yvX9-ZibXzgnEaA@mail.gmail.com> (raw)
In-Reply-To: <52400d43-3890-68cb-0e63-35c3636be19a@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2114 bytes --]

Hi Philippe,

On Mon, Mar 2, 2020 at 7:04 PM Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> On 3/2/20 4:44 PM, Peter Maydell wrote:
> > On Thu, 27 Feb 2020 at 22:02, Niek Linnenbank <nieklinnenbank@gmail.com>
> wrote:
> >>
> >> The Cubieboard machine does not support the -bios argument.
> >> Report an error when -bios is used and exit immediately.
> >>
> >> Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
> >> ---
> >>   hw/arm/cubieboard.c | 7 +++++++
> >>   1 file changed, 7 insertions(+)
> >>
> >> diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
> >> index 6c55d9056f..871b1beef4 100644
> >> --- a/hw/arm/cubieboard.c
> >> +++ b/hw/arm/cubieboard.c
> >> @@ -19,6 +19,7 @@
> >>   #include "exec/address-spaces.h"
> >>   #include "qapi/error.h"
> >>   #include "cpu.h"
> >> +#include "sysemu/sysemu.h"
> >>   #include "hw/sysbus.h"
> >>   #include "hw/boards.h"
> >>   #include "hw/arm/allwinner-a10.h"
> >> @@ -33,6 +34,12 @@ static void cubieboard_init(MachineState *machine)
> >>       AwA10State *a10;
> >>       Error *err = NULL;
> >>
> >> +    /* BIOS is not supported by this board */
> >> +    if (bios_name) {
> >> +        error_report("BIOS not supported for this machine");
> >> +        exit(1);
> >> +    }
> >
> > We don't usually bother to check this, but I guess there's
> > no reason not to.
>
> I agree this is confusing to expect the machine boot from a flash when
> using -bios and having to debug until figuring out the reason.
>
> This -bios is a generic machine option, maybe we could move this check
> to the common machine code.
>

Agreed, that sounds logical indeed.

When we have a common machine code/class I presume that boards which do
support the -bios
option could simply set somekind of flag/field to enable the -bios
functionality. And for boards
which do not support it, the common machine code would then by default give
an error and exit.

Regards,
Niek


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

-- 
Niek Linnenbank

[-- Attachment #2: Type: text/html, Size: 3397 bytes --]

  reply	other threads:[~2020-03-02 22:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 22:01 [PATCH v1 0/4] hw/arm/cubieboard: correct CPU type and add machine argument checks Niek Linnenbank
2020-02-27 22:01 ` [PATCH v1 1/4] hw/arm/cubieboard: use ARM Cortex-A8 as the default CPU in machine definition Niek Linnenbank
2020-03-02 15:32   ` Peter Maydell
2020-03-02 17:54     ` Philippe Mathieu-Daudé
2020-02-27 22:01 ` [PATCH v1 2/4] hw/arm/cubieboard: restrict allowed CPU type to ARM Cortex-A8 Niek Linnenbank
2020-03-02 15:33   ` Peter Maydell
2020-02-27 22:01 ` [PATCH v1 3/4] hw/arm/cubieboard: restrict allowed RAM size to 512MiB and 1GiB Niek Linnenbank
2020-03-02 15:41   ` Peter Maydell
2020-02-27 22:01 ` [PATCH v1 4/4] hw/arm/cubieboard: report error when using unsupported -bios argument Niek Linnenbank
2020-03-02 15:44   ` Peter Maydell
2020-03-02 18:04     ` Philippe Mathieu-Daudé
2020-03-02 22:30       ` Niek Linnenbank [this message]
2020-03-02 16:06 ` [PATCH v1 0/4] hw/arm/cubieboard: correct CPU type and add machine argument checks Peter Maydell
2020-03-02 22:21   ` Niek Linnenbank
2020-03-02 18:05 ` Philippe Mathieu-Daudé

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=CAPan3Wpcfrf9PcaPEbWQvagKJbaOnSnumk9yvX9-ZibXzgnEaA@mail.gmail.com \
    --to=nieklinnenbank@gmail.com \
    --cc=b.galvani@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --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 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).