Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reporting traps (faults) to GDB in SE mode #166

Merged
merged 3 commits into from
Aug 17, 2023

Commits on Aug 17, 2023

  1. arch-power: Fix reporting traps to GDB

    Due to inverted logic in POWER fault handlers, unimplemented opcode and
    trap faults did not report trap to GDB (if connected). This commit fixes
    the problem.
    
    While at it, I opted to use `if (! ...) { panic(...) }` rather than
    `panic_if(...)`. I find it easier to understand in this case.
    
    Change-Id: I6cd5dfd5f6546b8541d685e877afef21540d6824
    janvrany committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    fde58a4 View commit details
    Browse the repository at this point in the history
  2. arch-riscv: Do not advance PC when handling faults in SE mode

    On RISC-V when trap occurs the contents of PC register contains the
    address of instruction that caused that trap (as opposed to the address
    of instruction following it in instruction stream). Therefore this commit
    does not advance the PC before reporting trap in SE mode.
    
    Change-Id: I83f3766cff276312cefcf1b4ac6e78a6569846b9
    janvrany committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    546b3ea View commit details
    Browse the repository at this point in the history
  3. arch-riscv: Report traps to GDB in SE mode

    This commit add code to report illegal instruction and breakpoint traps
    to GDB (if connected). This merely follows what POWER does.
    janvrany committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    3564348 View commit details
    Browse the repository at this point in the history