Changeset 7095 in vbox for trunk/include/VBox
- Timestamp:
- Feb 22, 2008 12:41:56 PM (17 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/cpum.h
r5999 r7095 82 82 typedef struct CPUMCTXCORE 83 83 { 84 uint32_t edi; 85 uint32_t esi; 86 uint32_t ebp; 87 uint32_t eax; 88 uint32_t ebx; 89 uint32_t edx; 90 uint32_t ecx; 91 92 uint32_t esp; 93 RTSEL ss; 94 RTSEL ssPadding; 84 union 85 { 86 uint32_t edi; 87 uint64_t rdi; 88 }; 89 union 90 { 91 uint32_t esi; 92 uint64_t rsi; 93 }; 94 union 95 { 96 uint32_t ebp; 97 uint64_t rbp; 98 }; 99 union 100 { 101 uint32_t eax; 102 uint64_t rax; 103 }; 104 union 105 { 106 uint32_t ebx; 107 uint64_t rbx; 108 }; 109 union 110 { 111 uint32_t edx; 112 uint64_t rdx; 113 }; 114 union 115 { 116 uint32_t ecx; 117 uint64_t rcx; 118 }; 119 union 120 { 121 /* Note: we rely on the exact layout, because we use lss esp, [] in the switcher */ 122 struct 123 { 124 uint32_t esp; 125 RTSEL ss; 126 RTSEL ssPadding; 127 }; 128 struct 129 { 130 uint64_t rsp; 131 RTSEL ss64; 132 RTSEL ss64Padding; 133 }; 134 }; 95 135 96 136 RTSEL gs; … … 105 145 RTSEL csPadding; 106 146 107 X86EFLAGS eflags; 108 uint32_t eip; 147 union 148 { 149 X86EFLAGS eflags; 150 X86RFLAGS rflags; 151 }; 152 union 153 { 154 uint32_t eip; 155 uint64_t rip; 156 }; 157 158 uint64_t r8; 159 uint64_t r9; 160 uint64_t r10; 161 uint64_t r11; 162 uint64_t r12; 163 uint64_t r13; 164 uint64_t r14; 165 uint64_t r15; 109 166 110 167 /** Hidden selector registers. … … 138 195 /** CPUMCTXCORE Part. 139 196 * @{ */ 140 uint32_t edi; 141 uint32_t esi; 142 uint32_t ebp; 143 uint32_t eax; 144 uint32_t ebx; 145 uint32_t edx; 146 uint32_t ecx; 147 148 uint32_t esp; 149 RTSEL ss; 150 RTSEL ssPadding; 197 union 198 { 199 uint32_t edi; 200 uint64_t rdi; 201 }; 202 union 203 { 204 uint32_t esi; 205 uint64_t rsi; 206 }; 207 union 208 { 209 uint32_t ebp; 210 uint64_t rbp; 211 }; 212 union 213 { 214 uint32_t eax; 215 uint64_t rax; 216 }; 217 union 218 { 219 uint32_t ebx; 220 uint64_t rbx; 221 }; 222 union 223 { 224 uint32_t edx; 225 uint64_t rdx; 226 }; 227 union 228 { 229 uint32_t ecx; 230 uint64_t rcx; 231 }; 232 union 233 { 234 /* Note: we rely on the exact layout, because we use lss esp, [] in the switcher */ 235 struct 236 { 237 uint32_t esp; 238 RTSEL ss; 239 RTSEL ssPadding; 240 }; 241 struct 242 { 243 uint64_t rsp; 244 RTSEL ss64; 245 RTSEL ss64Padding; 246 }; 247 }; 151 248 152 249 RTSEL gs; … … 161 258 RTSEL csPadding; 162 259 163 X86EFLAGS eflags; 164 uint32_t eip; 260 union 261 { 262 X86EFLAGS eflags; 263 X86RFLAGS rflags; 264 }; 265 union 266 { 267 uint32_t eip; 268 uint64_t rip; 269 }; 270 271 uint64_t r8; 272 uint64_t r9; 273 uint64_t r10; 274 uint64_t r11; 275 uint64_t r12; 276 uint64_t r13; 277 uint64_t r14; 278 uint64_t r15; 165 279 166 280 /** Hidden selector registers. … … 178 292 /** Control registers. 179 293 * @{ */ 180 uint32_t cr0; 181 uint32_t cr2; 182 uint32_t cr3; 183 uint32_t cr4; 294 uint64_t cr0; 295 uint64_t cr2; 296 uint64_t cr3; 297 uint64_t cr4; 298 uint64_t cr8; 184 299 /** @} */ 185 300 186 301 /** Debug registers. 187 302 * @{ */ 188 uint32_t dr0; 189 uint32_t dr1; 190 uint32_t dr2; 191 uint32_t dr3; 192 uint32_t dr4; /**< @todo remove dr4 and dr5. */ 193 uint32_t dr5; 194 uint32_t dr6; 195 uint32_t dr7; 303 uint64_t dr0; 304 uint64_t dr1; 305 uint64_t dr2; 306 uint64_t dr3; 307 uint64_t dr4; /**< @todo remove dr4 and dr5. */ 308 uint64_t dr5; 309 uint64_t dr6; 310 uint64_t dr7; 311 /* DR8-15 are currently not supported */ 196 312 /** @} */ 197 313 -
trunk/include/VBox/cpum.mac
r5999 r7095 34 34 ; and other places. 35 35 struc CPUMCTXCORE 36 .edi res d137 .esi res d138 .ebp res d139 .eax res d140 .ebx res d141 .edx res d142 .ecx res d136 .edi resq 1 37 .esi resq 1 38 .ebp resq 1 39 .eax resq 1 40 .ebx resq 1 41 .edx resq 1 42 .ecx resq 1 43 43 .esp resd 1 44 44 .ss resw 1 45 .ssPadding resw 145 .ssPadding resw 3 46 46 .gs resw 1 47 47 .gsPadding resw 1 … … 54 54 .cs resw 1 55 55 .csPadding resw 1 56 .eflags resd 1 57 .eip resd 1 56 .eflags resq 1 57 .eip resq 1 58 59 .r8 resq 1 60 .r9 resq 1 61 .r10 resq 1 62 .r11 resq 1 63 .r12 resq 1 64 .r13 resq 1 65 .r14 resq 1 66 .r15 resq 1 58 67 59 68 .esHid.u32Base resd 1 … … 87 96 .fpu resb 512 88 97 89 .edi res d190 .esi res d191 .ebp res d192 .eax res d193 .ebx res d194 .edx res d195 .ecx res d198 .edi resq 1 99 .esi resq 1 100 .ebp resq 1 101 .eax resq 1 102 .ebx resq 1 103 .edx resq 1 104 .ecx resq 1 96 105 .esp resd 1 97 106 .ss resw 1 98 .ssPadding resw 1107 .ssPadding resw 3 99 108 .gs resw 1 100 109 .gsPadding resw 1 … … 107 116 .cs resw 1 108 117 .csPadding resw 1 109 .eflags resd 1 110 .eip resd 1 118 .eflags resq 1 119 .eip resq 1 120 121 .r8 resq 1 122 .r9 resq 1 123 .r10 resq 1 124 .r11 resq 1 125 .r12 resq 1 126 .r13 resq 1 127 .r14 resq 1 128 .r15 resq 1 129 111 130 .esHid.u32Base resd 1 112 131 .esHid.u32Limit resd 1 … … 134 153 135 154 136 .cr0 resd 1 137 .cr2 resd 1 138 .cr3 resd 1 139 .cr4 resd 1 155 .cr0 resq 1 156 .cr2 resq 1 157 .cr3 resq 1 158 .cr4 resq 1 159 .cr8 resq 1 140 160 141 .dr0 res d1142 .dr1 res d1143 .dr2 res d1144 .dr3 res d1145 .dr4 res d1146 .dr5 res d1147 .dr6 res d1148 .dr7 res d1161 .dr0 resq 1 162 .dr1 resq 1 163 .dr2 resq 1 164 .dr3 resq 1 165 .dr4 resq 1 166 .dr5 resq 1 167 .dr6 resq 1 168 .dr7 resq 1 149 169 150 170 .gdtr resb 6 ; GDT limit + linear address -
trunk/include/VBox/vm.h
r7036 r7095 392 392 struct CPUM s; 393 393 #endif 394 #ifdef VBOX_WITH_HYBIRD_32BIT_KERNEL 395 char padding[3648]; /* multiple of 32 */ 396 #else 397 char padding[HC_ARCH_BITS == 32 ? 3488 : 3616]; /* multiple of 32 */ 398 #endif 394 char padding[4096]; /* multiple of 32 */ 399 395 } cpum; 400 396 -
trunk/include/VBox/vm.mac
r6796 r7095 88 88 89 89 alignb 32 90 %ifdef VBOX_WITH_HYBIRD_32BIT_KERNEL 91 .cpum resb 3648 92 %elif HC_ARCH_BITS == 32 93 .cpum resb 3488 94 %else 95 .cpum resb 3616 96 %endif 90 .cpum resb 4096 97 91 .vmm resb 1024 98 92 -
trunk/include/VBox/x86.h
r5999 r7095 119 119 /** Pointer to const EFLAGS. */ 120 120 typedef const X86EFLAGS *PCX86EFLAGS; 121 122 /** 123 * RFLAGS (32 upper bits are reserved) 124 */ 125 typedef union X86RFLAGS 126 { 127 /** The bitfield view. */ 128 X86EFLAGSBITS Bits; 129 /** The 8-bit view. */ 130 uint8_t au8[8]; 131 /** The 16-bit view. */ 132 uint16_t au16[4]; 133 /** The 32-bit view. */ 134 uint32_t au32[2]; 135 /** The 64-bit view. */ 136 uint64_t au64[1]; 137 /** The 64-bit view. */ 138 uint32_t u64; 139 } X86RFLAGS; 140 /** Pointer to RFLAGS. */ 141 typedef X86RFLAGS *PX86RFLAGS; 142 /** Pointer to const RFLAGS. */ 143 typedef const X86RFLAGS *PCX86RFLAGS; 121 144 122 145 … … 1687 1710 /** 128-bit view. (yeah, very helpful) */ 1688 1711 uint128_t au128[1]; 1689 } aXMM[ 8];1690 /* - offset 288- */1691 uint32_t au32RsrvdRest[(512 - 288) / sizeof(uint32_t)];1712 } aXMM[16]; /* 8 registers in 32 bits mode; 16 in long mode */ 1713 /* - offset 416 - */ 1714 uint32_t au32RsrvdRest[(512 - 416) / sizeof(uint32_t)]; 1692 1715 } X86FXSTATE; 1693 1716 #pragma pack()
Note:
See TracChangeset
for help on using the changeset viewer.