From patchwork Tue Mar 15 14:41:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Lal X-Patchwork-Id: 12781549 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D2D5C433F5 for ; Tue, 15 Mar 2022 14:42:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349165AbiCOOnK (ORCPT ); Tue, 15 Mar 2022 10:43:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242040AbiCOOnJ (ORCPT ); Tue, 15 Mar 2022 10:43:09 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A72005575C; Tue, 15 Mar 2022 07:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1647355317; x=1678891317; h=from:to:cc:subject:date:message-id:mime-version; bh=MrQ1fvABcxNaAepb8WOlt+Sg8YuuQ7eRewo0sYq/MHY=; b=CjWJVsrXpuf0/nWsMOAlPlLdelQ80bGCl30wsa4gaH2MmaqdHtxXU/kS 7SR5m8oMUz72wolBOLT+1cx7SQ3kPknPsDZRkYad9BbetJYyjBVkstZhm DEFSJ9sC09eub4XhsJPXXaETf++12XaVq5Ms/znx5i3/GeQEU4dd6CKfv Q=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-01.qualcomm.com with ESMTP; 15 Mar 2022 07:41:57 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2022 07:41:57 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Tue, 15 Mar 2022 07:41:56 -0700 Received: from hu-ylal-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 15 Mar 2022 07:41:54 -0700 From: Yogesh Lal To: , CC: , , , Yogesh Lal Subject: [PATCH V2] remoteproc: qcom: pas: Add elf64 support to coredump Date: Tue, 15 Mar 2022 20:11:47 +0530 Message-ID: <1647355307-7612-1-git-send-email-quic_ylal@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This change adds elf64 coredump to the ADSP,CDSP and MPSS subsystems as they will be 64 bit from sm8450 onward. Signed-off-by: Yogesh Lal Reviewed-by: Sibi Sankar --- Updating commit message and minor code change. drivers/remoteproc/qcom_q6v5_pas.c | 68 +++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 4 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 1ae47cc..445ee3f 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -34,6 +34,7 @@ struct adsp_data { const char *firmware_name; int pas_id; unsigned int minidump_id; + bool uses_elf64; bool has_aggre2_clk; bool auto_boot; @@ -450,7 +451,11 @@ static int adsp_probe(struct platform_device *pdev) } rproc->auto_boot = desc->auto_boot; - rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE); + + if (desc->uses_elf64) + rproc_coredump_set_elf_info(rproc, ELFCLASS64, EM_NONE); + else + rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE); adsp = (struct qcom_adsp *)rproc->priv; adsp->dev = &pdev->dev; @@ -617,6 +622,24 @@ static const struct adsp_data sm8350_adsp_resource = { .ssctl_id = 0x14, }; +static const struct adsp_data sm8450_adsp_resource = { + .crash_reason_smem = 423, + .firmware_name = "adsp.mdt", + .pas_id = 1, + .uses_elf64 = true, + .has_aggre2_clk = false, + .auto_boot = true, + .proxy_pd_names = (char*[]){ + "lcx", + "lmx", + NULL + }, + .load_state = "adsp", + .ssr_name = "lpass", + .sysmon_name = "adsp", + .ssctl_id = 0x14, +}; + static const struct adsp_data msm8996_adsp_resource = { .crash_reason_smem = 423, .firmware_name = "adsp.mdt", @@ -721,6 +744,24 @@ static const struct adsp_data sm8350_cdsp_resource = { .ssctl_id = 0x17, }; +static const struct adsp_data sm8450_cdsp_resource = { + .crash_reason_smem = 601, + .firmware_name = "cdsp.mdt", + .pas_id = 18, + .uses_elf64 = true, + .has_aggre2_clk = false, + .auto_boot = true, + .proxy_pd_names = (char*[]){ + "cx", + "mxc", + NULL + }, + .load_state = "cdsp", + .ssr_name = "cdsp", + .sysmon_name = "cdsp", + .ssctl_id = 0x17, +}; + static const struct adsp_data mpss_resource_init = { .crash_reason_smem = 421, .firmware_name = "modem.mdt", @@ -755,6 +796,25 @@ static const struct adsp_data sc8180x_mpss_resource = { .ssctl_id = 0x12, }; +static const struct adsp_data sm8450_mpss_resource = { + .crash_reason_smem = 421, + .firmware_name = "modem.mdt", + .pas_id = 4, + .minidump_id = 3, + .uses_elf64 = true, + .has_aggre2_clk = false, + .auto_boot = false, + .proxy_pd_names = (char*[]){ + "cx", + "mss", + NULL + }, + .load_state = "modem", + .ssr_name = "mpss", + .sysmon_name = "modem", + .ssctl_id = 0x12, +}; + static const struct adsp_data slpi_resource_init = { .crash_reason_smem = 424, .firmware_name = "slpi.mdt", @@ -879,10 +939,10 @@ static const struct of_device_id adsp_of_match[] = { { .compatible = "qcom,sm8350-cdsp-pas", .data = &sm8350_cdsp_resource}, { .compatible = "qcom,sm8350-slpi-pas", .data = &sm8350_slpi_resource}, { .compatible = "qcom,sm8350-mpss-pas", .data = &mpss_resource_init}, - { .compatible = "qcom,sm8450-adsp-pas", .data = &sm8350_adsp_resource}, - { .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource}, + { .compatible = "qcom,sm8450-adsp-pas", .data = &sm8450_adsp_resource}, + { .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8450_cdsp_resource}, { .compatible = "qcom,sm8450-slpi-pas", .data = &sm8350_slpi_resource}, - { .compatible = "qcom,sm8450-mpss-pas", .data = &mpss_resource_init}, + { .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource}, { }, }; MODULE_DEVICE_TABLE(of, adsp_of_match);