mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PULL] Additional x86 setup fixes
@ 2007-08-02 20:45 H. Peter Anvin
  0 siblings, 0 replies; 2+ messages in thread
From: H. Peter Anvin @ 2007-08-02 20:45 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: H. Peter Anvin, Antonino A. Daplas, Linux Kernel Mailing List

Hi Linus,

One more batch of x86setup bug fixes.  Of these, one is a manifest bug
(EDID query failure), one is a non-manifest bug, and one is
documentation (Grub < 0.93 buggy.)

Please pull:

  git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup.git for-linus

Antonino A. Daplas (1):
      [x86 setup] video setup: Fix VBE DDC reading

H. Peter Anvin (2):
      [x86 setup] EDD: add missing =m constraint
      [x86 setup] Document grub < 0.93 as broken

 Documentation/Changes       |    1 +
 arch/i386/boot/edd.c        |    2 +-
 arch/i386/boot/video-vesa.c |    2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

[Full changelog and diffs follow]

commit c3887cd7253299cac2a6dc5ea792613a5ba5bf6a
Author: H. Peter Anvin <hpa@zytor.com>
Date:   Thu Aug 2 13:50:43 2007 -0400

    [x86 setup] Document grub < 0.93 as broken
    
    Grub older than 0.93 are broken when the kernel setup is bigger than
    8K.  This was fixed in 2002, and 0.93 was the first grub version which
    fixed this bug.
    
    Signed-off-by: H. Peter Anvin <hpa@zytor.com>

diff --git a/Documentation/Changes b/Documentation/Changes
index 73a8617..cb2b141 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -45,6 +45,7 @@ o  nfs-utils              1.0.5                   # showmount --version
 o  procps                 3.2.0                   # ps --version
 o  oprofile               0.9                     # oprofiled --version
 o  udev                   081                     # udevinfo -V
+o  grub                   0.93                    # grub --version
 
 Kernel compilation
 ==================

commit 463c9a9f7d1f746c251761cef3af5c808394b7e1
Author: H. Peter Anvin <hpa@zytor.com>
Date:   Thu Aug 2 13:45:49 2007 -0400

    [x86 setup] EDD: add missing =m constraint
    
    Add a missing =m constraint to the EDD-probing code, that could have
    caused improper dead-code elimination.
    
    Signed-off-by: H. Peter Anvin <hpa@zytor.com>

diff --git a/arch/i386/boot/edd.c b/arch/i386/boot/edd.c
index 77d92da..658834d 100644
--- a/arch/i386/boot/edd.c
+++ b/arch/i386/boot/edd.c
@@ -127,7 +127,7 @@ static int get_edd_info(u8 devno, struct edd_info *ei)
 	ax = 0x4800;
 	dx = devno;
 	asm("pushfl; int $0x13; popfl"
-	    : "+a" (ax), "+d" (dx)
+	    : "+a" (ax), "+d" (dx), "=m" (ei->params)
 	    : "S" (&ei->params)
 	    : "ebx", "ecx", "edi");
 

commit 59acc08fd95aefb5430458a08a82b15a4174ed74
Author: Antonino A. Daplas <adaplas@gmail.com>
Date:   Thu Aug 2 18:16:46 2007 +0800

    [x86 setup] video setup: Fix VBE DDC reading
    
    Add memory operand constraint and write-only modifier to the inline
    assembly to effect the writing of the EDID block to boot_params.edid_info.
    
    Without this, gcc would think the EDID query was dead code and would
    eliminate it.
    
    Signed-off-by: Antonino Daplas <adaplas@gmail.com>
    Signed-off-by: H. Peter Anvin <hpa@zytor.com>

diff --git a/arch/i386/boot/video-vesa.c b/arch/i386/boot/video-vesa.c
index e6aa9eb..f1bc71e 100644
--- a/arch/i386/boot/video-vesa.c
+++ b/arch/i386/boot/video-vesa.c
@@ -268,7 +268,7 @@ void vesa_store_edid(void)
 	dx = 0;			/* EDID block number */
 	di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */
 	asm(INT10
-	    : "+a" (ax), "+b" (bx), "+d" (dx)
+	    : "+a" (ax), "+b" (bx), "+d" (dx), "=m" (boot_params.edid_info)
 	    : "c" (cx), "D" (di)
 	    : "esi");
 #endif /* CONFIG_FIRMWARE_EDID */

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [GIT PULL] Additional x86 setup fixes
@ 2007-07-31 22:42 H. Peter Anvin
  0 siblings, 0 replies; 2+ messages in thread
From: H. Peter Anvin @ 2007-07-31 22:42 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: H. Peter Anvin, Linux Kernel Mailing List

Hi Linus,

Please pull:

  git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup.git for-linus

Two patches are cosmetic; the EDD issue can cause crashes when booting
from CD-ROM on some systems.

H. Peter Anvin (2):
      [x86 setup] Newline after setup signature failure message
      [x86 setup] EDD: Fix the computation of the MBR sector buffer

Randy Dunlap (1):
      x86 boot code comments typos

 arch/i386/boot/code16gcc.h  |    2 +-
 arch/i386/boot/edd.c        |    5 +++--
 arch/i386/boot/header.S     |    4 ++--
 arch/i386/boot/pm.c         |    2 +-
 arch/i386/boot/video-bios.c |    2 +-
 5 files changed, 8 insertions(+), 7 deletions(-)

[Full descriptions and diffs follow.]

commit ff659d13ed91dd0b237064aba91a5259f827aeb3
Author: H. Peter Anvin <hpa@zytor.com>
Date:   Tue Jul 31 16:17:13 2007 -0400

    [x86 setup] EDD: Fix the computation of the MBR sector buffer
    
    Some BIOSes require that sector buffers not cross 64K
    boundaries.  As a result, we compute a dynamic address on the
    setup heap.  Unfortunately, this address computation was just
    totally wrong.
    
    Signed-off-by: H. Peter Anvin <hpa@zytor.com>

diff --git a/arch/i386/boot/edd.c b/arch/i386/boot/edd.c
index 25a2824..77d92da 100644
--- a/arch/i386/boot/edd.c
+++ b/arch/i386/boot/edd.c
@@ -72,17 +72,18 @@ static u32 read_mbr_sig(u8 devno, struct edd_info *ei)
 	u32 mbrsig;
 	u32 buf_base, mbr_base;
 	extern char _end[];
-	static char mbr_buf[1024];
 
 	sector_size = ei->params.bytes_per_sector;
 	if (!sector_size)
 		sector_size = 512; /* Best available guess */
 
+	/* Produce a naturally aligned buffer on the heap */
 	buf_base = (ds() << 4) + (u32)&_end;
 	mbr_base = (buf_base+sector_size-1) & ~(sector_size-1);
-	mbrbuf_ptr = mbr_buf + (mbr_base-buf_base);
+	mbrbuf_ptr = _end + (mbr_base-buf_base);
 	mbrbuf_end = mbrbuf_ptr + sector_size;
 
+	/* Make sure we actually have space on the heap... */
 	if (!(boot_params.hdr.loadflags & CAN_USE_HEAP))
 		return 0;
 	if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr)

commit 8b608d2f5a1b3552363a3161566645a409ff8530
Author: H. Peter Anvin <hpa@zytor.com>
Date:   Thu Jul 26 16:10:22 2007 -0700

    [x86 setup] Newline after setup signature failure message
    
    End the "No setup signature found..." with a newline (the puts
    routine will automatically add a carriage return.)
    
    Signed-off-by: H. Peter Anvin <hpa@zytor.com>

diff --git a/arch/i386/boot/header.S b/arch/i386/boot/header.S
index 32ce54a..7f4a2c5 100644
--- a/arch/i386/boot/header.S
+++ b/arch/i386/boot/header.S
@@ -280,4 +280,4 @@ die:
 	.section ".initdata", "a"
 setup_corrupt:
 	.byte	7
-	.string	"No setup signature found..."
+	.string	"No setup signature found...\n"

commit 8218d029c58b89837a24b4e1362c33d0ba7450b5
Author: Randy Dunlap <randy.dunlap@oracle.com>
Date:   Thu Jul 26 10:10:35 2007 -0700

    x86 boot code comments typos
    
    Fix comments typos in new x86 boot code.
    
    Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
    Signed-off-by: H. Peter Anvin <hpa@zytor.com>

diff --git a/arch/i386/boot/code16gcc.h b/arch/i386/boot/code16gcc.h
index 3bd8480..d93e480 100644
--- a/arch/i386/boot/code16gcc.h
+++ b/arch/i386/boot/code16gcc.h
@@ -2,7 +2,7 @@
  * code16gcc.h
  *
  * This file is -include'd when compiling 16-bit C code.
- * Note: this asm() needs to be emitted before gcc omits any code.
+ * Note: this asm() needs to be emitted before gcc emits any code.
  * Depending on gcc version, this requires -fno-unit-at-a-time or
  * -fno-toplevel-reorder.
  *
diff --git a/arch/i386/boot/header.S b/arch/i386/boot/header.S
index 6b9923f..32ce54a 100644
--- a/arch/i386/boot/header.S
+++ b/arch/i386/boot/header.S
@@ -225,7 +225,7 @@ start_of_setup:
 	int	$0x13
 #endif
 
-# We will have entired with %cs = %ds+0x20, normalize %cs so
+# We will have entered with %cs = %ds+0x20, normalize %cs so
 # it is on par with the other segments.
 	pushw	%ds
 	pushw	$setup2
diff --git a/arch/i386/boot/pm.c b/arch/i386/boot/pm.c
index 1df025c..6be9ca8 100644
--- a/arch/i386/boot/pm.c
+++ b/arch/i386/boot/pm.c
@@ -80,7 +80,7 @@ static void move_kernel_around(void)
  */
 static void mask_all_interrupts(void)
 {
-	outb(0xff, 0xa1);	/* Mask all interrupts on the seconday PIC */
+	outb(0xff, 0xa1);	/* Mask all interrupts on the secondary PIC */
 	io_delay();
 	outb(0xfb, 0x21);	/* Mask all but cascade on the primary PIC */
 	io_delay();
diff --git a/arch/i386/boot/video-bios.c b/arch/i386/boot/video-bios.c
index afea46c..68e65d9 100644
--- a/arch/i386/boot/video-bios.c
+++ b/arch/i386/boot/video-bios.c
@@ -44,7 +44,7 @@ static int set_bios_mode(u8 mode)
 		     : "+a" (ax)
 		     : : "ebx", "ecx", "edx", "esi", "edi");
 
-	do_restore = 1;		/* Assume video contents was lost */
+	do_restore = 1;		/* Assume video contents were lost */
 	new_mode = ax & 0x7f;	/* Not all BIOSes are clean with the top bit */
 
 	if (new_mode == mode)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-02 20:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-02 20:45 [GIT PULL] Additional x86 setup fixes H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2007-07-31 22:42 H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®