Skip to content

Commit 7011978

Browse files
authored
[FREELDR] Do some MSVC fixes (reactos#8454)
Ensure using the correct data segment in the lgdt/lidt invocation. Also simplify the MASM/ML vs. gas syntax by using `lXdtPrefix`. Fixes x86 MSVC FreeLoader boot following commit 9decade.
1 parent bb7a613 commit 7011978

File tree

1 file changed

+2
-10
lines changed
  • boot/freeldr/freeldr/arch/realmode

1 file changed

+2
-10
lines changed

boot/freeldr/freeldr/arch/realmode/i386.S

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,7 @@ inrmode:
9595
mov sp, word ptr ds:[stack16]
9696

9797
/* Load IDTR with real mode value */
98-
#ifdef _USE_ML
99-
lidt fword ptr rmode_idtptr
100-
#else
101-
lidt rmode_idtptr
102-
#endif
98+
lidt lXdtPrefix ds:[rmode_idtptr]
10399

104100
sti /* These are ok now */
105101

@@ -120,11 +116,7 @@ exit_to_protected:
120116
mov word ptr ds:[stack16], sp
121117

122118
/* Load the GDT */
123-
#ifdef _USE_ML
124-
lgdt fword ptr gdtptr
125-
#else
126-
lgdt gdtptr
127-
#endif
119+
lgdt lXdtPrefix ds:[gdtptr]
128120

129121
/* Enable Protected Mode */
130122
mov eax, cr0

0 commit comments

Comments
 (0)