]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-06-22 Robert Millan <rmh.grub@aybabtu.com>
authorrobertmh <robertmh@localhost>
Mon, 22 Jun 2009 18:04:37 +0000 (18:04 +0000)
committerrobertmh <robertmh@localhost>
Mon, 22 Jun 2009 18:04:37 +0000 (18:04 +0000)
        * 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.

ChangeLog
conf/i386-coreboot.rmk
conf/i386-ieee1275.rmk
conf/i386-pc.rmk
kern/i386/coreboot/startup.S
kern/i386/ieee1275/startup.S
kern/i386/misc.S [new file with mode: 0644]
kern/i386/pc/startup.S

index ea303ce19ab7d140ccb6a5fde6ba251296e2cca2..3b6f5aedc4a90507fc56eda501cf1e0b5ead4102 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
+
+       * 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  <rmh.grub@aybabtu.com>
 
        * kern/i386/pc/startup.S (real_to_prot): Move from here ...
index 39e290e166ade36c8d15a27a1abeceef4bb64b24..a76f425078c533f4808e03a6478bc8fbf83d1682 100644 (file)
@@ -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 \
index f3225abbeae80e6e7e01df1caa3da259acdad810..5024dad5039039a31921f2f3a4dfd7bc1916d105 100644 (file)
@@ -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 \
index ae4feafbf45737688d14bba8e3ff67d1661c67d5..50a70bf24f3e789e2d5fecb4358a70f129892dfe 100644 (file)
@@ -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 \
index fc53a85429dfaf98cec192bf173568ceaaa2db2c..3f2dd5f50d4b7cc5329878503f551f49ef48c7ea 100644 (file)
@@ -77,14 +77,6 @@ codestart:
        /* jump to the main body of C code */
        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).
index dfbfab5947a492c645a3a85cb4cac3131dc334fc..35258adb6dc24d34aebf5deb4353fad9086bb43e 100644 (file)
@@ -58,14 +58,6 @@ codestart:
        movl %eax, EXT_C(grub_ieee1275_entry_fn)
        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 (file)
index 0000000..7d57df9
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+
+#include <grub/symbol.h>
+
+       .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
index cb3fec6ba687a5f690dc4aa3960d0044f28a6251..171fbeabe2216b6b8374a68a3b0fb89cc61da852 100644 (file)
@@ -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