Unify GDT selector naming convention
This commit is contained in:
@@ -46,7 +46,7 @@ ArEnableExtendedPhysicalAddressing:
|
||||
leaq XpaEnterLongMode(%rip), %rbx
|
||||
|
||||
/* Push the 32-bit code segment selector and the target address for a far jump */
|
||||
pushq $GDT_R0_CMCODE
|
||||
pushq $KGDT_R0_CMCODE
|
||||
pushq %rax
|
||||
|
||||
/* Perform a far return to switch to 32-bit compatibility mode */
|
||||
@@ -60,7 +60,7 @@ XpaEnterCompatMode:
|
||||
pushl %ecx
|
||||
|
||||
/* Set the stack segment to the 32-bit data segment selector */
|
||||
movl $GDT_R0_DATA, %eax
|
||||
movl $KGDT_R0_DATA, %eax
|
||||
movl %eax, %ss
|
||||
|
||||
/* Disable PGE and PCIDE to ensure all TLB entries will be flushed */
|
||||
@@ -100,7 +100,7 @@ XpaEnterCompatMode:
|
||||
|
||||
XpaFlushInstructions:
|
||||
/* Push the 64-bit code segment selector and the target address for a far jump */
|
||||
pushl $GDT_R0_CODE
|
||||
pushl $KGDT_R0_CODE
|
||||
pushl %ebx
|
||||
|
||||
/* Perform a far return to switch to 64-bit long mode */
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
#define CR4_PCIDE 0x00020000
|
||||
|
||||
/* GDT selectors */
|
||||
#define GDT_R0_CMCODE 0x08
|
||||
#define GDT_R0_CODE 0x10
|
||||
#define GDT_R0_DATA 0x18
|
||||
#define KGDT_R0_CMCODE 0x08
|
||||
#define KGDT_R0_CODE 0x10
|
||||
#define KGDT_R0_DATA 0x18
|
||||
|
||||
/* MSR registers */
|
||||
#define X86_MSR_EFER 0xC0000080
|
||||
|
||||
Reference in New Issue
Block a user