Received: from eggs.gnu.org ([140.186.70.92]:53397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qeqvt-0001Ye-Am for qemu-devel@nongnu.org; Thu, 07 Jul 2011 11:56:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeqlW-0003BJ-06 for qemu-devel@nongnu.org; Thu, 07 Jul 2011 11:45:24 -0400 Received: from canardo.mork.no ([148.122.252.1]:40262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeqlS-00033L-TI for qemu-devel@nongnu.org; Thu, 07 Jul 2011 11:45:19 -0400 From: =?utf-8?Q?Bj=C3=B8rn_Mork?= References: <20100221040555.GA16455@morn.localdomain> <20100228193904.GA15352@morn.localdomain> <20100228204137.GA23442@redhat.com> <87d3y3p4sc.fsf@nemi.mork.no> <20100414012749.GB29097@morn.localdomain> <87ochmmhma.fsf@nemi.mork.no> Date: Thu, 07 Jul 2011 17:45:02 +0200 In-Reply-To: <87ochmmhma.fsf@nemi.mork.no> (=?utf-8?Q?=22Bj=C3=B8rn?= Mork"'s message of "Wed, 14 Apr 2010 12:51:57 +0200") Message-ID: <87sjqi9jsx.fsf@nemi.mork.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] SeaBIOS error with Juniper FreeBSD kernel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: Brandon Bennett , seabios@seabios.org, qemu-devel@nongnu.org, Gleb Natapov Bj=C3=B8rn Mork writes: > "Kevin O'Connor" writes: > >> It looks like memory layout changes in the f-segment is tickling the >> underlying bug. I don't think SMBIOS, the above commit, or the other >> commit identified earlier are the root cause of the problem. Instead, >> I'd guess these commits just change the memory layout enough to avoid >> the root cause. > > Sounds like a reasonable explanation. Is there anything I can do to try > to pin down the problem? > >> This looks like it is going to require some careful study with a >> debugger and some execution traces. Unfortunately, since this image >> isn't available for download it makes it difficult to track down. > > I understand that. But I'm afraid I can't provide any such image. > > I don't think Juniper has done anything extra-ordinary at this point > however, so I'll try to see if I can create a freely distributable image > triggering the bug using the same tools as them. Will let you know if I > succeed.=20 It's been a while with little work and little progress on my side... But I looked at this again today, and found that it may be related to the SMBIOS table being allocated with malloc_high(). Does that make sense? Anyway, the problematic OS boots without problems with current seabios from git if I make this change: diff --git a/src/smbios.c b/src/smbios.c index 8df0f2d..c96deb5 100644 --- a/src/smbios.c +++ b/src/smbios.c @@ -17,7 +17,7 @@ smbios_entry_point_init(u16 max_structure_size, u16 number_of_structures) { struct smbios_entry_point *ep =3D malloc_fseg(sizeof(*ep)); - void *finaltable =3D malloc_high(structure_table_length); + void *finaltable =3D malloc_fseg(structure_table_length); if (!ep || !finaltable) { warn_noalloc(); free(ep); I tried malloc_low() too, and that works as well. But malloc_fseg() seems appropriate, unless I've misunderstood something here. Which very well can be. I am not going to claim any understanding at all. Does the above make any sense, or is this just another example of=20 "tickling the underlying bug"? Bj=C3=B8rn