All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin O'Connor <kevin@koconnor.net>
To: "Bjørn Mork" <bjorn@mork.no>
Cc: Brandon Bennett <bennetb@gmail.com>,
	seabios@seabios.org, qemu-devel@nongnu.org,
	Gleb Natapov <gleb@redhat.com>
Subject: Re: [Qemu-devel] SeaBIOS error with Juniper FreeBSD kernel
Date: Thu, 7 Jul 2011 19:50:09 -0400	[thread overview]
Message-ID: <20110707235009.GB12991@morn.localdomain> (raw)
In-Reply-To: <87sjqi9jsx.fsf@nemi.mork.no>

On Thu, Jul 07, 2011 at 05:45:02PM +0200, Bjørn Mork wrote:
> 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 = malloc_fseg(sizeof(*ep));
> -    void *finaltable = malloc_high(structure_table_length);
> +    void *finaltable = malloc_fseg(structure_table_length);
>      if (!ep || !finaltable) {
>          warn_noalloc();
>          free(ep);

Thanks.

It's possible that the OS has an error in handling the SMBIOS when it
is in high-memory (located above 1meg).  (For example, older versions
of Linux crash when the mptable is in high memory.)

However, it would be really odd for the OS to work some times with the
SMBIOS in high memory and sometimes fail.

> 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.

malloc_low and malloc_fseg would both put the table in the first
megabyte of physical ram.  Of the two, malloc_fseg would be
preferable.

> Does the above make any sense, or is this just another example of 
> "tickling the underlying bug"?

I have to wonder if the reorganization of memory just caused the bug
to not pop up.  If you disable SMBIOS, can you confirm the problem
reliably goes away on multiple versions of SeaBIOS?

-Kevin

  reply	other threads:[~2011-07-07 23:50 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-21  0:23 [Qemu-devel] SeaBIOS error with Juniper FreeBSD kernel Brandon Bennett
2010-02-21  4:05 ` Kevin O'Connor
2010-02-21 23:04   ` Brandon Bennett
2010-02-21 23:18     ` Brandon Bennett
2010-02-22  2:56       ` [Qemu-devel] SeaBIOS error with Nextstep bootloader Natalia Portillo
2010-02-28 19:51         ` Kevin O'Connor
2010-03-01  2:00           ` Natalia Portillo
2010-03-11  9:44           ` Natalia Portillo
2010-03-12  1:59             ` Kevin O'Connor
2010-03-12  9:05               ` Natalia Portillo
2010-03-13  6:30                 ` Roy Tam
2010-03-13 14:42                   ` [Qemu-devel] PS/2 mouse emulation problems Natalia Portillo
2010-03-13 14:44                     ` [Qemu-devel] " Roy Tam
2010-03-13 20:23                       ` Kevin O'Connor
2010-03-14  2:49                         ` Roy Tam
2010-03-14  3:11                           ` Roy Tam
2010-03-14  3:43                             ` Kevin O'Connor
2010-03-14  5:28                               ` Roy Tam
2010-03-14  7:11                                 ` Kevin O'Connor
2010-03-13 16:52                   ` [Qemu-devel] SeaBIOS error with Nextstep bootloader Kevin O'Connor
2010-02-28 19:39       ` [Qemu-devel] SeaBIOS error with Juniper FreeBSD kernel Kevin O'Connor
2010-02-28 20:41         ` Gleb Natapov
2010-04-13 18:48           ` [Qemu-devel] " Bjørn Mork
2010-04-14  1:27             ` Kevin O'Connor
2010-04-14 10:51               ` Bjørn Mork
2011-07-07 15:45                 ` [Qemu-devel] " Bjørn Mork
2011-07-07 23:50                   ` Kevin O'Connor [this message]
2011-07-08  7:46                     ` Bjørn Mork
2011-07-10 20:41                       ` Kevin O'Connor
2011-07-10 21:25                         ` [Qemu-devel] [SeaBIOS] " Sebastian Herbszt
2011-07-11 23:33                           ` Brandon Bennett
2011-08-01 13:49                             ` Bjørn Mork
2011-08-02  0:36                               ` Kevin O'Connor
2011-08-02  9:33                                 ` Bjørn Mork
2011-08-02 12:41                                   ` Kevin O'Connor
2011-08-03 12:42                                     ` Bjørn Mork
2011-08-03 13:31                                       ` Avi Kivity
2011-08-03 13:48                                         ` Bjørn Mork
2011-08-03 14:03                                           ` Avi Kivity
2011-08-03 23:48                                       ` Kevin O'Connor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110707235009.GB12991@morn.localdomain \
    --to=kevin@koconnor.net \
    --cc=bennetb@gmail.com \
    --cc=bjorn@mork.no \
    --cc=gleb@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.