Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
wdenk | 5c952cf | 2004-10-10 21:27:30 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2004, Psyent Corporation <www.psyent.com> |
| 4 | * Scott McNutt <smcnutt@psyent.com> |
wdenk | 5c952cf | 2004-10-10 21:27:30 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
wdenk | 5c952cf | 2004-10-10 21:27:30 +0000 | [diff] [blame] | 7 | #include <common.h> |
Simon Glass | db41d65 | 2019-12-28 10:45:07 -0700 | [diff] [blame] | 8 | #include <hang.h> |
| 9 | #include <asm/ptrace.h> |
wdenk | 5c952cf | 2004-10-10 21:27:30 +0000 | [diff] [blame] | 10 | |
| 11 | void trap_handler (struct pt_regs *regs) |
| 12 | { |
| 13 | /* Just issue warning */ |
| 14 | printf ("\n\n*** WARNING: unimplemented trap @ %08x\n\n", |
| 15 | regs->reg[29] - 4); |
| 16 | } |
| 17 | |
| 18 | void soft_emulation (struct pt_regs *regs) |
| 19 | { |
| 20 | /* TODO: Software emulation of mul/div etc. Until this is |
| 21 | * implemented, generate warning and hang. |
| 22 | */ |
| 23 | printf ("\n\n*** ERROR: unimplemented instruction @ %08x\n", |
| 24 | regs->reg[29] - 4); |
Simon Glass | db41d65 | 2019-12-28 10:45:07 -0700 | [diff] [blame] | 25 | hang(); |
wdenk | 5c952cf | 2004-10-10 21:27:30 +0000 | [diff] [blame] | 26 | } |