VirtualBox

Changeset 103668 in vbox


Ignore:
Timestamp:
Mar 4, 2024 1:58:08 PM (13 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162028
Message:

include/iprt/x86.h: Some _BIT definitions for the CR registers, bugref:10371

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/x86.h

    r103002 r103668  
    976976#define X86_CR0_PE                          RT_BIT_32(0)
    977977#define X86_CR0_PROTECTION_ENABLE           RT_BIT_32(0)
     978#define X86_CR0_PE_BIT                      0
    978979/** Bit 1 - MP - Monitor Coprocessor */
    979980#define X86_CR0_MP                          RT_BIT_32(1)
    980981#define X86_CR0_MONITOR_COPROCESSOR         RT_BIT_32(1)
     982#define X86_CR0_MP_BIT                      1
    981983/** Bit 2 - EM - Emulation. */
    982984#define X86_CR0_EM                          RT_BIT_32(2)
    983985#define X86_CR0_EMULATE_FPU                 RT_BIT_32(2)
     986#define X86_CR0_EM_BIT                      2
    984987/** Bit 3 - TS - Task Switch. */
    985988#define X86_CR0_TS                          RT_BIT_32(3)
    986989#define X86_CR0_TASK_SWITCH                 RT_BIT_32(3)
     990#define X86_CR0_TS_BIT                      3
    987991/** Bit 4 - ET - Extension flag. (386, 'hardcoded' to 1 on 486+) */
    988992#define X86_CR0_ET                          RT_BIT_32(4)
    989993#define X86_CR0_EXTENSION_TYPE              RT_BIT_32(4)
     994#define X86_CR0_ET_BIT                      4
    990995/** Bit 5 - NE - Numeric error (486+). */
    991996#define X86_CR0_NE                          RT_BIT_32(5)
    992997#define X86_CR0_NUMERIC_ERROR               RT_BIT_32(5)
     998#define X86_CR0_NE_BIT                      5
    993999/** Bit 16 - WP - Write Protect (486+). */
    9941000#define X86_CR0_WP                          RT_BIT_32(16)
    9951001#define X86_CR0_WRITE_PROTECT               RT_BIT_32(16)
     1002#define X86_CR0_WP_BIT                      16
    9961003/** Bit 18 - AM - Alignment Mask (486+). */
    9971004#define X86_CR0_AM                          RT_BIT_32(18)
    9981005#define X86_CR0_ALIGMENT_MASK               RT_BIT_32(18)
     1006#define X86_CR0_AM_BIT                      18
    9991007/** Bit 29 - NW - Not Write-though (486+). */
    10001008#define X86_CR0_NW                          RT_BIT_32(29)
    10011009#define X86_CR0_NOT_WRITE_THROUGH           RT_BIT_32(29)
     1010#define X86_CR0_NW_BIT                      29
    10021011/** Bit 30 - WP - Cache Disable (486+). */
    10031012#define X86_CR0_CD                          RT_BIT_32(30)
    10041013#define X86_CR0_CACHE_DISABLE               RT_BIT_32(30)
     1014#define X86_CR0_CD_BIT                      30
    10051015/** Bit 31 - PG - Paging. */
    10061016#define X86_CR0_PG                          RT_BIT_32(31)
     
    10141024/** Bit 3 - PWT - Page-level Writes Transparent. */
    10151025#define X86_CR3_PWT                         RT_BIT_32(3)
     1026#define X86_CR3_PWT_BIT                     3
    10161027/** Bit 4 - PCD - Page-level Cache Disable. */
    10171028#define X86_CR3_PCD                         RT_BIT_32(4)
     1029#define X86_CR3_PCD_BIT                     4
    10181030/** Bits 12-31 - - Page directory page number. */
    10191031#define X86_CR3_PAGE_MASK                   (0xfffff000)
     
    10351047/** Bit 0 - VME - Virtual-8086 Mode Extensions. */
    10361048#define X86_CR4_VME                         RT_BIT_32(0)
     1049#define X86_CR4_VME_BIT                     0
    10371050/** Bit 1 - PVI - Protected-Mode Virtual Interrupts. */
    10381051#define X86_CR4_PVI                         RT_BIT_32(1)
     1052#define X86_CR4_PVI_BIT                     1
    10391053/** Bit 2 - TSD - Time Stamp Disable. */
    10401054#define X86_CR4_TSD                         RT_BIT_32(2)
     1055#define X86_CR4_TSD_BIT                     2
    10411056/** Bit 3 - DE - Debugging Extensions. */
    10421057#define X86_CR4_DE                          RT_BIT_32(3)
     1058#define X86_CR4_DE_BIT                      3
    10431059/** Bit 4 - PSE - Page Size Extension. */
    10441060#define X86_CR4_PSE                         RT_BIT_32(4)
     1061#define X86_CR4_PSE_BIT                     4
    10451062/** Bit 5 - PAE - Physical Address Extension. */
    10461063#define X86_CR4_PAE                         RT_BIT_32(5)
     1064#define X86_CR4_PAE_BIT                     5
    10471065/** Bit 6 - MCE - Machine-Check Enable. */
    10481066#define X86_CR4_MCE                         RT_BIT_32(6)
     1067#define X86_CR4_MCE_BIT                     6
    10491068/** Bit 7 - PGE - Page Global Enable. */
    10501069#define X86_CR4_PGE                         RT_BIT_32(7)
     1070#define X86_CR4_PGE_BIT                     7
    10511071/** Bit 8 - PCE - Performance-Monitoring Counter Enable. */
    10521072#define X86_CR4_PCE                         RT_BIT_32(8)
     1073#define X86_CR4_PCE_BIT                     8
    10531074/** Bit 9 - OSFXSR - Operating System Support for FXSAVE and FXRSTORE instructions. */
    10541075#define X86_CR4_OSFXSR                      RT_BIT_32(9)
     1076#define X86_CR4_OSFXSR_BIT                  9
    10551077/** Bit 10 - OSXMMEEXCPT - Operating System Support for Unmasked SIMD Floating-Point Exceptions. */
    10561078#define X86_CR4_OSXMMEEXCPT                 RT_BIT_32(10)
     1079#define X86_CR4_OSXMMEEXCPT_BIT             10
    10571080/** Bit 11 - UMIP - User-Mode Instruction Prevention. */
    10581081#define X86_CR4_UMIP                        RT_BIT_32(11)
     1082#define X86_CR4_UMIP_BIT                    11
    10591083/** Bit 13 - VMXE - VMX mode is enabled. */
    10601084#define X86_CR4_VMXE                        RT_BIT_32(13)
     1085#define X86_CR4_VMXE_BIT                    13
    10611086/** Bit 14 - SMXE - Safer Mode Extensions Enabled. */
    10621087#define X86_CR4_SMXE                        RT_BIT_32(14)
     1088#define X86_CR4_SMXE_BIT                    14
    10631089/** Bit 16 - FSGSBASE - Read/write FSGSBASE instructions Enable. */
    10641090#define X86_CR4_FSGSBASE                    RT_BIT_32(16)
     1091#define X86_CR4_FSGSBASE_BIT                16
    10651092/** Bit 17 - PCIDE - Process-Context Identifiers Enabled. */
    10661093#define X86_CR4_PCIDE                       RT_BIT_32(17)
     1094#define X86_CR4_PCIDE_BIT                   17
    10671095/** Bit 18 - OSXSAVE - Operating System Support for XSAVE and processor
    10681096 * extended states. */
    10691097#define X86_CR4_OSXSAVE                     RT_BIT_32(18)
     1098#define X86_CR4_OSXSAVE_BIT                 18
    10701099/** Bit 20 - SMEP - Supervisor-mode Execution Prevention enabled. */
    10711100#define X86_CR4_SMEP                        RT_BIT_32(20)
     1101#define X86_CR4_SMEP_BIt                    20
    10721102/** Bit 21 - SMAP - Supervisor-mode Access Prevention enabled. */
    10731103#define X86_CR4_SMAP                        RT_BIT_32(21)
     1104#define X86_CR4_SMAP_BIT                    21
    10741105/** Bit 22 - PKE - Protection Key Enable. */
    10751106#define X86_CR4_PKE                         RT_BIT_32(22)
     1107#define X86_CR4_PKE_BIT                     22
    10761108/** Bit 23 - CET - Control-flow Enhancement Technology enabled. */
    10771109#define X86_CR4_CET                         RT_BIT_32(23)
     1110#define X86_CR4_CET_BIT                     23
    10781111/** @} */
    10791112
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette