[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 00/18] hw/avr: Introduce few Arduino boards

From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v4 00/18] hw/avr: Introduce few Arduino boards
Date: Wed, 22 Jan 2020 22:56:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 1/22/20 9:46 PM, Richard Henderson wrote:
On 1/21/20 11:23 AM, Philippe Mathieu-Daudé wrote:
4. There is difference between -bios and -kernel (arduino boars crash when 
-bios is used, but this seems because I run avr6 on avr5 CPU). I would be happy 
if you explained what is the difference between these two arguments.

qemu man page is not very helpful...

        -bios file
            Set the filename for the BIOS.

        -kernel bzImage
            Use bzImage as kernel image. The kernel can be either a
Linux kernel or in multiboot format.

Paolo, Peter, do you have a simple explanation?

It depends on your target board.  They *can* do very different things.

E.g. for "pc" (x86) machine, -bios sets the seabios image to use, and -kernel
loads a kernel image that seabios will invoke.

E.g. for "dp264" (alpha) machine, -bios sets the palcode image to use and
-kernel loads a kernel image.  Note that in this case, the alpha kernel relies
on palcode services, so both must be present for the system to work.

E.g. for "virt" (arm) machine, -bios loads a raw image at which the reset
vector will be pointed, whereas -kernel loads a linux kernel image and follows
the arm-linux kernel boot protocol.  In other words the images are treated very

I don't know what, if anything, an avr kernel would require from boot services.
  I suspect the two options *could* be treated identically.

I think -bios used to be dumb, and originally it would only load a binary blob at a fixed memory address (like mapping a ROM or a parallel flash). And -kernel was a bit smarter, understanding ELF format. It can set (Linux) arch-specific registers, in particular when used with -append (cmdline) and -dtb (device tree).

At some point -bios got to understand ELF too, so QEMU could load ROMs mapped at different base address (and not force a default one).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]