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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 7E6B5C433E0 for ; Mon, 27 Jul 2020 09:20:31 +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 3DE4120658 for ; Mon, 27 Jul 2020 09:20:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YdCg2Eij"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="g9Uy/93V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DE4120658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.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:MIME-Version:In-Reply-To:References:Message-ID:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Tu4R9gakhK/xHn7LXPmef4gq3V5vP8J8IjWsJX+y0r0=; b=YdCg2Eij6FT5vmeMKdMRzAye2 P5L/oMBSf/eLxLyRB6Js4qU9kM4usdkL+z0gTT33uXkIv5tBl9R2OnrJUEg9Z9pGmtF+M4S8NAUTs ZEP7DT3EC8BCl8Etpy30ryJxqC6VU7Obsr+tcukwPKHvImzyHJBu6OvGeNOq5q4E/PDgf+CNH7G3s 4omE/yoO6PBsqjYtAZENNDfc4t6bfaGcKUev/ZE5AEu9TxYmTpBdPp9oBvHeXugiL64ZrL4a6wv2Z zCDVDqiFBDcdJkMFLP7nxHvvCSimLG3HWHHr8FFww0JUZayaNrkTvgwMNO2oA14xlCfuCBBwRUHnA nEvwesmtw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzzHL-0000Qt-3m; Mon, 27 Jul 2020 09:18:39 +0000 Received: from mail-db8eur05on2040.outbound.protection.outlook.com ([40.107.20.40] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzzHG-0000PM-He for linux-arm-kernel@lists.infradead.org; Mon, 27 Jul 2020 09:18:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fhDPYu+Da9uirHrIllS8rE8eeoWdCu5dJEDeWUoyU7rdBPT0xeQAo15aF8SQFOzZxfGzQYWHH4cALXUBbZK1yB40ELz/CbrTKZETiE1ZMtpwxygMHa8arcAMWNkpxa+mznMp1g28x69o1goxat+gom9Lomj05V/zTXukwvZV3sfiDQwWcLPXHrkmJhldjifSWx+k+ay3VFWaQsepWidwlcMlbxMnXag3uQO5G1+mllPZNml1Q5NtdcWg7mwXnosfe9/mMDF2B9s4CpLigPfMj2awZbduXcIjJDy9Ouq1L1U7CAhqCX0VGHVR8YjTBsnDlVZ5WdGyIpXmznSYyUWlmg== 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-SenderADCheck; bh=1Lzeqa93p+X/h5Y4RUQeKFeGL0w6THTbKr+YPyINJ50=; b=NiLyB229ilt7dXesVeuph7nTRBchw98OV40ivL6rIt0Ny5HbG4uHoAtatV7upNlrMaGhdHYqCOfRJYd3PUTkQvxRdITKEv9xvcojP+nud+Qp1qal0kK6CTVgnWGfjMsspzuyvNf/+zbFu0qLH0aAAUPfj5RhTZHgu+fHsY191cxEummcPQMeQIpEMslDNcTkLtUkSYksiRIagPw0miN7lxo1Qouiqp4YWlWDGau+BlZJImuk5Ha0jdLwnOyVRPUts539t2GbyRZBLia6i9aPub84jWHVLYfyjujeolvGjXyWHnZOVD4qLAwn6JLZTGlujyw2cgfSulqKF+8jCPhNvg== 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=1Lzeqa93p+X/h5Y4RUQeKFeGL0w6THTbKr+YPyINJ50=; b=g9Uy/93VvAxah1ddNbgeBiFI+pd6l3P9EeL8rZ4A3ISWYMH/9l21N7N5yKcdGvbfsou1vlvYjrmUNy7adFFcBOjpmd23gyrRdxZwruDiBaHteL9pxdcmwmV4m7FOmuWqGQcjuJitG1bM+9cYa3uhT+NSggH4mZEYhhk2F3iVWgY= Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB6684.eurprd04.prod.outlook.com (2603:10a6:10:105::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.21; Mon, 27 Jul 2020 09:18:31 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::2d36:b569:17c:7701%4]) with mapi id 15.20.3216.033; Mon, 27 Jul 2020 09:18:31 +0000 From: Peng Fan To: Oleksij Rempel Subject: RE: [PATCH 00/10] remoteproc: imx_rproc: support iMX8M and early boot Thread-Topic: [PATCH 00/10] remoteproc: imx_rproc: support iMX8M and early boot Thread-Index: AQHWYY4eiJ2SF2lCSU+quq5ttXjJ16ka/gOAgAAAWJCAABTmgIAAFqig Date: Mon, 27 Jul 2020 09:18:31 +0000 Message-ID: References: <20200724080813.24884-1-peng.fan@nxp.com> <20200727063839.kfgrtperzkygvjr2@pengutronix.de> <20200727075441.lgscydoj3txupeay@pengutronix.de> In-Reply-To: <20200727075441.lgscydoj3txupeay@pengutronix.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; x-originating-ip: [119.31.174.71] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: a223ba01-2eae-4972-1641-08d8320e07bb x-ms-traffictypediagnostic: DB8PR04MB6684: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: E1NUNF6wBdbNmhh+oHaIjHleDo+fxj1HRYbjzKlf6teoze0FwfhZJpuGILd3Y7Zz42ojdoJtk1Z9kzrw9Fy/ToGlavOwO/Qa7m38oKLTob10jJ9+G8tCHeLGggoAoADd/M6iJIlWqbJqJJ9/g7cnwcBEgV8NjjoMCTbLmajN083E1D0pYrfxLBwOASf5x3iCo4ohX5PfVSGizuw4Txhkv8lePvINwOqiTkkx7vRrgACxppjXox5qhAqdM/LEh613e3jacukh2GisVd9dtnk/6hkqufNH4ywMNIyG5j62mdNfu4LM0ejDjEshzQigC/dbrFErvd7q27TcyWRBaF8yXAwLgf5I5U4/XVhcEunqs4Kx8LYFuL4KiLfVEuw5z5jUBYAZs6xmBZZxvRp7DX85ldWwCSKZAK4g4fAlbSmyXQIlkow83OYo95opamiwzexSa978x+TOezmMqqp4MRca8w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(39860400002)(136003)(376002)(366004)(346002)(83080400001)(66946007)(83380400001)(86362001)(76116006)(2906002)(316002)(6916009)(4326008)(7696005)(71200400001)(6506007)(8936002)(33656002)(66446008)(64756008)(66556008)(66476007)(8676002)(7416002)(44832011)(5660300002)(26005)(54906003)(55016002)(966005)(478600001)(9686003)(52536014)(186003)(32563001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 2J6iRr/RHN2D2SqkqAg9ENaajAsuDJWEv+XswZJ8xgr9hw/hw1jvJQuPdVLFQlQFzkcdpSvT46bpwQllDs2yw6lCa51xY+UwR6Iaw6tdPHw29jL3Qxl9ySYxcSIMLmaIRZj9VixcDqobaN9kecbdhviMZ0nmYTgmaGUmuSSHcR3EJqY7mpcN5U3GlZgOC9B1+C29uoUMFB6vxt0ouMzKoUPG5jwu5sL1ICEKkemqFsJNe36kU/tQJmY8Zy0enkZ5CZmYkBLhquhdXHUwcxYnW1ExGdqbi99t1s4s3xr6/5fvdsbE/axgw5GxoB/j2C+ewuSWfHjPGEVMMYY58v0BhmM32Ikv6URc/fS/m33poZ69rT5iqZk5HDkpzRCX2D3Cjmb6D5C1J5sDXm/hT04UBzey1XoxWGd1X6jsdeyeCOhdMzXLpykoNzsmmYu+59a5feG7V2jE+gjXmCcKqdiF3qD/Hj295Wk8PTlEbkxsJj2vdDgtZqmLrN2lRb9iTTAc MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a223ba01-2eae-4972-1641-08d8320e07bb X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jul 2020 09:18:31.2228 (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: GiMIii+VO7FKSvYsspCbtF0jy855dscll6VuNdjs28I3zD7prAb05Wq07vpsdvy6zwpYGoyY0uqjo+EmIglPCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6684 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200727_051834_727953_1BE3988A X-CRM114-Status: GOOD ( 39.44 ) 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: "devicetree@vger.kernel.org" , "mathieu.poirier@linaro.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "bjorn.andersson@linaro.org" , "robh+dt@kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux-arm-kernel@lists.infradead.org" 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 > Subject: Re: [PATCH 00/10] remoteproc: imx_rproc: support iMX8M and early > boot > > On Mon, Jul 27, 2020 at 06:44:32AM +0000, Peng Fan wrote: > > Hi Oleksij, > > > > > Subject: Re: [PATCH 00/10] remoteproc: imx_rproc: support iMX8M and > > > early boot > > > > > > Hi, > > > > > > On Fri, Jul 24, 2020 at 04:08:03PM +0800, Peng Fan wrote: > > > > This patchset is to support i.MX8MQ/M coproc booted before linux. > > > > Since i.MX8MQ/M was not supported, several patches are needed to > > > > first support the platform, then support early boot case. > > > > > > > > I intended to included i.MX8QM/QXP, but that would introduce a > > > > large patchset, so not included. But the clk/syscon optional patch > > > > for i.MX8QM/QXP was still kept here to avoid rebase error. > > > > > > Thank you for your work. > > > > > > Can you please provide more information about big picture of this work. > > > > > > If I see it correctly, we have here support for i.MX8MM, which seems > > > to be able to fully control Cortex M4 (enable CPU core, etc...). > > > > Yes. > > In this case, I would recommend to mainline the i.MX8MM part > first/separately. Only the last patch is to support earlyboot, all others is imx8mm part. > > > > > > > And other case, where remoteproc is running on application processor > > > and can't or should not touch M4 (i.MX7ULP, i.MX8QM/QXP..). Since M4 > > > provides some functionality, you are trying to reuse remoteproc > > > framework to get resource table present in ELF header and to > > > dynamically load things. For some reasons this header provides more > > > information then needed, so you are changing the ELF parser in the kernel > to workaround it. > > > > Not exactly. > > > > For i.MX8MM, we support two cases. M4 kicked by U-Boot, M4 kicked by > Linux remoteproc. > > For i.MX8QM/QXP, the typical usecase is M4 kicked by SCFW, but we will > > also add M4 kicked by Linux remoteproc. > > For i.MX7ULP, I would only support M4 dual boot case, M4 control > everything. > > From current state of discussion, i'm not sure what role plays remoteproc in > the scenario where M4 is started before linux. Especially if we are not using > resource table. We are using resource table from an address, not in elf file. This is the new feature in Linux-next to support coproc booted early. > > > The reason the change the elf parser is that when M4 elf is loaded by > > Linux remoteproc, It use memset to clear area. > > The use of memset, depends on ELF format. Fix/change the linker script on > your firmware and memset will be never called. > > > However we use ioremap, memset on ARM64 will report crash to device > > nGnRE memory. And we could not use ioremap_wc to TCM area, since it > > could have data correctly written into TCM. > > I have strong feeling, that we are talking about badly or not properly > formatted ELF binary. I would prefer to double check it, before we will apply > fixes on wrong place. > > > Maintainer not wanna to drop memset in common code, and TI guys > > suggest add i.MX specific elf stuff. So I add elf handler in i.MX code. > > I think, removing memset may damage current users of imx_rproc driver. > Since, like I said: the use of memset depends on ELF format. In my elf file, the last PT_LOAD contains data/bss/heap/stack. I'll check with our MCU guys, we only need the specific data loaded. Elf file type is EXEC (Executable file) Entry point 0x1ffe0355 There are 3 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x010000 0x1ffe0000 0x1ffe0000 0x00240 0x00240 R 0x10000 LOAD 0x010240 0x1ffe0240 0x1ffe0240 0x03e90 0x03e90 RWE 0x10000 LOAD 0x020000 0x20000000 0x1ffe40d0 0x00068 0x0ad00 RW 0x10000 Section to Segment mapping: Segment Sections... 00 .interrupts 01 .resource_table .text .ARM .init_array .fini_array 02 .data .bss .heap .stack Thanks, Peng. > > > Thanks, > > Peng. > > > > > > > > Correct? > > > > > > > Peng Fan (10): > > > > dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M > > > > remoteproc: imx_rproc: correct err message > > > > remoteproc: imx: use devm_ioremap > > > > remoteproc: imx_rproc: make syscon optional > > > > remoteproc: imx_rproc: make clk optional > > > > remoteproc: imx_rproc: add load hook > > > > remoteproc: imx_rproc: add i.MX specific parse fw hook > > > > remoteproc: imx_rproc: support i.MX8MQ/M > > > > remoteproc: imx_proc: enable virtio/mailbox > > > > remoteproc: imx_rproc: support coproc booting before Linux > > > > > > > > .../devicetree/bindings/remoteproc/imx-rproc.txt | 3 + > > > > drivers/remoteproc/imx_rproc.c | 409 > > > ++++++++++++++++++++- > > > > 2 files changed, 401 insertions(+), 11 deletions(-) > > > > > > > > -- > > > > 2.16.4 > > > > > > > > > > > > _______________________________________________ > > > > linux-arm-kernel mailing list > > > > linux-arm-kernel@lists.infradead.org > > > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > > > > > > > > > -- > > > Pengutronix e.K. | > > > | > > > Steuerwalder Str. 21 | > > > http://www.pengutronix.de/ | > > > 31137 Hildesheim, Germany | Phone: > > > +49-5121-206917-0 | > > > Amtsgericht Hildesheim, HRA 2686 | Fax: > > > +49-5121-206917-5555 | > > -- > Pengutronix e.K. | > | > Steuerwalder Str. 21 | > http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: > +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: > +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel