Replace magic numbers with architectural defines
All checks were successful
Builds / ExectOS (amd64, release) (push) Successful in -59m29s
Builds / ExectOS (amd64, debug) (push) Successful in -59m27s
Builds / ExectOS (i686, release) (push) Successful in -59m28s
Builds / ExectOS (i686, debug) (push) Successful in -59m26s

This commit is contained in:
2026-05-13 22:01:49 +02:00
parent ae18468bad
commit 6b852556a5
2 changed files with 11 additions and 11 deletions

View File

@@ -401,7 +401,7 @@ ArStartApplicationProcessor:
/* Far return to enter 32-bit protected mode */
leal (ApEnterProtectedMode - ArStartApplicationProcessor)(%ebx), %eax
pushl $0x08
pushl $KGDT_R0_CMCODE
pushl %eax
lretl
@@ -410,7 +410,7 @@ ApEnterProtectedMode:
.code32
/* Setup all data segment registers */
movw $0x18, %ax
movw $KGDT_R0_DATA, %ax
movw %ax, %ds
movw %ax, %es
movw %ax, %ss
@@ -431,19 +431,19 @@ ApEnterProtectedMode:
movl %eax, %cr3
/* Enable Long Mode and No-Execute */
movl $0xC0000080, %ecx
movl $X86_MSR_EFER, %ecx
rdmsr
orl $0x00000900, %eax
orl $(X86_MSR_EFER_LME | X86_MSR_EFER_NXE), %eax
wrmsr
/* Enable Paging */
movl %cr0, %eax
orl $0x80000000, %eax
orl $CR0_PG, %eax
movl %eax, %cr0
/* Far return to enter 64-bit long mode */
leal (ApEnterLongMode - ArStartApplicationProcessor)(%ebx), %eax
pushl $0x10
pushl $KGDT_R0_CODE
pushl %eax
lretl