[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 10/10] PPC: e500: Move to u-boot as f
From: |
Scott Wood |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 10/10] PPC: e500: Move to u-boot as firmware |
Date: |
Wed, 22 Jan 2014 18:23:41 -0600 |
On Mon, 2014-01-20 at 00:44 +0100, Alexander Graf wrote:
> Almost all platforms QEMU emulates have some sort of firmware they can load
> to expose a guest environment that closely resembles the way it would look
> like on real hardware.
>
> This patch introduces such a firmware on our e500 platforms. U-boot is the
> default firmware for most of these systems and as such our preferred choice.
>
> For now, it is able to expose the same functionality to the user as the direct
> -kernel option was, just that it prints some nice messages beforehand.
>
> However, if you abort the boot (press any key) or boot without -kernel you
> are actually able to modify the boot environment, execute a networked boot
> through the e1000 emulation and execute u-boot payloads.
Have you removed support for loading the kernel directly? I thought you
said you were only going to load U-Boot in the absence of -kernel.
Given the absence of runtime services, and the presence of a
standardized OS entry mechanism (ePAPR), inserting firmware into the
process seems like a niche use case rather than something that should be
the default, much less mandatory.
> + /* Load u-boot (ELF) */
> + if (bios_name == NULL) {
> + bios_name = "u-boot.e500";
> + }
> + filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
> +
> + bios_size = load_elf(filename, NULL, NULL, &bios_entry, &loadaddr, NULL,
> + 1, ELF_MACHINE, 0);
> + if (bios_size < 0) {
> + /*
> + * Hrm. No ELF image? Try a uImage, maybe someone is giving us an
> + * ePAPR compliant kernel
> + */
ePAPR specifies ELF, not uImage (though QEMU does currently support
ePAPR-ish loading of uImages, as U-Boot does) -- and you still seem to
be trying to load firmware here, not a kernel.
-Scott
[Qemu-ppc] [PATCH 06/10] PPC: Add dcbtls emulation, Alexander Graf, 2014/01/19
[Qemu-ppc] [PATCH 03/10] PPC: Add stub emulation for HDBCR0, Alexander Graf, 2014/01/19
[Qemu-ppc] [PATCH 05/10] PPC: Properly emulate L1CSR0 and L1CSR1, Alexander Graf, 2014/01/19
[Qemu-ppc] [PATCH 01/10] PPC: Make all e500 CPUs SVR aware, Alexander Graf, 2014/01/19