From 51e2e7acf3469490378af9533e35c66b8604b4ec Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Mon, 22 Jun 2009 18:04:37 +0000 Subject: [PATCH] 2009-06-22 Robert Millan * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'. * conf/i386-ieee1275.rmk: Likewise. * conf/i386-coreboot.rmk: Likewise. * kern/i386/pc/startup.S (grub_stop): Remove function. * kern/i386/ieee1275/startup.S: Likewise. * kern/i386/coreboot/startup.S: Likewise. * kern/i386/misc.S (grub_stop): New function. git-svn-id: svn://svn.savannah.gnu.org/grub/trunk/grub2@2359 d0de0278-0dc1-4c01-8a07-af38b3205e46 --- ChangeLog | 11 +++++++++++ conf/i386-coreboot.rmk | 1 + conf/i386-ieee1275.rmk | 4 +++- conf/i386-pc.rmk | 4 +++- kern/i386/coreboot/startup.S | 8 -------- kern/i386/ieee1275/startup.S | 8 -------- kern/i386/misc.S | 29 +++++++++++++++++++++++++++++ kern/i386/pc/startup.S | 8 -------- 8 files changed, 47 insertions(+), 26 deletions(-) create mode 100644 kern/i386/misc.S diff --git a/ChangeLog b/ChangeLog index ea303ce1..3b6f5aed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2009-06-22 Robert Millan + * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'. + * conf/i386-ieee1275.rmk: Likewise. + * conf/i386-coreboot.rmk: Likewise. + + * kern/i386/pc/startup.S (grub_stop): Remove function. + * kern/i386/ieee1275/startup.S: Likewise. + * kern/i386/coreboot/startup.S: Likewise. + * kern/i386/misc.S (grub_stop): New function. + +2009-06-22 Robert Millan + * kern/i386/pc/startup.S (real_to_prot): Move from here ... * kern/i386/realmode.S (real_to_prot): ... to here. diff --git a/conf/i386-coreboot.rmk b/conf/i386-coreboot.rmk index 39e290e1..a76f4250 100644 --- a/conf/i386-coreboot.rmk +++ b/conf/i386-coreboot.rmk @@ -12,6 +12,7 @@ pkglib_PROGRAMS = kernel.img # For kernel.img. kernel_img_SOURCES = kern/i386/coreboot/startup.S \ + kern/i386/misc.S \ kern/i386/coreboot/init.c \ kern/i386/multiboot_mmap.c \ kern/main.c kern/device.c \ diff --git a/conf/i386-ieee1275.rmk b/conf/i386-ieee1275.rmk index f3225abb..5024dad5 100644 --- a/conf/i386-ieee1275.rmk +++ b/conf/i386-ieee1275.rmk @@ -11,7 +11,9 @@ script/sh/lexer.c_DEPENDENCIES = grub_script.tab.h pkglib_PROGRAMS = kernel.img # For kernel.img. -kernel_img_SOURCES = kern/i386/ieee1275/startup.S kern/i386/ieee1275/init.c \ +kernel_img_SOURCES = kern/i386/ieee1275/startup.S \ + kern/i386/misc.S \ + kern/i386/ieee1275/init.c \ kern/ieee1275/init.c \ kern/ieee1275/mmap.c \ kern/ieee1275/cmain.c kern/ieee1275/openfw.c \ diff --git a/conf/i386-pc.rmk b/conf/i386-pc.rmk index ae4feafb..50a70bf2 100644 --- a/conf/i386-pc.rmk +++ b/conf/i386-pc.rmk @@ -46,7 +46,9 @@ cdboot_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)7C00 cdboot_img_FORMAT = binary # For kernel.img. -kernel_img_SOURCES = kern/i386/pc/startup.S kern/main.c kern/device.c \ +kernel_img_SOURCES = kern/i386/pc/startup.S \ + kern/i386/misc.S \ + kern/main.c kern/device.c \ kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \ kern/misc.c kern/mm.c kern/reader.c kern/term.c \ kern/rescue_parser.c kern/rescue_reader.c \ diff --git a/kern/i386/coreboot/startup.S b/kern/i386/coreboot/startup.S index fc53a854..3f2dd5f5 100644 --- a/kern/i386/coreboot/startup.S +++ b/kern/i386/coreboot/startup.S @@ -78,14 +78,6 @@ codestart: jmp EXT_C(grub_main) /* - * This call is special... it never returns... in fact it should simply - * hang at this point! - */ -FUNCTION(grub_stop) - hlt - jmp EXT_C(grub_stop) - -/* * prot_to_real and associated structures (but NOT real_to_prot, that is * only needed for BIOS gates). */ diff --git a/kern/i386/ieee1275/startup.S b/kern/i386/ieee1275/startup.S index dfbfab59..35258adb 100644 --- a/kern/i386/ieee1275/startup.S +++ b/kern/i386/ieee1275/startup.S @@ -59,14 +59,6 @@ codestart: jmp EXT_C(grub_main) /* - * This call is special... it never returns... in fact it should simply - * hang at this point! - */ -FUNCTION(grub_stop) - hlt - jmp EXT_C(grub_stop) - -/* * prot_to_real and associated structures (but NOT real_to_prot, that is * only needed for BIOS gates). */ diff --git a/kern/i386/misc.S b/kern/i386/misc.S new file mode 100644 index 00000000..7d57df9b --- /dev/null +++ b/kern/i386/misc.S @@ -0,0 +1,29 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2008 Free Software Foundation, Inc. + * + * GRUB is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GRUB is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB. If not, see . + */ + +#include + + .text +/* + * This call is special... it never returns... in fact it should simply + * hang at this point! + */ +FUNCTION(grub_stop) + cli +1: hlt + jmp 1b diff --git a/kern/i386/pc/startup.S b/kern/i386/pc/startup.S index cb3fec6b..171fbeab 100644 --- a/kern/i386/pc/startup.S +++ b/kern/i386/pc/startup.S @@ -463,14 +463,6 @@ gate_a20_check_state: */ . = _start + GRUB_KERNEL_MACHINE_RAW_SIZE -/* - * This call is special... it never returns... in fact it should simply - * hang at this point! - */ - -FUNCTION(grub_stop) - call prot_to_real - /* * This next part is sort of evil. It takes advantage of the * byte ordering on the x86 to work in either 16-bit or 32-bit -- 2.11.4.GIT