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 13import "camkes-hardware.idl4"; 14 15connector seL4GDB { 16 from Procedure; 17 to Procedure; 18} 19connector seL4GDBMem { 20 from Procedure; 21 to Procedure; 22} 23 24 25procedure GDB_delegate { 26 include <camkes/gdb/delegate_types.h>; 27 int read_memory(in seL4_Word addr, in seL4_Word length, out delegate_mem_range_t data); 28 int write_memory(in seL4_Word addr, in seL4_Word length, in delegate_mem_range_t data); 29 void read_registers(in seL4_Word tcb_cap, out seL4_UserContext registers); 30 void read_register(in seL4_Word tcb_cap, out seL4_Word reg, in seL4_Word reg_num); 31 int write_registers(in seL4_Word tcb_cap, in seL4_UserContext registers, in int len); 32 int write_register(in seL4_Word tcb_cap, in seL4_Word data, in seL4_Word reg_num); 33 int insert_break(in seL4_Word tcb_cap, in seL4_Word type, in seL4_Word addr, in seL4_Word size, in seL4_Word rw); 34 int remove_break(in seL4_Word tcb_cap, in seL4_Word type, in seL4_Word addr, in seL4_Word size, in seL4_Word rw); 35 int resume(in seL4_Word tcb_cap); 36 int step(in seL4_Word tcb_cap); 37}; 38 39procedure CAmkES_Debug { 40 void debug(inout int num); 41} 42 43component debug_server { 44 provides CAmkES_Debug client_fault; 45 uses IOPort serial_port; 46 uses GDB_delegate delegate; 47 consumes IRQ3 serial_irq; 48 has binary_semaphore b; 49 has mutex serial; 50 51} 52component debug_serial { 53 hardware; 54 provides IOPort serial; 55 emits IRQ3 serial_irq; 56} 57