From: Alex Williamson <alex.williamson@hp.com> To: bochs-developers@lists.sourceforge.net Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, alex.williamson@hp.com Subject: [PATCH] bios: Use a different mask to size the option ROM BAR Date: Thu, 07 May 2009 10:16:03 -0600 [thread overview] Message-ID: <20090507161533.25315.52621.stgit@kvm.aw> (raw) Bit 0 is the enable bit, which we not only don't want to set, but it will stick and make us think it's an I/O port resource. Signed-off-by: Alex Williamson <alex.williamson@hp.com> --- bios/rombios32.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bios/rombios32.c b/bios/rombios32.c index 269f175..616e70a 100644 --- a/bios/rombios32.c +++ b/bios/rombios32.c @@ -948,11 +948,13 @@ static void pci_bios_init_device(PCIDevice *d) int ofs; uint32_t val, size ; - if (i == PCI_ROM_SLOT) + if (i == PCI_ROM_SLOT) { ofs = 0x30; - else + pci_config_writel(d, ofs, 0xfffffffe); + } else { ofs = 0x10 + i * 4; - pci_config_writel(d, ofs, 0xffffffff); + pci_config_writel(d, ofs, 0xffffffff); + } val = pci_config_readl(d, ofs); if (val != 0) { size = (~(val & ~0xf)) + 1;
WARNING: multiple messages have this Message-ID (diff)
From: Alex Williamson <alex.williamson@hp.com> To: bochs-developers@lists.sourceforge.net Cc: alex.williamson@hp.com, qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH] bios: Use a different mask to size the option ROM BAR Date: Thu, 07 May 2009 10:16:03 -0600 [thread overview] Message-ID: <20090507161533.25315.52621.stgit@kvm.aw> (raw) Bit 0 is the enable bit, which we not only don't want to set, but it will stick and make us think it's an I/O port resource. Signed-off-by: Alex Williamson <alex.williamson@hp.com> --- bios/rombios32.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bios/rombios32.c b/bios/rombios32.c index 269f175..616e70a 100644 --- a/bios/rombios32.c +++ b/bios/rombios32.c @@ -948,11 +948,13 @@ static void pci_bios_init_device(PCIDevice *d) int ofs; uint32_t val, size ; - if (i == PCI_ROM_SLOT) + if (i == PCI_ROM_SLOT) { ofs = 0x30; - else + pci_config_writel(d, ofs, 0xfffffffe); + } else { ofs = 0x10 + i * 4; - pci_config_writel(d, ofs, 0xffffffff); + pci_config_writel(d, ofs, 0xffffffff); + } val = pci_config_readl(d, ofs); if (val != 0) { size = (~(val & ~0xf)) + 1;
next reply other threads:[~2009-05-07 16:20 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-05-07 16:16 Alex Williamson [this message] 2009-05-07 16:16 ` [Qemu-devel] [PATCH] bios: Use a different mask to size the option ROM BAR Alex Williamson
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=20090507161533.25315.52621.stgit@kvm.aw \ --to=alex.williamson@hp.com \ --cc=bochs-developers@lists.sourceforge.net \ --cc=kvm@vger.kernel.org \ --cc=qemu-devel@nongnu.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: linkBe 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.