All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <1923861@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1923861] Re: Hardfault when accessing FPSCR register
Date: Fri, 16 Apr 2021 10:43:03 -0000	[thread overview]
Message-ID: <161856978331.8931.16686838459061592837.malone@gac.canonical.com> (raw)
In-Reply-To: 161841503123.8560.18071871517113740352.malonedeb@gac.canonical.com

https://patchew.org/QEMU/20210416104010.13228-1-peter.maydell@linaro.org/
should fix the "not actually an M55" bug which will then give you the
double-precision and FP16 (and the right FPSCR value).

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1923861

Title:
  Hardfault when accessing FPSCR register

Status in QEMU:
  New

Bug description:
  QEMU release version: v6.0.0-rc2

  command line:
  qemu-system-arm -machine mps3-an547 -nographic -kernel <my_project>.elf -semihosting -semihosting-config enable=on,target=native

  host operating system: Linux ISCNR90TMR1S 5.4.72-microsoft-standard-
  WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64
  GNU/Linux

  guest operating system: none (bare metal)

  Observation:
  I am simulating embedded firmware for a Cortex-M55 device, using MPS3-AN547 machine. In the startup code I am accessing the FPSCR core register:

      unsigned int fpscr =__get_FPSCR();
      fpscr = fpscr & (~FPU_FPDSCR_AHP_Msk);
      __set_FPSCR(fpscr);

  where the register access functions __get_FPSCR() and
  __set_FPSCR(fpscr) are taken from CMSIS_5 at
  ./CMSIS/Core/include/cmsis_gcc.h

  I observe hardfaults upon __get_FPSCR() and __set_FPSCR(fpscr). The
  same startup code works fine on the Arm Corstone-300 FVP (MPS3-AN547).

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1923861/+subscriptions


  parent reply	other threads:[~2021-04-16 10:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 15:43 [Bug 1923861] [NEW] Hardfault when accessing FPSCR register ml-0
2021-04-15 13:53 ` [Bug 1923861] " ml-0
2021-04-15 14:21 ` Peter Maydell
2021-04-15 15:36 ` ml-0
2021-04-15 16:07 ` Peter Maydell
2021-04-15 16:44 ` ml-0
2021-04-15 18:17 ` Peter Maydell
2021-04-15 18:32 ` Peter Maydell
2021-04-16  7:51 ` ml-0
2021-04-16  9:20 ` Peter Maydell
2021-04-16  9:53 ` ml-0
2021-04-16  9:53 ` Peter Maydell
2021-04-16 10:10 ` Peter Maydell
2021-04-16 10:43 ` Peter Maydell [this message]
2021-04-16 11:07 ` ml-0
2021-04-19 12:59 ` Peter Maydell
2021-04-30  7:25 ` Thomas Huth

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=161856978331.8931.16686838459061592837.malone@gac.canonical.com \
    --to=1923861@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.