* abort_align() handles the following data abort: * * FAULT_ALIGN - Alignment fault * * Everything should be aligned in kernel with exception of user to kernel * and vice versa data copying, so if pcb_onfault is not set, it's fatal. * We generate signal in case of abort from user mode. */
| 632 | * We generate signal in case of abort from user mode. |
| 633 | */ |
| 634 | static int |
| 635 | abort_align(struct trapframe *tf, u_int idx, u_int fsr, u_int far, |
| 636 | u_int prefetch, struct thread *td, struct ksig *ksig) |
| 637 | { |
| 638 | bool usermode; |
| 639 | |
| 640 | usermode = TRAPF_USERMODE(tf); |
| 641 | if (!usermode) { |
| 642 | if (td->td_intr_nesting_level == 0 && td != NULL && |
| 643 | td->td_pcb->pcb_onfault != NULL) { |
| 644 | tf->tf_r0 = EFAULT; |
| 645 | tf->tf_pc = (int)td->td_pcb->pcb_onfault; |
| 646 | return (0); |
| 647 | } |
| 648 | abort_fatal(tf, idx, fsr, far, prefetch, td, ksig); |
| 649 | } |
| 650 | /* Deliver a bus error signal to the process */ |
| 651 | ksig->code = BUS_ADRALN; |
| 652 | ksig->sig = SIGBUS; |
| 653 | ksig->addr = far; |
| 654 | return (1); |
| 655 | } |
| 656 | |
| 657 | /* |
| 658 | * abort_icache() handles the following data abort: |
nothing calls this directly
no test coverage detected