[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 5/6] hw/arm/digic: add NOR ROM support
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v10 5/6] hw/arm/digic: add NOR ROM support |
Date: |
Tue, 17 Dec 2013 14:04:35 +0000 |
On 16 December 2013 10:15, Antony Pavlov <address@hidden> wrote:
> +static void digic_load_rom(DigicBoardState *s, hwaddr addr,
> + hwaddr max_size, const char *def_filename)
> +{
> + target_long rom_size;
> + const char *filename;
> +
> + if (bios_name) {
> + filename = bios_name;
> + } else {
> + filename = def_filename;
> + }
> +
> + if (filename) {
> + char *fn = qemu_find_file(QEMU_FILE_TYPE_BIOS, filename);
> +
> + if (!fn) {
> + error_report("Couldn't find rom image '%s'.\n", filename);
> + exit(1);
> + }
> +
> + rom_size = load_image_targphys(fn, addr, max_size);
> + if (rom_size < 0 || rom_size > max_size) {
> + error_report("Couldn't load rom image '%s'.\n", filename);
> + exit(1);
> + }
> + }
> +}
This results in 'make check' failing if you don't have the rom blob
around. Since I've already applied this to my tree, I've just fixed this
nit there, by adding this change:
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -30,6 +30,7 @@
#include "hw/block/flash.h"
#include "hw/loader.h"
#include "sysemu/sysemu.h"
+#include "sysemu/qtest.h"
#define DIGIC4_ROM0_BASE 0xf0000000
#define DIGIC4_ROM1_BASE 0xf8000000
@@ -86,6 +87,13 @@ static void digic_load_rom(DigicBoardState *s, hwaddr addr,
target_long rom_size;
const char *filename;
+ if (qtest_enabled()) {
+ /* qtest runs no code so don't attempt a ROM load which
+ * could fail and result in a spurious test failure.
+ */
+ return;
+ }
+
if (bios_name) {
filename = bios_name;
} else {
thanks
-- PMM
- [Qemu-devel] [PATCH v10 0/6] hw/arm: add initial support for Canon DIGIC SoC, Antony Pavlov, 2013/12/16
- [Qemu-devel] [PATCH v10 1/6] hw/arm: add very initial support for Canon DIGIC SoC, Antony Pavlov, 2013/12/16
- [Qemu-devel] [PATCH v10 2/6] hw/arm/digic: prepare DIGIC-based boards support, Antony Pavlov, 2013/12/16
- [Qemu-devel] [PATCH v10 3/6] hw/arm/digic: add timer support, Antony Pavlov, 2013/12/16
- [Qemu-devel] [PATCH v10 4/6] hw/arm/digic: add UART support, Antony Pavlov, 2013/12/16
- [Qemu-devel] [PATCH v10 6/6] MAINTAINERS: Document 'Canon DIGIC' machine, Antony Pavlov, 2013/12/16
- [Qemu-devel] [PATCH v10 5/6] hw/arm/digic: add NOR ROM support, Antony Pavlov, 2013/12/16
- Re: [Qemu-devel] [PATCH v10 5/6] hw/arm/digic: add NOR ROM support,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH v10 0/6] hw/arm: add initial support for Canon DIGIC SoC, Peter Maydell, 2013/12/17