Comments (4)
The exception class EC == 0b000111 in ESR means Access to SME, SVE, Advanced SIMD or floating-point functionality trapped by CPACR_EL1.FPEN, CPTR_EL2.FPEN, CPTR_EL2.TFP, or CPTR_EL3.TFP control..
In other words, the Advanced SIMD and VFP extensions which are not enabled.
A possible workaround is to ask the compiler not to use these instructions via -mgeneral-regs-only
.
The solution is to enable them via the FPEN bit 31:20 in the CPACR_EL1 register.
mrs x1, cpacr_el1
mov x0, #(3 << 20)
orr x0, x1, x0
msr cpacr_el1, x0
from aarch64-bare-metal-qemu.
For completeness, I used the aarch64-none-elf
toolchain provided by Arm, version 11.2-2022.02:
from aarch64-bare-metal-qemu.
The exception class EC == 0b000111 in ESR means Access to SME, SVE, Advanced SIMD or floating-point functionality trapped by CPACR_EL1.FPEN, CPTR_EL2.FPEN, CPTR_EL2.TFP, or CPTR_EL3.TFP control..
In other words, the Advanced SIMD and VFP extensions which are not enabled.
A possible workaround is to ask the compiler not to use these instructions via
-mgeneral-regs-only
.The solution is to enable them via the FPEN bit 31:20 in the CPACR_EL1 register.
mrs x1, cpacr_el1 mov x0, #(3 << 20) orr x0, x1, x0 msr cpacr_el1, x0
Thanks. Another way I can think of is to handle the exception by implementing an exception handler (changing the vector table, adding handling code, etc).
from aarch64-bare-metal-qemu.
Another way I can think of is to handle the exception
If you know how to do it, yes, but I guess it is not easy, plus that it adds some run-time overhead, the exception will trigger for each quad instruction, and in printf() there are a lot.
Enabling SMD during startup is much simpler.
Also to be noted that -mgeneral-regs-only
is effective only for the application code, the printf()
in the library still makes use of quad instructions and crashes.
from aarch64-bare-metal-qemu.
Related Issues (2)
- linaro website error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aarch64-bare-metal-qemu.