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 B5516CD1284 for ; Sat, 6 Apr 2024 18:28:39 +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=4wKiMIm8y3HfMFF+zlYTXjWfyHEYSm4TDqslsqsBCME=; b=1ze9ZRX5ScxBVP IzuHTV622oGKt917SIncy0X47ljHCCgYyDxd3uMGSzrRBiOd2yNnI81tM+fX2hnezMa1vyHZWjbrx jcd6x8ogUeciKdQarj2AwYsCnl4JhXznUMQlGylJkGo509PibunIvX5lvw0V0VVhjcsFpOG641+Y5 2dDtoM4glYVTsH6nYUXMn+mO1LN/LHOdXmWxH4cEFi7D2GqwtttLNFx02qH3P85ouBjCVYwTjCKZv VNwzUcVroFROw08ehpbiVNEZROr93Wv4Y/godcD59XvRoXxXlcQpI/WipYfn89oijJZGyC+zeizT3 g4TvbIUckoR5Ab/dTR3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtAmB-0000000Ap9w-06zd; Sat, 06 Apr 2024 18:28:27 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtAm7-0000000Ap99-2LUV for linux-arm-kernel@lists.infradead.org; Sat, 06 Apr 2024 18:28:25 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a450bedffdfso438738866b.3 for ; Sat, 06 Apr 2024 11:28:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712428098; x=1713032898; 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=Ol5/leVU/g6TtCF3jERsW6Ittq1/U67NNL8KNVOCFpw=; b=aNsdfpD32W9lSs0UbiUi/9yIBd5Hsgr6AACzxAuZGJuMvDFitPW1Qtb9ROPhFgdo6u pFPgeJcZPRCRxrsgdkGtuXqx4xiZFbsvLeeb4hPwRQaIDosp76a0nYYGizmQHK+NAxUF PG9vWweot1PTsYPBWmgGZYy9WFq1oVhm5+eQMtPwjWZoJzCtIf10JQQBhhCJKX+FSvUz Imhqc1tcP7snkB+p77CsT/XeYaaV1GPe6+EPHruZDeuPcAxfNH+AzYyNi9uUhNCiazha iS7SOv5fsie95/mCCZDAkMNFcKx7SmGOq2w6BZ+etxWdkO+s/0Uh/P6IJfr2YK1+c1Gc XzgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712428098; x=1713032898; 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=Ol5/leVU/g6TtCF3jERsW6Ittq1/U67NNL8KNVOCFpw=; b=SNLM3KrzOrmLbUs7xAlrtd9Uvb3uqXGDUTdWmWnWc0KhXDx5r0AcqVuoaEI4sbZKQG 2FCnTzCi65XIADSuXMFORL5v0hLjrpAbCYD5luo12gNgDjTuXX9AZiw2yKBpiRIcebBV OIkSHwHJdKt68lVBgOlH62MgV7pRE6gKfI4t1ImI2E6OzHYM8xVCBUoaL7x8/D0fcMdT o+68mqPFyXxxBJO+c6CGX6V+mJXW2dKvOMI8r30OeBqgzgxtDRsVf0oqc56Y0rjdQgeR krvSkACXXBRlKUnjpsf3BrwAarNlW/kq1jrLkeVHpQbF1VgWL8jVGdS/HyJGyhjzdywI t+RA== X-Forwarded-Encrypted: i=1; AJvYcCW7dVLOcm86obWVLYxI2J+S6kAiKoGewPnpVH2LRf0UWtcf0sFMfzh1qd4jrhefLbCNKUut81GPB501Lgrc7g25gu0e35NVxa/SgQd1OiZWHLcireo= X-Gm-Message-State: AOJu0Yx/V4yDCGNils4AAMdBorS0g4uD44dAfah+aPVSxLCbkWW5ZaSj gDB4Bc1/Mfj4tugy5idm1DlTNNssjRE1ajDSFFANa4AMkCGzSUFU X-Google-Smtp-Source: AGHT+IHbTGaXO6EIGCg1/eLWb0inWBoVCd+c9l+hrz4C3GZ0cvdwXG8xVyhaTB6TsMiVfDhIVayO5g== X-Received: by 2002:a17:906:e255:b0:a51:c976:b3a9 with SMTP id gq21-20020a170906e25500b00a51c976b3a9mr86107ejb.24.1712428097922; Sat, 06 Apr 2024 11:28:17 -0700 (PDT) Received: from ?IPV6:2a04:241e:501:580:a40e:b8a:6234:b1c0? ([2a04:241e:501:580:a40e:b8a:6234:b1c0]) by smtp.gmail.com with ESMTPSA id kh20-20020a170906f81400b00a46af0fbf5dsm2207686ejb.103.2024.04.06.11.28.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 Apr 2024 11:28:17 -0700 (PDT) Message-ID: Date: Sat, 6 Apr 2024 21:28:15 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] remoteproc: zynqmp: Add coredump support To: Tanmay Shah , Mathieu Poirier Cc: Bjorn Andersson , Michal Simek , linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <6adf7a7c-c9ad-40ae-9e11-cc722c8049dd@amd.com> Content-Language: en-US From: Leonard Crestez In-Reply-To: <6adf7a7c-c9ad-40ae-9e11-cc722c8049dd@amd.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240406_112823_641390_15DE88B2 X-CRM114-Status: GOOD ( 21.27 ) 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 4/4/24 23:14, Tanmay Shah wrote: > Hello, > > Thanks for your patch. Patch looks good to me. > Please find some comments below. > > On 3/16/24 1:16 PM, 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 >> >> 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. >> > > Correct Linux can't. One workaround is that R5 firmware can mark > required memory regions as non-cachable in MPU setting. This way information > loss can be avoided. The solution I ended up with is to add cache flushing in some sort of R5-side crash handler. >> 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 doesn't really have access to R5 control registers due to security. > Instead EEMI calls to platform management controller are used to control R5. > So R5 control register dump shouldn't needed. > > Mathieu, > I am okay to merge this patch. Thanks for the review. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel