L4Re Operating System Framework
Interface and Usage Documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
__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 * License: see LICENSE.spdx (in this directory or the directories above)
7 */
12#pragma once
13
14#include <l4/sys/types.h>
15#include <l4/sys/__vcpu-arm.h>
16
17enum
18{
26
27 L4_VCPU_STATE_SIZE = 0x100,
28 L4_VCPU_STATE_EXT_SIZE = 0x400,
29};
30
40
41L4_INLINE l4_arm_vcpu_e_info_t const *
42l4_vcpu_e_info(void const *vcpu) L4_NOTHROW
43{
44 return (l4_arm_vcpu_e_info_t const *)((l4_addr_t)vcpu
46}
47
48L4_INLINE void *l4_vcpu_e_ptr(void const *vcpu, unsigned id) L4_NOTHROW
49{ return (void *)((l4_addr_t)vcpu + L4_VCPU_OFFSET_EXT_STATE + (id & 0xfff)); }
50
70
75{
76 l4_umword_t host_tpidruro;
78
83typedef struct l4_vcpu_ipc_regs_t
84{
85 l4_msgtag_t tag;
86 l4_umword_t _d1[3];
87 l4_umword_t label;
88 l4_umword_t _d2[8];
90
100{
101 L4_VCPU_E_HCR = 0x8008,
102 L4_VCPU_E_TTBR0 = 0x8010,
103 L4_VCPU_E_TTBR1 = 0x8018,
104 L4_VCPU_E_TTBCR = 0x0020,
105 L4_VCPU_E_SCTLR = 0x0024,
106 L4_VCPU_E_DACR = 0x0028,
107 L4_VCPU_E_FCSEIDR = 0x002c,
108
109 L4_VCPU_E_CNTVCTL = 0x0030,
110 L4_VCPU_E_CNTVOFF = 0x8038,
111
112 L4_VCPU_E_VMPIDR = 0x0040,
113 L4_VCPU_E_VPIDR = 0x0044,
114
116
117 L4_VCPU_E_GIC_HCR = 0x0050,
118 L4_VCPU_E_GIC_VTR = 0x0054,
119 L4_VCPU_E_GIC_VMCR = 0x0058,
120 L4_VCPU_E_GIC_MISR = 0x005c,
121 L4_VCPU_E_GIC_EISR = 0x0060,
122 L4_VCPU_E_GIC_ELSR = 0x0064,
123 L4_VCPU_E_GIC_V2_LR0 = 0x0068,
124 L4_VCPU_E_GIC_V3_LR0 = 0x8068,
125};
@ L4_VCPU_STATE_VERSION
Architecture-specific version ID.
Definition __vcpu-arch.h:24
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.
@ L4_VCPU_E_VTMR_CFG
vtimer irq configuration
unsigned long l4_umword_t
Unsigned machine word.
Definition l4int.h:40
unsigned long l4_addr_t
Address type.
Definition l4int.h:34
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:36
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:37
@ L4_VCPU_OFFSET_EXT_STATE
Offset where extended state begins.
Definition __vcpu-arch.h:36
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
Definition compiler.h:159
#define L4_INLINE
L4 Inline function attribute.
Definition compiler.h:51
Common L4 ABI Data Types.
Message tag data structure.
Definition types.h:153
Architecture-specific vCPU state.
Definition __vcpu-arch.h:75
vCPU message registers.
Definition __vcpu-arch.h:84
vCPU registers.
Definition __vcpu-arch.h:56
l4_umword_t sp
stack pointer
Definition __vcpu-arch.h:62
l4_umword_t err
error code
Definition __vcpu-arch.h:58
l4_umword_t pfa
page fault address
Definition __vcpu-arch.h:57
l4_umword_t tpidruro
Thread-ID register.
Definition __vcpu-arch.h:67
l4_umword_t flags
eflags
Definition __vcpu-arch.h:66
l4_umword_t tpidrurw
Thread-ID register.
Definition __vcpu-arch.h:68
l4_umword_t ip
instruction pointer
Definition __vcpu-arch.h:65