Fix triple-fault when starting APs with program loaded above 16MB (issue #63).
In a .code16 section, the default coding for the lgdt instruction only loads a 24 bit base address from the GDT descriptor. When loaded above 16MB, we need it to load the full 32 bits.
This commit is contained in:
parent
f98ceb1613
commit
f16be176ed
|
@ -744,7 +744,7 @@ ap_trampoline:
|
|||
movl %edi, %eax
|
||||
addl $(gdt - startup), %eax
|
||||
movl %eax, (ap_gdt_descr - ap_trampoline + 2)
|
||||
lgdt ap_gdt_descr - ap_trampoline
|
||||
data32 lgdt ap_gdt_descr - ap_trampoline
|
||||
|
||||
# Switch to protected mode and reload the segment registers.
|
||||
|
||||
|
|
|
@ -556,7 +556,7 @@ ap_trampoline:
|
|||
movl %ebx, %eax
|
||||
addl $(gdt - startup), %eax
|
||||
movl %eax, (ap_gdt_descr - ap_trampoline + 2)
|
||||
lgdt ap_gdt_descr - ap_trampoline
|
||||
data32 lgdt ap_gdt_descr - ap_trampoline
|
||||
|
||||
# Set the page directory base address.
|
||||
|
||||
|
|
Loading…
Reference in New Issue