mirror of
https://github.com/reactos/reactos.git
synced 2026-06-04 02:10:28 +08:00
[FREELDR] Do some MSVC fixes (#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 9decadee83.
This commit is contained in:
@@ -95,11 +95,7 @@ inrmode:
|
||||
mov sp, word ptr ds:[stack16]
|
||||
|
||||
/* Load IDTR with real mode value */
|
||||
#ifdef _USE_ML
|
||||
lidt fword ptr rmode_idtptr
|
||||
#else
|
||||
lidt rmode_idtptr
|
||||
#endif
|
||||
lidt lXdtPrefix ds:[rmode_idtptr]
|
||||
|
||||
sti /* These are ok now */
|
||||
|
||||
@@ -120,11 +116,7 @@ exit_to_protected:
|
||||
mov word ptr ds:[stack16], sp
|
||||
|
||||
/* Load the GDT */
|
||||
#ifdef _USE_ML
|
||||
lgdt fword ptr gdtptr
|
||||
#else
|
||||
lgdt gdtptr
|
||||
#endif
|
||||
lgdt lXdtPrefix ds:[gdtptr]
|
||||
|
||||
/* Enable Protected Mode */
|
||||
mov eax, cr0
|
||||
|
||||
Reference in New Issue
Block a user