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 * 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/utcb.h>
16#include <l4/sys/__vcpu-arm.h>
17
18enum
19{
27
28 L4_VCPU_STATE_SIZE = 0x200,
29 L4_VCPU_STATE_EXT_SIZE = 0x800,
30};
31
41
42L4_INLINE l4_arm_vcpu_e_info_t const *
43l4_vcpu_e_info(void const *vcpu) L4_NOTHROW
44{
45 return (l4_arm_vcpu_e_info_t const *)((l4_addr_t)vcpu
47}
48
49L4_INLINE void *l4_vcpu_e_ptr(void const *vcpu, unsigned id) L4_NOTHROW
50{ return (void *)((l4_addr_t)vcpu + L4_VCPU_OFFSET_EXT_STATE + (id & 0xfff)); }
51
57
61typedef struct l4_vcpu_arch_state_t
62{
63 l4_umword_t host_tpidruro;
65
70typedef struct l4_vcpu_ipc_regs_t
71{
72 l4_msgtag_t tag;
73 l4_umword_t label;
74 l4_umword_t _d1[3];
76
86{
87 L4_VCPU_E_HCR = 0x8008,
88 L4_VCPU_E_SCTLR = 0x0010,
89 L4_VCPU_E_CPACR = 0x0014,
90
91 L4_VCPU_E_CNTVCTL = 0x0018,
92 L4_VCPU_E_CNTVOFF = 0x8020,
93
94 L4_VCPU_E_VMPIDR = 0x8028,
95 L4_VCPU_E_VPIDR = 0x0030,
96
98 L4_VCPU_E_VTCR = 0x8038,
99
100 L4_VCPU_E_GIC_HCR = 0x0040,
101 L4_VCPU_E_GIC_VTR = 0x0044,
102 L4_VCPU_E_GIC_VMCR = 0x0048,
103 L4_VCPU_E_GIC_MISR = 0x004c,
104 L4_VCPU_E_GIC_EISR = 0x0050,
105 L4_VCPU_E_GIC_ELSR = 0x0054,
106 L4_VCPU_E_GIC_V2_LR0 = 0x0058,
107 L4_VCPU_E_GIC_V3_LR0 = 0x8058,
108};
@ 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.
UTCB structure for exceptions.
Definition utcb.h:28
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