Re: new pc-bios/bios.bin breaks freebsd booting
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 pbonz...@redhat.com - Date: Thu, 13 Dec 2012 14:38:45 +0100 From: Paolo Bonzini pbonz...@redhat.com Subject: Re: [SeaBIOS] [PATCH] acpi: reintroduce LNKS To: Laszlo Ersek ler...@redhat.com CC: seab...@seabios.org, ri...@iet.unipi.it, Marcelo Tosatti mtosa...@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 ri...@iet.unipi.it wrote: it seems that qemu-1.3.0 is broken for freebsd... cheers luigi -- Forwarded message -- From: Luigi Rizzo ri...@iet.unipi.it Date: Wed, Dec 12, 2012 at 8:04 AM Subject: new pc-bios/bios.bin breaks freebsd booting To: qemu-de...@nongnu.org, kra...@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 0xfed0-0xfed003ff on acpi0 Timecounter HPET frequency 1 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, ri...@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, ri...@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-unsubscr...@freebsd.org ___ freebsd-current@freebsd.org mailing list
Re: new pc-bios/bios.bin breaks freebsd booting
Oh, phew. :) adrian On 13 December 2012 08:29, Luigi Rizzo ri...@iet.unipi.it wrote: 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 pbonz...@redhat.com - Date: Thu, 13 Dec 2012 14:38:45 +0100 From: Paolo Bonzini pbonz...@redhat.com Subject: Re: [SeaBIOS] [PATCH] acpi: reintroduce LNKS To: Laszlo Ersek ler...@redhat.com CC: seab...@seabios.org, ri...@iet.unipi.it, Marcelo Tosatti mtosa...@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 ri...@iet.unipi.it wrote: it seems that qemu-1.3.0 is broken for freebsd... cheers luigi -- Forwarded message -- From: Luigi Rizzo ri...@iet.unipi.it Date: Wed, Dec 12, 2012 at 8:04 AM Subject: new pc-bios/bios.bin breaks freebsd booting To: qemu-de...@nongnu.org, kra...@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 0xfed0-0xfed003ff on acpi0 Timecounter HPET frequency 1 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, ri...@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, ri...@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
Re: new pc-bios/bios.bin breaks freebsd booting
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 Adrian On 12 December 2012 08:07, Luigi Rizzo ri...@iet.unipi.it wrote: it seems that qemu-1.3.0 is broken for freebsd... cheers luigi -- Forwarded message -- From: Luigi Rizzo ri...@iet.unipi.it Date: Wed, Dec 12, 2012 at 8:04 AM Subject: new pc-bios/bios.bin breaks freebsd booting To: qemu-de...@nongnu.org, kra...@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 0xfed0-0xfed003ff on acpi0 Timecounter HPET frequency 1 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, ri...@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, ri...@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-unsubscr...@freebsd.org ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org