L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
__vcpu-arch.h
Go to the documentation of this file.
1/*
2 * (c) 2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3 * Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
5 *
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
9 *
10 * As a special exception, you may use this file as part of a free software
11 * library without restriction. Specifically, if other files instantiate
12 * templates or use macros or inline functions from this file, or you compile
13 * this file and link it with other files to produce an executable, this
14 * file does not by itself cause the resulting executable to be covered by
15 * the GNU General Public License. This exception does not however
16 * invalidate any other reasons why the executable file might be covered by
17 * the GNU General Public License.
18 */
23#pragma once
24
25#include <l4/sys/types.h>
26#include <l4/sys/__vcpu-arm.h>
27
28enum
29{
37
38 L4_VCPU_STATE_SIZE = 0x100,
39 L4_VCPU_STATE_EXT_SIZE = 0x400,
40};
41
51
52L4_INLINE l4_arm_vcpu_e_info_t const *
53l4_vcpu_e_info(void const *vcpu) L4_NOTHROW
54{
55 return (l4_arm_vcpu_e_info_t const *)((l4_addr_t)vcpu
57}
58
59L4_INLINE void *l4_vcpu_e_ptr(void const *vcpu, unsigned id) L4_NOTHROW
60{ return (void *)((l4_addr_t)vcpu + L4_VCPU_OFFSET_EXT_STATE + (id & 0xfff)); }
61
81
86{
87 l4_umword_t host_tpidruro;
89
94typedef struct l4_vcpu_ipc_regs_t
95{
96 l4_msgtag_t tag;
97 l4_umword_t _d1[3];
98 l4_umword_t label;
99 l4_umword_t _d2[8];
101
111{
112 L4_VCPU_E_HCR = 0x8008,
113 L4_VCPU_E_TTBR0 = 0x8010,
114 L4_VCPU_E_TTBR1 = 0x8018,
115 L4_VCPU_E_TTBCR = 0x0020,
116 L4_VCPU_E_SCTLR = 0x0024,
117 L4_VCPU_E_DACR = 0x0028,
118 L4_VCPU_E_FCSEIDR = 0x002c,
119
120 L4_VCPU_E_CNTVCTL = 0x0030,
121 L4_VCPU_E_CNTVOFF = 0x8038,
122
123 L4_VCPU_E_VMPIDR = 0x0040,
124 L4_VCPU_E_VPIDR = 0x0044,
125
126 L4_VCPU_E_GIC_HCR = 0x0050,
127 L4_VCPU_E_GIC_VTR = 0x0054,
128 L4_VCPU_E_GIC_VMCR = 0x0058,
129 L4_VCPU_E_GIC_MISR = 0x005c,
130 L4_VCPU_E_GIC_EISR = 0x0060,
131 L4_VCPU_E_GIC_ELSR = 0x0064,
132 L4_VCPU_E_GIC_V2_LR0 = 0x0068,
133 L4_VCPU_E_GIC_V3_LR0 = 0x8068,
134};
@ L4_VCPU_STATE_VERSION
Architecture-specific version ID.
Definition __vcpu-arch.h:35
struct l4_vcpu_arch_state_t l4_vcpu_arch_state_t
Architecture-specific vCPU state.
L4_vcpu_e_field_ids
IDs for extended vCPU state fields.
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:51
unsigned long l4_addr_t
Address type.
Definition l4int.h:45
struct l4_vcpu_ipc_regs_t l4_vcpu_ipc_regs_t
vCPU message registers.
L4_vcpu_state_offset
Offsets for vCPU state layouts.
Definition __vcpu-arch.h:47
struct l4_vcpu_regs_t l4_vcpu_regs_t
vCPU registers.
@ L4_VCPU_OFFSET_EXT_INFOS
Offset where extended infos begin.
Definition __vcpu-arch.h:48
@ L4_VCPU_OFFSET_EXT_STATE
Offset where extended state begins.
Definition __vcpu-arch.h:47
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:188
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:62
Common L4 ABI Data Types.
Message tag data structure.
Definition types.h:164
Architecture-specific vCPU state.
Definition __vcpu-arch.h:86
vCPU message registers.
Definition __vcpu-arch.h:95
vCPU registers.
Definition __vcpu-arch.h:67
l4_umword_t sp
stack pointer
Definition __vcpu-arch.h:73
l4_umword_t err
error code
Definition __vcpu-arch.h:69
l4_umword_t pfa
page fault address
Definition __vcpu-arch.h:68
l4_umword_t tpidruro
Thread-ID register.
Definition __vcpu-arch.h:78
l4_umword_t flags
eflags
Definition __vcpu-arch.h:77
l4_umword_t tpidrurw
Thread-ID register.
Definition __vcpu-arch.h:79
l4_umword_t ip
instruction pointer
Definition __vcpu-arch.h:76