BTX loader problem on specific hardware
mad at madpilot.net
Fri Jun 10 11:13:13 UTC 2011
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:
> > 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
> Hmm, these are not so easy to debug. You can try putting a 'foo: jmp foo'
Thank you for your reply! I have something to try now, at least :P
I really see the difficulty in this kind of debugging. It's something
I'd really like to help solve, if possible.
I forgot to mention that I fear the blame goes to the machine BIOS, and
the FreeBSD boot loaders are just victims.
> 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.
Unluckily it did not work this well. Wherever I put the loop in btxldr
makes the cursor go to the top and stay there, the machine hanging.(num
lock not reacting too)
This happens even if the loop is the first statement, but I observed a
small delay from when the code reaches the loop and the hang. It looks
like something times out.
Considering what I write below I have a theory about boot2 leaving
something in an incorrect state for whatever stage comes next.
> Oddly enough, BTX had to run at least once so that boot2 could find the loader
> and kick off the btxldr.S.
I experimented with boot2 too. I tried to make boot2 load the kernel
directly (as described in boot(8)) and got this error from BTX:
int=00000006 err=00000000 efl=00010002 eip=23ec42c6
eax=0018e070 ebx=00000000 ecx=00000000 edx=a0500004
esi=ffff6000 edi=0018e070 ebp=000003fa esp=00210608
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
es:esp=d9 03 00 00 00 00 00 00-00 00 00 00 00 00 20 00
40 00 60 00 8d 64 24 00-55 4e 44 49 16 1d 00 00
(the -_ after kernel are the spinner and the cursor, which really are in
the same place)
This makes me think that it is really boot2 to blame, I'm trying to
understand something there, but I'm really stuck.
I'm trying to add some output to boot2 to see what it is doing. I don't
really know what to look for though.
The above error is fully reproduceable giving always the exact same
values in the dump.
I also filed this information as a followup to PR i386/151122.
Guido Falsi <mad at madpilot.net>
More information about the freebsd-stable