From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpXhg-0005qq-U1 for qemu-devel@nongnu.org; Thu, 29 Sep 2016 05:32:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpXhc-0006XO-EN for qemu-devel@nongnu.org; Thu, 29 Sep 2016 05:32:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpXhc-0006XG-8J for qemu-devel@nongnu.org; Thu, 29 Sep 2016 05:32:28 -0400 From: Markus Armbruster References: <5fb4c81eca6d12f304e0798ea569742b6860caa4.1475102513.git.alistair.francis@xilinx.com> Date: Thu, 29 Sep 2016 11:32:25 +0200 In-Reply-To: <5fb4c81eca6d12f304e0798ea569742b6860caa4.1475102513.git.alistair.francis@xilinx.com> (Alistair Francis's message of "Wed, 28 Sep 2016 15:45:43 -0700") Message-ID: <87lgybhx06.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v12 1/2] generic-loader: Add a generic loader List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alistair Francis Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org, cov@codeaurora.org, crosthwaitepeter@gmail.com, pbonzini@redhat.com Alistair Francis 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 > Reviewed-by: Peter Maydell [...] > 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 > + * > + * 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