From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYvOV-0006hF-6n for qemu-devel@nongnu.org; Mon, 07 Sep 2015 08:19:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYvOQ-00009g-48 for qemu-devel@nongnu.org; Mon, 07 Sep 2015 08:19:31 -0400 Received: from mail-lb0-x22d.google.com ([2a00:1450:4010:c04::22d]:35716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYvOP-00009P-Qw for qemu-devel@nongnu.org; Mon, 07 Sep 2015 08:19:26 -0400 Received: by lbpo4 with SMTP id o4so38498973lbp.2 for ; Mon, 07 Sep 2015 05:19:24 -0700 (PDT) References: <1441383782-24378-1-git-send-email-peter.maydell@linaro.org> <1441383782-24378-3-git-send-email-peter.maydell@linaro.org> From: Sergey Fedorov Message-ID: <55ED80C9.5000700@gmail.com> Date: Mon, 7 Sep 2015 15:19:21 +0300 MIME-Version: 1.0 In-Reply-To: <1441383782-24378-3-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 2/6] hw/arm: new interface for devices which need to behave differently for kernel boot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , patches@linaro.org Hi Peter, On 04.09.2015 19:22, Peter Maydell wrote: > +typedef struct ARMLinuxBootIfClass { > + /*< private >*/ > + InterfaceClass parent_class; > + > + /*< public >*/ > + /** arm_linux_init: configure the device for a direct boot > + * of an ARM Linux kernel (so that device reset puts it into > + * the state the kernel expects after firmware initialization, > + * rather than the true hardware reset state). This callback is > + * called once after machine construction is complete (before the > + * first system reset). > + * > + * @obj: the object implementing this interface > + * @secure_boot: true if we are booting Secure, false for NonSecure > + * (or for a CPU which doesn't support TrustZone) > + */ > + void (*arm_linux_init)(ARMLinuxBootIf *obj, bool secure_boot); Why don't just pass a pointer to arm_boot_info structure itself rather than its secure_boot element to arm_linux_init()? > +} ARMLinuxBootIfClass; Best regards, Sergey