From owner-freebsd-stable@FreeBSD.ORG Thu Jun 9 20:12:35 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12F06106566B for ; Thu, 9 Jun 2011 20:12:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id DE72E8FC17 for ; Thu, 9 Jun 2011 20:12:34 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 66AA246B0A; Thu, 9 Jun 2011 16:12:34 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EB51A8A01F; Thu, 9 Jun 2011 16:12:33 -0400 (EDT) From: John Baldwin To: freebsd-stable@freebsd.org Date: Thu, 9 Jun 2011 15:43:15 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <20110609152820.GC57263@megatron.madpilot.net> In-Reply-To: <20110609152820.GC57263@megatron.madpilot.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201106091543.16028.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 09 Jun 2011 16:12:34 -0400 (EDT) Cc: Guido Falsi Subject: Re: BTX loader problem on specific hardware X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2011 20:12:35 -0000 On Thursday, June 09, 2011 11:28:20 am Guido Falsi wrote: > Hi! > > I'm having a problem with BTX hanging on an HP 6005 Pro PC. > > I have filed a followup to an existing PR about this exact problem: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=151122 > > All the information there looks correct and stands true. > > I have tried performing some trivial debugging on btxld and btx, but not > having any ASM skills and not knowing much about PC booting process I > could not conjure much. > > It looks that it hangs between the end of btxld.S just before > relocating it's own start.8 routine and the first few instructions > in btx.S. Could really not make up much more. > > I tried using old btx code, but it does not compile with present tools. > So I'm a little stuck. > > I have the machine handy and can perform tests, run code and even debug > further if instructed a little on what needs to be done. > > I hope someone with some specific knowledge could have a look at > this(strange) problem. > > Thanks in advance! Hmm, these are not so easy to debug. You can try putting a 'foo: jmp foo' instruction in various places as a sort of 'while (1)' loop. The first test I would do is to put it earlier in btxld before the messages that BTXLDR_VERBOSE logs to see if when it hangs the cursor stays at its current location rather than jumping back up. If that works out then you can start moving the 'foo: jmp foo' later until you find a point where it hangs and moves the cursor (which means it hung in between your previous 'jmp foo' and the one you most recently added). I would start by walking down through btxldr.S. If it makes it all the way through that, start walking through the BTX init code. Oddly enough, BTX had to run at least once so that boot2 could find the loader and kick off the btxldr.S. -- John Baldwin