From nobody Tue Feb 10 08:06:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1567750369; cv=none; d=zoho.com; s=zohoarc; b=VADRiXyivmMJK6/rYpnxDLSulZrL7Qyh9RdbZ6IyqR117i9GjjxYX/Lh1Zh6cd0vptWwwreHeE5aJv6BUhKbe/8JxxQWR1otyHgJ7hV1EFGrLILTkQARr80WkWv2Je0Kr6zBE+2VzhU82AGz9CUpxHtWRNRAHNCSd1DYiC6USzI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567750369; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=jyRveru0QqdLTJB7DWF/j5mPF0ZWpnIR0PdUBneWBbg=; b=T2P709sn/ubeNYJlKd2R0XAiKY2B6UnvAmkMwCr+h/HuoItLZPwlkzsMyYyG3j329g/BgNFn0sdR9tIVKoeeu/C7W9npsjYCrs+yC426WiI8eo6sI5tdUofalqM1RUg//3HxePTB3/zRGaCvvMyG84R6Stin+jkkDI9KQxMNBL8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567750369196539.8383818225072; Thu, 5 Sep 2019 23:12:49 -0700 (PDT) Received: from localhost ([::1]:52364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i67U7-0003hq-Ne for importer@patchew.org; Fri, 06 Sep 2019 02:12:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39916) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i67SY-0002UB-RW for qemu-devel@nongnu.org; Fri, 06 Sep 2019 02:11:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i67SX-0003jF-OC for qemu-devel@nongnu.org; Fri, 06 Sep 2019 02:11:02 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52513) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i67SX-0003iy-KZ for qemu-devel@nongnu.org; Fri, 06 Sep 2019 02:11:01 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 698C921FA7; Fri, 6 Sep 2019 02:11:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Fri, 06 Sep 2019 02:11:01 -0400 Received: from alistair-xps-14z.alistair23.me (c-73-93-84-208.hsd1.ca.comcast.net [73.93.84.208]) by mail.messagingengine.com (Postfix) with ESMTPA id BA9B1D60057; Fri, 6 Sep 2019 02:11:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm2; bh= jyRveru0QqdLTJB7DWF/j5mPF0ZWpnIR0PdUBneWBbg=; b=iqo6Ro0/0hQGk0Vz j3GG9VvzmiMok1XWM6jra2m6vFcbNlagZVgVmmpGQKyH6S8kfAm4xTJeig/X3W8m ImU9pebrGel7I0yr80oq47Rb9RsHYPbOQeEUN7gbqRsgplBPqTOGmpfl+JIFnfWt AftDOHI5rLq3nBndiH/30oHoi1a1tUwVdo+g4dcDbMWzYz66FEOZOFkU0l3VnznG iUM3/5hCaWFbKwEJT30RudCNDbJjSdJLDZrrnHmewuhuDCJmLiZnp0hGBLHnZT2U WXQ5C+IBAc3wowpRtJAKnNkB/fiFI+9ALRwT53aIE8aMU071QeTgr8I43HcyBFSf nUNzbQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=jyRveru0QqdLTJB7DWF/j5mPF0ZWpnIR0PdUBneWB bg=; b=Wou//CytpZ+MquIzLpvv9pI7W9ZdabwEo5dD2B69vesI2jezl6XHXoGCh mkysnCQPQUyu46aYbmiFoKAdmSNUQJjKIihWaP3b34rLhILdPeN59x1wCZXsWXjf UYRrVGkGTLuxoP5AAAj4gPPSoYyqNOCNzioIXe/8xnoQMViOg9a57vGEzR/Zb5nA nW5jw+IyQYTpUv6x0PCfVFTcaEKn+qw5S+3ZrQX4G5VoqGxs7Xa0/3V836w6lMG2 lLbscKvxyPXSv+2J1y3gNOHpHX6McyT/BEfa3RIVeInEjYvYnPY6raPgnfIGzePq CHZy7ZTS9FyHFzCIAEoftdDD0NByg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudejkedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhggtgfgsehtke ertdertdejnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishht rghirhesrghlihhsthgrihhrvdefrdhmvgeqnecukfhppeejfedrleefrdekgedrvddtke enucfrrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhishhtrghirhdv fedrmhgvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: From: Alistair Francis To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Thu, 5 Sep 2019 23:11:00 -0700 Message-Id: X-Mailer: git-send-email 2.22.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.25 Subject: [Qemu-devel] [PATCH v4 1/6] armv7m: Allow entry information to be returned X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair23@gmail.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Allow the kernel's entry point information to be returned when loading a kernel. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/armv7m.c | 4 +++- include/hw/arm/boot.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 7a3c48f002..40755d77db 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -306,7 +306,7 @@ static void armv7m_reset(void *opaque) cpu_reset(CPU(cpu)); } =20 -void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int mem_= size) +uint64_t armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int = mem_size) { int image_size; uint64_t entry; @@ -353,6 +353,8 @@ void armv7m_load_kernel(ARMCPU *cpu, const char *kernel= _filename, int mem_size) * board must call this function! */ qemu_register_reset(armv7m_reset, cpu); + + return entry; } =20 static Property bitband_properties[] =3D { diff --git a/include/hw/arm/boot.h b/include/hw/arm/boot.h index 7f4d0ca7cd..e35b83c0d2 100644 --- a/include/hw/arm/boot.h +++ b/include/hw/arm/boot.h @@ -27,11 +27,13 @@ typedef enum { * @kernel_filename: file to load * @mem_size: mem_size: maximum image size to load * + * returns: location of the kernel's entry point + * * Load the guest image for an ARMv7M system. This must be called by * any ARMv7M board. (This is necessary to ensure that the CPU resets * correctly on system reset, as well as for kernel loading.) */ -void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int mem_= size); +uint64_t armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename, int = mem_size); =20 /* arm_boot.c */ struct arm_boot_info { --=20 2.22.0