Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Dec 2012 17:29:49 +0100
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        emulation@freebsd.org, nox@freebsd.org, current@freebsd.org
Subject:   Re: new pc-bios/bios.bin breaks freebsd booting
Message-ID:  <20121213162949.GA23250@onelab2.iet.unipi.it>
In-Reply-To: <CAJ-Vmo==ShYd%2B8Un_nfBpN8ieoVrtN7ZJgZ-kMUg4hiqCJ_xww@mail.gmail.com>
References:  <CA%2BhQ2%2BjvR830=1qiXbzJih4RtZTrSWUyGgXiV8k7XHic%2BQbC4g@mail.gmail.com> <CA%2BhQ2%2Bj4AkN8_AxN1bZztTcWtY9Wn8CD5J0xom-Rbw%2BPzpHjyQ@mail.gmail.com> <CAJ-Vmo==ShYd%2B8Un_nfBpN8ieoVrtN7ZJgZ-kMUg4hiqCJ_xww@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 12, 2012 at 09:01:01AM -0800, Adrian Chadd wrote:
> Yes, the qemu bios people decided that they could change the ACPI
> setup, in order to make Linux boot slightly (1 line) quieter.
> 
> http://git.qemu.org/?p=seabios.git;a=commit;h=4540409d19a4baeec5006d925cfca19f8038a96e

the qemu folks are actually being very responsive in trying to fix
this for FreeBSD. See

http://lists.nongnu.org/archive/html/qemu-devel/2012-12/msg01703.html

and also the message below

cheers
luigi

----- Forwarded message from Paolo Bonzini <pbonzini@redhat.com> -----

Date: Thu, 13 Dec 2012 14:38:45 +0100
From: Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [SeaBIOS] [PATCH] acpi: reintroduce LNKS
To: Laszlo Ersek <lersek@redhat.com>
CC: seabios@seabios.org, rizzo@iet.unipi.it,
        Marcelo Tosatti <mtosatti@redhat.com>

Il 13/12/2012 14:33, Laszlo Ersek ha scritto:
>> > Unfortunately, the code after the patch is also against the spec, and it
>> > breaks FreeBSD because it treats IRQ 9 polarity as active low without
>> > the Interrupt() entry.  Actually, numeric _PRT entries are handled the
>> > same in Linux and FreeBSD (as active-low).  However, under Linux it just
>> > happens to trigger another special casing of SCI which sets SCI up from
>> > its override entry in the MADT, ignoring the DSDT completely.
> I won't pretend I understand what I'm talking about, but the ACPI spec
> 5.0 says in "5.2.12.5 Interrupt Source Override Structure",
>
>     Interrupt Source Overrides are also necessary when an identity
>     mapped interrupt input has a non-standard polarity.
>
> Hence "necessary but not sufficient", is that it?

The MADT is about 8259 pins, while the _PRT entry identifies a GSI.  So
we have the same GSI (9) specified twice.  Linux ignores the settings of
the second entry and reuses those that came from the GSI.  The important
bit here is this:

        /* Don't set up the ACPI SCI because it's already set up */
        if (acpi_gbl_FADT.sci_interrupt == gsi)
                return gsi;

(And as you can see it's wrong, sci_interrupt is an 8259 interrupt not a
GSI).

> SCI_INT in the FADT is explained as
>
>     [...] OSPM is required to treat the ACPI SCI interrupt as a
>     sharable, level, active low interrupt.
>
> which is then overridden in the MADT, stating active-high polarity.

Yes, but this doesn't affect the definition of this GSI in the _PRT.  It
is always level/active-low for a numeric entry.  Among the two
conflicting choices, Linux happens to favor the MADT.  FreeBSD doesn't.

Paolo

----- End forwarded message -----

> 
> 
> 
> Adrian
> 
> On 12 December 2012 08:07, Luigi Rizzo <rizzo@iet.unipi.it> wrote:
> > it seems that qemu-1.3.0 is broken for freebsd...
> >
> > cheers
> > luigi
> >
> > ---------- Forwarded message ----------
> > From: Luigi Rizzo <rizzo@iet.unipi.it>
> > Date: Wed, Dec 12, 2012 at 8:04 AM
> > Subject: new pc-bios/bios.bin breaks freebsd booting
> > To: qemu-devel@nongnu.org, kraxel@redhat.com
> >
> >
> > I am not sure if it has been reported already but this commit
> >
> > http://git.qemu.org/?p=qemu.git;a=commitdiff;h=d7a51dbbaa70677846453f8c961590913052dd86
> >
> > (replacing pc-bios/bios.bin with a newer version)
> > breaks booting of FreeBSD on recent qemu (starting roughly with qemu-
> > 1.3.0-rc2).
> >
> > Using a FreeBSD host, and a FreeBSD guest,
> > the qemu thread runs at 100% and the console is stuck
> > after the 'pci0' probe:
> >
> >
> > ...
> > hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
> >
> > Timecounter "HPET" frequency 100000000 Hz quality 950
> >
> > Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
> >
> > acpi_timer0: <24-bit timer at 3.579545MHz> port 0xb008-0xb00b on acpi0
> >
> > pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
> >
> > pci0: <ACPI PCI bus> on pcib0
> >
> > Reverting the bios fixes things.
> > I wonder if it isn't the case of reverting this change ?
> >
> > cheers
> > luigi
> >
> >
> >
> > --
> > -----------------------------------------+-------------------------------
> >  Prof. Luigi RIZZO, rizzo@iet.unipi.it  . Dip. di Ing. dell'Informazione
> >  http://www.iet.unipi.it/~luigi/        . Universita` di Pisa
> >  TEL      +39-050-2211611               . via Diotisalvi 2
> >  Mobile   +39-338-6809875               . 56122 PISA (Italy)
> > -----------------------------------------+-------------------------------
> >
> >
> >
> >
> > --
> > -----------------------------------------+-------------------------------
> >  Prof. Luigi RIZZO, rizzo@iet.unipi.it  . Dip. di Ing. dell'Informazione
> >  http://www.iet.unipi.it/~luigi/        . Universita` di Pisa
> >  TEL      +39-050-2211611               . via Diotisalvi 2
> >  Mobile   +39-338-6809875               . 56122 PISA (Italy)
> > -----------------------------------------+-------------------------------
> > _______________________________________________
> > freebsd-current@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"



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