Giter VIP home page Giter VIP logo

Comments (11)

vogelpi avatar vogelpi commented on July 17, 2024

I am also pinging @eroom1966 as we have discussed this a while ago.

from riscv-arch-test.

allenjbaum avatar allenjbaum commented on July 17, 2024

from riscv-arch-test.

vogelpi avatar vogelpi commented on July 17, 2024

Thanks @allenjbaum for your quick response. I am happy to learn that this problem is being addressed.

from riscv-arch-test.

allenjbaum avatar allenjbaum commented on July 17, 2024

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.

neelgala avatar neelgala commented on July 17, 2024

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.

allenjbaum avatar allenjbaum commented on July 17, 2024

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.

eroom1966 avatar eroom1966 commented on July 17, 2024

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.

allenjbaum avatar allenjbaum commented on July 17, 2024

from riscv-arch-test.

allenjbaum avatar allenjbaum commented on July 17, 2024

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.

allenjbaum avatar allenjbaum commented on July 17, 2024

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.

allenjbaum avatar allenjbaum commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.