Changeset 11798 in vbox for trunk/include
- Timestamp:
- Aug 29, 2008 9:48:49 AM (16 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/cpum.h
r11704 r11798 363 363 */ 364 364 #define CPUMCTX2CORE(pCtx) ((PCPUMCTXCORE)(void *)&(pCtx)->edi) 365 366 367 /** 368 * Selector hidden registers. (version 1.6) 369 */ 370 typedef struct CPUMSELREGHID_VER1_6 371 { 372 /** Base register. */ 373 uint32_t u32Base; 374 /** Limit (expanded). */ 375 uint32_t u32Limit; 376 /** Flags. 377 * This is the high 32-bit word of the descriptor entry. 378 * Only the flags, dpl and type are used. */ 379 X86DESCATTR Attr; 380 } CPUMSELREGHID_VER1_6; 381 382 /** 383 * CPU context. (Version 1.6) 384 */ 385 #pragma pack(1) 386 typedef struct CPUMCTX_VER1_6 387 { 388 /** FPU state. (16-byte alignment) 389 * @todo This doesn't have to be in X86FXSTATE on CPUs without fxsr - we need a type for the 390 * actual format or convert it (waste of time). */ 391 X86FXSTATE fpu; 392 393 /** CPUMCTXCORE Part. 394 * @{ */ 395 union 396 { 397 uint32_t edi; 398 uint64_t rdi; 399 }; 400 union 401 { 402 uint32_t esi; 403 uint64_t rsi; 404 }; 405 union 406 { 407 uint32_t ebp; 408 uint64_t rbp; 409 }; 410 union 411 { 412 uint32_t eax; 413 uint64_t rax; 414 }; 415 union 416 { 417 uint32_t ebx; 418 uint64_t rbx; 419 }; 420 union 421 { 422 uint32_t edx; 423 uint64_t rdx; 424 }; 425 union 426 { 427 uint32_t ecx; 428 uint64_t rcx; 429 }; 430 /* Note: we rely on the exact layout, because we use lss esp, [] in the switcher */ 431 uint32_t esp; 432 RTSEL ss; 433 RTSEL ssPadding; 434 /* Note: no overlap with esp here. */ 435 uint64_t rsp; 436 437 RTSEL gs; 438 RTSEL gsPadding; 439 RTSEL fs; 440 RTSEL fsPadding; 441 RTSEL es; 442 RTSEL esPadding; 443 RTSEL ds; 444 RTSEL dsPadding; 445 RTSEL cs; 446 RTSEL csPadding[3]; /* 3 words to force 8 byte alignment for the remainder */ 447 448 union 449 { 450 X86EFLAGS eflags; 451 X86RFLAGS rflags; 452 }; 453 union 454 { 455 uint32_t eip; 456 uint64_t rip; 457 }; 458 459 uint64_t r8; 460 uint64_t r9; 461 uint64_t r10; 462 uint64_t r11; 463 uint64_t r12; 464 uint64_t r13; 465 uint64_t r14; 466 uint64_t r15; 467 468 /** Hidden selector registers. 469 * @{ */ 470 CPUMSELREGHID_VER1_6 esHid; 471 CPUMSELREGHID_VER1_6 csHid; 472 CPUMSELREGHID_VER1_6 ssHid; 473 CPUMSELREGHID_VER1_6 dsHid; 474 CPUMSELREGHID_VER1_6 fsHid; 475 CPUMSELREGHID_VER1_6 gsHid; 476 /** @} */ 477 478 /** @} */ 479 480 /** Control registers. 481 * @{ */ 482 uint64_t cr0; 483 uint64_t cr2; 484 uint64_t cr3; 485 uint64_t cr4; 486 uint64_t cr8; 487 /** @} */ 488 489 /** Debug registers. 490 * @{ */ 491 uint64_t dr0; 492 uint64_t dr1; 493 uint64_t dr2; 494 uint64_t dr3; 495 uint64_t dr4; /**< @todo remove dr4 and dr5. */ 496 uint64_t dr5; 497 uint64_t dr6; 498 uint64_t dr7; 499 /* DR8-15 are currently not supported */ 500 /** @} */ 501 502 /** Global Descriptor Table register. */ 503 VBOXGDTR_VER1_6 gdtr; 504 uint16_t gdtrPadding; 505 uint32_t gdtrPadding64;/** @todo fix this hack */ 506 /** Interrupt Descriptor Table register. */ 507 VBOXIDTR_VER1_6 idtr; 508 uint16_t idtrPadding; 509 uint32_t idtrPadding64;/** @todo fix this hack */ 510 /** The task register. 511 * Only the guest context uses all the members. */ 512 RTSEL ldtr; 513 RTSEL ldtrPadding; 514 /** The task register. 515 * Only the guest context uses all the members. */ 516 RTSEL tr; 517 RTSEL trPadding; 518 519 /** The sysenter msr registers. 520 * This member is not used by the hypervisor context. */ 521 CPUMSYSENTER SysEnter; 522 523 /** System MSRs. 524 * @{ */ 525 uint64_t msrEFER; 526 uint64_t msrSTAR; 527 uint64_t msrPAT; 528 uint64_t msrLSTAR; 529 uint64_t msrCSTAR; 530 uint64_t msrSFMASK; 531 uint64_t msrFSBASE; 532 uint64_t msrGSBASE; 533 uint64_t msrKERNELGSBASE; 534 /** @} */ 535 536 /** Hidden selector registers. 537 * @{ */ 538 CPUMSELREGHID_VER1_6 ldtrHid; 539 CPUMSELREGHID_VER1_6 trHid; 540 /** @} */ 541 542 /* padding to get 32byte aligned size */ 543 uint32_t padding[2]; 544 } CPUMCTX_VER1_6; 545 #pragma pack() 365 546 366 547 /** -
trunk/include/VBox/types.h
r11306 r11798 375 375 } VBOXIDTR, *PVBOXIDTR; 376 376 #pragma pack() 377 378 #pragma pack(1) 379 /** IDTR from version 1.6 */ 380 typedef struct VBOXIDTR_VER1_6 381 { 382 /** Size of the IDT. */ 383 uint16_t cbIdt; 384 /** Address of the IDT. */ 385 uint32_t pIdt; 386 } VBOXIDTR_VER1_6, *PVBOXIDTR_VER1_6; 387 #pragma pack() 388 377 389 /** @} */ 378 390 … … 397 409 /** Pointer to GDTR. */ 398 410 typedef VBOXGDTR *PVBOXGDTR; 411 412 #pragma pack(1) 413 /** GDTR from version 1.6 */ 414 typedef struct VBOXGDTR_VER1_6 415 { 416 /** Size of the GDT. */ 417 uint16_t cbGdt; 418 /** Address of the GDT. */ 419 uint32_t pGdt; 420 } VBOXGDTR_VER1_6; 421 #pragma pack() 399 422 400 423 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.