Store instructions fetched from non-executable memory update data_we_o, data_addr_o, and data_wdata_o
Nobody has claimed this yet.
- Dominant language
- SystemVerilog
- Stars
- 2.1k
- Forks
- 810
- Avg merge
- 5d 23h
- Merged PRs (30d)
- 9
Description
Observed Behavior
When a store instruction is read from a section of memory marked by the PMP as non-executable, data_we_o, data_addr_o, and data_wdata_o are still updated as though the instruction is valid. Additionally, no output alert or fault signals are raised, though the appropriate CSRs are updated.
Expected Behavior
Instructions deemed invalid by the PMP should be entirely gated and have no artifacts. Additionally, I would expect an alert_minor_o to be raised, though I may be wrong about that.
Steps to reproduce the issue
I've created a repository with the test bench I used to verify the issue.
To trigger this issue in your own environment:
- Configure the PMP to have areas that should not be executable.
- Store memory write instructions in that non-executable area.
- Branch to the non-executable area.
- Observe the error.
Regarding parameters, I observed this issue with BranchTargetALU enabled and disabled, with WritebackStage enabled and disabled, with ICache enabled, with BranchPredictor enabled and disabled, and with SecureIbex disabled. All other parameters (excluding PMP configuration) were left at their default values.
My Environment
EDA tool and version:
Xilinx Vivado 2024.1
Operating system:
Windows 11
Version of the Ibex source code:
Commit SHA: 125445f692d5dc91892a7852112ad3633f44969f. No changes to source code.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction testbench, ibex_invalid_store_tb.sv, and configure PMP to branch into a non-executable area containing store instructions. Trace the resulting data_we_o, data_addr_o, data_wdata_o, alert, and fault signals; done means invalid instructions produce no store-interface artifacts and the expected fault behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100