Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3898628ybv; Mon, 10 Feb 2020 08:25:27 -0800 (PST) X-Google-Smtp-Source: APXvYqx2SAE66sN38l++fcSJpX14gUkm2cOoPxXUFbQV7T34kTqzYSTsK7DT57JkJgMWYlyhEtJ2 X-Received: by 2002:a05:6830:2154:: with SMTP id r20mr1748937otd.131.1581351927203; Mon, 10 Feb 2020 08:25:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581351927; cv=none; d=google.com; s=arc-20160816; b=lSXutq8a6F6aCeG4gykHf4zLnG5CE3xi6cPauoAJQqwKo1ZMBdkG8UeNoyYYjop0wX hssVgvIhvknF7vT795LBapkMMIpyJtEkW0pTunFb5q84rw3f+y7aEtgDi4U3gGOIa8nj 7daXCysa7pIBrozGNrj2A6BDCaKV2VVUr/2OyigfImg9+V/d/Xbuy4YacHOdKOjnsb5y aYw7CUhu4/5rnlc3wIVQ0WKEpKM/OraXvw2ivipsqXZdYcnsGsI/3slL0LljWdQZW/5j nfBJQ0lEDu3frHPywAwZbZgGxqtlq169CnLQnHfgWz7/kJJZsH3m1vV9j4KajDLG2k9C Ak8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=7i8uswkEMsftUzWNZaWpKTwl9chv4VQD7b+VNxGWpY0=; b=xPd940ZxbMST4sDJMSrH0aePMV/+YcwdoY/bbiAcxbU8OrmHFPR/X4cuo9QxSEHHc/ HhZhxrSvhxu82DMSBMaOj3kQnWb+xqCdZVYo2e4FNv9mH+LnAPhLSJ0fzYzQFdiNbT2k HTjVoP5lutQmeDSgCxtyzIM9LRVGfMCB6noSAKBbkfYJZRi11dqXFJ1kzgEOqOuAcMgJ XfxC+h0LwDX6MBK+qQqJMJyeGeM4DJfga7ENzzVEPEqQO6SlMT1LFsrGKO6cOnaA35yz 9FP3NQ2CV+H1zb5MsRHTCboUoh++O1ciiywZ/4aHxb6nWqHaDVsnZa5ZNptjXUYz19/a S6Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=qAhbOVR6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kalray.eu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 94si387807otw.297.2020.02.10.08.25.15; Mon, 10 Feb 2020 08:25:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=qAhbOVR6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kalray.eu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727904AbgBJQX6 (ORCPT + 99 others); Mon, 10 Feb 2020 11:23:58 -0500 Received: from zimbra2.kalray.eu ([92.103.151.219]:58604 "EHLO zimbra2.kalray.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727579AbgBJQX6 (ORCPT ); Mon, 10 Feb 2020 11:23:58 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 4F5FD27E0658; Mon, 10 Feb 2020 17:23:56 +0100 (CET) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ibnmg7bxNp1D; Mon, 10 Feb 2020 17:23:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id F170F27E079C; Mon, 10 Feb 2020 17:23:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu F170F27E079C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1581351836; bh=7i8uswkEMsftUzWNZaWpKTwl9chv4VQD7b+VNxGWpY0=; h=From:To:Date:Message-Id; b=qAhbOVR6uHF47yqt08wvNxUitSKT79LG9tDghJ9PGjGXVx3jVvVxOAH2ZwRgwnwbA 7EMOxbbTOFsmJeca9Y+WZvQMqlik1PegV/cQQ/QWC3rZggzSuWNKYpE0sgf6jIqecm kOKedq+2K+ZoRRbJnzTPriuK0W/FKDPrBL0OAiaI= X-Virus-Scanned: amavisd-new at zimbra2.kalray.eu Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yPulY8mreZhE; Mon, 10 Feb 2020 17:23:55 +0100 (CET) Received: from triton.lin.mbt.kalray.eu (unknown [192.168.37.25]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id D1B4627E0658; Mon, 10 Feb 2020 17:23:55 +0100 (CET) From: Clement Leger To: Ohad Ben-Cohen , Bjorn Andersson , Jonathan Corbet , Shawn Guo , Sascha Hauer , linux-remoteproc@vger.kernel.org Cc: Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andy Gross , Patrice Chotard , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Arnaud Pouliquen , Loic PALLARDY , s-anna , Mathieu Poirier , Clement Leger Subject: [PATCH v4 0/5] remoteproc: Add elf64 support Date: Mon, 10 Feb 2020 17:22:04 +0100 Message-Id: <20200210162209.23149-1-cleger@kalray.eu> X-Mailer: git-send-email 2.15.0.276.g89ea799 In-Reply-To: <527785289.2852303.1581062223707.JavaMail.zimbra@kalray.eu> References: <527785289.2852303.1581062223707.JavaMail.zimbra@kalray.eu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This serie add support for elf64 in remoteproc (elf loader, coredump). First two patches modifies the type of len argument (in da_to_va) and boot_addr in order to allow loading elf64 segment with a u64 size and a u64 entry point. Next patch introduce a set of macros to access elf64 and elf32 transparently. Last two patches are the actual modification in the elf loader and remoteproc coredump support to add elf64 support. Changes from V3: - Adapt coredump to elf64 file format - Rename remoteproc_elf_loader.h to remoteproc_elf_helpers.h - Update copyright year in remoteproc_elf_helpers.h - Rename macros elf_hdr_* to elf_get_hdr_* for coherency with elf_hdr_set_* - Split elf64 loader patch in 3: - boot_addr u64 change - remoteproc_elf_helpers.h creation - elf64 loading Clement Leger (5): remoteproc: Use u64 len for da_to_va remoteproc: Use u64 type for boot_addr remoteproc: Add elf helpers to access elf64 and elf32 fields remoteproc: Add elf64 support in elf loader remoteproc: Adapt coredump to generate correct elf type Documentation/remoteproc.txt | 2 +- drivers/remoteproc/imx_rproc.c | 11 +- drivers/remoteproc/keystone_remoteproc.c | 4 +- drivers/remoteproc/qcom_q6v5_adsp.c | 2 +- drivers/remoteproc/qcom_q6v5_mss.c | 2 +- drivers/remoteproc/qcom_q6v5_pas.c | 2 +- drivers/remoteproc/qcom_q6v5_wcss.c | 2 +- drivers/remoteproc/qcom_wcnss.c | 2 +- drivers/remoteproc/remoteproc_core.c | 69 +++++++------ drivers/remoteproc/remoteproc_elf_helpers.h | 95 ++++++++++++++++++ drivers/remoteproc/remoteproc_elf_loader.c | 150 ++++++++++++++++++---------- drivers/remoteproc/remoteproc_internal.h | 4 +- drivers/remoteproc/st_remoteproc.c | 2 +- drivers/remoteproc/st_slim_rproc.c | 4 +- drivers/remoteproc/wkup_m3_rproc.c | 4 +- include/linux/remoteproc.h | 7 +- 16 files changed, 252 insertions(+), 110 deletions(-) create mode 100644 drivers/remoteproc/remoteproc_elf_helpers.h -- 2.15.0.276.g89ea799