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:
Vladimir 'phcoder' Serbinenko 2012-02-26 22:10:13 +01:00
parent 27317084c6
commit 94f064b4c9
7 changed files with 47 additions and 4 deletions

View file

@ -76,6 +76,8 @@ VARIABLE(grub_relocator16_start)
movl %esi, %eax
shrl $4, %eax
movw %ax, (LOCAL (segment) - LOCAL (base)) (%esi, 1)
lidt (EXT_C(grub_relocator16_idt) - LOCAL (base)) (%esi, 1)
/* jump to a 16 bit segment */
ljmp $PSEUDO_REAL_CSEG, $(LOCAL (cont2) - LOCAL(base))
@ -278,4 +280,7 @@ LOCAL(cs_base_byte3):
.byte 0, 0x92, 0, 0
LOCAL(gdt_end):
VARIABLE(grub_relocator16_idt)
.word 0
.long 0
VARIABLE(grub_relocator16_end)