casaroli opened a new pull request, #20725: URL: https://github.com/apache/nuttx/pull/20725
## Summary User code could not read `CTR_EL0`, use `DC ZVA`, or clean and invalidate the caches by virtual address: each of these trapped and the task was killed. Programs read `CTR_EL0` to find the cache line sizes, and must clean the D-cache and invalidate the I-cache after they write code. This PR sets `SCTLR_EL1.UCT`, `DZE` and `UCI`, as other operating systems do. The instructions still check the access permissions of the address. ## Impact arm64 only: EL0 may now use these cache instructions. ## Testing Builds: `qemu-armv8a:nsh`, `qemu-armv8a:knsh`, `lm3s6965-ek:qemu-flat`. Runtime, QEMU 11 with HVF on an Apple M4: `ostest` on `qemu-armv8a:knsh` (kernel build) and `qemu-armv8a:nsh` (flat build) ends with `ostest_main: Exiting with status 0`. `tools/checkpatch.sh -c -u -m -g` passes. A user program that reads `CTR_EL0` and cleans and invalidates the caches after it writes code was killed with a trap on `qemu-armv8a:knsh` before, and runs with the change. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
