1/* 2 * Copyright 2017, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the BSD 2-Clause license. Note that NO WARRANTY is provided. 8 * See "LICENSE_BSD2.txt" for details. 9 * 10 * @TAG(DATA61_BSD) 11 */ 12 13#include <sel4/sel4.h> 14#include <sel4debug/unknown_syscall.h> 15 16void debug_unknown_syscall_message(int (*printfn)(const char *format, ...), 17 seL4_Word* mrs) 18{ 19 /* See section 5.2.2 of the manual. */ 20 for (unsigned int i = 0; i < 8; i++) { 21 printfn(" R%u = %p\n", i, (void*)mrs[i]); 22 } 23 printfn(" PC = %p\n" 24 " SP = %p\n" 25 " LR = %p\n" 26 " CPSR = %p\n" 27 " syscall = %p\n", 28 (void*)mrs[8], (void*)mrs[9], (void*)mrs[10], (void*)mrs[11], 29 (void*)mrs[12]); 30} 31