Changeset b3f8fb7 in mainline for kernel/arch/ia32xen/include/hypercall.h
- Timestamp:
- 2007-01-28T13:25:49Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e8c1a5
- Parents:
- 1ba41c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32xen/include/hypercall.h
r1ba41c5 rb3f8fb7 30 30 #define KERN_ia32xen_HYPERCALL_H_ 31 31 32 #include <arch/types.h> 33 #include <macros.h> 34 35 typedef uint16_t domid_t; 36 37 typedef struct { 38 uint8_t vector; /**< Exception vector */ 39 uint8_t flags; /**< 0-3: privilege level; 4: clear event enable */ 40 uint16_t cs; /**< Code selector */ 41 void *address; /**< Code offset */ 42 } trap_info_t; 43 44 45 typedef struct { 46 evtchn_t port; 47 } evtchn_send_t; 48 49 typedef struct { 50 uint32_t cmd; 51 union { 52 evtchn_send_t send; 53 }; 54 } evtchn_op_t; 55 32 #ifndef __ASM__ 33 # include <arch/types.h> 34 # include <macros.h> 35 #endif 36 37 #define GUEST_CMDLINE 1024 38 #define VIRT_CPUS 32 39 #define START_INFO_SIZE 1104 40 41 #define BOOT_OFFSET 0x0000 42 #define TEMP_STACK_SIZE 0x1000 43 44 #define XEN_VIRT_START 0xFC000000 45 #define XEN_CS 0xe019 46 47 #define XEN_ELFNOTE_INFO 0 48 #define XEN_ELFNOTE_ENTRY 1 49 #define XEN_ELFNOTE_HYPERCALL_PAGE 2 50 #define XEN_ELFNOTE_VIRT_BASE 3 51 #define XEN_ELFNOTE_PADDR_OFFSET 4 52 #define XEN_ELFNOTE_XEN_VERSION 5 53 #define XEN_ELFNOTE_GUEST_OS 6 54 #define XEN_ELFNOTE_GUEST_VERSION 7 55 #define XEN_ELFNOTE_LOADER 8 56 #define XEN_ELFNOTE_PAE_MODE 9 57 #define XEN_ELFNOTE_FEATURES 10 58 #define XEN_ELFNOTE_BSD_SYMTAB 11 59 60 #define mp_map ((pfn_t *) XEN_VIRT_START) 61 62 #define SIF_PRIVILEGED (1 << 0) /**< Privileged domain */ 63 #define SIF_INITDOMAIN (1 << 1) /**< Iinitial control domain */ 64 65 #define XEN_CONSOLE_VGA 0x03 66 #define XEN_CONSOLE_VESA 0x23 56 67 57 68 #define XEN_SET_TRAP_TABLE 0 … … 104 115 #define DOMID_IO (0x7FF1U) 105 116 117 #ifndef __ASM__ 118 119 typedef uint16_t domid_t; 120 typedef uint32_t evtchn_t; 121 122 typedef struct { 123 uint32_t version; 124 uint32_t pad0; 125 uint64_t tsc_timestamp; /**< TSC at last update of time vals */ 126 uint64_t system_time; /**< Time, in nanosecs, since boot */ 127 uint32_t tsc_to_system_mul; 128 int8_t tsc_shift; 129 int8_t pad1[3]; 130 } vcpu_time_info_t; 131 132 typedef struct { 133 uint32_t cr2; 134 uint32_t pad[5]; 135 } arch_vcpu_info_t; 136 137 typedef struct arch_shared_info { 138 pfn_t max_pfn; /**< max pfn that appears in table */ 139 uint32_t pfn_to_mfn_frame_list_list; 140 uint32_t nmi_reason; 141 } arch_shared_info_t; 142 143 typedef struct { 144 uint8_t evtchn_upcall_pending; 145 ipl_t evtchn_upcall_mask; 146 evtchn_t evtchn_pending_sel; 147 arch_vcpu_info_t arch; 148 vcpu_time_info_t time; 149 } vcpu_info_t; 150 151 typedef struct { 152 vcpu_info_t vcpu_info[VIRT_CPUS]; 153 evtchn_t evtchn_pending[32]; 154 evtchn_t evtchn_mask[32]; 155 156 uint32_t wc_version; /**< Version counter */ 157 uint32_t wc_sec; /**< Secs 00:00:00 UTC, Jan 1, 1970 */ 158 uint32_t wc_nsec; /**< Nsecs 00:00:00 UTC, Jan 1, 1970 */ 159 160 arch_shared_info_t arch; 161 } shared_info_t; 162 163 typedef struct { 164 int8_t magic[32]; /**< "xen-<version>-<platform>" */ 165 uint32_t frames; /**< Available frames */ 166 shared_info_t *shared_info; /**< Shared info structure (machine address) */ 167 uint32_t flags; /**< SIF_xxx flags */ 168 pfn_t store_mfn; /**< Shared page (machine page) */ 169 evtchn_t store_evtchn; /**< Event channel for store communication */ 170 171 union { 172 struct { 173 pfn_t mfn; /**< Console page (machine page) */ 174 evtchn_t evtchn; /**< Event channel for console messages */ 175 } domU; 176 177 struct { 178 uint32_t info_off; /**< Offset of console_info struct */ 179 uint32_t info_size; /**< Size of console_info struct from start */ 180 } dom0; 181 } console; 182 183 pte_t *ptl0; /**< Boot PTL0 (kernel address) */ 184 uint32_t pt_frames; /**< Number of bootstrap page table frames */ 185 pfn_t *pm_map; /**< Physical->machine frame map (kernel address) */ 186 void *mod_start; /**< Modules start (kernel address) */ 187 uint32_t mod_len; /**< Modules size (bytes) */ 188 int8_t cmd_line[GUEST_CMDLINE]; 189 } start_info_t; 190 191 typedef struct { 192 uint8_t video_type; 193 194 union { 195 struct { 196 uint16_t font_height; 197 uint16_t cursor_x; 198 uint16_t cursor_y; 199 uint16_t rows; 200 uint16_t columns; 201 } vga; 202 203 struct { 204 uint16_t width; 205 uint16_t height; 206 uint16_t bytes_per_line; 207 uint16_t bits_per_pixel; 208 uint32_t lfb_base; 209 uint32_t lfb_size; 210 uint8_t red_pos; 211 uint8_t red_size; 212 uint8_t green_pos; 213 uint8_t green_size; 214 uint8_t blue_pos; 215 uint8_t blue_size; 216 uint8_t rsvd_pos; 217 uint8_t rsvd_size; 218 } vesa_lfb; 219 } info; 220 } console_info_t; 221 222 typedef struct { 223 pfn_t start; 224 pfn_t size; 225 pfn_t reserved; 226 } memzone_t; 227 228 extern start_info_t start_info; 229 extern shared_info_t shared_info; 230 extern memzone_t meminfo; 231 232 typedef struct { 233 uint8_t vector; /**< Exception vector */ 234 uint8_t flags; /**< 0-3: privilege level; 4: clear event enable */ 235 uint16_t cs; /**< Code selector */ 236 void *address; /**< Code offset */ 237 } trap_info_t; 238 239 typedef struct { 240 evtchn_t port; 241 } evtchn_send_t; 242 243 typedef struct { 244 uint32_t cmd; 245 union { 246 evtchn_send_t send; 247 }; 248 } evtchn_op_t; 106 249 107 250 #define force_evtchn_callback() ((void) xen_version(0, 0)) … … 235 378 236 379 #endif 380 381 #endif
Note:
See TracChangeset
for help on using the changeset viewer.