traps.c 590 B

12345678910111213141516171819202122232425
  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 <asm/ptrace.h>
  7. #include <common.h>
  8. void trap_handler (struct pt_regs *regs)
  9. {
  10. /* Just issue warning */
  11. printf ("\n\n*** WARNING: unimplemented trap @ %08x\n\n",
  12. regs->reg[29] - 4);
  13. }
  14. void soft_emulation (struct pt_regs *regs)
  15. {
  16. /* TODO: Software emulation of mul/div etc. Until this is
  17. * implemented, generate warning and hang.
  18. */
  19. printf ("\n\n*** ERROR: unimplemented instruction @ %08x\n",
  20. regs->reg[29] - 4);
  21. hang ();
  22. }