public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alexander van Heukelum <heukelum@mailshack.com>,
	Andi Kleen <ak@suse.de>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Make bootsector stub 16-bit-only (i386)
Date: Tue, 8 May 2007 11:12:43 -0700	[thread overview]
Message-ID: <20070508111243.13e7a7f7.akpm@linux-foundation.org> (raw)
In-Reply-To: <46405E0C.3020909@zytor.com>

On Tue, 08 May 2007 04:25:00 -0700 "H. Peter Anvin" <hpa@zytor.com> wrote:

> Andrew Morton wrote:
> 
> >>  
> >>  	# Normalize the start address
> >> -	jmpl	$BOOTSEG, $start2
> >> +	jmpw	$BOOTSEG, $start2
> > 
> > Sigh, another blow struck in the ongoing struggle between my Vaio and the
> > rest of the world.
> > 
> > Stone-cold black-screen lockup immediately upon boot.
> > 
> > Stock FC5 install, config at
> > http://userweb.kernel.org/~akpm/config-sony.txt
> 
> Andrew, I'm seriously starting to think there is something fundamentally
> wrong with that test setup.

heh.  All the other bugs have been real oh-yeah-youre-right bugs.  This is
the only mystery bug which I recall.

> The bootsect code in question is never executed.  AT ALL.  The only
> raison d'être for it at all is to print an error message if someone
> writes the kernel to a raw floppy disk.  Nor does it change the
> alignment of the header or anything else to that effect -- the assembly
> code downstream has an explicit ".org" directive.  For what it's worth,
> just to make sure I'm not crazy, I just re-tested both booting the
> kernel and booting the raw disk image, in simulation and on real
> hardware, and it doesn't change anything.  I used your configuration
> file (yes '' | make oldconfig) minus Bluetooth (which is broken in
> current top of Linus) against top of tree Linus + the jmpw patch.  I
> obviously don't have your Vaio, but I do have my own share of quirky
> hardware.  FWIW, I netbooted the hardware using pxelinux 3.50-pre7 as
> the bootloader.[*]
> 
> I'm not writing this to give you a hard time, far from it.  I'm
> suggesting that there might be something wrong with that rig that's
> giving you false testing failures.  I don't particularly care about the
> patch itself -- all it does is save 3 bytes which are currently unused
> anyway, (although it might help Vivek's work.)  However, I'm very
> concerned that you might be getting false failures, for obvious reasons.
> 

I just retested bare 2.6.21 with that patch.  Same hang.

Maybe the assembler or linker screwed something up.

Without patch:

(gdb)  x/20i _start
0x0 <_start>:   ljmpw  $0x0,$0x8
0x6 <_start+6>: rolb   $0x8c,(%edi)
0x9 <start2+1>: enter  $0xd88e,$0x8e
0xd <start2+5>: rorb   $0xfb,0x7c00bcd0(%esi)
0x14 <start2+12>:       cld    
0x15 <start2+13>:       mov    $0x20ac0031,%esi
0x1a <msg_loop+2>:      (bad)  
0x1b <msg_loop+3>:      je     0x26 <die>
0x1d <msg_loop+5>:      mov    $0xe,%ah
0x1f <msg_loop+7>:      mov    $0x10cd0007,%ebx
0x24 <msg_loop+12>:     jmp    0x18 <msg_loop>
0x26 <die>:     xor    %eax,%eax
0x28 <die+2>:   int    $0x16

With patch:

(gdb) x/20i _start
0x0 <_start>:   ljmp   $0xc88c,$0x7c00005
0x7 <start2+2>: mov    %eax,%ds
0x9 <start2+4>: mov    %eax,%es
0xb <start2+6>: mov    %eax,%ss
0xd <start2+8>: mov    $0xfcfb7c00,%esp
0x12 <start2+13>:       mov    $0x20ac002e,%esi
0x17 <msg_loop+2>:      (bad)  
0x18 <msg_loop+3>:      je     0x23 <die>
0x1a <msg_loop+5>:      mov    $0xe,%ah
0x1c <msg_loop+7>:      mov    $0x10cd0007,%ebx
0x21 <msg_loop+12>:     jmp    0x15 <msg_loop>

not sure what's going on there.  We seem to have confused gdb.

  parent reply	other threads:[~2007-05-08 18:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-05 10:44 [PATCH] Make bootsector stub 16-bit-only (i386) Alexander van Heukelum
2007-05-05 18:07 ` H. Peter Anvin
2007-05-08 10:28 ` Andrew Morton
2007-05-08 11:25   ` H. Peter Anvin
2007-05-08 12:27     ` Andi Kleen
2007-05-08 17:13       ` H. Peter Anvin
2007-05-08 18:12     ` Andrew Morton [this message]
2007-05-08 18:27       ` H. Peter Anvin
2007-05-08 18:32   ` Alexander van Heukelum
2007-05-08 18:45     ` H. Peter Anvin
2007-05-08 19:19       ` Alexander van Heukelum
2007-05-08 22:27         ` H. Peter Anvin
2007-05-08 20:00     ` Andrew Morton
2007-05-09  0:04     ` Antonino A. Daplas
2007-05-09  8:54       ` Alexander van Heukelum
2007-05-09 13:45         ` Antonino A. Daplas
2007-05-09 16:51         ` H. Peter Anvin
2007-05-09 18:18           ` Alexander van Heukelum
2007-05-09 18:27             ` H. Peter Anvin
2007-05-09 14:30       ` Lennart Sorensen
2007-05-09 14:51         ` Antonino A. Daplas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070508111243.13e7a7f7.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ak@suse.de \
    --cc=heukelum@mailshack.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox