1 /******************************************************************************
4 * Hardware platform operations. Intended for use by domain-0 kernel.
6 * Copyright (c) 2002-2006, K Fraser
9 #ifndef __XEN_PUBLIC_PLATFORM_H__
10 #define __XEN_PUBLIC_PLATFORM_H__
14 #define XENPF_INTERFACE_VERSION 0x03000001
17 * Set clock such that it would read <secs,nsecs> after 00:00:00 UTC,
18 * 1 January, 1970 if the current system time was <system_time>.
20 #define XENPF_settime 17
21 struct xenpf_settime {
27 typedef struct xenpf_settime xenpf_settime_t;
28 DEFINE_XEN_GUEST_HANDLE(xenpf_settime_t);
31 * Request memory range (@mfn, @mfn+@nr_mfns-1) to have type @type.
32 * On x86, @type is an architecture-defined MTRR memory type.
33 * On success, returns the MTRR that was used (@reg) and a handle that can
34 * be passed to XENPF_DEL_MEMTYPE to accurately tear down the new setting.
37 #define XENPF_add_memtype 31
38 struct xenpf_add_memtype {
47 typedef struct xenpf_add_memtype xenpf_add_memtype_t;
48 DEFINE_XEN_GUEST_HANDLE(xenpf_add_memtype_t);
51 * Tear down an existing memory-range type. If @handle is remembered then it
52 * should be passed in to accurately tear down the correct setting (in case
53 * of overlapping memory regions with differing types). If it is not known
54 * then @handle should be set to zero. In all cases @reg must be set.
57 #define XENPF_del_memtype 32
58 struct xenpf_del_memtype {
63 typedef struct xenpf_del_memtype xenpf_del_memtype_t;
64 DEFINE_XEN_GUEST_HANDLE(xenpf_del_memtype_t);
66 /* Read current type of an MTRR (x86-specific). */
67 #define XENPF_read_memtype 33
68 struct xenpf_read_memtype {
76 typedef struct xenpf_read_memtype xenpf_read_memtype_t;
77 DEFINE_XEN_GUEST_HANDLE(xenpf_read_memtype_t);
79 #define XENPF_microcode_update 35
80 struct xenpf_microcode_update {
82 XEN_GUEST_HANDLE(void) data; /* Pointer to microcode data */
83 uint32_t length; /* Length of microcode data. */
85 typedef struct xenpf_microcode_update xenpf_microcode_update_t;
86 DEFINE_XEN_GUEST_HANDLE(xenpf_microcode_update_t);
88 #define XENPF_platform_quirk 39
89 #define QUIRK_NOIRQBALANCING 1 /* Do not restrict IO-APIC RTE targets */
90 #define QUIRK_IOAPIC_BAD_REGSEL 2 /* IO-APIC REGSEL forgets its value */
91 #define QUIRK_IOAPIC_GOOD_REGSEL 3 /* IO-APIC REGSEL behaves properly */
92 struct xenpf_platform_quirk {
96 typedef struct xenpf_platform_quirk xenpf_platform_quirk_t;
97 DEFINE_XEN_GUEST_HANDLE(xenpf_platform_quirk_t);
99 struct xen_platform_op {
101 uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
103 struct xenpf_settime settime;
104 struct xenpf_add_memtype add_memtype;
105 struct xenpf_del_memtype del_memtype;
106 struct xenpf_read_memtype read_memtype;
107 struct xenpf_microcode_update microcode;
108 struct xenpf_platform_quirk platform_quirk;
112 typedef struct xen_platform_op xen_platform_op_t;
113 DEFINE_XEN_GUEST_HANDLE(xen_platform_op_t);
115 #endif /* __XEN_PUBLIC_PLATFORM_H__ */
123 * indent-tabs-mode: nil