From owner-freebsd-i386@FreeBSD.ORG Fri Apr 28 19:49:22 2006 Return-Path: X-Original-To: freebsd-i386@freebsd.org Delivered-To: freebsd-i386@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A165116A404; Fri, 28 Apr 2006 19:49:22 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E9FC43D53; Fri, 28 Apr 2006 19:49:22 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout1.pacific.net.au (Postfix) with ESMTP id E4F333286F7; Sat, 29 Apr 2006 05:49:20 +1000 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k3SJnIdo002475; Sat, 29 Apr 2006 05:49:19 +1000 Date: Sat, 29 Apr 2006 05:49:19 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Yuichiro Goto In-Reply-To: <200604271927.k3RJRsGU023448@www.freebsd.org> Message-ID: <20060429053833.G22060@delplex.bde.org> References: <200604271927.k3RJRsGU023448@www.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-gnats-submit@freebsd.org, freebsd-i386@freebsd.org Subject: Re: i386/96430: boot2 is unable to load kernel directly X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 19:49:22 -0000 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