Alistair Francis <alistair.fran...@xilinx.com> writes:

> Add a generic loader to QEMU which can be used to load images or set
> memory values.
>
> Internally inside QEMU this is a device. It is a strange device that
> provides no hardware interface but allows QEMU to monkey patch memory
> specified when it is created. To be able to do this it has a reset
> callback that does the memory operations.
>
> This device allows the user to monkey patch memory. To be able to do
> this it needs a backend to manage the datas, the same as other
> memory-related devices. In this case as the backend is so trivial we
> have merged it with the frontend instead of creating and maintaining a
> seperate backend.

Works for me.

> Signed-off-by: Alistair Francis <alistair.fran...@xilinx.com>
> Reviewed-by: Peter Maydell <peter.mayd...@linaro.org>
[...]
> diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c
> new file mode 100644
> index 0000000..fc2fea7
> --- /dev/null
> +++ b/hw/core/generic-loader.c
> @@ -0,0 +1,197 @@
> +/*
> + * Generic Loader
> + *
> + * Copyright (C) 2014 Li Guang
> + * Copyright (C) 2016 Xilinx Inc.
> + * Written by Li Guang <lig.f...@cn.fujitsu.com>
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful, but 
> WITHOUT
> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
> + * for more details.
> + */

The text you added to the commit message would make a lovely comment
here.  Please add it.

> +
> +#include "qemu/osdep.h"
> +#include "qom/cpu.h"
> +#include "hw/sysbus.h"
> +#include "sysemu/dma.h"
> +#include "hw/loader.h"
> +#include "qapi/error.h"
> +#include "hw/core/generic-loader.h"
[...]

Thank you very much for processing my much-too-late design review
graciously.

Acked-by: Markus Armbruster <arm...@redhat.com>

Reply via email to