iPXE
include
xen
arch-ppc.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
/*
3
* Copyright (C) IBM Corp. 2005, 2006
4
* Copyright (C) Raptor Engineering, LLC 2023
5
*
6
* Authors: Hollis Blanchard <hollisb@us.ibm.com>
7
* Timothy Pearson <tpearson@raptorengineering.com>
8
* Shawn Anastasio <sanastasio@raptorengineering.com>
9
*/
10
11
#ifndef __XEN_PUBLIC_ARCH_PPC_H__
12
#define __XEN_PUBLIC_ARCH_PPC_H__
13
14
FILE_LICENCE
( MIT );
15
FILE_SECBOOT
( PERMITTED );
16
17
#if defined(__XEN__) || defined(__XEN_TOOLS__)
18
#define int64_aligned_t int64_t __attribute__((__aligned__(8)))
19
#define uint64_aligned_t uint64_t __attribute__((__aligned__(8)))
20
#endif
21
22
#ifndef __ASSEMBLY__
23
#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
24
typedef union { type *p; unsigned long q; } \
25
__guest_handle_ ## name; \
26
typedef union { type *p; uint64_aligned_t q; } \
27
__guest_handle_64_ ## name
28
29
#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
30
___DEFINE_XEN_GUEST_HANDLE(name, type); \
31
___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
32
#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
33
#define __XEN_GUEST_HANDLE(name) __guest_handle_64_ ## name
34
#define XEN_GUEST_HANDLE(name) __XEN_GUEST_HANDLE(name)
35
#define XEN_GUEST_HANDLE_PARAM(name) __guest_handle_ ## name
36
#define set_xen_guest_handle_raw(hnd, val) \
37
do { \
38
__typeof__(&(hnd)) sxghr_tmp_ = &(hnd); \
39
sxghr_tmp_->q = 0; \
40
sxghr_tmp_->p = (val); \
41
} while ( 0 )
42
#define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
43
44
#ifdef __XEN_TOOLS__
45
#define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0)
46
#endif
47
48
typedef
uint64_t
xen_pfn_t
;
49
#define PRI_xen_pfn PRIx64
50
#define PRIu_xen_pfn PRIu64
51
52
/*
53
* Maximum number of virtual CPUs in legacy multi-processor guests.
54
* Only one. All other VCPUS must use VCPUOP_register_vcpu_info.
55
*/
56
#define XEN_LEGACY_MAX_VCPUS 1
57
58
typedef
uint64_t
xen_ulong_t
;
59
#define PRI_xen_ulong PRIx64
60
61
/*
62
* User-accessible registers: most of these need to be saved/restored
63
* for every nested Xen invocation.
64
*/
65
struct
vcpu_guest_core_regs
66
{
67
uint64_t
gprs
[32];
68
uint64_t
lr
;
69
uint64_t
ctr
;
70
uint64_t
srr0
;
71
uint64_t
srr1
;
72
uint64_t
pc
;
73
uint64_t
msr
;
74
uint64_t
fpscr
;
/* XXX Is this necessary */
75
uint64_t
xer
;
76
uint64_t
hid4
;
/* debug only */
77
uint64_t
dar
;
/* debug only */
78
uint32_t
dsisr
;
/* debug only */
79
uint32_t
cr
;
80
uint32_t
__pad
;
/* good spot for another 32bit reg */
81
uint32_t
entry_vector
;
82
};
83
typedef
struct
vcpu_guest_core_regs
vcpu_guest_core_regs_t
;
84
85
typedef
uint64_t
tsc_timestamp_t
;
/* RDTSC timestamp */
/* XXX timebase */
86
87
/* ONLY used to communicate with dom0! See also struct exec_domain. */
88
struct
vcpu_guest_context
{
89
vcpu_guest_core_regs_t
user_regs
;
/* User-level CPU registers */
90
uint64_t
sdr1
;
/* Pagetable base */
91
/* XXX etc */
92
};
93
typedef
struct
vcpu_guest_context
vcpu_guest_context_t
;
94
DEFINE_XEN_GUEST_HANDLE
(
vcpu_guest_context_t
);
95
96
struct
arch_shared_info
{
97
uint64_t
boot_timebase
;
98
};
99
100
struct
arch_vcpu_info
{
101
};
102
103
struct
xen_arch_domainconfig
{
104
};
105
106
typedef
struct
xen_pmu_arch
{
uint8_t
dummy
; }
xen_pmu_arch_t
;
107
108
#endif
/* !__ASSEMBLY__ */
109
110
#endif
/* __XEN_PUBLIC_ARCH_PPC_H__ */
vcpu_guest_core_regs::__pad
uint32_t __pad
Definition:
arch-ppc.h:80
vcpu_guest_core_regs::dar
uint64_t dar
Definition:
arch-ppc.h:77
DEFINE_XEN_GUEST_HANDLE
#define DEFINE_XEN_GUEST_HANDLE(name)
Definition:
arch-ppc.h:32
vcpu_guest_core_regs::hid4
uint64_t hid4
Definition:
arch-ppc.h:76
uint64_t
unsigned long long uint64_t
Definition:
stdint.h:13
vcpu_guest_core_regs::gprs
uint64_t gprs[32]
Definition:
arch-ppc.h:67
vcpu_guest_context
Definition:
arch-ppc.h:88
xen_ulong_t
uint64_t xen_ulong_t
Definition:
arch-ppc.h:58
xen_pmu_arch_t
struct xen_pmu_arch xen_pmu_arch_t
vcpu_guest_core_regs::srr0
uint64_t srr0
Definition:
arch-ppc.h:70
arch_shared_info
Definition:
nonxen.h:34
vcpu_guest_core_regs::cr
uint32_t cr
Definition:
arch-ppc.h:79
vcpu_guest_core_regs::msr
uint64_t msr
Definition:
arch-ppc.h:73
vcpu_guest_context::user_regs
vcpu_guest_core_regs_t user_regs
Definition:
arch-ppc.h:89
xen_pmu_arch
Definition:
arch-arm.h:550
xen_pmu_arch::dummy
uint8_t dummy
Definition:
arch-arm.h:550
vcpu_guest_core_regs::pc
uint64_t pc
Definition:
arch-ppc.h:72
xen_pfn_t
uint64_t xen_pfn_t
Definition:
arch-ppc.h:48
uint8_t
unsigned char uint8_t
Definition:
stdint.h:10
uint32_t
unsigned int uint32_t
Definition:
stdint.h:12
vcpu_guest_core_regs::xer
uint64_t xer
Definition:
arch-ppc.h:75
vcpu_guest_core_regs
Definition:
arch-ppc.h:65
vcpu_guest_core_regs::lr
uint64_t lr
Definition:
arch-ppc.h:68
vcpu_guest_core_regs::srr1
uint64_t srr1
Definition:
arch-ppc.h:71
arch_vcpu_info
Definition:
nonxen.h:32
arch_shared_info::boot_timebase
uint64_t boot_timebase
Definition:
arch-ppc.h:97
vcpu_guest_core_regs::entry_vector
uint32_t entry_vector
Definition:
arch-ppc.h:81
tsc_timestamp_t
uint64_t tsc_timestamp_t
Definition:
arch-ppc.h:85
vcpu_guest_context::sdr1
uint64_t sdr1
Definition:
arch-ppc.h:90
FILE_SECBOOT
FILE_SECBOOT(PERMITTED)
vcpu_guest_core_regs::fpscr
uint64_t fpscr
Definition:
arch-ppc.h:74
vcpu_guest_core_regs::dsisr
uint32_t dsisr
Definition:
arch-ppc.h:78
FILE_LICENCE
FILE_LICENCE(MIT)
vcpu_guest_core_regs::ctr
uint64_t ctr
Definition:
arch-ppc.h:69
xen_arch_domainconfig
Definition:
arch-ppc.h:103
Generated by
1.8.15