mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
Fix interrupt mixup from previous commit.
* include/grub/i386/pc/int.h (grub_i386_idt): New struct. (grub_realidt): New var. * grub-core/lib/i386/relocator16.S (grub_relocator16_idt): New variable Load idt. * grub-core/lib/i386/relocator.c (grub_relocator16_idt): New declaration. (grub_relocator16_boot): Set grub_relocator16_idt. * grub-core/kern/i386/realmode.S (realidt): Renamed to ... (LOCAL(realidt)): ... this. * grub-core/boot/i386/pc/startup_raw.S: Pass pointer to realidt in eax. * grub-core/kern/i386/pc/startup.S: Save pointer to realidt. (grub_realidt): New variable.
This commit is contained in:
1 parent
27317084c6
commit
94f064b4c9
7 files changed
+47
-4
No files matched your search
@@ -56,6 +56,7 @@ _start:
|
||||
|
||||
movl %ecx, (LOCAL(real_to_prot_addr) - _start) (%esi)
|
||||
movl %edi, (LOCAL(prot_to_real_addr) - _start) (%esi)
|
||||
movl %eax, (EXT_C(grub_realidt) - _start) (%esi)
|
||||
|
||||
/* copy back the decompressed part (except the modules) */
|
||||
movl $(_edata - _start), %ecx
|
||||
@@ -177,6 +178,9 @@ FUNCTION(grub_pxe_call)
|
||||
|
||||
#include "../int.S"
|
||||
|
||||
VARIABLE(grub_realidt)
|
||||
.long 0
|
||||
|
||||
.bss
|
||||
VARIABLE(grub_boot_device)
|
||||
.long 0
|
||||
@@ -118,7 +118,7 @@ gdt:
|
||||
gdtdesc:
|
||||
.word 0x27 /* limit */
|
||||
.long gdt /* addr */
|
||||
realidt:
|
||||
LOCAL(realidt):
|
||||
.word 0
|
||||
.long 0
|
||||
protidt:
|
||||
@@ -175,7 +175,7 @@ protcseg:
|
||||
/* zero %eax */
|
||||
xorl %eax, %eax
|
||||
|
||||
sidt realidt
|
||||
sidt LOCAL(realidt)
|
||||
lidt protidt
|
||||
|
||||
/* return on the old (or initialized) stack! */
|
||||
@@ -205,7 +205,7 @@ prot_to_real:
|
||||
lgdt gdtdesc
|
||||
|
||||
sidt protidt
|
||||
lidt realidt
|
||||
lidt LOCAL(realidt)
|
||||
|
||||
/* save the protected mode stack */
|
||||
movl %esp, %eax
|
||||
|
||||
Reference in new issue
Block a user