Hi,

This patch fix two bugs in the EFI port:

1, grub_longjmp (x86_64 EFI):

Return 1 when val = 0. This behavior is consistent with grub_longjmp
of i386 platform.

2, genfslist.sh and genpartmaplist.sh

In EFI, the kernel is in a module kernel.mod. genfslist.sh scans the
source for grub_fs_register, so kernel.mod would be included in fs.lst
and partmap.lst, which cause serious problem when grub try to load
extra file system modules. This patch simply ignore kernel.mod in
genfslist.sh and genpartmaplist.sh.

2008-08-22  Bean  <[EMAIL PROTECTED]>
        
        * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.

        * genfslist.sh: Ignore kernel.mod.

        * genpartmaplist.sh: Likewise.

-- 
Bean
diff --git a/genfslist.sh b/genfslist.sh
index b54f0ff..ec48e86 100644
--- a/genfslist.sh
+++ b/genfslist.sh
@@ -15,6 +15,11 @@
 
 module=$1
 
+# Ignore kernel.mod.
+if test $module = kernel; then
+    exit
+fi
+
 # For now, this emits only a module name, if the module registers a filesystem.
 if grep -v "^#" | grep '^ *grub_fs_register' >/dev/null 2>&1; then
     echo $module
diff --git a/genpartmaplist.sh b/genpartmaplist.sh
index ba65049..fceb0f8 100644
--- a/genpartmaplist.sh
+++ b/genpartmaplist.sh
@@ -15,6 +15,11 @@
 
 module=$1
 
+# Ignore kernel.mod.
+if test $module = kernel; then
+    exit
+fi
+
 # For now, this emits only a module name, if the module registers a partition map.
 if grep -v "^#" | grep '^ *grub_partition_map_register' >/dev/null 2>&1; then
     echo $module
diff --git a/normal/x86_64/setjmp.S b/normal/x86_64/setjmp.S
index 4c8d4b3..621b09b 100644
--- a/normal/x86_64/setjmp.S
+++ b/normal/x86_64/setjmp.S
@@ -50,6 +50,11 @@ FUNCTION(grub_setjmp)
  */
 FUNCTION(grub_longjmp)
 	movl	%esi, %eax
+	orl	%eax, %eax
+	jnz	1f
+	incl	%eax
+1:
+
 	movq	(%rdi), %rbx
 	movq	8(%rdi), %rsp
 	movq	16(%rdi), %rbp
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to