From owner-freebsd-emulation@FreeBSD.ORG Thu Dec 13 16:31:24 2012 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08300ED3; Thu, 13 Dec 2012 16:31:24 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 91D548FC0A; Thu, 13 Dec 2012 16:31:23 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id A050873029; Thu, 13 Dec 2012 17:29:49 +0100 (CET) Date: Thu, 13 Dec 2012 17:29:49 +0100 From: Luigi Rizzo To: Adrian Chadd Subject: Re: new pc-bios/bios.bin breaks freebsd booting Message-ID: <20121213162949.GA23250@onelab2.iet.unipi.it> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: emulation@freebsd.org, nox@freebsd.org, current@freebsd.org X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2012 16:31:24 -0000 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 ----- Date: Thu, 13 Dec 2012 14:38:45 +0100 From: Paolo Bonzini Subject: Re: [SeaBIOS] [PATCH] acpi: reintroduce LNKS To: Laszlo Ersek CC: seabios@seabios.org, rizzo@iet.unipi.it, Marcelo Tosatti 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 wrote: > > it seems that qemu-1.3.0 is broken for freebsd... > > > > cheers > > luigi > > > > ---------- Forwarded message ---------- > > From: Luigi Rizzo > > 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: 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: port 0xcf8-0xcff on acpi0 > > > > pci0: 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"