From owner-freebsd-stable@FreeBSD.ORG Mon Jun 13 15:26:57 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 E04F5106564A; Mon, 13 Jun 2011 15:26:57 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from megatron.madpilot.net (megatron.madpilot.net [88.149.173.206]) by mx1.freebsd.org (Postfix) with ESMTP id 7CFE48FC0C; Mon, 13 Jun 2011 15:26:57 +0000 (UTC) Received: from megatron.madpilot.net (localhost [127.0.0.1]) by megatron.madpilot.net (Postfix) with ESMTP id 67F1D1BE3; Mon, 13 Jun 2011 17:26:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=madpilot.net; h= user-agent:in-reply-to:content-disposition:content-type :content-type:mime-version:references:message-id:subject:subject :from:from:date:date:received:received; s=mail; t=1307978813; x= 1309793213; bh=i2mJ2jAR9QjmSrYgyr/YJNIBZmCH3hNe7rp2e+4J6JA=; b=R WsznYEd9p9mCKrg2yViPz8Qe+sxgoUybIvsJVEPuL56b+E4Gk6T9/Ec8/tJgnHPO ypcfEOchhNC+/UYB3S1W4h4Z2RRYvgkmor5atwH6laM+ADx3lv3pQcrqRVrHqDB2 /Rg8o5a0Nw7kUhakEyHl9pBLgeLpRKpWWWmlkm0iyg= X-Virus-Scanned: amavisd-new at madpilot.net Received: from megatron.madpilot.net ([127.0.0.1]) by megatron.madpilot.net (megatron.madpilot.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id HHw4D3ZljZ8g; Mon, 13 Jun 2011 17:26:53 +0200 (CEST) Received: by megatron.madpilot.net (Postfix, from userid 1000) id BE1871BDA; Mon, 13 Jun 2011 17:26:53 +0200 (CEST) Date: Mon, 13 Jun 2011 17:26:53 +0200 From: Guido Falsi To: John Baldwin Message-ID: <20110613152653.GA82909@megatron.madpilot.net> References: <20110609152820.GC57263@megatron.madpilot.net> <201106091543.16028.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201106091543.16028.jhb@freebsd.org> X-Operating-System: FreeBSD 8.2-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org 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: Mon, 13 Jun 2011 15:26:58 -0000 On Thu, Jun 09, 2011 at 03:43:15PM -0400, John Baldwin wrote: > 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. > > > > 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. I found something performing the tests you suggested. I finally found out that it's loader triggering the lockup at it's very start. System locks up in the first part of bios_getmem() when BIOS "int 0x15 function 0xe820" is called. I noticed this is used here to get the memory map info from the BIOS. And this is not the first time there are memory map problems with HP BIOSes. :( I'm trying to understand how to disassemble the bios code for that function, but I'm having some problems, do someone have any pointers to some how-to or help? -- Guido Falsi