Comments (11)
I am also pinging @eroom1966 as we have discussed this a while ago.
from riscv-arch-test.
from riscv-arch-test.
Thanks @allenjbaum for your quick response. I am happy to learn that this problem is being addressed.
from riscv-arch-test.
Well, it will be addressed in the future. It isn't clear to me that it is possible to fix this in v.1, though.
from riscv-arch-test.
Therer are currently 4 tests: I-EBREAK, I-ECALL, I-MISALIGN_JMP and I-MISALIGN_LDST which require access and update of mtvec. While riscof accounts for capturing the platform specifc constraints for mtvec, these tests would also have to be updated along with a linker script changes as well to account for this issue.
from riscv-arch-test.
Is this possible to fix in the current framework to handle arbitrary alignments?
if we only need to modify linker scripts which are already implementation specific, that is doable
If we need to modify tests, that will be implementation specific, and until we can import YAML parameters, we can't have a general test, in which case this should be deferred until we get to v.2.
I don't think we have a way of "deferring" issues; should this get a "fixed in riscof" tag?
from riscv-arch-test.
I think the issue here is that the idiom adopted by Andrew Waterman was used early in the test development, so that the mtvec address is set to be the address of an instruction after the faulting address, in other words (pseudo code)
l1: some_instruction
l2: set mtvec = &l4
l3: faulting_instruction
l4: some_instruction
if the intention is to use a READONLY MTVEC, then a trap handler must be written and located at the fixed MTVEC address, this traphandler could read the EPC and perform a jump to EPC+2 (compressed) or EPC+4 (uncompressed) thus resuming execution at l4
I think it is a test issue, not a framework issue
Thx
Lee
from riscv-arch-test.
from riscv-arch-test.
OK, the tests that have just merged have a standard trap handler that any test can use.
The prolog/setup sets mtvec to a trampoline in the handler that enables saving trap state.
If it is unable to set mtvec to that handler, it instead replaces whatever mtvec points to with the trampoline code.
Only if that fails does it give up & the test fails
A future version may allow implementors to point to a RWX area to place the trampoline table. So:
- An implementation that has a fixed MTVEC that vectors to ROM will always fail
- An implementation that has partially writable MTVEC that is initialized point to ROM when the initialization routine is entered will fail.
Otherwise, it should work.
from riscv-arch-test.
Has this been retested with the updated RFQ tests?
If not, I suggest you reclone the entire riscv-arch-test (the new name for the old riscv-compliance repo) repo and try again
The new tests should save and overwrite the region that MTVEC points to with a trap vector table, and restore it after the test. Any traps will then get vectored to ther standard trap handler, save trap state, and return past the trap point.
from riscv-arch-test.
Seeing no comments, I believe this has been fixed in the latest version of the tests; that is, the tests that were failing because of mtvec alignment shouldn't be failing now. I am closing this, but please reopen if you see further failures.
from riscv-arch-test.
Related Issues (20)
- Continued missing coverage for x0/non-x0 on registers (when all registers are the same)
- Atomic Test cases for amominu (and potentially others) Sail is not generating the correect signature HOT 1
- RVMODEL_IO_ASSERT_GPR_RQ used for float point registers HOT 2
- Example models where asserts are actually defined/used? HOT 6
- ecall check fails in CLIC mode HOT 5
- mode bits inside "vector" entry in signature
- Test misalign-jal-01.S generates compressed instruction for platforms that support only RV32I HOT 7
- Floating point tests are enormous HOT 4
- jalr-01.S fails with illegal operands on latest binutils 2.42 HOT 2
- misalign-jal-01.S without support for compressed instruction signature mismatch HOT 5
- Zfh's 'flh-align-01' test is executed even if Zfh is not enabled HOT 6
- Extra spaces at the end of a multiline macro causing compile warnings for env/test_macros.h
- RVTEST_CODE_END use of RVTEST_SAVE_GPRS in env/arch_test.h doesn't work HOT 4
- Compliance command failure HOT 4
- Unexpected Zfh's fdiv test appear when no Zfh enable HOT 4
- Zfa tests missing fmvp.d.x
- Regnerated MUL* tests missing Zmmul string in RVTEST_ISA macro
- Zfh tests missing floating-to-float conversions
- Error in CTG commands for generating floating point riscv-tests HOT 4
- Cover Group files are scattered in different directories HOT 2
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 riscv-arch-test.