From patchwork Fri Nov 13 07:02:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11902639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A03E6C55ABD for ; Fri, 13 Nov 2020 07:03:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3F14B221E9 for ; Fri, 13 Nov 2020 07:03:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="C9NlU/5f"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="XVooYVhL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F14B221E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:Mime-Version:Message-Id:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=VXKAucl4NU9vzIvUYw2JqKSLlqbzfH3lYIIaXq4GjPI=; b=C9NlU/5fa8ew4kcFGx+HcGpyhL 4+jFeT7jatfeedv29P5W+4u15Yvy2b6oRBFGo8ANJQonuq8qCtuHCWUjrfeLW68ErWMqbryR/YWUK VJHOJZ385ox7a6+3we0br4xb9VBWF+/bF+z49Ur9reeCnA+JkGlPuKZJscSrGiywyLW+9StTYqz6w q4ovMfbEbZIq9fumfyBmRUuOok2zbo5+C1/hpZL5UjED5b/u4St1uaRQc+d3K7jVNf+4Vl+6kSWfc oL4YVQu67f0573vu54cONNqgmmPr48cbQuMUzgKR9aTGxSiZ1HLujh5O0qAbDqSL6wh2Y0cgefrFy fgyBkuAw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdT6K-00021G-Hc; Fri, 13 Nov 2020 07:02:28 +0000 Received: from mail-qv1-xf49.google.com ([2607:f8b0:4864:20::f49]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdT6G-0001zV-AG for linux-arm-kernel@lists.infradead.org; Fri, 13 Nov 2020 07:02:25 +0000 Received: by mail-qv1-xf49.google.com with SMTP id s8so1194613qvr.20 for ; Thu, 12 Nov 2020 23:02:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=XMlqZ1InvxrZfrALPvBsxmrkxcxs/WzrYWfmoOXV5oQ=; b=XVooYVhLDc0Sxh+voEL4RI0ViDpiw3LQnqfijn6fkLxThdB9A6vVzVQcRsZqpDUyFM dnHB62ASfXZ8pUMj3/GbzQ+YLLKrGdcC3YFBzYxDX3mSqRew6CdnS/uT44zz1B9F5Vgb w4+pMDHs8L6/mnHsOjeopUVHtLkeS/CfTrzmKfFLfqYYbqNwb/Ad7TY1idDwNmQAPY+8 WHUte8/sQIMOaRmim4QGRMqKqZvt7cQf9WHzsolz8BqalcAE7hCGl13bCR4J/m3IMofM FUk+HPr0KVKDZiyLURaZckuEdr18OLJK+GlWq/05Wu/ScICbOsfl6wC4cz0AWYVrvAgA ia4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=XMlqZ1InvxrZfrALPvBsxmrkxcxs/WzrYWfmoOXV5oQ=; b=jVUulOLy+m1uCufXMNnrg5lXEWwAZ0yrhB4qhSRp7l0W2OLjsEIkW0kd9rcFl7MB6g 9ErVUrKXtmSrF2p9TEBnyI8hNfvpgVOP94bOjlwwYLbscOQiDZUEJA+PA6d+0Xom5845 nkgbwYm7OpASojvMCxOfcISFu90bEhV2GVnbwIaoHUEe3Kl2uPiC0ssWeOWfS4yhAswp TWTmdYCDfSlb5lTOPW7bocRgj/7+VwAl6LMsSkKPZAQDyENAoh1xs/OtYwlHiZBJ7zmE G/wskEJVIdqRFKJ3Yg3EHdJjQAVF7NtZWmkrzhgKE5oHTs3gnWAZKtztHvpwn5bmWeAE BoTg== X-Gm-Message-State: AOAM530Fkbz/WB1Zir9DiApK4wDKzaPzFZGrmBM4mi7cK0I4oSWlVWFy kZSPvHg4cvPhqcbGZ/J4QkPF0gJUzdDx X-Google-Smtp-Source: ABdhPJyr0GWZSCn20T2kweKfZDN3L/Gq3xDk5MyWTw/K0xIoS6FPcymwiRLJuEACC5/6JU5eFXQjNdpACT2h X-Received: from tzungbi-z840.tpe.corp.google.com ([2401:fa00:1:b:725a:fff:fe41:c6a5]) (user=tzungbi job=sendgmr) by 2002:a0c:90e4:: with SMTP id p91mr939345qvp.61.1605250937150; Thu, 12 Nov 2020 23:02:17 -0800 (PST) Date: Fri, 13 Nov 2020 15:02:04 +0800 Message-Id: <20201113070207.836613-1-tzungbi@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [PATCH 0/3] remoteproc/mediatek: read IPI buffer offset from FW binary From: Tzung-Bi Shih To: ohad@wizery.com, bjorn.andersson@linaro.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201113_020224_478895_F55A8532 X-CRM114-Status: UNSURE ( 8.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-remoteproc@vger.kernel.org, tzungbi@google.com, linux-mediatek@lists.infradead.org, pihsun@chromium.org, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series reads the address of IPI (inter-processor-interrupt) shared buffer from the FW binary itself. The 1st patch fixes a boundary check bug. The 2nd patch skips a program header to parse if filesz is 0. The 3rd patch parses the FW binary to find the shared buffer address. The series bases on https://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc.git/log/?h=for-next Tzung-Bi Shih (3): remoteproc/mediatek: fix boundary check remoteproc/mediatek: skip if filesz is 0 remoteproc/mediatek: read IPI buffer offset from FW drivers/remoteproc/mtk_scp.c | 89 +++++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 32 deletions(-)