1 /* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License 2. See the file "COPYING-GPL-2" in the main directory of this 4 * archive for more details. 5 * 6 * Copyright (C) 2013 Imagination Technologies Ltd. 7 * Author: Yann Le Du <ledu@kymasys.com> 8 */ 9 10 #pragma once 11 12 #include <l4/sys/types.h> 13 #include <l4/sys/utcb.h> 14 15 enum 16 { 17 /** 18 * Architecture specific version ID. 19 * 20 * This ID must match the version field in the l4_vcpu_state_t structure 21 * after enabling vCPU mode or extended vCPU mode for a thread. 22 */ 23 L4_VCPU_STATE_VERSION = 0x12 24 }; 25 26 /** 27 * \brief vCPU registers. 28 * \ingroup l4_vcpu_api 29 * 30 * l4_exc_regs_t matches l4_vcpu_regs_t and corresponds to 31 * fiasco/src/kern/mips32/trap_state.cpp: Trap_state_regs and 32 * entry_frame-mips32.cpp: Syscall_frame and Return_frame 33 */ 34 typedef l4_exc_regs_t l4_vcpu_regs_t; 35 36 typedef struct l4_vcpu_arch_state_t 37 { 38 l4_umword_t ulr; 39 } l4_vcpu_arch_state_t; 40 41 /** 42 * \brief vCPU message registers. 43 * \ingroup l4_vcpu_api 44 * 45 * l4_vcpu_ipc_regs_t register usage matches the implementation of l4_ipc() in 46 * l4sys/include/ARCH-mips/L4API-l4f/ipc.h 47 */ 48 typedef struct l4_vcpu_ipc_regs_t 49 { 50 void *utcb; /* s0 */ 51 l4_umword_t dest; /* s1 */ 52 l4_umword_t timeout; /* s2 */ 53 l4_msgtag_t tag; /* s3 */ 54 l4_umword_t label; /* s4 */ 55 } l4_vcpu_ipc_regs_t; 56