From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D8E6C001B0 for ; Wed, 19 Jul 2023 05:51:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AX4MXB7E2NdegeQXVO+bG2YSRVjYt8V2i+vxj2cxPMk=; b=r+PLFzrIswgHy0 dBM3wriszfPeI+R2V1tvPTWF4aQDj8T6Igy0Qm8PHSZvNfGdQ5Zptd/m3OR2/MJuSkCwn1tpS2o7d qlRh9PH/CZb4P/3RSwKqF+fd9HquXSELAd73R6wLdShzrXucUyELRH6ktvl8mJVL8wcCZlPcCZekv BQ54zUbqHGAerb/TBNoA8vTh/x286smU93jXH4U6RfpJt536M/voOtp8FhCEjSfM9QRW9wH8xqUuf yiw3RyuLKJlcvWcbLVEfxj3r4XT8ituaG97uk/DLuGlezkO1qOHGOYJQA4qhgRYV21xHpix18iST0 HlTMkx+ay5H7Rdz9O8ww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qM05V-005R6z-1E; Wed, 19 Jul 2023 05:51:01 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qM05T-005R6D-13 for linux-arm-kernel@bombadil.infradead.org; Wed, 19 Jul 2023 05:50:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=SWDtHVs3Urak5aG+ygvNpGbYkcumje8U+MVjSEamA3I=; b=VYrou3NAzhUY3LImsS30yoQtv6 jskjXPfgGhcBPsAvjRbrPE/0cA1X9+1htVCMChU+mkU6iLBIz97MmDiGAY/d9iAi65c4ppv4IjoC5 hERB0GqbpMgnn9hdlDYUwv06eT7ORkL5gCr/2LW6fzd8BmOVg5uJyNeogO+qU1PZqyiOuqlEPCpSx bbsYs07QyoSr+HP+YsMlFQKlWM6v811ZjAQLT4HnDelvRkqunOHkoU1g4t7WpN0+fAsIH55wp+8iX IGqW2QU/jMgLFa7ZwYy2uTSRfS0zHgo6rGo6EFXpErAN0EC0yrWueEYwYjKnmnOK0+77eMbo7KLQb WlksRQsw==; Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qLmYr-00BhBx-2e for linux-arm-kernel@lists.infradead.org; Tue, 18 Jul 2023 15:24:28 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-68336d06620so5874446b3a.1 for ; Tue, 18 Jul 2023 08:24:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689693798; x=1692285798; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=SWDtHVs3Urak5aG+ygvNpGbYkcumje8U+MVjSEamA3I=; b=OSgivM0r2+T7IwP3feiWb17Gir3+X4dfmryhv0WyyhJE/WNLA6uo1tuYEOKlXQyHtd 4O9/SbOauZ+QT0d/k7oBpbld7JMsW2KxBLkVKAARv8SzkUM//5zbFMwHVbui5y4P0qQi kfFZMUdgnETrnYLtDqJ3U6V/W2egiA9BKth7tozj1pIWRYCXqQbP/KztX9S+jU9EY/uo UdiaNYu7I77BnmfAMPhy7FsxHCJVDZsIEdTXPsUhMo7u0pv0BxuEDkqfPXE7de9OxEV0 fYty3cmjTv7Xk/QgNSOjfkVZB6mlBNJsoYGoqBDA5DQHAJnO49V2SAo94AByTKb4qwBF MSVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689693798; x=1692285798; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SWDtHVs3Urak5aG+ygvNpGbYkcumje8U+MVjSEamA3I=; b=KYvqFM71nXciq7xRPMYApow8ynnhTfnx7m+2W1qEAReMwAX8Wbk6SZ2ULD5WPSKLDG s8zPJM0cJdPHPZbgZCUe6FFi6S6r61ezR5rEQW2oYdWrNlE6/894xP7h6lMin3p/MRs6 ci7kDTyfEzhI4nO3cKwGuhC4r+Zl2AfTknK8rscUAYXEi42F2m//c3Q6NEUt6/f03rft b0JpiKs+8fTUvxMtCvQWFrxaieFJOotmgThbCUUfPM4VA2I/NDpXzErjMJ0D9Mq9qmMl 41fmQv+1F1Gnt+aVFqf1PiimGyCL3rnclILMcvtP0Nv7IVOb1LC2jRhzsxir3aJGI2cU SncQ== X-Gm-Message-State: ABy/qLbnA4wtGMR6J9LWsLFkDukBzJQQv3PDZ7VNizwj/qV/q20Ru/o0 ksw7uxH7e4g7y9UczS91fQlK7w== X-Google-Smtp-Source: APBJJlE+sWd4ROQI9JcUy6oSHWAFtSVeK0lAHGj5ZqujU3RjIYVyIliD/z6LGdnmOnfT++85IjeDIQ== X-Received: by 2002:a05:6a20:72a3:b0:133:96c9:fb3b with SMTP id o35-20020a056a2072a300b0013396c9fb3bmr16428354pzk.45.1689693798346; Tue, 18 Jul 2023 08:23:18 -0700 (PDT) Received: from p14s ([2604:3d09:148c:c800:181:e3fe:53e1:920]) by smtp.gmail.com with ESMTPSA id c14-20020aa78c0e000000b00654228f9e93sm1678412pfd.120.2023.07.18.08.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jul 2023 08:23:17 -0700 (PDT) Date: Tue, 18 Jul 2023 09:23:15 -0600 From: Mathieu Poirier To: Iuliana Prodan Cc: "Iuliana Prodan (OSS)" , Bjorn Andersson , Shawn Guo , Sascha Hauer , "S.J. Wang" , Fabio Estevam , Daniel Baluta , Mpuaudiosw , linux-imx , linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Pengutronix Kernel Team , LnxRevLi Subject: Re: [PATCH 1/2] remoteproc: imx_dsp_rproc: add mandatory find_loaded_rsc_table op Message-ID: References: <20230712224220.26430-1-iuliana.prodan@oss.nxp.com> <474c0241-a58e-b435-8ac1-82a5a458d79a@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <474c0241-a58e-b435-8ac1-82a5a458d79a@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230718_162426_174307_2208CCCF X-CRM114-Status: GOOD ( 31.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 18, 2023 at 11:25:03AM +0300, Iuliana Prodan wrote: > On 7/17/2023 8:42 PM, Mathieu Poirier wrote: > > On Thu, Jul 13, 2023 at 01:42:20AM +0300, Iuliana Prodan (OSS) wrote: > > > From: Iuliana Prodan > > > > > > Add the .find_loaded_rsc_table operation for i.MX DSP. > > > We need it for inter-process communication between DSP > > > and main core. > > > > > > This callback is used to find the resource table (defined > > > in remote processor linker script) where the address of the > > > vrings along with the other allocated resources (carveouts etc) > > > are stored. > > > If this is not found, the vrings are not allocated and > > > the IPC between cores will not work. > > Is there a constraint on the system memory the M4 can address? If so there > > will be a need to declare address ranges for vrings and buffers in reserved > > memory in the DT. > > > > Thanks, > > Mathieu > > Hi Mathieu, > > No, there is no constraint on memory. > > We want the Cortex A core to communicate with the HiFi4 DSP. > The Cortex A is in charge of starting the DSP and loading the firmware in > HiFi4's memory. > When using rpmsg for IPC, the Cortex A needs to find the resource table > (defined in the DSP linker script) and this is done using > .find_loaded_rsc_table callback. > > For the DT, we are using a (not upstream) device tree where we have the > reserved-memory for dsp_vdev0vring0, dsp_vdev0vring1 and dsp_vdev0buffer. That is the part I'm interested in. Don't we need the reserved-memory entries? Otherwise the M4 may not be able to access the memory chosen by the application processor, most likely leading to a crash. > > Iulia > > > > > Signed-off-by: Iuliana Prodan > > > --- > > > drivers/remoteproc/imx_dsp_rproc.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c > > > index d95fa5586189..b5634507d953 100644 > > > --- a/drivers/remoteproc/imx_dsp_rproc.c > > > +++ b/drivers/remoteproc/imx_dsp_rproc.c > > > @@ -941,6 +941,7 @@ static const struct rproc_ops imx_dsp_rproc_ops = { > > > .kick = imx_dsp_rproc_kick, > > > .load = imx_dsp_rproc_elf_load_segments, > > > .parse_fw = imx_dsp_rproc_parse_fw, > > > + .find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table, > > > .sanity_check = rproc_elf_sanity_check, > > > .get_boot_addr = rproc_elf_get_boot_addr, > > > }; > > > -- > > > 2.17.1 > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel