Changeset 34019 in vbox for trunk/include
- Timestamp:
- Nov 12, 2010 8:56:55 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 67684
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/types.h
r32190 r34019 422 422 unsigned u1Fixed1 : 1; 423 423 /** Fixed value bit 3 - Set to 0. */ 424 unsigned u1Fixed2 : 1;424 unsigned u1Fixed2 : 1; 425 425 /** Fixed value bit 4 - Set to 0. */ 426 426 unsigned u1Fixed3 : 1; … … 454 454 unsigned u1Fixed2 : 1; 455 455 /** Fixed value bit 3 - Set to 0. */ 456 unsigned u1Fixed3 : 1;456 unsigned u1Fixed3 : 1; 457 457 /** Fixed value bit 4 - Set to 1. */ 458 458 unsigned u1Fixed4 : 1; … … 491 491 unsigned u1Fixed2 : 1; 492 492 /** Fixed value bit 3 - Set to 1. */ 493 unsigned u1Fixed3 : 1;493 unsigned u1Fixed3 : 1; 494 494 /** Fixed value bit 4 - Set to 1. */ 495 495 unsigned u1Fixed4 : 1; … … 577 577 typedef VBOXIDTE const *PCVBOXIDTE; 578 578 579 /** IDT Entry, 64-bit mode, Intertupt gate view. */ 580 #pragma pack(1) /* paranoia */ 581 typedef struct VBOXIDTE64_INTERRUPTGATE 582 { 583 /** Low offset word. */ 584 unsigned u16OffsetLow : 16; 585 /** Segment Selector. */ 586 unsigned u16SegSel : 16; 587 /** Interrupt Stack Table Index. */ 588 unsigned u3Ist : 3; 589 /** Fixed value bit 0 - Set to 0. */ 590 unsigned u1Fixed0 : 1; 591 /** Fixed value bit 1 - Set to 0. */ 592 unsigned u1Fixed1 : 1; 593 /** Fixed value bit 2 - Set to 0. */ 594 unsigned u1Fixed2 : 1; 595 /** Fixed value bit 3 - Set to 0. */ 596 unsigned u1Fixed3 : 1; 597 /** Fixed value bit 4 - Set to 0. */ 598 unsigned u1Fixed4 : 1; 599 /** Fixed value bit 5 - Set to 0. */ 600 unsigned u1Fixed5 : 1; 601 /** Fixed value bit 6 - Set to 1. */ 602 unsigned u1Fixed6 : 1; 603 /** Fixed value bit 7 - Set to 1. */ 604 unsigned u1Fixed7 : 1; 605 /** Gate size, 1 = 32 bits, 0 = 16 bits. */ 606 unsigned u132BitGate : 1; 607 /** Fixed value bit 5 - Set to 0. */ 608 unsigned u1Fixed8 : 1; 609 /** Descriptor Privilege level. */ 610 unsigned u2DPL : 2; 611 /** Present flag. */ 612 unsigned u1Present : 1; 613 /** High offset word. */ 614 unsigned u16OffsetHigh : 16; 615 /** Offset bits 32..63. */ 616 unsigned u32OffsetHigh64; 617 /** Reserved. */ 618 unsigned u32Reserved; 619 } VBOXIDTE64_INTERRUPTGATE; 620 #pragma pack() 621 /** Pointer to IDT Entry, Interrupt gate view. */ 622 typedef VBOXIDTE64_INTERRUPTGATE *PVBOXIDTE64_INTERRUPTGATE; 623 624 /** IDT Entry, 64-bit mode, Trap gate view. */ 625 #pragma pack(1) /* paranoia */ 626 typedef struct VBOXIDTE64_TRAPGATE 627 { 628 /** Low offset word. */ 629 unsigned u16OffsetLow : 16; 630 /** Segment Selector. */ 631 unsigned u16SegSel : 16; 632 /** Interrupt Stack Table Index. */ 633 unsigned u3Ist : 3; 634 /** Fixed value bit 0 - Set to 0. */ 635 unsigned u1Fixed0 : 1; 636 /** Fixed value bit 1 - Set to 0. */ 637 unsigned u1Fixed1 : 1; 638 /** Fixed value bit 2 - Set to 0. */ 639 unsigned u1Fixed2 : 1; 640 /** Fixed value bit 3 - Set to 0. */ 641 unsigned u1Fixed3 : 1; 642 /** Fixed value bit 4 - Set to 0. */ 643 unsigned u1Fixed4 : 1; 644 /** Fixed value bit 5 - Set to 1. */ 645 unsigned u1Fixed5 : 1; 646 /** Fixed value bit 6 - Set to 1. */ 647 unsigned u1Fixed6 : 1; 648 /** Fixed value bit 7 - Set to 1. */ 649 unsigned u1Fixed7 : 1; 650 /** Gate size, 1 = 32 bits, 0 = 16 bits. */ 651 unsigned u132BitGate : 1; 652 /** Fixed value bit 5 - Set to 0. */ 653 unsigned u1Fixed8 : 1; 654 /** Descriptor Privilege level. */ 655 unsigned u2DPL : 2; 656 /** Present flag. */ 657 unsigned u1Present : 1; 658 /** High offset word. */ 659 unsigned u16OffsetHigh : 16; 660 /** Offset bits 32..63. */ 661 unsigned u32OffsetHigh64; 662 /** Reserved. */ 663 unsigned u32Reserved; 664 } VBOXIDTE64_TRAPGATE; 665 #pragma pack() 666 /** Pointer to IDT Entry, Interrupt gate view. */ 667 typedef VBOXIDTE64_TRAPGATE *PVBOXIDTE64_TRAPGATE; 668 669 /** IDT Entry, 64-bit mode, Generic view. */ 670 #pragma pack(1) /* paranoia */ 671 typedef struct VBOXIDTE64_GENERIC 672 { 673 /** Low offset word. */ 674 unsigned u16OffsetLow : 16; 675 /** Segment Selector. */ 676 unsigned u16SegSel : 16; 677 /** Reserved. */ 678 unsigned u3Ist : 3; 679 /** Fixed value bit 0 - Set to 0. */ 680 unsigned u1Fixed0 : 1; 681 /** Fixed value bit 1 - Set to 0. */ 682 unsigned u1Fixed1 : 1; 683 /** IDT Type part one (not used for task gate). */ 684 unsigned u3Type1 : 3; 685 /** IDT Type part two. */ 686 unsigned u5Type2 : 5; 687 /** Descriptor Privilege level. */ 688 unsigned u2DPL : 2; 689 /** Present flag. */ 690 unsigned u1Present : 1; 691 /** High offset word. */ 692 unsigned u16OffsetHigh : 16; 693 /** Offset bits 32..63. */ 694 unsigned u32OffsetHigh64; 695 /** Reserved. */ 696 unsigned u32Reserved; 697 } VBOXIDTE64_GENERIC; 698 #pragma pack() 699 /** Pointer to IDT Entry Generic view. */ 700 typedef VBOXIDTE64_GENERIC *PVBOXIDTE64_GENERIC; 701 702 /** IDT Entry, 64-bit mode. */ 703 #pragma pack(1) /* paranoia */ 704 typedef union VBOXIDTE64 705 { 706 /** Trap gate view. */ 707 VBOXIDTE64_TRAPGATE Trap; 708 /** Interrupt gate view. */ 709 VBOXIDTE64_INTERRUPTGATE Int; 710 /** Generic IDT view. */ 711 VBOXIDTE64_GENERIC Gen; 712 713 /** 8 bit unsigned integer view. */ 714 uint8_t au8[16]; 715 /** 16 bit unsigned integer view. */ 716 uint16_t au16[8]; 717 /** 32 bit unsigned integer view. */ 718 uint32_t au32[4]; 719 /** 64 bit unsigned integer view. */ 720 uint64_t au64[2]; 721 } VBOXIDTE64; 722 #pragma pack() 723 /** Pointer to IDT Entry. */ 724 typedef VBOXIDTE64 *PVBOXIDTE64; 725 /** Pointer to IDT Entry. */ 726 typedef VBOXIDTE64 const *PCVBOXIDTE64; 727 579 728 #pragma pack(1) 580 729 /** IDTR */ … … 608 757 ( ((uint32_t)((desc).Gen.u16OffsetHigh) << 16) \ 609 758 | ( (desc).Gen.u16OffsetLow ) ) 759 760 /** @def VBOXIDTE64_OFFSET 761 * Return the offset of an IDT entry. 762 */ 763 #define VBOXIDTE64_OFFSET(desc) \ 764 ( ((uint64_t)((desc).Gen.u32OffsetHigh64) << 32) \ 765 | ((uint32_t)((desc).Gen.u16OffsetHigh) << 16) \ 766 | ( (desc).Gen.u16OffsetLow ) ) 610 767 611 768 #pragma pack(1)
Note:
See TracChangeset
for help on using the changeset viewer.