From nobody@FreeBSD.org  Thu Apr 27 19:27:55 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1F7FA16A402
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Apr 2006 19:27:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E299743D45
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Apr 2006 19:27:54 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k3RJRseH023450
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Apr 2006 19:27:54 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k3RJRsGU023448;
	Thu, 27 Apr 2006 19:27:54 GMT
	(envelope-from nobody)
Message-Id: <200604271927.k3RJRsGU023448@www.freebsd.org>
Date: Thu, 27 Apr 2006 19:27:54 GMT
From: Yuichiro Goto <y7goto@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: boot2 is unable to load kernel directly
X-Send-Pr-Version: www-2.3
X-GNATS-Notify: bde,ru

>Number:         96430
>Category:       i386
>Synopsis:       boot2 is unable to load kernel directly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 27 19:30:12 GMT 2006
>Closed-Date:    Mon Nov 27 14:50:14 GMT 2006
>Last-Modified:  Mon Nov 27 15:00:23 GMT 2006
>Originator:     Yuichiro Goto
>Release:        FreeBSD 6.1-RC1
>Organization:
>Environment:
FreeBSD cobalt.my.domain 6.1-RC FreeBSD 6.1-RC #0: Wed Apr 26 10:38:08 JST 2006     root@cobalt.my.domain:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Loading a kernel directly using boot2 causes the invalid-opcode fault like the
following:

int=00000006  err=00000000  efl=00010002  eip=c0445a90
eax=c0445a90  ebx=0007cd0f  ecx=c0b5e1a7  edx=a030001e
esi=c0b5e1a7  edi=c0445a90  ebp=00000002  esp=0009eb84
cs=0008  ds=0010  es=0010    fs=0010  gs=0010  ss=0010
cs:eip=ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff
       ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff
ss:esp=69 95 00 00 00 00 00 80-1e 00 30 a0 00 00 00 00
       00 00 00 00 00 00 00 00-60 dd 00 00 36 42 00 00
BTX halted

I tried to load a kernel directly that is a slightly modified
version of GENERIC.  The following 2 lines are added to
GENERIC:

makeoptions     CONF_CFLAGS=-DROOTDEVNAME=\"ufs:/dev/ad0s2a\"
makeoptions     NO_MODULES=yes
>How-To-Repeat:
Directly load a kernel using boot2.
>Fix:
load() in src/sys/boot/i386/boot2/boot2.c tries to copy kernel segments at a
phisical address on memory whose most significant 2 bits are set.  This is
because of changes between rev 1.70 and 1.71 of
src/sys/boot/i386/boot2/boot2.c.
>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: Yuichiro Goto <y7goto@gmail.com>
Cc: freebsd-gnats-submit@freebsd.org, freebsd-i386@freebsd.org
Subject: Re: i386/96430: boot2 is unable to load kernel directly
Date: Sat, 29 Apr 2006 05:49:19 +1000 (EST)

 On Thu, 27 Apr 2006, Yuichiro Goto wrote:
 
 >> Description:
 > Loading a kernel directly using boot2 causes the invalid-opcode fault like the
 > following:
 >
 > int=00000006  err=00000000  efl=00010002  eip=c0445a90
 > eax=c0445a90  ebx=0007cd0f  ecx=c0b5e1a7  edx=a030001e
 > esi=c0b5e1a7  edi=c0445a90  ebp=00000002  esp=0009eb84
 > cs=0008  ds=0010  es=0010    fs=0010  gs=0010  ss=0010
 > cs:eip=ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff
 >       ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff
 > ss:esp=69 95 00 00 00 00 00 80-1e 00 30 a0 00 00 00 00
 >       00 00 00 00 00 00 00 00-60 dd 00 00 36 42 00 00
 > BTX halted
 >
 > I tried to load a kernel directly that is a slightly modified
 > version of GENERIC.  ...
 
 >> How-To-Repeat:
 > Directly load a kernel using boot2.
 >> Fix:
 > load() in src/sys/boot/i386/boot2/boot2.c tries to copy kernel segments at a
 > phisical address on memory whose most significant 2 bits are set.  This is
 > because of changes between rev 1.70 and 1.71 of
 > src/sys/boot/i386/boot2/boot2.c.
 
 I reported this to the author of the bug a few months ago.
 
 I use an old 2-stage-only boot loader that is missing this bug, but
 still the GENERIC kernel doesn't load - the load hangs with no message.
 Loading of smaller kernels (size ~= 3MB) with boot2 still works with
 both my old boot loader and the FreeBSD-6.0 boot2 with rev.1.71 backed
 out.
 
 Bruce
Responsible-Changed-From-To: freebsd-i386->jhb 
Responsible-Changed-By: ru 
Responsible-Changed-When: Thu Oct 26 12:17:14 UTC 2006 
Responsible-Changed-Why:  
John, could you please look into fixing this properly? 
Backing out rev. 1.71 changes fixes this issue for me; 
see my email with more details. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96430 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/96430: commit references a PR
Date: Thu, 26 Oct 2006 19:16:15 +0000 (UTC)

 ru          2006-10-26 19:15:54 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/boot/i386/boot2  boot2.c 
   Log:
   Back out rev. 1.71 as it breaks directly loading (i386) kernels.
   
   OK'ed by:       jhb
   PR:             i386/96430, i386/104709
   MFC after:      3 days
   
   Revision  Changes    Path
   1.80      +3 -3      src/sys/boot/i386/boot2/boot2.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: ru 
State-Changed-When: Mon Oct 30 15:31:32 UTC 2006 
State-Changed-Why:  
Fixed differently in 7.0-CURRENT. 


Responsible-Changed-From-To: jhb->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Mon Oct 30 15:31:32 UTC 2006 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=96430 
State-Changed-From-To: patched->closed 
State-Changed-By: ru 
State-Changed-When: Mon Nov 27 14:49:56 UTC 2006 
State-Changed-Why:  
Fixed in RELENG_6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=96430 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/96430: commit references a PR
Date: Mon, 27 Nov 2006 14:50:47 +0000 (UTC)

 ru          2006-11-27 14:49:38 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sys/boot/i386/boot2  boot2.c 
   Log:
   MFC: 1.80: Restore support for directly loaded kernels.
        1.81: Restore support for -c and -d.
   
   PR:             i386/96430, i386/104709
   
   Revision  Changes    Path
   1.72.2.5  +7 -5      src/sys/boot/i386/boot2/boot2.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
