win-pvdrivers

annotate common/include/public/platform.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
rev   line source
andy@12 1 /******************************************************************************
andy@12 2 * platform.h
andy@12 3 *
andy@12 4 * Hardware platform operations. Intended for use by domain-0 kernel.
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 * Copyright (c) 2002-2006, K Fraser
andy@12 25 */
andy@12 26
andy@12 27 #ifndef __XEN_PUBLIC_PLATFORM_H__
andy@12 28 #define __XEN_PUBLIC_PLATFORM_H__
andy@12 29
andy@12 30 #include "xen.h"
andy@12 31
andy@12 32 #define XENPF_INTERFACE_VERSION 0x03000001
andy@12 33
andy@12 34 /*
andy@12 35 * Set clock such that it would read <secs,nsecs> after 00:00:00 UTC,
andy@12 36 * 1 January, 1970 if the current system time was <system_time>.
andy@12 37 */
andy@12 38 #define XENPF_settime 17
andy@12 39 struct xenpf_settime {
andy@12 40 /* IN variables. */
andy@12 41 uint32_t secs;
andy@12 42 uint32_t nsecs;
andy@12 43 uint64_t system_time;
andy@12 44 };
andy@12 45 typedef struct xenpf_settime xenpf_settime_t;
andy@12 46 DEFINE_XEN_GUEST_HANDLE(xenpf_settime_t);
andy@12 47
andy@12 48 /*
andy@12 49 * Request memory range (@mfn, @mfn+@nr_mfns-1) to have type @type.
andy@12 50 * On x86, @type is an architecture-defined MTRR memory type.
andy@12 51 * On success, returns the MTRR that was used (@reg) and a handle that can
andy@12 52 * be passed to XENPF_DEL_MEMTYPE to accurately tear down the new setting.
andy@12 53 * (x86-specific).
andy@12 54 */
andy@12 55 #define XENPF_add_memtype 31
andy@12 56 struct xenpf_add_memtype {
andy@12 57 /* IN variables. */
andy@12 58 xen_pfn_t mfn;
andy@12 59 uint64_t nr_mfns;
andy@12 60 uint32_t type;
andy@12 61 /* OUT variables. */
andy@12 62 uint32_t handle;
andy@12 63 uint32_t reg;
andy@12 64 };
andy@12 65 typedef struct xenpf_add_memtype xenpf_add_memtype_t;
andy@12 66 DEFINE_XEN_GUEST_HANDLE(xenpf_add_memtype_t);
andy@12 67
andy@12 68 /*
andy@12 69 * Tear down an existing memory-range type. If @handle is remembered then it
andy@12 70 * should be passed in to accurately tear down the correct setting (in case
andy@12 71 * of overlapping memory regions with differing types). If it is not known
andy@12 72 * then @handle should be set to zero. In all cases @reg must be set.
andy@12 73 * (x86-specific).
andy@12 74 */
andy@12 75 #define XENPF_del_memtype 32
andy@12 76 struct xenpf_del_memtype {
andy@12 77 /* IN variables. */
andy@12 78 uint32_t handle;
andy@12 79 uint32_t reg;
andy@12 80 };
andy@12 81 typedef struct xenpf_del_memtype xenpf_del_memtype_t;
andy@12 82 DEFINE_XEN_GUEST_HANDLE(xenpf_del_memtype_t);
andy@12 83
andy@12 84 /* Read current type of an MTRR (x86-specific). */
andy@12 85 #define XENPF_read_memtype 33
andy@12 86 struct xenpf_read_memtype {
andy@12 87 /* IN variables. */
andy@12 88 uint32_t reg;
andy@12 89 /* OUT variables. */
andy@12 90 xen_pfn_t mfn;
andy@12 91 uint64_t nr_mfns;
andy@12 92 uint32_t type;
andy@12 93 };
andy@12 94 typedef struct xenpf_read_memtype xenpf_read_memtype_t;
andy@12 95 DEFINE_XEN_GUEST_HANDLE(xenpf_read_memtype_t);
andy@12 96
andy@12 97 #define XENPF_microcode_update 35
andy@12 98 struct xenpf_microcode_update {
andy@12 99 /* IN variables. */
andy@12 100 XEN_GUEST_HANDLE(void) data; /* Pointer to microcode data */
andy@12 101 uint32_t length; /* Length of microcode data. */
andy@12 102 };
andy@12 103 typedef struct xenpf_microcode_update xenpf_microcode_update_t;
andy@12 104 DEFINE_XEN_GUEST_HANDLE(xenpf_microcode_update_t);
andy@12 105
andy@12 106 #define XENPF_platform_quirk 39
andy@12 107 #define QUIRK_NOIRQBALANCING 1 /* Do not restrict IO-APIC RTE targets */
andy@12 108 #define QUIRK_IOAPIC_BAD_REGSEL 2 /* IO-APIC REGSEL forgets its value */
andy@12 109 #define QUIRK_IOAPIC_GOOD_REGSEL 3 /* IO-APIC REGSEL behaves properly */
andy@12 110 struct xenpf_platform_quirk {
andy@12 111 /* IN variables. */
andy@12 112 uint32_t quirk_id;
andy@12 113 };
andy@12 114 typedef struct xenpf_platform_quirk xenpf_platform_quirk_t;
andy@12 115 DEFINE_XEN_GUEST_HANDLE(xenpf_platform_quirk_t);
andy@12 116
andy@12 117 #define XENPF_firmware_info 50
andy@12 118 #define XEN_FW_DISK_INFO 1 /* from int 13 AH=08/41/48 */
andy@12 119 #define XEN_FW_DISK_MBR_SIGNATURE 2 /* from MBR offset 0x1b8 */
andy@12 120 #define XEN_FW_VBEDDC_INFO 3 /* from int 10 AX=4f15 */
andy@12 121 struct xenpf_firmware_info {
andy@12 122 /* IN variables. */
andy@12 123 uint32_t type;
andy@12 124 uint32_t index;
andy@12 125 /* OUT variables. */
andy@12 126 union {
andy@12 127 struct {
andy@12 128 /* Int13, Fn48: Check Extensions Present. */
andy@12 129 uint8_t device; /* %dl: bios device number */
andy@12 130 uint8_t version; /* %ah: major version */
andy@12 131 uint16_t interface_support; /* %cx: support bitmap */
andy@12 132 /* Int13, Fn08: Legacy Get Device Parameters. */
andy@12 133 uint16_t legacy_max_cylinder; /* %cl[7:6]:%ch: max cyl # */
andy@12 134 uint8_t legacy_max_head; /* %dh: max head # */
andy@12 135 uint8_t legacy_sectors_per_track; /* %cl[5:0]: max sector # */
andy@12 136 /* Int13, Fn41: Get Device Parameters (as filled into %ds:%esi). */
andy@12 137 /* NB. First uint16_t of buffer must be set to buffer size. */
andy@12 138 XEN_GUEST_HANDLE(void) edd_params;
andy@12 139 } disk_info; /* XEN_FW_DISK_INFO */
andy@12 140 struct {
andy@12 141 uint8_t device; /* bios device number */
andy@12 142 uint32_t mbr_signature; /* offset 0x1b8 in mbr */
andy@12 143 } disk_mbr_signature; /* XEN_FW_DISK_MBR_SIGNATURE */
andy@12 144 struct {
andy@12 145 /* Int10, AX=4F15: Get EDID info. */
andy@12 146 uint8_t capabilities;
andy@12 147 uint8_t edid_transfer_time;
andy@12 148 /* must refer to 128-byte buffer */
andy@12 149 XEN_GUEST_HANDLE(uint8_t) edid;
andy@12 150 } vbeddc_info; /* XEN_FW_VBEDDC_INFO */
andy@12 151 } u;
andy@12 152 };
andy@12 153 typedef struct xenpf_firmware_info xenpf_firmware_info_t;
andy@12 154 DEFINE_XEN_GUEST_HANDLE(xenpf_firmware_info_t);
andy@12 155
andy@12 156 struct xen_platform_op {
andy@12 157 uint32_t cmd;
andy@12 158 uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
andy@12 159 union {
andy@12 160 struct xenpf_settime settime;
andy@12 161 struct xenpf_add_memtype add_memtype;
andy@12 162 struct xenpf_del_memtype del_memtype;
andy@12 163 struct xenpf_read_memtype read_memtype;
andy@12 164 struct xenpf_microcode_update microcode;
andy@12 165 struct xenpf_platform_quirk platform_quirk;
andy@12 166 struct xenpf_firmware_info firmware_info;
andy@12 167 uint8_t pad[128];
andy@12 168 } u;
andy@12 169 };
andy@12 170 typedef struct xen_platform_op xen_platform_op_t;
andy@12 171 DEFINE_XEN_GUEST_HANDLE(xen_platform_op_t);
andy@12 172
andy@12 173 #endif /* __XEN_PUBLIC_PLATFORM_H__ */
andy@12 174
andy@12 175 /*
andy@12 176 * Local variables:
andy@12 177 * mode: C
andy@12 178 * c-set-style: "BSD"
andy@12 179 * c-basic-offset: 4
andy@12 180 * tab-width: 4
andy@12 181 * indent-tabs-mode: nil
andy@12 182 * End:
andy@12 183 */