chipsalliance / chipsalliance/dromajo

Pagetable walk throws access violation even with no PMP entries set

Open
#46 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
244
Forks
69
PR merge metrics
No merged PRs in 30d

Description

I ran the attached assembly program with dromajo and it gives an exception on a nop instruction. I ran the same program on Spike and it ignored nop instruction and proceeded as expected.

I have attached a zip file that contains the compiled binary file (test.elf), assembly file (test.S), and disassembly of the binary (test.txt).

The following figure shows the diff between Spike trace and dromajo trace. nop instruction is located after the highlighted mret instruction.
![image](https://user-images.githubusercontent.com/27680512/123189858-8fdb4300-d46c-11eb-8943-2335de38f718.png)

[test.zip](https://github.com/chipsalliance/dromajo/files/6705720/test.zip)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the access violation with the attached test.elf and compare dromajo's trace with the provided Spike trace. Read test.S and test.txt around the mret and following nop, then trace the pagetable and PMP handling involved. Done means the nop executes without an access violation when no PMP entries are set, matching Spike.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.