29#ifndef __XEN_PUBLIC_ARCH_ARM_H__
30#define __XEN_PUBLIC_ARCH_ARM_H__
170#define XEN_HYPERCALL_TAG 0XEA1
172#define int64_aligned_t int64_t __aligned(8)
173#define uint64_aligned_t uint64_t __aligned(8)
176#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
177 typedef union { type *p; unsigned long q; } \
178 __guest_handle_ ## name; \
179 typedef union { type *p; uint64_aligned_t q; } \
180 __guest_handle_64_ ## name
189#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
190 ___DEFINE_XEN_GUEST_HANDLE(name, type); \
191 ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
192#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
193#define __XEN_GUEST_HANDLE(name) __guest_handle_64_ ## name
194#define XEN_GUEST_HANDLE(name) __XEN_GUEST_HANDLE(name)
195#define XEN_GUEST_HANDLE_PARAM(name) __guest_handle_ ## name
196#define set_xen_guest_handle_raw(hnd, val) \
198 __typeof__(&(hnd)) _sxghr_tmp = &(hnd); \
200 _sxghr_tmp->p = val; \
202#define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
205#define PRI_xen_pfn PRIx64
206#define PRIu_xen_pfn PRIu64
212#define XEN_LEGACY_MAX_VCPUS 1
215#define PRI_xen_ulong PRIx64
217#ifdef CONFIG_XEN_DOM0
218#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
220# define __DECL_REG(n64, n32) union { \
226#define __DECL_REG(n64, n32) uint64_t n64
229struct vcpu_guest_core_regs {
231 __DECL_REG(x0, r0_usr);
232 __DECL_REG(x1, r1_usr);
233 __DECL_REG(x2, r2_usr);
234 __DECL_REG(x3, r3_usr);
235 __DECL_REG(x4, r4_usr);
236 __DECL_REG(x5, r5_usr);
237 __DECL_REG(x6, r6_usr);
238 __DECL_REG(x7, r7_usr);
239 __DECL_REG(x8, r8_usr);
240 __DECL_REG(x9, r9_usr);
241 __DECL_REG(x10, r10_usr);
242 __DECL_REG(x11, r11_usr);
243 __DECL_REG(x12, r12_usr);
245 __DECL_REG(x13, sp_usr);
246 __DECL_REG(x14, lr_usr);
248 __DECL_REG(x15, __unused_sp_hyp);
250 __DECL_REG(x16, lr_irq);
251 __DECL_REG(x17, sp_irq);
253 __DECL_REG(x18, lr_svc);
254 __DECL_REG(x19, sp_svc);
256 __DECL_REG(x20, lr_abt);
257 __DECL_REG(x21, sp_abt);
259 __DECL_REG(x22, lr_und);
260 __DECL_REG(x23, sp_und);
262 __DECL_REG(x24, r8_fiq);
263 __DECL_REG(x25, r9_fiq);
264 __DECL_REG(x26, r10_fiq);
265 __DECL_REG(x27, r11_fiq);
266 __DECL_REG(x28, r12_fiq);
268 __DECL_REG(x29, sp_fiq);
269 __DECL_REG(x30, lr_fiq);
272 __DECL_REG(pc64, pc32);
281 uint32_t spsr_fiq, spsr_irq, spsr_und, spsr_abt;
287typedef struct vcpu_guest_core_regs vcpu_guest_core_regs_t;
292struct vcpu_guest_context {
293#define _VGCF_online 0
294#define VGCF_online (1 << _VGCF_online)
297 struct vcpu_guest_core_regs user_regs;
302typedef struct vcpu_guest_context vcpu_guest_context_t;
309#define XEN_DOMCTL_CONFIG_GIC_NATIVE 0
310#define XEN_DOMCTL_CONFIG_GIC_V2 1
311#define XEN_DOMCTL_CONFIG_GIC_V3 2
313#define XEN_DOMCTL_CONFIG_TEE_NONE 0
314#define XEN_DOMCTL_CONFIG_TEE_OPTEE 1
316struct xen_arch_domainconfig {
351#ifdef CONFIG_XEN_DOM0
354#define PSR_THUMB (1 << 5)
355#define PSR_FIQ_MASK (1 << 6)
356#define PSR_IRQ_MASK (1 << 7)
357#define PSR_ABT_MASK (1 << 8)
358#define PSR_BIG_ENDIAN (1 << 9)
359#define PSR_DBG_MASK (1 << 9)
360#define PSR_IT_MASK (0x0600fc00)
361#define PSR_JAZELLE (1<<24)
364#define PSR_MODE_USR 0x10
365#define PSR_MODE_FIQ 0x11
366#define PSR_MODE_IRQ 0x12
367#define PSR_MODE_SVC 0x13
368#define PSR_MODE_MON 0x16
369#define PSR_MODE_ABT 0x17
370#define PSR_MODE_HYP 0x1a
371#define PSR_MODE_UND 0x1b
372#define PSR_MODE_SYS 0x1f
375#define PSR_MODE_BIT 0x10
376#define PSR_MODE_EL3h 0x0d
377#define PSR_MODE_EL3t 0x0c
378#define PSR_MODE_EL2h 0x09
379#define PSR_MODE_EL2t 0x08
380#define PSR_MODE_EL1h 0x05
381#define PSR_MODE_EL1t 0x04
382#define PSR_MODE_EL0t 0x00
384#define PSR_GUEST32_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_SVC)
385#define PSR_GUEST64_INIT (PSR_ABT_MASK|PSR_FIQ_MASK|PSR_IRQ_MASK|PSR_MODE_EL1h)
387#define SCTLR_GUEST_INIT xen_mk_ullong(0x00c50078)
405#define GUEST_GICD_BASE xen_mk_ullong(0x03001000)
406#define GUEST_GICD_SIZE xen_mk_ullong(0x00001000)
407#define GUEST_GICC_BASE xen_mk_ullong(0x03002000)
408#define GUEST_GICC_SIZE xen_mk_ullong(0x00002000)
411#define GUEST_GICV3_GICD_BASE xen_mk_ullong(0x03001000)
412#define GUEST_GICV3_GICD_SIZE xen_mk_ullong(0x00010000)
414#define GUEST_GICV3_RDIST_REGIONS 1
416#define GUEST_GICV3_GICR0_BASE xen_mk_ullong(0x03020000)
417#define GUEST_GICV3_GICR0_SIZE xen_mk_ullong(0x01000000)
420#define GUEST_ACPI_BASE xen_mk_ullong(0x20000000)
421#define GUEST_ACPI_SIZE xen_mk_ullong(0x02000000)
424#define GUEST_PL011_BASE xen_mk_ullong(0x22000000)
425#define GUEST_PL011_SIZE xen_mk_ullong(0x00001000)
431#define GUEST_GNTTAB_BASE xen_mk_ullong(0x38000000)
432#define GUEST_GNTTAB_SIZE xen_mk_ullong(0x01000000)
434#define GUEST_MAGIC_BASE xen_mk_ullong(0x39000000)
435#define GUEST_MAGIC_SIZE xen_mk_ullong(0x01000000)
437#define GUEST_RAM_BANKS 2
439#define GUEST_RAM0_BASE xen_mk_ullong(0x40000000)
440#define GUEST_RAM0_SIZE xen_mk_ullong(0xc0000000)
442#define GUEST_RAM1_BASE xen_mk_ullong(0x0200000000)
443#define GUEST_RAM1_SIZE xen_mk_ullong(0xfe00000000)
445#define GUEST_RAM_BASE GUEST_RAM0_BASE
447#define GUEST_RAM_MAX (GUEST_RAM0_SIZE + GUEST_RAM1_SIZE)
449#define GUEST_RAM_BANK_BASES { GUEST_RAM0_BASE, GUEST_RAM1_BASE }
450#define GUEST_RAM_BANK_SIZES { GUEST_RAM0_SIZE, GUEST_RAM1_SIZE }
453#define GUEST_MAX_VCPUS 128
456#define GUEST_TIMER_VIRT_PPI 27
457#define GUEST_TIMER_PHYS_S_PPI 29
458#define GUEST_TIMER_PHYS_NS_PPI 30
459#define GUEST_EVTCHN_PPI 31
461#define GUEST_VPL011_SPI 32
464#define PSCI_cpu_suspend 0
465#define PSCI_cpu_off 1
467#define PSCI_migrate 3
uint64_t xen_pfn_t
Definition: arch-arm.h:204
uint64_t xen_callback_t
Definition: arch-arm.h:347
struct xen_pmu_arch xen_pmu_arch_t
uint64_t xen_ulong_t
Definition: arch-arm.h:214
#define DEFINE_XEN_GUEST_HANDLE(name)
Definition: arch-arm.h:192
flags
Definition: parser.h:96
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Definition: arch-arm.h:344
Definition: arch-arm.h:340
Definition: arch-arm.h:473
uint8_t dummy
Definition: arch-arm.h:473