Move grub_chainloader_real_boot out of the kernel.

* grub-core/Makefile.am: Remove machine/loader.h.
	* grub-core/kern/i386/pc/startup.S (grub_chainloader_real_boot):
	Removed.
	* grub-core/lib/i386/relocator.c (grub_relocator16_esi): New extern
	variable.
	(grub_relocator16_keep_a20_enabled): Likewise.
	(grub_relocator16_boot): Fill new variables.
	* grub-core/lib/i386/relocator16.S: Add gate a20 handling.
	* grub-core/loader/i386/pc/chainloader.c (grub_chainloader_boot): Use
	relocator.
	(grub_chainloader_unload): Likewise.
	(grub_chainloader_cmd): Likewise.
	* include/grub/i386/pc/loader.h: Removed.
	* include/grub/i386/relocator.h (grub_relocator16_state): Add a20
	and esi. All initialisers updated.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-11-12 15:46:50 +01:00
commit 678f4b6713
12 changed files with 168 additions and 69 deletions

View file

@ -464,31 +464,6 @@ FUNCTION(grub_exit)
ljmp $0xf000, $0xfff0
.code32
/*
* void grub_chainloader_real_boot (int drive, void *part_addr)
*
* This starts another boot loader.
*/
FUNCTION(grub_chainloader_real_boot)
pushl %edx
pushl %eax
/* Turn off Gate A20 */
xorl %eax, %eax
call grub_gate_a20
/* set up to pass boot drive */
popl %edx
/* ESI must point to a partition table entry */
popl %esi
call prot_to_real
.code16
ljmp $0, $GRUB_MEMORY_MACHINE_BOOT_LOADER_ADDR
.code32
/*
* void grub_console_putchar (int c)
*