qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: sanjana gogte <sanj27272@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: Assistance Required for QEMU Hardfault Error with Cortex-M33 on MPS2AN505
Date: Tue, 16 Jan 2024 14:22:19 +0000	[thread overview]
Message-ID: <CAFEAcA-L2vepWXfgaHW=ogLAvAZjJd5yv1hm6dBU6dsEOS_gCA@mail.gmail.com> (raw)
In-Reply-To: <CA+ji3pGBJBp+trjM-RhgkYjOs8rrtLJgHsaNvf=EyGtWB4gAow@mail.gmail.com>

On Tue, 16 Jan 2024 at 14:16, sanjana gogte <sanj27272@gmail.com> wrote:
>
> I hope this message finds you well. I am reaching out to seek your expertise regarding a persistent issue I have encountered while working with QEMU, specifically a hardfault error when emulating the MPS2AN505 with a Cortex-M33 core.
>
> I have been grappling with this issue for some time and am unsure of the next steps to take. Could you please advise on potential areas to investigate or adjustments that might resolve this error? I am particularly curious if the issue lies with the vector table placement or the configuration in my linker script.
>
> The error I am facing is as follows:
> qemu: fatal: Lockup: can't escalate 3 to HardFault (current priority -1)
>
> This occurs when I attempt to run my kernel.elf file using the following QEMU command:
>
> qemu-system-arm -machine mps2-an505 -cpu cortex-m33 \
>                 -m 16M \
>                 -nographic -serial mon:stdio \
>                 -device loader,file=kernel.elf

(1) Tell us what QEMU version you're using.

(2) Give us the debug logs, by adding
 -D qemu.log -d
in_asm,exec,cpu,int,cpu_reset,unimp,guest_errors,nochain -singlestep

Your guest is probably crashing in early bootup, and the
only way to tell where is to debug it.

Also, your interrupt vector table is too short, because
you've only put in the first two entries (SP and reset PC).
This will result in unhelpfully confusing behaviour if
the CPU ever takes some other kind of exception.

thanks
-- PMM


  reply	other threads:[~2024-01-16 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16 10:28 Assistance Required for QEMU Hardfault Error with Cortex-M33 on MPS2AN505 sanjana gogte
2024-01-16 14:22 ` Peter Maydell [this message]
2024-01-18  6:30   ` sanjana gogte
2024-01-18 10:04     ` Peter Maydell
2024-01-30  7:48       ` sanjana gogte
2024-01-30 10:29         ` Peter Maydell
2024-01-31 10:56           ` sanjana gogte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA-L2vepWXfgaHW=ogLAvAZjJd5yv1hm6dBU6dsEOS_gCA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sanj27272@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).