Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7059110rwp; Tue, 18 Jul 2023 09:24:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlEpZDzFjODKr3j9jn0fJJQzf9LPirzWuVMnbzf7KKVmcDKI2ZXg2/eIHRd5A5IAp/J80R4i X-Received: by 2002:a05:6402:332:b0:51d:9ec4:9616 with SMTP id q18-20020a056402033200b0051d9ec49616mr236113edw.28.1689697484822; Tue, 18 Jul 2023 09:24:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689697484; cv=pass; d=google.com; s=arc-20160816; b=e+FBtCoA52m6M7BJP9SYINjT2WLlqKz1oHzOxBWg+wlzTk0lSalBcGZyi1NFQbWGwM Dpj/PfMTajGDmftJqpjESAe3Aibxj9yXjadvQZf2LHHyTBazWLpTZvgvTDqfcHKOq/Rk oSpaNxQcCQgnzZh7R/wxgFpsTApEfbMEI80aQeedNjldgVdChdpvHQn486EU+ZMzZVBk 3zWxiTB4L3BxOSZaWEw/3n29NOJg4ecnDoRteomHKyTPUp3aH3SaOMJyIbjTJP9WtNYY TX6NgefrCebnhzvqBzaE31E38AqgTZtioGxGRAv3sjKL5Tl4nqbm1sRXrAYCD0useSl5 CbPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=jG7CTn+1t4UFxt+pm9emW0cq48h8DO/l5TMegM506Vw=; fh=TtArh1elyXX5NFTz81zL6OhijLnxTEXmbuOZ5kYv+w4=; b=ZCOHPYADP6B4fcqwg5yix90kzIQo2hwpatN0nRfTcAB3L4suOuaZV7Hb8pY/h7G0OW rbvI3tzXdmq8Lpet0aAs1SNuna+FVrNmcUES2VSZMB1yX+U/lLn/BvPC4d4y0+dZHrfT ggKiwPYNrFSqdXvDwvkJjGpeQI0cF3E29hUBIaWNUQjQrOaWlIEkdMvNat9L+YEHKuYN lUcntD3P0h71waK5LTmlWF05e/KzhKptezxeMP7z6QLNEZL4NVXF23G75SE7O4LTP9mW uQpyrH2rHu1JmwEWguebajN+yFvTJVtoktUGvQxLqIghQOGxD/ZH3FMJftbGRJZeFhPG cUPw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=le+Z0Ruh; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r21-20020a056402035500b0051dd2c07091si1514612edw.161.2023.07.18.09.24.21; Tue, 18 Jul 2023 09:24:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=le+Z0Ruh; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231365AbjGRPlC (ORCPT + 99 others); Tue, 18 Jul 2023 11:41:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230296AbjGRPlB (ORCPT ); Tue, 18 Jul 2023 11:41:01 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2041.outbound.protection.outlook.com [40.107.7.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 769CEDD; Tue, 18 Jul 2023 08:40:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GWY3/RpObjawJOezDAKkEGhC8rAk/vut4kEKDoFXTQfN/8ZKoyabbJzES5TICELAOVbOTajOVCduym8mql/TLXl6YpFqhJvvtqgjuK3OpO1B21ZvPPkZZIO3d27YO9tNTSIsRXePdoUDHHrasOqG2wd0/TJhWyWvj+ZGWlr+uh0IquDQnwEhrEK6klBZCD4ShifCj+yvqDN6vaqP9Prty2VPQChu7Yf2MIOc+dRz9A5JW09oPhY3zjBmmCPoHmGoNnDBX73FxJn1CeMdKjy62BMvUAaYf10/bIFZfcyzd5IBGWiWx/w1dmkFqNexpYyJmC2hHOELEJDu2o5yrGqm4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jG7CTn+1t4UFxt+pm9emW0cq48h8DO/l5TMegM506Vw=; b=ZFZMCGYU02wWdTzF8P7wbv0Qh8l3J51HoJKTvV8dD20jdC5J/cXVyoe6pve0v9rHEAm9po386anLVk2T98kz9RlF2pcH0UIZBPwZjdc0pMkIIBb5Tk1InrBfVstdKIceDt/Ykszx66FiNmfMXM8dztKGjY90kHPq7bvXoTit88TQoj8t2dM4aWocJmbNUZC/QKSuc73fBWxdRKVIT3ZhPJJ5u9WnOmZoH2X1uNb1JbSc8uRkPtZ5fvngzZD2JPGWP7zh1KW8suDG1CPdcZ0c1JfUxX+FCYtf/IMyovsUUjeTfxVnMbAcU6FyDgFcJTskMkgNO5GYGNvIjusRkr+WqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jG7CTn+1t4UFxt+pm9emW0cq48h8DO/l5TMegM506Vw=; b=le+Z0Ruh4wVQ2ZOf0q2zDxMpErMRYae3yMymsbvC+riByjW2FpGeWQNLpZLwT7vsXJYaglCKPKAzKbLfZ2NDL4q9UARRf/2qUwit3Rnv5XTsKxxpq1prn7NqAj+6F3ebQ0sx+s5N0f0MLyZKmVM9ygVT59GqIHmoLQ2qzwEAFyo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8774.eurprd04.prod.outlook.com (2603:10a6:10:2e1::21) by AM0PR04MB7155.eurprd04.prod.outlook.com (2603:10a6:208:194::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Tue, 18 Jul 2023 15:40:56 +0000 Received: from DU2PR04MB8774.eurprd04.prod.outlook.com ([fe80::f1e4:90a0:aabe:ac23]) by DU2PR04MB8774.eurprd04.prod.outlook.com ([fe80::f1e4:90a0:aabe:ac23%7]) with mapi id 15.20.6588.031; Tue, 18 Jul 2023 15:40:55 +0000 Message-ID: <03d7c703-81cb-20f9-aaf8-2ab8ca3e7138@nxp.com> Date: Tue, 18 Jul 2023 18:40:53 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 1/2] remoteproc: imx_dsp_rproc: add mandatory find_loaded_rsc_table op To: Mathieu Poirier 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 References: <20230712224220.26430-1-iuliana.prodan@oss.nxp.com> <474c0241-a58e-b435-8ac1-82a5a458d79a@nxp.com> Content-Language: en-US From: Iuliana Prodan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AS4P190CA0030.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:5d0::20) To DU2PR04MB8774.eurprd04.prod.outlook.com (2603:10a6:10:2e1::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8774:EE_|AM0PR04MB7155:EE_ X-MS-Office365-Filtering-Correlation-Id: 0376dcea-3068-4a8f-7979-08db87a56032 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +G7h4PjTMlXKC6KApQkd/JOEiqPX6uApsGY9QRV+acf4jBdZcFgY7N7USxK1HK9qEWaHzMrrqHt3GKdoSM84ytkB4SIp3LFKVX7P0t1k258z9osMNpD3SPJzfH6L+rXOhhoLRQrfQfVdF0BGRtQneA5yDTpHbeFMo7tsZI2/DLWgz86EmjkN2m3U83/VPFRBfWcAyAo/XlXgc47To5F86mYRBdNQBV2bINbH6vDTq53my6m9fqm7c1iwhlYnqMZpnfAY5+5SFhJI0TiyltuTQGaa0fCy0Uk6Y3Krfn+rxy6awJXhcS4RDZ7lEmTF0WJNrLsF8DDUnuAIj9EsCZccRNIC94M4KA/SHBr5/pw4TlktGnzWlb6lndXWf/4k/F1ohey2VbIYCcsOtO5zQkwJ1xt0xQhFIUVW4f6MNQjwXlMXEz9rTom1X2sUxFr0A4UoAZHna7wWLW/wrXKbL+Bcv4705EeBB+Qr8MXQiWgyb4zjgsb8uW0dwyVLhTyVz8NlR4fNpskTzkcDXhWwBEevieWKk4KUvNifggmBCaNqGrbm+ps5IN5nUTyMUNwNLPH4McB03sIc9onjC1bKnFgg5tsqOyKmeiWLs84MCKVCivFEEjB/y/D4570jQod2ejmNaV9Obv+gCuzbEvczSiZ8jg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8774.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(376002)(366004)(346002)(39860400002)(451199021)(31696002)(8676002)(316002)(8936002)(44832011)(66556008)(31686004)(66946007)(5660300002)(6486002)(4326008)(2906002)(478600001)(26005)(6512007)(53546011)(54906003)(6506007)(41300700001)(186003)(66476007)(83380400001)(2616005)(6916009)(38100700002)(36756003)(86362001)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Qm9PRVhvZWJsVFg5S2ZPNWhTR1MxUUJUWXZNL1FOdnh4R0JvNjlHQjVLOFFG?= =?utf-8?B?VEZZMHhRT2VMMjE1OHAyYkhvL2tqV2gvMjhzR1hyTm1rck8wTEM5SDZsRldF?= =?utf-8?B?ZTZWTmd1N1B2QVhOOTJ3ekpnNlN4Tkpid0ZuVHRyUVlzZXgvL0VUTjBTZ0x6?= =?utf-8?B?Z0N6NDBVNmxIVzdadklmcmhYcFRNWGpSek9QMEYrSjQ5ZnFIRWVNNitZai8x?= =?utf-8?B?ZFczWldOMkFoblExbFVkSmVWdW5SSk1tZWgyVDRJYWlJa01JSDAvdGN3V3Er?= =?utf-8?B?S01jSno0cHh3SDRVekhPMURrbjNHNVBJdmZ2WDB4U0trUjZwUk56eFZDOFBa?= =?utf-8?B?L0Z0eUNLUFNWeTk3WGUwM1ZDems1TW52dzZEUEdyQkJZUVNHQmxRQy9HaFpG?= =?utf-8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-Exchange-CrossTenant-Network-Message-Id: 0376dcea-3068-4a8f-7979-08db87a56032 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8774.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2023 15:40:55.9128 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2sbOgcP6To/F7hmKP0OCqQ3mLfHj0XNbA9iw2fLGFu4BaqFhWM8SFegqY+odvKCa+ihy+tTt8MGh7XOnY7NwVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7155 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/18/2023 6:23 PM, Mathieu Poirier wrote: > 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. This kernel module (imx_dsp_rproc) is used only for DSP. For M4 core we use imx_rproc. Iulia >> 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 >>>>