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 B33F4C6FD1E for ; Tue, 7 Mar 2023 17:29:09 +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=8qcyFN+qNgjPG3ZRQ7gdSXw89AmxDrF3/neqTVW+DiE=; b=LrNBRfP4l3w0Mk kHyTikgTJcISDxRWsKAQGFH5rZXaaOEIQN3704OrZ9dwM7pb/8cVrYB8tn8KHdCL0LE5vMpQ7ok2Q sXpGLjWI3yylRYqrd9soGgjzMJopLasOsj/PG5PN7hPE4uXvYFU/X7X+HjvvjOwtjP3SGyE9KKI4f pPg6EeVxxEbINpiwzJIrmg4ZrGBFqyadYSS3w47ErO1rK5hfr4wUH0xQ7rwGMA5P6llUmNT+vROaX bomFMVSSEOKlFXzfXJnOzgUgdZRcD/hQvFXZLGLPXaHrF6qMS7fKd/8o50S2De4RQnMgyfhGPWzOs YzXGnw14YMGK88iqjdmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZb6d-001n7l-1a; Tue, 07 Mar 2023 17:28:07 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pZb6Z-001n7B-UI for linux-arm-kernel@lists.infradead.org; Tue, 07 Mar 2023 17:28:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678210081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cfPqcA1cwRLTFxhmqSenRbKcOcueH6OIZGXv5ofSOBc=; b=c4x6i/1ShoGvdbrKw1MuLtUpu2DIGGEkuZIcJ3SBI4DxH/UUvAbglGzZ8I5DXDZwwE2vcu Wy7dmZg4zXzZcVcz+YQtK68hU8aBIdRbnu9vpnX/O/0BnZ60RsSm1JHDkCHllEzemgghqX BtgWJy4AQPICavxs9W4WiscZiqw/9Qc= Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-213-q1rhUA5YPqqfZiIDdL9u7w-1; Tue, 07 Mar 2023 12:28:00 -0500 X-MC-Unique: q1rhUA5YPqqfZiIDdL9u7w-1 Received: by mail-il1-f197.google.com with SMTP id j9-20020a056e02220900b0031d93dba5a9so4900389ilf.17 for ; Tue, 07 Mar 2023 09:27:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678210079; h=user-agent: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=cfPqcA1cwRLTFxhmqSenRbKcOcueH6OIZGXv5ofSOBc=; b=kmsty+ASUTfNKJPDBUbs5W8JyAZfJpPrzYWEM1KT5jGBUH0An1o5ThG9cx6/RXUje1 tsNLwZrHQEeuxtXFJfPc+aOl3aAZQYRpoTslk+1siEe5ZEM6piodjARInaIxo19K99wD 8+uOKdCL6fZeOaYmHFFh4o6Jfff0Ftqg2AhOWaMZqB4ZGbsc1T/OKloHWmipSSBffSdO FGf6q8hz/6fAnzeRf6Pz8pBFUP+QSa/0CMXE9JQK1FRoW7OHIIKcu8x8Y4pItqqXIQAS Se1wJhFZQrd0k8uUMDvHlYaD/MKBJ5SUCUy0ATB/bzjpR41pPxTa7y7Q9s1zA8ya4bXM 8Z+g== X-Gm-Message-State: AO0yUKUw2ewMWrwBo62ErXR7ljrY5naFlT/FFjD+NDY7rUPh6W6ItOzd 6DHU8515gFkukIAzslxMpZeP5cEnXSfQh6YchJZJJ5gtJxF2aCgoMtq5pf3txCW3ddmp8LvbOkv yfcC9BOSnScZJTEEbU8qrnjyTQPDcwOAibyA= X-Received: by 2002:a05:6e02:12cf:b0:317:3f4:c06c with SMTP id i15-20020a056e0212cf00b0031703f4c06cmr13683747ilm.20.1678210079347; Tue, 07 Mar 2023 09:27:59 -0800 (PST) X-Google-Smtp-Source: AK7set/0WWrRrCd3gc67coU2cSQKQm4QzNjqBsadANxnjkNms5bcQylIzmjtvguW4ZIsk3I4wn0cYQ== X-Received: by 2002:a05:6e02:12cf:b0:317:3f4:c06c with SMTP id i15-20020a056e0212cf00b0031703f4c06cmr13683737ilm.20.1678210079049; Tue, 07 Mar 2023 09:27:59 -0800 (PST) Received: from x1 (c-73-214-169-22.hsd1.pa.comcast.net. [73.214.169.22]) by smtp.gmail.com with ESMTPSA id g11-20020a02b70b000000b003a7c47efde0sm4344252jam.11.2023.03.07.09.27.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 09:27:58 -0800 (PST) Date: Tue, 7 Mar 2023 12:27:56 -0500 From: Brian Masney To: Mukesh Ojha Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH 0/6] Add basic Minidump kernel driver support Message-ID: References: <1676978713-7394-1-git-send-email-quic_mojha@quicinc.com> <47542dbb-8cf3-6eae-a38e-910d38bd960b@quicinc.com> <14b11c3c-353c-50f9-f9a4-837fc5d06fa4@quicinc.com> MIME-Version: 1.0 In-Reply-To: <14b11c3c-353c-50f9-f9a4-837fc5d06fa4@quicinc.com> User-Agent: Mutt/2.2.7 (2022-08-07) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230307_092804_093658_92059AD0 X-CRM114-Status: GOOD ( 31.28 ) 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 Mon, Feb 27, 2023 at 03:45:31PM +0530, Mukesh Ojha wrote: > > > On 2/25/2023 12:36 AM, Brian Masney wrote: > > Hi Mukesh, > > > > On Fri, Feb 24, 2023 at 04:10:42PM +0530, Mukesh Ojha wrote: > > > On 2/23/2023 6:07 PM, Brian Masney wrote: > > > > I'd like to test this series plus your series that sets the multiple > > > > download modes. > > > > > > Sure, you are welcome, but for that you need a device running with Qualcomm > > > SoC and if it has a upstream support. > > > > I will be testing this series on a sa8540p (QDrive3 Automotive > > Development Board), which has the sc8280xp SoC with good upstream > > support. This is also the same board that I have a reliable way to > > make the board crash due to a known firmware bug. > > > > > Can you try below patch to just select minidump download mode and make the > device crash ? > > --------------------------------------->8------------------------------- > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > index 0d02599..bd8e1a8 100644 > --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi > @@ -280,6 +280,7 @@ > firmware { > scm: scm { > compatible = "qcom,scm-sc8280xp", "qcom,scm"; > + qcom,dload-mode = <&tcsr 0x13000>; > }; > }; > > diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c > index cdbfe54..e1539a2 100644 > --- a/drivers/firmware/qcom_scm.c > +++ b/drivers/firmware/qcom_scm.c > @@ -20,7 +20,7 @@ > > #include "qcom_scm.h" > > -static bool download_mode = > IS_ENABLED(CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT); > +static bool download_mode = true; > module_param(download_mode, bool, 0); > > #define SCM_HAS_CORE_CLK BIT(0) > @@ -427,7 +427,7 @@ static void qcom_scm_set_download_mode(bool enable) > ret = __qcom_scm_set_dload_mode(__scm->dev, enable); > } else if (__scm->dload_mode_addr) { > ret = qcom_scm_io_writel(__scm->dload_mode_addr, > - enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0); > + enable ? 0x20 : 0); > } else { > dev_err(__scm->dev, > "No available mechanism for setting download > mode\n"); Hi Mukesh, I tried to test this series but I don't know how to actually use the minidump feature that's in this series. Some more documentation is needed. I added this series, plus your other series that adds the download modes to the SCM driver to my tree, along with your changes above. I downgraded the firmware on my sa8540p and I have my reproducible crash. Linux immediately loses control and the board firmware takes over. I assumed that I'd need to do a warm reboot so that DDR contents are still present so Linux can grab the memory contents on next reboot. However, 'fastboot devices' shows no devices so I can't reboot that way. I can do a cold boot but the DDR contents will be lost. Also this series needs to be rebased against 6.3rc1. Brian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel