TO RESET: unhandled_page_fault: show instruction address

Change-Id: I29a8d30d9b3e5cfbe5e16b1faaa253e794b8fc5b
This commit is contained in:
Masamichi Takagi
2020-06-15 12:51:48 +09:00
parent 3949ab65a8
commit 2a984a12fe
3 changed files with 37 additions and 0 deletions

View File

@@ -1448,6 +1448,14 @@ void arch_print_stack(void)
{
}
#ifdef ENABLE_FUGAKU_HACKS
unsigned long arch_get_instruction_address(const void *reg)
{
const struct pt_regs *regs = (struct pt_regs *)reg;
return regs->pc;
}
#endif
void arch_show_interrupt_context(const void *reg)
{
const struct pt_regs *regs = (struct pt_regs *)reg;

View File

@@ -1575,6 +1575,16 @@ void arch_print_stack(void)
__print_stack(rbp, 0);
}
#ifdef ENABLE_FUGAKU_HACKS
unsigned long arch_get_instruction_address(const void *reg)
{
const struct x86_user_context *uctx = reg;
const struct x86_basic_regs *regs = &uctx->gpr;
return regs->rip;
}
#endif
/*@
@ requires \valid(reg);
@ assigns \nothing;