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 D8624C54E67 for ; Thu, 28 Mar 2024 08:17:35 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xKSOyRTqQSZdTCzrR5Szoskr5IByqXDZfIbbIp72lYc=; b=GMh07aE9Rwo1nB DNZfAV8qv4R58hMklshQLGJUR5jukFZPQs83Op9qSRKZ3StBAlydLfgL+SpC7mReR+VacPgK1hPmR d+vlK5gtcm1v0/Ku8ZJ1timj13i+srrfLEADmd96vdFOjNGtf80Zdi0CrpwVW+TM3CpSeh4C8Tj7r Vj5s8ft8JMwScCEuMxFeNEsS9WRC/hYiIu/fCTc0rGo8qofIlNkaA6h5LG37vZ5MgAe0PDlp0hjKY 6lHFqsnwzXHMe6ZpmZIWwgdqhO/l+7oHp5vUbfaq9Bv7U25F4IM2itKvTj3wSbF9p3CKHwi5UjEP8 uuF3IjDv3XVTX4gb3gAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpkws-0000000D3cc-2wf8; Thu, 28 Mar 2024 08:17:23 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpkwo-0000000D3b1-186y for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 08:17:19 +0000 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-56b8e4f38a2so773735a12.3 for ; Thu, 28 Mar 2024 01:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711613836; x=1712218636; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=HmNTrCP1VHaj+fSm0FhgBSVWxPEIQR4/guaH7m0B49c=; b=ENxcKNgZPz3DiPPev7xaUgHcXerdBNzOIl/FvzfpKjE+cRMxwpuzSpKKQ5T8TgfmDi truTRPhgQeW2iDzKzHZNVH5RCodLB9RCMiZD/t2tKFY+dfVYFJZsNl/VlLnELZdBNUli eFwqnM/pY5iFAz81F14G2a6v41WKSWV67dlwA7ocghMDyIynDrPGPu4Fl8OLPNZGdOET lGkbeSRMj4SBqbESxkRIUESjSTxSk28T0pY2uP9dh6zF9T0QFmZAeiwTeFTKrb3EsISG Lmj34KttYC5aOqe3JbIwFnIN3odZ77TVZSRM+ef1lxZuly9iyTPe3sGvWHnSgmWr56n/ j3kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711613836; x=1712218636; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HmNTrCP1VHaj+fSm0FhgBSVWxPEIQR4/guaH7m0B49c=; b=mvPjXTMRRipS9cRKPZSB1zdx29eCP7QkKHiUksiB5KkNNbGiY+OpiUAxn3ccUDqxWC h0s0/m+ZHH9gTEo7G7Y1UjMy8NVKwhaBEprndCJnqIYC3IO68e1Or5k6Os68/qo2Zg5I 9SIYXMxA0tm7qZbAR1pKoDl4zPVAH6SqFgsn/J5nX/AeTN7MiPBZ2wdOJmP2TBL5G5eU 5h1H0Aun7hxCWuWVsjLNRiOuUfKrPpPVt31qQTH/HYHGjjP/112SY5yrw4xeLIZ2036J Vpx/AmOEJKZQ+C1PHddHba2oMZNYZlLVYv6ffSImMiYSpApzat6O6Ny7B7sHbW0jwrsb Nkag== X-Forwarded-Encrypted: i=1; AJvYcCXaeBQo7JvtaOfYPdogk3Qb6ygM2ItP/YqA/2lWfbK9wMeULDEUysbO09nNcrTLxNnYXmVxRT2p6+TvvcEIM4Udeo/wUnyBkI+3TPvptGiFzWZ8M3o= X-Gm-Message-State: AOJu0Yw97/+21PTN1ngtoA+Xqp+tmGrfgh6WpXmg4ox1E8ErLhFkaCcc 2exkQw7Npa9Gdh5mk5y+EBn07rkJ8N7qVkWJAV4InpfEM8uunIqu X-Google-Smtp-Source: AGHT+IGDZQiP+bPqJ26M2oncThf2wSh1zk+FcIY3MKrfyPkiPReC5vjXQTAeUmiXoDGxxm5y2+DQeg== X-Received: by 2002:a50:ba82:0:b0:56b:8d0e:1a08 with SMTP id x2-20020a50ba82000000b0056b8d0e1a08mr1503758ede.26.1711613836260; Thu, 28 Mar 2024 01:17:16 -0700 (PDT) Received: from ?IPV6:2a04:241e:501:580:a2ad:1d18:206e:34fc? ([2a04:241e:501:580:a2ad:1d18:206e:34fc]) by smtp.gmail.com with ESMTPSA id di19-20020a056402319300b0056a2b87787dsm554087edb.37.2024.03.28.01.17.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Mar 2024 01:17:15 -0700 (PDT) Message-ID: <07183fd8-a5a1-4cae-b317-d703ef7c1de1@gmail.com> Date: Thu, 28 Mar 2024 10:17:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] remoteproc: zynqmp: Add coredump support To: Mathieu Poirier , Tanmay Shah Cc: Bjorn Andersson , Michal Simek , linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: Content-Language: en-US From: Leonard Crestez In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240328_011718_406130_CDC0CB33 X-CRM114-Status: GOOD ( 21.78 ) 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 3/18/24 18:52, Mathieu Poirier wrote: > Hi Leonard, > > I have queued patches for this driver that will break this patch. Please > re-submit when v6.9-rc1 is out and rproc-next has been updated, which should be > around the middle of next week. Hello, It's been a while - v6.9-rc1 is out and rproc-next has been rebased on top of it. But the coredump patch still applies? I expected some unrelated xlnx_r5_remoteproc patches to cause conflicts but there's nothing there. It seems to me that the patch can be applied as-is and no resend is required. Am I missing something? -- Regards, Leonard > On Sat, Mar 16, 2024 at 08:16:42PM +0200, Leonard Crestez wrote: >> Supporting remoteproc coredump requires the platform-specific driver to >> register coredump segments to be dumped. Do this by calling >> rproc_coredump_add_segment for every carveout. >> >> Also call rproc_coredump_set_elf_info when then rproc is created. If the >> ELFCLASS parameter is not provided then coredump fails with an error. >> Other drivers seem to pass EM_NONE for the machine argument but for me >> this shows a warning in gdb. Pass EM_ARM because this is an ARM R5. >> >> Signed-off-by: Leonard Crestez >> --- >> >> Tests were done by triggering an deliberate crash using remoteproc >> debugfs: echo 2 > /sys/kernel/debug/remoteproc/remoteproc0/crash >> >> This was tested using RPU apps which use RAM for everything so TCM dump >> was not verified. The freertos-gdb script package showed credible data: >> >> https://github.com/espressif/freertos-gdb >> >> The R5 cache is not flushed so RAM might be out of date which is >> actually very bad because information most relevant to determining the >> cause of a crash is lost. Possible workaround would be to flush caches >> in some sort of R5 crash handler? I don't think Linux can do anything >> about this limitation. >> >> The generated coredump doesn't contain registers, this seems to be a >> limitation shared with other rproc coredumps. It's not clear how the apu >> could access rpu registers on zynqmp, my only idea would be to use the >> coresight dap but that sounds difficult. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel