Changeset b3f8fb7 in mainline for kernel/arch/ia32xen/include
- Timestamp:
- 2007-01-28T13:25:49Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e8c1a5
- Parents:
- 1ba41c5
- Location:
- kernel/arch/ia32xen/include
- Files:
-
- 1 deleted
- 7 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 -
kernel/arch/ia32xen/include/mm/as.h
r1ba41c5 rb3f8fb7 48 48 } as_arch_t; 49 49 50 #include <genarch/mm/as_pt.h> 51 50 52 #define as_constructor_arch(as, flags) (as != as) 51 53 #define as_destructor_arch(as) (as != as) -
kernel/arch/ia32xen/include/mm/frame.h
r1ba41c5 rb3f8fb7 43 43 #ifndef __ASM__ 44 44 45 #include <arch/types.h>46 #include <arch/boot/boot.h>47 48 45 #define PA2MA(x) ((start_info.pm_map[((uintptr_t) (x)) >> 12] << 12) + (((uintptr_t) (x)) & 0xfff)) 49 46 #define MA2PA(x) ((mp_map[((uintptr_t) (x)) >> 12] << 12) + (((uintptr_t) (x)) & 0xfff)) -
kernel/arch/ia32xen/include/mm/memory_init.h
r1ba41c5 rb3f8fb7 37 37 #define KERN_ia32xen_MEMORY_INIT_H_ 38 38 39 #include < typedefs.h>39 #include <arch/types.h> 40 40 41 41 size_t get_memory_size(void); -
kernel/arch/ia32xen/include/mm/page.h
r1ba41c5 rb3f8fb7 122 122 #ifndef __ASM__ 123 123 124 #include <mm/page.h> 125 #include <arch/types.h> 126 #include <arch/mm/frame.h> 127 #include <typedefs.h> 124 #include <mm/mm.h> 128 125 #include <arch/hypercall.h> 126 #include <arch/interrupt.h> 129 127 130 128 /* Page fault error codes. */ … … 141 139 /** When bit on this position is 1, a reserved bit was set in page directory. */ 142 140 #define PFERR_CODE_RSVD (1 << 3) 143 144 /** Page Table Entry. */145 struct page_specifier {146 unsigned present : 1;147 unsigned writeable : 1;148 unsigned uaccessible : 1;149 unsigned page_write_through : 1;150 unsigned page_cache_disable : 1;151 unsigned accessed : 1;152 unsigned dirty : 1;153 unsigned pat : 1;154 unsigned global : 1;155 unsigned soft_valid : 1; /**< Valid content even if the present bit is not set. */156 unsigned avl : 2;157 unsigned frame_address : 20;158 } __attribute__ ((packed));159 141 160 142 typedef struct { -
kernel/arch/ia32xen/include/pm.h
r1ba41c5 rb3f8fb7 70 70 71 71 #include <arch/types.h> 72 #include <typedefs.h>73 72 #include <arch/context.h> 74 73 -
kernel/arch/ia32xen/include/types.h
r1ba41c5 rb3f8fb7 37 37 38 38 #define NULL 0 39 #define false 0 40 #define true 1 39 41 40 42 typedef signed char int8_t; … … 48 50 typedef unsigned long long uint64_t; 49 51 52 typedef uint32_t size_t; 53 typedef uint32_t count_t; 54 typedef uint32_t index_t; 55 50 56 typedef uint32_t uintptr_t; 51 57 typedef uint32_t pfn_t; … … 56 62 typedef int32_t native_t; 57 63 58 typedef struct page_specifier pte_t; 64 typedef uint8_t bool; 65 typedef uint64_t task_id_t; 66 typedef uint32_t context_id_t; 67 68 typedef int32_t inr_t; 69 typedef int32_t devno_t; 70 71 /** Page Table Entry. */ 72 typedef struct { 73 unsigned present : 1; 74 unsigned writeable : 1; 75 unsigned uaccessible : 1; 76 unsigned page_write_through : 1; 77 unsigned page_cache_disable : 1; 78 unsigned accessed : 1; 79 unsigned dirty : 1; 80 unsigned pat : 1; 81 unsigned global : 1; 82 unsigned soft_valid : 1; /**< Valid content even if the present bit is not set. */ 83 unsigned avl : 2; 84 unsigned frame_address : 20; 85 } __attribute__ ((packed)) pte_t; 59 86 60 87 #endif
Note:
See TracChangeset
for help on using the changeset viewer.