mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
Validate linked RISC-V executables when CONFIG_COMPILER_ENABLE_RISCV_ZCMP is enabled on affected chips. Disassemble each function and reject mstatus.MIE clears that lack an earlier mintthresh write of 0xff. Handle csrrci, csrrw, and register-mask csrrc patterns while ignoring csrrs. Add build-only coverage for valid and invalid sequences with CMake v1 and v2. Stop the hardware stack guard before switching stacks during restart, and keep ZCMP disabled for TEE test apps that still require the workaround.
4 lines
567 B
YAML
4 lines
567 B
YAML
-
|
|
re: "ZCMP workaround violation"
|
|
hint: "Global interrupt disable (csrrc/csrrci mstatus,8) was found without the required mintthresh write (csrrw to CSR 0x347) within the previous instructions. This is unsafe with RISC-V ZCMP enabled on affected chips.\nEither apply the workaround before clearing mstatus.MIE (see SOC_CPU_ZCMP_WORKAROUND examples in ESP-IDF), or disable the ZCMP extension: set CONFIG_COMPILER_ENABLE_RISCV_ZCMP=n in sdkconfig / sdkconfig.defaults, or use 'idf.py menuconfig' -> 'Compiler options' -> disable 'Enable RISCV ZCMP extension'."
|