[2364] 2009-06-23 Robert Millan <[email protected]>

Robert Millan <[email protected]> Mon, 22 Jun 2009 22:48:20 +0000
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2364
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2364
Author:   robertmh
Date:     2009-06-22 22:48:20 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
2009-06-23  Robert Millan  <[email protected]>

        * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
        segment 0x0 unconditionally, because the reference generated by
        GAS is an absolute address.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/kern/i386/realmode.S

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-06-22 20:40:28 UTC (rev 2363)
+++ trunk/grub2/ChangeLog	2009-06-22 22:48:20 UTC (rev 2364)
@@ -1,3 +1,9 @@
+2009-06-23  Robert Millan  <[email protected]>
+
+	* kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
+	segment 0x0 unconditionally, because the reference generated by
+	GAS is an absolute address.
+
 2009-06-22  Robert Millan  <[email protected]>
 
 	* include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.

Modified: trunk/grub2/kern/i386/realmode.S
===================================================================
--- trunk/grub2/kern/i386/realmode.S	2009-06-22 20:40:28 UTC (rev 2363)
+++ trunk/grub2/kern/i386/realmode.S	2009-06-22 22:48:20 UTC (rev 2364)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007 Free Software Foundation, Inc.
+ *  Copyright (C) 1999,2000,2001,2002,2003,2005,2006,2007,2009 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
@@ -121,13 +121,9 @@
 	cli
 
 	/* load the GDT register */
-#ifdef APPLE_CC
-	mov %cs, %ax
-	mov %ax, %ds
+	xorw	%ax, %ax
+	movw	%ax, %ds
 	DATA32	ADDR32	lgdt	gdtdesc
-#else
-	DATA32	ADDR32	lgdt	%cs:gdtdesc
-#endif
 
 	/* turn on protected mode */
 	movl	%cr0, %eax