-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seL4 floating point compilation support #139
Comments
The Perhaps there is some FPU initialisation that seL4 is not doing and instead relying on the previous boot-loading stage to set it up. Do you have one of the supported hardware platforms to run the proof of concept systems on? It would confirm whether it's a general issue or just specific to QEMU. These are my initial thoughts but I will have a deeper look within the next couple of days. |
Some more insights into the problem We are using the environment from the microkit tutorial for the examples here. In this case, we tested the client protection domain. We encountered the same problems on two separate computers. When running the proof of concept on actual hardware we don't encounter any problems and can use functions from the math.h library. This gives us confidence that the problem is specific to QEMU. Our platform information:
Initially, we encountered following error when trying to compile:
Thanks to @Vincer239 and with this solution, we figured out that adding the
The program compiles without errors. However, when trying to run the program after compiling, we now get a different error:
Note that instead of |
Something strange seems to be going on as the instruction pointer and the fault address is zero. I modified the 'hello' example for QEMU to use I'll try reproduce your test and see what happens. |
Okay, I can reproduce the issue. The problem seems to be the toolchain, I am not sure if The The reason The reason the tutorial uses that toolchain is because it is available in package managers, unlike aarch64-none-elf. If you want to keep using GCC and not bring your own libc/libmath, I believe it would be better to use |
@Bojan-Lukic did you run the same program on hardware as on QEMU, using the same toolchain? |
@Ivan-Velickovic, yes. It was pretty much the same program on hardware as we ran on QEMU. We configured the system file with the board UART addresses and updated the Makefile with the board name/number instead of the qemu_arm_virt option. We loaded the separate ELF files on the board. |
We are running the sel4 microkit with QEMU on NixOS 23.11 to implement a proof of concept system.
One of our applications requires trigonometric functions, hence we are using the math.h library in the c file of one of our protection domains. When trying to do a simple calculation with the sine function we get errors when building and running the system. Therefore, we assume that there are issues with either the library we are using or with certain types of floating point operations in seL4.
What floating point compilation does seL4 support and what is the right approach for using floating point operations?
The text was updated successfully, but these errors were encountered: