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 A9A56A0548; Mon, 16 Aug 2021 18:25:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D7A240143; Mon, 16 Aug 2021 18:25:14 +0200 (CEST) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) by mails.dpdk.org (Postfix) with ESMTP id 25FF54003C for ; Mon, 16 Aug 2021 18:25:13 +0200 (CEST) Received: by mail-io1-f49.google.com with SMTP id b200so3328343iof.13 for ; Mon, 16 Aug 2021 09:25:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pWqJzT4E7qqS/nDpBvJivQ5q53Vkp+VIK/i4hI4o8ZY=; b=rSfnGAzVwL3AEI2IUMt5TezGfac3v4pll5xIJfnBYUnbgyXnGu044hijfWjw5eYYHO Nmi7HiqWYkRBZ3OFd9rFsbar03rFa3wPMT8h5y8hgk8iNeAI8s+xZKAzadsD2pixyT3J tr8ZnTnksyAYwpQ1pTXbdbzMg8bqgNBUkjwLuaGj5zYtwgQXIP87QQnAjyu8d3dR4l8C aQnGT/VsysHOLQivMNEJIxU19crHECej+NSFjxAjlGDWlgUFsSpKpMPWEi89xwbScFES RbwC8M6M7jW5N0jQL3JDJIB8bvpDvu5wMFWOJ8UV7FR7Wm2Vml+mEOMddkclrftSmYWf RXoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pWqJzT4E7qqS/nDpBvJivQ5q53Vkp+VIK/i4hI4o8ZY=; b=LKmcJmgjKkTKBPc3uFjeSe6EQaEzt4F+M77xTnXhJofGimAGKizZla//oka5K0owmg sZXEPmtz6p9/E03VFF77FYtZmPQGz4OGQlm0NPBotnhOYBE6E4dCdZeW7dwSSESmN4VF nCcby4vZsRwwH/q5zBXbNKILdkcViFDzOkYucIeI2d9MPGf6tyxXJXsOU09WYfFUPh+t JW5lygqPXtuyVIRe0qVh783JEBrX9IvAKeFROoQKvPZ5mUnoYdGIw00RqJP0J5D+4f5s 0QcrTNZiHYnudNPY0z2/fRMZDUYGH0/vj0q70SDtZ8ZRE7W5aJ908EFsD/ER7aeM2452 Jhyg== X-Gm-Message-State: AOAM530c7A0ChrqZb37jf4LnlTXNOWXfidykqeNH5NVt8qTNYnMus+te 1UO5hR1kxgdq8B9FCZm7R0RdHncPID1KQB0c7I8= X-Google-Smtp-Source: ABdhPJxMUmurNesft6JqhM6nmJ1+jbVMg1lUZ5OLe5ho4EByix1BNQ4cjf9KntAlmoterKzqrP9zS0tmUcNEkiCbDe4= X-Received: by 2002:a6b:c305:: with SMTP id t5mr13313559iof.123.1629131112576; Mon, 16 Aug 2021 09:25:12 -0700 (PDT) MIME-Version: 1.0 References: <20210730084938.2426128-1-jerinj@marvell.com> <20210730084938.2426128-6-jerinj@marvell.com> In-Reply-To: From: Jerin Jacob Date: Mon, 16 Aug 2021 21:54:46 +0530 Message-ID: To: David Christensen Cc: Jerin Jacob , dpdk-dev , Thomas Monjalon , David Marchand , "Richardson, Bruce" , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , "Dmitry Malloy (MESHCHANINOV)" , Pallavi Kadam , "Ananyev, Konstantin" , "Ruifeng Wang (Arm Technology China)" , Jan Viktorin Content-Type: text/plain; charset="UTF-8" Subject: Re: [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" On Tue, Aug 3, 2021 at 4:20 AM David Christensen wrote: > > > > On 7/30/21 1:49 AM, jerinj@marvell.com wrote: > > 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++) > ~~~ > Maybe <= instead of < ?? 31 is a strange number of registers and the > line feed doesn't seem to line things up for PSTATEn below. Based on spec https://elixir.bootlin.com/linux/v4.5/source/arch/arm64/include/uapi/asm/sigcontext.h it is 0 from 30 as r31 is SP, it is already part as struct sigcontext::sp. > > > + oops_print("X%.2d: 0x%.16llx%s", i, mc->regs[i], > > + i & 0x1 ? "\n" : " "); > > Dave