traps.c 607 B

1234567891011121314151617181920212223242526
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * (C) Copyright 2004, Psyent Corporation <www.psyent.com>
  4. * Scott McNutt <smcnutt@psyent.com>
  5. */
  6. #include <common.h>
  7. #include <hang.h>
  8. #include <asm/ptrace.h>
  9. void trap_handler (struct pt_regs *regs)
  10. {
  11. /* Just issue warning */
  12. printf ("\n\n*** WARNING: unimplemented trap @ %08x\n\n",
  13. regs->reg[29] - 4);
  14. }
  15. void soft_emulation (struct pt_regs *regs)
  16. {
  17. /* TODO: Software emulation of mul/div etc. Until this is
  18. * implemented, generate warning and hang.
  19. */
  20. printf ("\n\n*** ERROR: unimplemented instruction @ %08x\n",
  21. regs->reg[29] - 4);
  22. hang();
  23. }