win-pvdrivers

annotate common/include/public/arch-ia64.h @ 62:edd4a2ad5b44

Removed old inf files
author James Harper <james.harper@bendigoit.com.au>
date Wed Dec 19 10:22:50 2007 +1100 (2007-12-19)
parents 5712dede5a1b
children b474e898b409
rev   line source
andy@12 1 /******************************************************************************
andy@12 2 * arch-ia64/hypervisor-if.h
andy@12 3 *
andy@12 4 * Guest OS interface to IA64 Xen.
andy@12 5 *
andy@12 6 * Permission is hereby granted, free of charge, to any person obtaining a copy
andy@12 7 * of this software and associated documentation files (the "Software"), to
andy@12 8 * deal in the Software without restriction, including without limitation the
andy@12 9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
andy@12 10 * sell copies of the Software, and to permit persons to whom the Software is
andy@12 11 * furnished to do so, subject to the following conditions:
andy@12 12 *
andy@12 13 * The above copyright notice and this permission notice shall be included in
andy@12 14 * all copies or substantial portions of the Software.
andy@12 15 *
andy@12 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
andy@12 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
andy@12 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
andy@12 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
andy@12 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
andy@12 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
andy@12 22 * DEALINGS IN THE SOFTWARE.
andy@12 23 *
andy@12 24 */
andy@12 25
andy@12 26 #ifndef __HYPERVISOR_IF_IA64_H__
andy@12 27 #define __HYPERVISOR_IF_IA64_H__
andy@12 28
andy@12 29 /* Structural guest handles introduced in 0x00030201. */
andy@12 30 #if __XEN_INTERFACE_VERSION__ >= 0x00030201
andy@12 31 #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
andy@12 32 typedef struct { type *p; } __guest_handle_ ## name
andy@12 33 #else
andy@12 34 #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
andy@12 35 typedef type * __guest_handle_ ## name
andy@12 36 #endif
andy@12 37
andy@12 38 #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
andy@12 39 #define XEN_GUEST_HANDLE(name) __guest_handle_ ## name
andy@12 40 #define XEN_GUEST_HANDLE_64(name) XEN_GUEST_HANDLE(name)
andy@12 41 #define uint64_aligned_t uint64_t
andy@12 42 #define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0)
andy@12 43 #ifdef __XEN_TOOLS__
andy@12 44 #define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0)
andy@12 45 #endif
andy@12 46
andy@12 47 #ifndef __ASSEMBLY__
andy@12 48 /* Guest handles for primitive C types. */
andy@12 49 __DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
andy@12 50 __DEFINE_XEN_GUEST_HANDLE(uint, unsigned int);
andy@12 51 __DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
andy@12 52 __DEFINE_XEN_GUEST_HANDLE(u64, unsigned long);
andy@12 53 DEFINE_XEN_GUEST_HANDLE(char);
andy@12 54 DEFINE_XEN_GUEST_HANDLE(int);
andy@12 55 DEFINE_XEN_GUEST_HANDLE(long);
andy@12 56 DEFINE_XEN_GUEST_HANDLE(void);
andy@12 57
andy@12 58 typedef unsigned long xen_pfn_t;
andy@12 59 DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
andy@12 60 #define PRI_xen_pfn "lx"
andy@12 61 #endif
andy@12 62
andy@12 63 /* Arch specific VIRQs definition */
andy@12 64 #define VIRQ_ITC VIRQ_ARCH_0 /* V. Virtual itc timer */
andy@12 65 #define VIRQ_MCA_CMC VIRQ_ARCH_1 /* MCA cmc interrupt */
andy@12 66 #define VIRQ_MCA_CPE VIRQ_ARCH_2 /* MCA cpe interrupt */
andy@12 67
andy@12 68 /* Maximum number of virtual CPUs in multi-processor guests. */
andy@12 69 /* WARNING: before changing this, check that shared_info fits on a page */
andy@12 70 #define MAX_VIRT_CPUS 64
andy@12 71
andy@12 72 #ifndef __ASSEMBLY__
andy@12 73
andy@12 74 typedef unsigned long xen_ulong_t;
andy@12 75
andy@12 76 #define INVALID_MFN (~0UL)
andy@12 77
andy@12 78 #define MEM_G (1UL << 30)
andy@12 79 #define MEM_M (1UL << 20)
andy@12 80 #define MEM_K (1UL << 10)
andy@12 81
andy@12 82 #define MMIO_START (3 * MEM_G)
andy@12 83 #define MMIO_SIZE (512 * MEM_M)
andy@12 84
andy@12 85 #define VGA_IO_START 0xA0000UL
andy@12 86 #define VGA_IO_SIZE 0x20000
andy@12 87
andy@12 88 #define LEGACY_IO_START (MMIO_START + MMIO_SIZE)
andy@12 89 #define LEGACY_IO_SIZE (64*MEM_M)
andy@12 90
andy@12 91 #define IO_PAGE_START (LEGACY_IO_START + LEGACY_IO_SIZE)
andy@12 92 #define IO_PAGE_SIZE PAGE_SIZE
andy@12 93
andy@12 94 #define STORE_PAGE_START (IO_PAGE_START + IO_PAGE_SIZE)
andy@12 95 #define STORE_PAGE_SIZE PAGE_SIZE
andy@12 96
andy@12 97 #define BUFFER_IO_PAGE_START (STORE_PAGE_START+STORE_PAGE_SIZE)
andy@12 98 #define BUFFER_IO_PAGE_SIZE PAGE_SIZE
andy@12 99
andy@12 100 #define BUFFER_PIO_PAGE_START (BUFFER_IO_PAGE_START+BUFFER_IO_PAGE_SIZE)
andy@12 101 #define BUFFER_PIO_PAGE_SIZE PAGE_SIZE
andy@12 102
andy@12 103 #define IO_SAPIC_START 0xfec00000UL
andy@12 104 #define IO_SAPIC_SIZE 0x100000
andy@12 105
andy@12 106 #define PIB_START 0xfee00000UL
andy@12 107 #define PIB_SIZE 0x200000
andy@12 108
andy@12 109 #define GFW_START (4*MEM_G -16*MEM_M)
andy@12 110 #define GFW_SIZE (16*MEM_M)
andy@12 111
andy@12 112 /* Nvram belongs to GFW memory space */
andy@12 113 #define NVRAM_SIZE (MEM_K * 64)
andy@12 114 #define NVRAM_START (GFW_START + 10 * MEM_M)
andy@12 115
andy@12 116 #define NVRAM_VALID_SIG 0x4650494e45584948 // "HIXENIPF"
andy@12 117 struct nvram_save_addr {
andy@12 118 unsigned long addr;
andy@12 119 unsigned long signature;
andy@12 120 };
andy@12 121
andy@12 122 struct pt_fpreg {
andy@12 123 union {
andy@12 124 unsigned long bits[2];
andy@12 125 long double __dummy; /* force 16-byte alignment */
andy@12 126 } u;
andy@12 127 };
andy@12 128
andy@12 129 struct cpu_user_regs {
andy@12 130 /* The following registers are saved by SAVE_MIN: */
andy@12 131 unsigned long b6; /* scratch */
andy@12 132 unsigned long b7; /* scratch */
andy@12 133
andy@12 134 unsigned long ar_csd; /* used by cmp8xchg16 (scratch) */
andy@12 135 unsigned long ar_ssd; /* reserved for future use (scratch) */
andy@12 136
andy@12 137 unsigned long r8; /* scratch (return value register 0) */
andy@12 138 unsigned long r9; /* scratch (return value register 1) */
andy@12 139 unsigned long r10; /* scratch (return value register 2) */
andy@12 140 unsigned long r11; /* scratch (return value register 3) */
andy@12 141
andy@12 142 unsigned long cr_ipsr; /* interrupted task's psr */
andy@12 143 unsigned long cr_iip; /* interrupted task's instruction pointer */
andy@12 144 unsigned long cr_ifs; /* interrupted task's function state */
andy@12 145
andy@12 146 unsigned long ar_unat; /* interrupted task's NaT register (preserved) */
andy@12 147 unsigned long ar_pfs; /* prev function state */
andy@12 148 unsigned long ar_rsc; /* RSE configuration */
andy@12 149 /* The following two are valid only if cr_ipsr.cpl > 0: */
andy@12 150 unsigned long ar_rnat; /* RSE NaT */
andy@12 151 unsigned long ar_bspstore; /* RSE bspstore */
andy@12 152
andy@12 153 unsigned long pr; /* 64 predicate registers (1 bit each) */
andy@12 154 unsigned long b0; /* return pointer (bp) */
andy@12 155 unsigned long loadrs; /* size of dirty partition << 16 */
andy@12 156
andy@12 157 unsigned long r1; /* the gp pointer */
andy@12 158 unsigned long r12; /* interrupted task's memory stack pointer */
andy@12 159 unsigned long r13; /* thread pointer */
andy@12 160
andy@12 161 unsigned long ar_fpsr; /* floating point status (preserved) */
andy@12 162 unsigned long r15; /* scratch */
andy@12 163
andy@12 164 /* The remaining registers are NOT saved for system calls. */
andy@12 165
andy@12 166 unsigned long r14; /* scratch */
andy@12 167 unsigned long r2; /* scratch */
andy@12 168 unsigned long r3; /* scratch */
andy@12 169 unsigned long r16; /* scratch */
andy@12 170 unsigned long r17; /* scratch */
andy@12 171 unsigned long r18; /* scratch */
andy@12 172 unsigned long r19; /* scratch */
andy@12 173 unsigned long r20; /* scratch */
andy@12 174 unsigned long r21; /* scratch */
andy@12 175 unsigned long r22; /* scratch */
andy@12 176 unsigned long r23; /* scratch */
andy@12 177 unsigned long r24; /* scratch */
andy@12 178 unsigned long r25; /* scratch */
andy@12 179 unsigned long r26; /* scratch */
andy@12 180 unsigned long r27; /* scratch */
andy@12 181 unsigned long r28; /* scratch */
andy@12 182 unsigned long r29; /* scratch */
andy@12 183 unsigned long r30; /* scratch */
andy@12 184 unsigned long r31; /* scratch */
andy@12 185 unsigned long ar_ccv; /* compare/exchange value (scratch) */
andy@12 186
andy@12 187 /*
andy@12 188 * Floating point registers that the kernel considers scratch:
andy@12 189 */
andy@12 190 struct pt_fpreg f6; /* scratch */
andy@12 191 struct pt_fpreg f7; /* scratch */
andy@12 192 struct pt_fpreg f8; /* scratch */
andy@12 193 struct pt_fpreg f9; /* scratch */
andy@12 194 struct pt_fpreg f10; /* scratch */
andy@12 195 struct pt_fpreg f11; /* scratch */
andy@12 196 unsigned long r4; /* preserved */
andy@12 197 unsigned long r5; /* preserved */
andy@12 198 unsigned long r6; /* preserved */
andy@12 199 unsigned long r7; /* preserved */
andy@12 200 unsigned long eml_unat; /* used for emulating instruction */
andy@12 201 unsigned long pad0; /* alignment pad */
andy@12 202
andy@12 203 };
andy@12 204 typedef struct cpu_user_regs cpu_user_regs_t;
andy@12 205
andy@12 206 union vac {
andy@12 207 unsigned long value;
andy@12 208 struct {
andy@12 209 int a_int:1;
andy@12 210 int a_from_int_cr:1;
andy@12 211 int a_to_int_cr:1;
andy@12 212 int a_from_psr:1;
andy@12 213 int a_from_cpuid:1;
andy@12 214 int a_cover:1;
andy@12 215 int a_bsw:1;
andy@12 216 long reserved:57;
andy@12 217 };
andy@12 218 };
andy@12 219 typedef union vac vac_t;
andy@12 220
andy@12 221 union vdc {
andy@12 222 unsigned long value;
andy@12 223 struct {
andy@12 224 int d_vmsw:1;
andy@12 225 int d_extint:1;
andy@12 226 int d_ibr_dbr:1;
andy@12 227 int d_pmc:1;
andy@12 228 int d_to_pmd:1;
andy@12 229 int d_itm:1;
andy@12 230 long reserved:58;
andy@12 231 };
andy@12 232 };
andy@12 233 typedef union vdc vdc_t;
andy@12 234
andy@12 235 struct mapped_regs {
andy@12 236 union vac vac;
andy@12 237 union vdc vdc;
andy@12 238 unsigned long virt_env_vaddr;
andy@12 239 unsigned long reserved1[29];
andy@12 240 unsigned long vhpi;
andy@12 241 unsigned long reserved2[95];
andy@12 242 union {
andy@12 243 unsigned long vgr[16];
andy@12 244 unsigned long bank1_regs[16]; // bank1 regs (r16-r31) when bank0 active
andy@12 245 };
andy@12 246 union {
andy@12 247 unsigned long vbgr[16];
andy@12 248 unsigned long bank0_regs[16]; // bank0 regs (r16-r31) when bank1 active
andy@12 249 };
andy@12 250 unsigned long vnat;
andy@12 251 unsigned long vbnat;
andy@12 252 unsigned long vcpuid[5];
andy@12 253 unsigned long reserved3[11];
andy@12 254 unsigned long vpsr;
andy@12 255 unsigned long vpr;
andy@12 256 unsigned long reserved4[76];
andy@12 257 union {
andy@12 258 unsigned long vcr[128];
andy@12 259 struct {
andy@12 260 unsigned long dcr; // CR0
andy@12 261 unsigned long itm;
andy@12 262 unsigned long iva;
andy@12 263 unsigned long rsv1[5];
andy@12 264 unsigned long pta; // CR8
andy@12 265 unsigned long rsv2[7];
andy@12 266 unsigned long ipsr; // CR16
andy@12 267 unsigned long isr;
andy@12 268 unsigned long rsv3;
andy@12 269 unsigned long iip;
andy@12 270 unsigned long ifa;
andy@12 271 unsigned long itir;
andy@12 272 unsigned long iipa;
andy@12 273 unsigned long ifs;
andy@12 274 unsigned long iim; // CR24
andy@12 275 unsigned long iha;
andy@12 276 unsigned long rsv4[38];
andy@12 277 unsigned long lid; // CR64
andy@12 278 unsigned long ivr;
andy@12 279 unsigned long tpr;
andy@12 280 unsigned long eoi;
andy@12 281 unsigned long irr[4];
andy@12 282 unsigned long itv; // CR72
andy@12 283 unsigned long pmv;
andy@12 284 unsigned long cmcv;
andy@12 285 unsigned long rsv5[5];
andy@12 286 unsigned long lrr0; // CR80
andy@12 287 unsigned long lrr1;
andy@12 288 unsigned long rsv6[46];
andy@12 289 };
andy@12 290 };
andy@12 291 union {
andy@12 292 unsigned long reserved5[128];
andy@12 293 struct {
andy@12 294 unsigned long precover_ifs;
andy@12 295 unsigned long unat; // not sure if this is needed until NaT arch is done
andy@12 296 int interrupt_collection_enabled; // virtual psr.ic
andy@12 297 /* virtual interrupt deliverable flag is evtchn_upcall_mask in
andy@12 298 * shared info area now. interrupt_mask_addr is the address
andy@12 299 * of evtchn_upcall_mask for current vcpu
andy@12 300 */
andy@12 301 unsigned char *interrupt_mask_addr;
andy@12 302 int pending_interruption;
andy@12 303 unsigned char vpsr_pp;
andy@12 304 unsigned char vpsr_dfh;
andy@12 305 unsigned char hpsr_dfh;
andy@12 306 unsigned char hpsr_mfh;
andy@12 307 unsigned long reserved5_1[4];
andy@12 308 int metaphysical_mode; // 1 = use metaphys mapping, 0 = use virtual
andy@12 309 int banknum; // 0 or 1, which virtual register bank is active
andy@12 310 unsigned long rrs[8]; // region registers
andy@12 311 unsigned long krs[8]; // kernel registers
andy@12 312 unsigned long pkrs[8]; // protection key registers
andy@12 313 unsigned long tmp[8]; // temp registers (e.g. for hyperprivops)
andy@12 314 };
andy@12 315 };
andy@12 316 };
andy@12 317 typedef struct mapped_regs mapped_regs_t;
andy@12 318
andy@12 319 struct vpd {
andy@12 320 struct mapped_regs vpd_low;
andy@12 321 unsigned long reserved6[3456];
andy@12 322 unsigned long vmm_avail[128];
andy@12 323 unsigned long reserved7[4096];
andy@12 324 };
andy@12 325 typedef struct vpd vpd_t;
andy@12 326
andy@12 327 struct arch_vcpu_info {
andy@12 328 };
andy@12 329 typedef struct arch_vcpu_info arch_vcpu_info_t;
andy@12 330
andy@12 331 struct arch_shared_info {
andy@12 332 /* PFN of the start_info page. */
andy@12 333 unsigned long start_info_pfn;
andy@12 334
andy@12 335 /* Interrupt vector for event channel. */
andy@12 336 int evtchn_vector;
andy@12 337
andy@12 338 uint64_t pad[32];
andy@12 339 };
andy@12 340 typedef struct arch_shared_info arch_shared_info_t;
andy@12 341
andy@12 342 typedef unsigned long xen_callback_t;
andy@12 343
andy@12 344 struct ia64_tr_entry {
andy@12 345 unsigned long pte;
andy@12 346 unsigned long itir;
andy@12 347 unsigned long vadr;
andy@12 348 unsigned long rid;
andy@12 349 };
andy@12 350
andy@12 351 struct vcpu_extra_regs {
andy@12 352 struct ia64_tr_entry itrs[8];
andy@12 353 struct ia64_tr_entry dtrs[8];
andy@12 354 unsigned long iva;
andy@12 355 unsigned long dcr;
andy@12 356 unsigned long event_callback_ip;
andy@12 357 };
andy@12 358
andy@12 359 struct vcpu_guest_context {
andy@12 360 #define VGCF_EXTRA_REGS (1<<1) /* Get/Set extra regs. */
andy@12 361 unsigned long flags; /* VGCF_* flags */
andy@12 362
andy@12 363 struct cpu_user_regs user_regs;
andy@12 364 struct vcpu_extra_regs extra_regs;
andy@12 365 unsigned long privregs_pfn;
andy@12 366 };
andy@12 367 typedef struct vcpu_guest_context vcpu_guest_context_t;
andy@12 368 DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
andy@12 369
andy@12 370 /* dom0 vp op */
andy@12 371 #define __HYPERVISOR_ia64_dom0vp_op __HYPERVISOR_arch_0
andy@12 372 /* Map io space in machine address to dom0 physical address space.
andy@12 373 Currently physical assigned address equals to machine address. */
andy@12 374 #define IA64_DOM0VP_ioremap 0
andy@12 375
andy@12 376 /* Convert a pseudo physical page frame number to the corresponding
andy@12 377 machine page frame number. If no page is assigned, INVALID_MFN or
andy@12 378 GPFN_INV_MASK is returned depending on domain's non-vti/vti mode. */
andy@12 379 #define IA64_DOM0VP_phystomach 1
andy@12 380
andy@12 381 /* Convert a machine page frame number to the corresponding pseudo physical
andy@12 382 page frame number of the caller domain. */
andy@12 383 #define IA64_DOM0VP_machtophys 3
andy@12 384
andy@12 385 /* Reserved for future use. */
andy@12 386 #define IA64_DOM0VP_iounmap 4
andy@12 387
andy@12 388 /* Unmap and free pages contained in the specified pseudo physical region. */
andy@12 389 #define IA64_DOM0VP_zap_physmap 5
andy@12 390
andy@12 391 /* Assign machine page frame to dom0's pseudo physical address space. */
andy@12 392 #define IA64_DOM0VP_add_physmap 6
andy@12 393
andy@12 394 /* expose the p2m table into domain */
andy@12 395 #define IA64_DOM0VP_expose_p2m 7
andy@12 396
andy@12 397 /* xen perfmon */
andy@12 398 #define IA64_DOM0VP_perfmon 8
andy@12 399
andy@12 400 /* gmfn version of IA64_DOM0VP_add_physmap */
andy@12 401 #define IA64_DOM0VP_add_physmap_with_gmfn 9
andy@12 402
andy@12 403 /* Add an I/O port space range */
andy@12 404 #define IA64_DOM0VP_add_io_space 11
andy@12 405
andy@12 406 // flags for page assignement to pseudo physical address space
andy@12 407 #define _ASSIGN_readonly 0
andy@12 408 #define ASSIGN_readonly (1UL << _ASSIGN_readonly)
andy@12 409 #define ASSIGN_writable (0UL << _ASSIGN_readonly) // dummy flag
andy@12 410 /* Internal only: memory attribute must be WC/UC/UCE. */
andy@12 411 #define _ASSIGN_nocache 1
andy@12 412 #define ASSIGN_nocache (1UL << _ASSIGN_nocache)
andy@12 413 // tlb tracking
andy@12 414 #define _ASSIGN_tlb_track 2
andy@12 415 #define ASSIGN_tlb_track (1UL << _ASSIGN_tlb_track)
andy@12 416 /* Internal only: associated with PGC_allocated bit */
andy@12 417 #define _ASSIGN_pgc_allocated 3
andy@12 418 #define ASSIGN_pgc_allocated (1UL << _ASSIGN_pgc_allocated)
andy@12 419
andy@12 420 /* This structure has the same layout of struct ia64_boot_param, defined in
andy@12 421 <asm/system.h>. It is redefined here to ease use. */
andy@12 422 struct xen_ia64_boot_param {
andy@12 423 unsigned long command_line; /* physical address of cmd line args */
andy@12 424 unsigned long efi_systab; /* physical address of EFI system table */
andy@12 425 unsigned long efi_memmap; /* physical address of EFI memory map */
andy@12 426 unsigned long efi_memmap_size; /* size of EFI memory map */
andy@12 427 unsigned long efi_memdesc_size; /* size of an EFI memory map descriptor */
andy@12 428 unsigned int efi_memdesc_version; /* memory descriptor version */
andy@12 429 struct {
andy@12 430 unsigned short num_cols; /* number of columns on console. */
andy@12 431 unsigned short num_rows; /* number of rows on console. */
andy@12 432 unsigned short orig_x; /* cursor's x position */
andy@12 433 unsigned short orig_y; /* cursor's y position */
andy@12 434 } console_info;
andy@12 435 unsigned long fpswa; /* physical address of the fpswa interface */
andy@12 436 unsigned long initrd_start;
andy@12 437 unsigned long initrd_size;
andy@12 438 unsigned long domain_start; /* va where the boot time domain begins */
andy@12 439 unsigned long domain_size; /* how big is the boot domain */
andy@12 440 };
andy@12 441
andy@12 442 #endif /* !__ASSEMBLY__ */
andy@12 443
andy@12 444 /* Size of the shared_info area (this is not related to page size). */
andy@12 445 #define XSI_SHIFT 14
andy@12 446 #define XSI_SIZE (1 << XSI_SHIFT)
andy@12 447 /* Log size of mapped_regs area (64 KB - only 4KB is used). */
andy@12 448 #define XMAPPEDREGS_SHIFT 12
andy@12 449 #define XMAPPEDREGS_SIZE (1 << XMAPPEDREGS_SHIFT)
andy@12 450 /* Offset of XASI (Xen arch shared info) wrt XSI_BASE. */
andy@12 451 #define XMAPPEDREGS_OFS XSI_SIZE
andy@12 452
andy@12 453 /* Hyperprivops. */
andy@12 454 #define HYPERPRIVOP_START 0x1
andy@12 455 #define HYPERPRIVOP_RFI (HYPERPRIVOP_START + 0x0)
andy@12 456 #define HYPERPRIVOP_RSM_DT (HYPERPRIVOP_START + 0x1)
andy@12 457 #define HYPERPRIVOP_SSM_DT (HYPERPRIVOP_START + 0x2)
andy@12 458 #define HYPERPRIVOP_COVER (HYPERPRIVOP_START + 0x3)
andy@12 459 #define HYPERPRIVOP_ITC_D (HYPERPRIVOP_START + 0x4)
andy@12 460 #define HYPERPRIVOP_ITC_I (HYPERPRIVOP_START + 0x5)
andy@12 461 #define HYPERPRIVOP_SSM_I (HYPERPRIVOP_START + 0x6)
andy@12 462 #define HYPERPRIVOP_GET_IVR (HYPERPRIVOP_START + 0x7)
andy@12 463 #define HYPERPRIVOP_GET_TPR (HYPERPRIVOP_START + 0x8)
andy@12 464 #define HYPERPRIVOP_SET_TPR (HYPERPRIVOP_START + 0x9)
andy@12 465 #define HYPERPRIVOP_EOI (HYPERPRIVOP_START + 0xa)
andy@12 466 #define HYPERPRIVOP_SET_ITM (HYPERPRIVOP_START + 0xb)
andy@12 467 #define HYPERPRIVOP_THASH (HYPERPRIVOP_START + 0xc)
andy@12 468 #define HYPERPRIVOP_PTC_GA (HYPERPRIVOP_START + 0xd)
andy@12 469 #define HYPERPRIVOP_ITR_D (HYPERPRIVOP_START + 0xe)
andy@12 470 #define HYPERPRIVOP_GET_RR (HYPERPRIVOP_START + 0xf)
andy@12 471 #define HYPERPRIVOP_SET_RR (HYPERPRIVOP_START + 0x10)
andy@12 472 #define HYPERPRIVOP_SET_KR (HYPERPRIVOP_START + 0x11)
andy@12 473 #define HYPERPRIVOP_FC (HYPERPRIVOP_START + 0x12)
andy@12 474 #define HYPERPRIVOP_GET_CPUID (HYPERPRIVOP_START + 0x13)
andy@12 475 #define HYPERPRIVOP_GET_PMD (HYPERPRIVOP_START + 0x14)
andy@12 476 #define HYPERPRIVOP_GET_EFLAG (HYPERPRIVOP_START + 0x15)
andy@12 477 #define HYPERPRIVOP_SET_EFLAG (HYPERPRIVOP_START + 0x16)
andy@12 478 #define HYPERPRIVOP_RSM_BE (HYPERPRIVOP_START + 0x17)
andy@12 479 #define HYPERPRIVOP_GET_PSR (HYPERPRIVOP_START + 0x18)
andy@12 480 #define HYPERPRIVOP_MAX (0x19)
andy@12 481
andy@12 482 /* Fast and light hypercalls. */
andy@12 483 #define __HYPERVISOR_ia64_fast_eoi __HYPERVISOR_arch_1
andy@12 484
andy@12 485 /* Xencomm macros. */
andy@12 486 #define XENCOMM_INLINE_MASK 0xf800000000000000UL
andy@12 487 #define XENCOMM_INLINE_FLAG 0x8000000000000000UL
andy@12 488
andy@12 489 #define XENCOMM_IS_INLINE(addr) \
andy@12 490 (((unsigned long)(addr) & XENCOMM_INLINE_MASK) == XENCOMM_INLINE_FLAG)
andy@12 491 #define XENCOMM_INLINE_ADDR(addr) \
andy@12 492 ((unsigned long)(addr) & ~XENCOMM_INLINE_MASK)
andy@12 493
andy@12 494 /* xen perfmon */
andy@12 495 #ifdef XEN
andy@12 496 #ifndef __ASSEMBLY__
andy@12 497 #ifndef _ASM_IA64_PERFMON_H
andy@12 498
andy@12 499 #include <xen/list.h> // asm/perfmon.h requires struct list_head
andy@12 500 #include <asm/perfmon.h>
andy@12 501 // for PFM_xxx and pfarg_features_t, pfarg_context_t, pfarg_reg_t, pfarg_load_t
andy@12 502
andy@12 503 #endif /* _ASM_IA64_PERFMON_H */
andy@12 504
andy@12 505 DEFINE_XEN_GUEST_HANDLE(pfarg_features_t);
andy@12 506 DEFINE_XEN_GUEST_HANDLE(pfarg_context_t);
andy@12 507 DEFINE_XEN_GUEST_HANDLE(pfarg_reg_t);
andy@12 508 DEFINE_XEN_GUEST_HANDLE(pfarg_load_t);
andy@12 509 #endif /* __ASSEMBLY__ */
andy@12 510 #endif /* XEN */
andy@12 511
andy@12 512 #endif /* __HYPERVISOR_IF_IA64_H__ */
andy@12 513
andy@12 514 /*
andy@12 515 * Local variables:
andy@12 516 * mode: C
andy@12 517 * c-set-style: "BSD"
andy@12 518 * c-basic-offset: 4
andy@12 519 * tab-width: 4
andy@12 520 * indent-tabs-mode: nil
andy@12 521 * End:
andy@12 522 */