[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] i386: drop FDC in pc-q35-2.4+ if neither

From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] i386: drop FDC in pc-q35-2.4+ if neither
Date: Thu, 28 May 2015 15:52:41 +0200

On Do, 2015-05-28 at 08:59 -0400, Gabriel L. Somlo wrote:
> > It is Very annoying to carry forward an outdatEd coNtroller with a mOdern
> > Machine type.
> > 
> > Hence, let us not instantiate the FDC when all of the following apply:
> > - the machine type is pc-q35-2.4 or later,
> > - "-device isa-fdc" is not passed on the command line (nor in the config
> >   file),
> > - no "-drive if=floppy,..." is requested.
> Don't forget the FDC0 entry in the ACPI DSDT !

No worries, everything is fine here.

> Right now, FDC0's _STA method returns 0x0F or 0x00, depending on the
> value of \_SB_.PCI0.ISA_.FDEN,


> which is hard-coded to 1 (so 0x0F
> always, basically :) )

Yes on piix4.

On q35 FDEN maps to the floppy drive enable bit of the ich9 lpc.  And
ich9_lpc_machine_ready() sets this (and other) enable bits.

/me double checks things.

Ok, in theory.  In practice there seems to be something wrong.  linux
kernel log on q35 (with floppy) yields this:

address@hidden ~]# dmesg | grep pnp
pnp: PnP ACPI init
pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active)
pnp 00:01: Plug and Play ACPI device, IDs PNP0303 (active)
pnp 00:02: Plug and Play ACPI device, IDs PNP0f13 (active)
pnp 00:03: Plug and Play ACPI device, IDs PNP0501 (active)
pnp: PnP ACPI: found 4 devices

Floppy (PNP0700) is not present.  Hmm ...

Seems be be this:

--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -494,7 +494,7 @@ static void ich9_lpc_machine_ready(Notifier *n, void 
         /* lpt */
         pci_conf[0x82] |= 0x04;
-    if (memory_region_present(io_as, 0x3f0)) {
+    if (memory_region_present(io_as, 0x3f2)) {
         /* floppy */
         pci_conf[0x82] |= 0x08;

Oh, and this ...

$ virsh qemu-monitor-command fedora-org-q35.base --hmp "info mtree" | grep fdc
    00000000000003f1-00000000000003f5 (prio 0, RW): fdc
    00000000000003f7-00000000000003f7 (prio 0, RW): fdc

... looks fishy too.  Shouldn't that be 0x3f2-0x3f6 for the first range?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]