Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Aug 2005 12:52:41 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        "Kenneth D. Merry" <ken@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org, John Baldwin <jhb@FreeBSD.org>
Subject:   Re: BTX problems
Message-ID:  <200508231252.43838.jkim@FreeBSD.org>
In-Reply-To: <20050823033252.GA85918@nargothrond.kdm.org>
References:  <20050813221234.GA23162@nargothrond.kdm.org> <200508221622.45914.jkim@FreeBSD.org> <20050823033252.GA85918@nargothrond.kdm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 22 August 2005 11:32 pm, Kenneth D. Merry wrote:
> On Mon, Aug 22, 2005 at 16:22:41 -0400, Jung-uk Kim wrote:
> > On Monday 22 August 2005 03:18 pm, John Baldwin wrote:
> > > On Monday 22 August 2005 01:19 pm, Jung-uk Kim wrote:
> > > > On Monday 22 August 2005 12:33 pm, Kenneth D. Merry wrote:
> > > > > On Mon, Aug 22, 2005 at 12:16:51 -0400, Jung-uk Kim wrote:
> > > > > > On Monday 22 August 2005 11:57 am, Kenneth D. Merry wrote:
> > > > > > > On Mon, Aug 22, 2005 at 11:37:25 -0400, Jung-uk Kim wrote:
> > > > > > > > On Saturday 20 August 2005 01:02 am, Kenneth D. Merry
> >
> > wrote:
> > > > > > > > > On Tue, Aug 16, 2005 at 13:39:48 -0400, John
> > > > > > > > > Baldwin
> >
> > wrote:
> > > > > > > > > > There haven't been a whole lot of changes.  My
> > > > > > > > > > guess would be the recently added smbios support.
> > > > > > > > > >  You can probably just comment out the call to
> > > > > > > > > > smbios_detect() in sys/boot/i386/loader/main.c as
> > > > > > > > > > a simple test for that. It could also possibly be
> > > > > > > > > > the multiple console support in which case it
> > > > > > > > > > would be easiest to just step your sys/boot tree
> > > > > > > > > > back using CVS.  The good news is that sys/boot
> > > > > > > > > > is largely self-contained so you can step it back
> > > > > > > > > > while keeping the rest of the tree up to date for
> > > > > > > > > > testing purposes at least.
> > > > > > > > >
> > > > > > > > > Thanks for the tips!
> > > > > > > > >
> > > > > > > > > Commenting out smbios_detect() did the trick.  The
> > > > > > > > > loader works fine after that.
> > > > > > > > >
> > > > > > > > > So now what?  Is there a way to fix it so it won't
> > > > > > > > > crash on my system?
> > > > > > > >
> > > > > > > > So, I guess I broke it, then.  Can you install
> > > > > > > > ports/sysutils/dmidecode and send me dmidecode
> > > > > > > > output?
> > > > > > >
> > > > > > > Sure, here it is.
> > > > > >
> > > > > > Okay, it looks good so far.  Can you do:
> > > > > >
> > > > > > dd if=/dev/mem of=dmi.dat bs=1 count=1534 skip=984640
> > > > > > dd if=/dev/mem of=smbios.dat bs=1 count=65536 skip=983040
> > > > > >
> > > > > > and send me dmi.dat and smbios.dat, please?
> > > > >
> > > > > Here they are.
> > > >
> > > > It's very strange.  It seems SM entry and DMI structures are
> > > > all sane. I don't understand why it happens. :-( I just wrote
> > > > a qucik-and-dirty userland wrapper for smbios.c, which is
> > > > attached.
> > > >
> > > > SMBIOS entry: 0x000f00a0
> > > > DMI structures: length = 1534, paddr = 0x000f0640, count = 49
> > > > smbios.bios.vendor="American Megatrends Inc."
> > > > smbios.bios.version="0700xx "
> > > > smbios.bios.reldate="11/14/2001"
> > > > smbios.system.maker="Supermicro"
> > > > smbios.system.product="P3TDE6"
> > > > smbios.system.version="1234567890"
> > > > smbios.planar.maker="Supermicro"
> > > > smbios.planar.product="P3TDE6"
> > > > smbios.planar.version="1234567890"
> > > > smbios.chassis.maker="Supermicro"
> > > > smbios.chassis.version="P3TDE6"
> > > >
> > > > Is it possible that PTOV() is not working somehow???  I need
> > > > help here.
> > >
> > > Perhaps give ken@ a patch with some printf's added to figure
> > > out how far it gets into smbios_detect() before it dies?
> >
> > Thanks for the suggestion.
> >
> > ken,
> >
> > can you try the attached diff and tell me how far it goes?
>
> Sure, here's what I get for output.
>
> I tried it once with the VGA console, and got the a loader/BTX
> panic message.
>
> Since there was a lot of output, I used the -h option for boot2 to
> run it through the serial console.  It looks like I got all the
> output except the panic message.

Sorry for the trouble but I don't see anything wrong with
smbios.c. :-(  It was working fine as planned and main.c was printing
loader banner, which is the next thing main() does.

FreeBSD/i386 bootstrap loader, Revision 1.1
(ken@gondolin.kdm.org, Fri Aug 19 22:51:48 MDT 2005)

So the panic must have happened after smbios_detect().  I can only
theorize somehow setenv() is corrupting memory for unknown reason.
Can you do the following and run the test again?

Index: smbios.c
===================================================================
RCS file: /home/ncvs/src/sys/boot/i386/libi386/smbios.c,v
retrieving revision 1.2
diff -u -r1.2 smbios.c
--- smbios.c    27 Jul 2005 19:11:10 -0000      1.2
+++ smbios.c    23 Aug 2005 16:50:43 -0000
@@ -134,7 +134,9 @@
 
        for (cp = (char *)(dmi + dmi[1]), i = 0; i < dmi[offset] - 1; i++)
                cp += strlen(cp) + 1;
+#if 0
        setenv(str, cp, 1);
+#endif
 }
 
 static u_int8_t

Thanks,

Jung-uk Kim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508231252.43838.jkim>