From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bplU9-0007C3-Je for qemu-devel@nongnu.org; Thu, 29 Sep 2016 20:15:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bplU7-0001wm-5D for qemu-devel@nongnu.org; Thu, 29 Sep 2016 20:15:28 -0400 Received: from mail-oi0-x244.google.com ([2607:f8b0:4003:c06::244]:36686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bplU7-0001wa-0E for qemu-devel@nongnu.org; Thu, 29 Sep 2016 20:15:27 -0400 Received: by mail-oi0-x244.google.com with SMTP id h186so1819443oia.3 for ; Thu, 29 Sep 2016 17:15:26 -0700 (PDT) MIME-Version: 1.0 Sender: alistair23@gmail.com In-Reply-To: <87lgybhx06.fsf@dusky.pond.sub.org> References: <5fb4c81eca6d12f304e0798ea569742b6860caa4.1475102513.git.alistair.francis@xilinx.com> <87lgybhx06.fsf@dusky.pond.sub.org> From: Alistair Francis Date: Thu, 29 Sep 2016 17:14:56 -0700 Message-ID: Content-Type: text/plain; charset=UTF-8 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: Markus Armbruster Cc: Alistair Francis , Peter Maydell , Peter Crosthwaite , Paolo Bonzini , "qemu-devel@nongnu.org Developers" , Christopher Covington On Thu, Sep 29, 2016 at 2:32 AM, Markus Armbruster wrote: > 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. Great! > >> 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. Adding it in. > >> + >> +#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. No worries > > Acked-by: Markus Armbruster Thanks! Alistair >