iPXE
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
15FILE_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
48typedef 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
58typedef 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 */
66{
74 uint64_t fpscr; /* XXX Is this necessary */
76 uint64_t hid4; /* debug only */
77 uint64_t dar; /* debug only */
78 uint32_t dsisr; /* debug only */
80 uint32_t __pad; /* good spot for another 32bit reg */
82};
84
85typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */ /* XXX timebase */
86
87/* ONLY used to communicate with dom0! See also struct exec_domain. */
89 vcpu_guest_core_regs_t user_regs; /* User-level CPU registers */
90 uint64_t sdr1; /* Pagetable base */
91 /* XXX etc */
92};
95
96struct arch_shared_info {
98};
99
100struct arch_vcpu_info {
101};
102
105
107
108#endif /* !__ASSEMBLY__ */
109
110#endif /* __XEN_PUBLIC_ARCH_PPC_H__ */
struct xen_pmu_arch xen_pmu_arch_t
struct vcpu_guest_core_regs vcpu_guest_core_regs_t
Definition arch-ppc.h:83
struct vcpu_guest_context vcpu_guest_context_t
Definition arch-ppc.h:93
uint64_t tsc_timestamp_t
Definition arch-ppc.h:85
#define DEFINE_XEN_GUEST_HANDLE(name)
Definition arch-ppc.h:32
unsigned int uint32_t
Definition stdint.h:12
unsigned long long uint64_t
Definition stdint.h:13
unsigned char uint8_t
Definition stdint.h:10
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
unsigned long xen_ulong_t
Definition nonxen.h:30
unsigned long xen_pfn_t
Definition nonxen.h:28
uint64_t boot_timebase
Definition arch-ppc.h:97
vcpu_guest_core_regs_t user_regs
Definition arch-ppc.h:89
uint32_t entry_vector
Definition arch-ppc.h:81
uint64_t gprs[32]
Definition arch-ppc.h:67
uint8_t dummy
Definition arch-arm.h:550