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()
202 show_regs(regs); in die()
203 do_show_stack(current, ®s->r30, pt_elr(regs), KERN_EMERG); in die()
221 int die_if_kernel(char *str, struct pt_regs *regs, long err) in die_if_kernel() argument
223 if (!user_mode(regs)) in die_if_kernel()
224 return die(str, regs, err); in die_if_kernel()
232 static void misaligned_instruction(struct pt_regs *regs) in misaligned_instruction() argument
234 die_if_kernel("Misaligned Instruction", regs, 0); in misaligned_instruction()
243 static void misaligned_data_load(struct pt_regs *regs) in misaligned_data_load() argument
245 die_if_kernel("Misaligned Data Load", regs, 0); in misaligned_data_load()
249 static void misaligned_data_store(struct pt_regs *regs) in misaligned_data_store() argument
251 die_if_kernel("Misaligned Data Store", regs, 0); in misaligned_data_store()
255 static void illegal_instruction(struct pt_regs *regs) in illegal_instruction() argument
257 die_if_kernel("Illegal Instruction", regs, 0); in illegal_instruction()
265 static void precise_bus_error(struct pt_regs *regs) in precise_bus_error() argument
267 die_if_kernel("Precise Bus Error", regs, 0); in precise_bus_error()
276 static void cache_error(struct pt_regs *regs) in cache_error() argument
278 die("Cache Error", regs, 0); in cache_error()
284 void do_genex(struct pt_regs *regs);
285 void do_genex(struct pt_regs *regs) in do_genex() argument
290 switch (pt_cause(regs)) { in do_genex()
293 execute_protection_fault(regs); in do_genex()
297 read_protection_fault(regs); in do_genex()
301 write_protection_fault(regs); in do_genex()
304 misaligned_instruction(regs); in do_genex()
307 illegal_instruction(regs); in do_genex()
310 misaligned_instruction(regs); in do_genex()
313 misaligned_data_load(regs); in do_genex()
316 misaligned_data_store(regs); in do_genex()
320 illegal_instruction(regs); in do_genex()
323 precise_bus_error(regs); in do_genex()
326 cache_error(regs); in do_genex()
329 /* Halt and catch fire */ in do_genex()
330 panic("Unrecognized exception 0x%lx\n", pt_cause(regs)); in do_genex()
335 void do_trap0(struct pt_regs *regs);
336 void do_trap0(struct pt_regs *regs) in do_trap0() argument
340 switch (pt_cause(regs)) { in do_trap0()
346 ptrace_report_syscall_entry(regs))) in do_trap0()
347 return; /* return -ENOSYS somewhere? */ in do_trap0()
349 /* Interrupts should be re-enabled for syscall processing */ in do_trap0()
356 * 64-bit arguments are passed in odd/even register pairs. in do_trap0()
358 * than three arguments with more than one 64-bit value. in do_trap0()
362 regs->syscall_nr = regs->r06; in do_trap0()
370 regs->restart_r0 = regs->r00; in do_trap0()
372 if ((unsigned long) regs->syscall_nr >= __NR_syscalls) { in do_trap0()
373 regs->r00 = -1; in do_trap0()
376 (sys_call_table[regs->syscall_nr]); in do_trap0()
377 regs->r00 = syscall(regs->r00, regs->r01, in do_trap0()
378 regs->r02, regs->r03, in do_trap0()
379 regs->r04, regs->r05); in do_trap0()
384 ptrace_report_syscall_exit(regs, 0); in do_trap0()
389 if (user_mode(regs)) { in do_trap0()
391 * Some architecures add some per-thread state in do_trap0()
398 (void __user *) pt_elr(regs)); in do_trap0()
401 kgdb_handle_exception(pt_cause(regs), SIGTRAP, in do_trap0()
402 TRAP_BRKPT, regs); in do_trap0()
413 void do_machcheck(struct pt_regs *regs);
414 void do_machcheck(struct pt_regs *regs) in do_machcheck() argument
416 /* Halt and catch fire */ in do_machcheck()
424 void do_debug_exception(struct pt_regs *regs);
425 void do_debug_exception(struct pt_regs *regs) in do_debug_exception() argument
427 regs->hvmer.vmest &= ~HVM_VMEST_CAUSE_MSK; in do_debug_exception()
428 regs->hvmer.vmest |= (TRAP_DEBUG << HVM_VMEST_CAUSE_SFT); in do_debug_exception()
429 do_trap0(regs); in do_debug_exception()