3 * \brief Debug system calls for all x86 architectures, user-side
7 * Copyright (c) 2007, 2008, 2009, 2010, ETH Zurich.
10 * This file is distributed under the terms in the attached LICENSE file.
11 * If you do not find this file, copies can be found by writing to:
12 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
15 #include <barrelfish/barrelfish.h>
16 #include <barrelfish/dispatch.h>
17 #include <barrelfish/syscall_arch.h>
18 #include <barrelfish_kpi/sys_debug.h>
19 #include <barrelfish/sys_debug.h>
23 errval_t sys_debug_get_tsc_per_ms(uint64_t *ret)
25 struct sysret sr = syscall2(SYSCALL_DEBUG, DEBUG_GET_TSC_PER_MS);
30 errval_t sys_debug_create_irq_src_cap(struct capref cap, uint16_t gsi)
32 uint8_t dcn_vbits = get_cnode_valid_bits(cap);
33 capaddr_t dcn_addr = get_cnode_addr(cap);
35 struct sysret sr = syscall6(SYSCALL_DEBUG, DEBUG_CREATE_IRQ_SRC_CAP, dcn_vbits, dcn_addr,
40 errval_t sys_debug_get_apic_id(uint8_t *ret)
42 struct sysret sr = syscall2(SYSCALL_DEBUG, DEBUG_GET_APIC_ID);
47 errval_t sys_debug_get_apic_timer(uint32_t *ret)
49 struct sysret sr = syscall2(SYSCALL_DEBUG, DEBUG_GET_APIC_TIMER);
54 errval_t sys_debug_get_apic_ticks_per_sec(uint32_t *ret)
56 struct sysret sr = syscall2(SYSCALL_DEBUG, DEBUG_GET_APIC_TICKS_PER_SEC);