I am trying to use both the FPU and a timer, but cannot get everything to work despite reading previous responses on these forums.
My environment: emulating a RPi3 using QEMU and compiling with Aarch64.
By default the Pi starts in EL2 (hypervisor mode). In this mode I can use the FPU, but was not able setup exceptions. I am also not sure this is the right execution level if I want to write my own OS.
If I try to use some code given in this forum to switch to EL1 and use a timer (https://github.com/eggman/raspberrypi/t ... i3/timer01):
- Interrupts work - kinda. I can catch a divide by zero, but trying to set the timer leads to a constant IRQ #0 generation - and nothing else gets executed
- The FPU doesn't work.Trying to use floats generates an exception. I tried using solutions provided in this forum to no avail, e.g. the aarch64 compiler doesn't seem to support flags such as -mfpu