From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7DD57A0C45; Fri, 30 Jul 2021 10:51:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF28F410EF; Fri, 30 Jul 2021 10:51:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 0C0B1410EF for ; Fri, 30 Jul 2021 10:51:40 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16U8kEoU016321; Fri, 30 Jul 2021 01:51:38 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=fJuxQJ9sAzr7T43DImPSJPUkNYpvuhxF+kJMFQCda+4=; b=irY24QkhbjKG9PbvCuyDYsYwGBCZ30zuvL0fk78gOiXKGt8UJbX8xb0mi0PrXB5OtnZ5 4iQnM2aMxgkpX+ftWkQdQyZes5wDVbH5VG513Po+wo7aF351IgPpotuWc6VhN5xC5gbk UXcLqQqcfoHrJYw1aTcy5NoctvpP3iOmAm/SaZtdXDyDMMii50VkFS8ETMoDX53gM3AD GJetiReqNuMaNWBaC7f0/ugGuy+jd8spMkh3eZKwFWlW+AqBrQUhAbfYbim8tLqz+Ptd iUvVYsPJ5jDJvgj06Vm+sKcbvDmqfb9X2fv53yWlsKMyoax66D1q/v/PxKjpLDMEb40E LQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 3a4866sacf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 30 Jul 2021 01:51:37 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 30 Jul 2021 01:51:36 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 30 Jul 2021 01:51:36 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 7F9093F705D; Fri, 30 Jul 2021 01:51:32 -0700 (PDT) From: To: CC: , , , , , , , , , , , Jerin Jacob Date: Fri, 30 Jul 2021 14:19:37 +0530 Message-ID: <20210730084938.2426128-6-jerinj@marvell.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210730084938.2426128-1-jerinj@marvell.com> References: <20210730084938.2426128-1-jerinj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: E0JsczeoTUOpLIbXkVXXPz_9hLpN08TB X-Proofpoint-ORIG-GUID: E0JsczeoTUOpLIbXkVXXPz_9hLpN08TB X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-30_05:2021-07-29, 2021-07-30 signatures=0 Subject: [dpdk-dev] 5/6] eal/arm64: support register dump for oops X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Jerin Jacob Dump the arm64 arch state register in oops handling routine. Signed-off-by: Jerin Jacob --- lib/eal/unix/eal_oops.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/eal/unix/eal_oops.c b/lib/eal/unix/eal_oops.c index da71481ade..7469610d96 100644 --- a/lib/eal/unix/eal_oops.c +++ b/lib/eal/unix/eal_oops.c @@ -162,6 +162,25 @@ archinfo_dump(ucontext_t *uc) stack_code_dump((void *)mc->gregs[REG_RSP], (void *)mc->gregs[REG_RIP]); } +#elif defined(RTE_ARCH_ARM64) && defined(RTE_EXEC_ENV_LINUX) + +static void +archinfo_dump(ucontext_t *uc) +{ + mcontext_t *mc = &uc->uc_mcontext; + int i; + + oops_print("PC : 0x%.16llx", mc->pc); + oops_print("SP : 0x%.16llx\n", mc->sp); + for (i = 0; i < 31; i++) + oops_print("X%.2d: 0x%.16llx%s", i, mc->regs[i], + i & 0x1 ? "\n" : " "); + + oops_print("PSTATE: 0x%.16llx\n", mc->pstate); + + stack_code_dump((void *)mc->sp, (void *)mc->pc); +} + #else static void -- 2.32.0