Lines Matching +full:halt +full:- +full:regs
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
93 task->comm, task_pid_nr(task)); in do_show_stack()
101 task->thread.switch_sp)->fp; in do_show_stack()
106 printk("%s-- Corrupt frame pointer %p\n", loglvl, fp); in do_show_stack()
114 /* Expect kernel stack to be in-bounds */ in do_show_stack()
116 high = low + THREAD_SIZE - 8; in do_show_stack()
133 printk("%s-- Corrupt frame pointer %p\n", loglvl, newfp); in do_show_stack()
139 struct pt_regs *regs = (struct pt_regs *) (((void *)fp) in do_show_stack() local
142 if (regs->syscall_nr != -1) { in do_show_stack()
143 printk("%s-- trap0 -- syscall_nr: %ld", loglvl, in do_show_stack()
144 regs->syscall_nr); in do_show_stack()
146 pt_psp(regs), pt_elr(regs)); in do_show_stack()
151 printk("%s-- %s (0x%lx) badva: %lx\n", loglvl, in do_show_stack()
152 ex_name(pt_cause(regs)), pt_cause(regs), in do_show_stack()
153 pt_badva(regs)); in do_show_stack()
156 newfp = (unsigned long *) regs->r30; in do_show_stack()
157 ip = pt_elr(regs); in do_show_stack()
180 int die(const char *str, struct pt_regs *regs, long err) in die() argument
197 if (notify_die(DIE_OOPS, str, regs, err, pt_cause(regs), SIGSEGV) == in die()
204 show_regs(regs); in die()
205 do_show_stack(current, ®s->r30, pt_elr(regs), KERN_EMERG); in die()
223 int die_if_kernel(char *str, struct pt_regs *regs, long err) in die_if_kernel() argument
225 if (!user_mode(regs)) in die_if_kernel()
226 return die(str, regs, err); in die_if_kernel()
234 static void misaligned_instruction(struct pt_regs *regs) in misaligned_instruction() argument
236 die_if_kernel("Misaligned Instruction", regs, 0); in misaligned_instruction()
245 static void misaligned_data_load(struct pt_regs *regs) in misaligned_data_load() argument
247 die_if_kernel("Misaligned Data Load", regs, 0); in misaligned_data_load()
251 static void misaligned_data_store(struct pt_regs *regs) in misaligned_data_store() argument
253 die_if_kernel("Misaligned Data Store", regs, 0); in misaligned_data_store()
257 static void illegal_instruction(struct pt_regs *regs) in illegal_instruction() argument
259 die_if_kernel("Illegal Instruction", regs, 0); in illegal_instruction()
267 static void precise_bus_error(struct pt_regs *regs) in precise_bus_error() argument
269 die_if_kernel("Precise Bus Error", regs, 0); in precise_bus_error()
278 static void cache_error(struct pt_regs *regs) in cache_error() argument
280 die("Cache Error", regs, 0); in cache_error()
286 void do_genex(struct pt_regs *regs);
287 void do_genex(struct pt_regs *regs) in do_genex() argument
292 switch (pt_cause(regs)) { in do_genex()
295 execute_protection_fault(regs); in do_genex()
299 read_protection_fault(regs); in do_genex()
303 write_protection_fault(regs); in do_genex()
306 misaligned_instruction(regs); in do_genex()
309 illegal_instruction(regs); in do_genex()
312 misaligned_instruction(regs); in do_genex()
315 misaligned_data_load(regs); in do_genex()
318 misaligned_data_store(regs); in do_genex()
322 illegal_instruction(regs); in do_genex()
325 precise_bus_error(regs); in do_genex()
328 cache_error(regs); in do_genex()
331 /* Halt and catch fire */ in do_genex()
332 panic("Unrecognized exception 0x%lx\n", pt_cause(regs)); in do_genex()
337 void do_trap0(struct pt_regs *regs);
338 void do_trap0(struct pt_regs *regs) in do_trap0() argument
342 switch (pt_cause(regs)) { in do_trap0()
348 ptrace_report_syscall_entry(regs))) in do_trap0()
349 return; /* return -ENOSYS somewhere? */ in do_trap0()
351 /* Interrupts should be re-enabled for syscall processing */ in do_trap0()
358 * 64-bit arguments are passed in odd/even register pairs. in do_trap0()
360 * than three arguments with more than one 64-bit value. in do_trap0()
364 regs->syscall_nr = regs->r06; in do_trap0()
372 regs->restart_r0 = regs->r00; in do_trap0()
374 if ((unsigned long) regs->syscall_nr >= __NR_syscalls) { in do_trap0()
375 regs->r00 = -1; in do_trap0()
378 (sys_call_table[regs->syscall_nr]); in do_trap0()
379 regs->r00 = syscall(regs->r00, regs->r01, in do_trap0()
380 regs->r02, regs->r03, in do_trap0()
381 regs->r04, regs->r05); in do_trap0()
386 ptrace_report_syscall_exit(regs, 0); in do_trap0()
391 if (user_mode(regs)) { in do_trap0()
393 * Some architecures add some per-thread state in do_trap0()
400 (void __user *) pt_elr(regs)); in do_trap0()
403 kgdb_handle_exception(pt_cause(regs), SIGTRAP, in do_trap0()
404 TRAP_BRKPT, regs); in do_trap0()
415 void do_machcheck(struct pt_regs *regs);
416 void do_machcheck(struct pt_regs *regs) in do_machcheck() argument
418 /* Halt and catch fire */ in do_machcheck()
426 void do_debug_exception(struct pt_regs *regs);
427 void do_debug_exception(struct pt_regs *regs) in do_debug_exception() argument
429 regs->hvmer.vmest &= ~HVM_VMEST_CAUSE_MSK; in do_debug_exception()
430 regs->hvmer.vmest |= (TRAP_DEBUG << HVM_VMEST_CAUSE_SFT); in do_debug_exception()
431 do_trap0(regs); in do_debug_exception()