From: Gleb Natapov <gleb@redhat.com>
To: kevin@koconnor.net
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 15/21] Pci hotplug support.
Date: Thu, 8 Oct 2009 17:59:20 +0200 [thread overview]
Message-ID: <1255017566-26220-16-git-send-email-gleb@redhat.com> (raw)
In-Reply-To: <1255017566-26220-1-git-send-email-gleb@redhat.com>
Qemy pcbios commit e88ec0d97b464915281d27d5714784d2215cbdef
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
src/acpi-dsdt.dsl | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 98 insertions(+), 1 deletions(-)
diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl
index 0c01624..4cd6f6a 100644
--- a/src/acpi-dsdt.dsl
+++ b/src/acpi-dsdt.dsl
@@ -65,6 +65,61 @@ DefinitionBlock (
prt_slot1(0x0005),
})
+ OperationRegion(PCST, SystemIO, 0xae00, 0x08)
+ Field (PCST, DWordAcc, NoLock, WriteAsZeros)
+ {
+ PCIU, 32,
+ PCID, 32,
+ }
+
+ OperationRegion(SEJ, SystemIO, 0xae08, 0x04)
+ Field (SEJ, DWordAcc, NoLock, WriteAsZeros)
+ {
+ B0EJ, 32,
+ }
+
+#define hotplug_slot(name, nr) \
+ Device (S##name) { \
+ Name (_ADR, nr##0000) \
+ Method (_EJ0,1) { \
+ Store(ShiftLeft(1, nr), B0EJ) \
+ Return (0x0) \
+ } \
+ Name (_SUN, name) \
+ }
+
+ hotplug_slot(1, 0x0001)
+ hotplug_slot(2, 0x0002)
+ hotplug_slot(3, 0x0003)
+ hotplug_slot(4, 0x0004)
+ hotplug_slot(5, 0x0005)
+ hotplug_slot(6, 0x0006)
+ hotplug_slot(7, 0x0007)
+ hotplug_slot(8, 0x0008)
+ hotplug_slot(9, 0x0009)
+ hotplug_slot(10, 0x000a)
+ hotplug_slot(11, 0x000b)
+ hotplug_slot(12, 0x000c)
+ hotplug_slot(13, 0x000d)
+ hotplug_slot(14, 0x000e)
+ hotplug_slot(15, 0x000f)
+ hotplug_slot(16, 0x0010)
+ hotplug_slot(17, 0x0011)
+ hotplug_slot(18, 0x0012)
+ hotplug_slot(19, 0x0013)
+ hotplug_slot(20, 0x0014)
+ hotplug_slot(21, 0x0015)
+ hotplug_slot(22, 0x0016)
+ hotplug_slot(23, 0x0017)
+ hotplug_slot(24, 0x0018)
+ hotplug_slot(25, 0x0019)
+ hotplug_slot(26, 0x001a)
+ hotplug_slot(27, 0x001b)
+ hotplug_slot(28, 0x001c)
+ hotplug_slot(29, 0x001d)
+ hotplug_slot(30, 0x001e)
+ hotplug_slot(31, 0x001f)
+
Name (_CRS, ResourceTemplate ()
{
WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
@@ -551,8 +606,50 @@ DefinitionBlock (
Method(_L00) {
Return(0x01)
}
+
+#define gen_pci_hotplug(nr) \
+ If (And(\_SB.PCI0.PCIU, ShiftLeft(1, nr))) { \
+ Notify(\_SB.PCI0.S##nr, 1) \
+ } \
+ If (And(\_SB.PCI0.PCID, ShiftLeft(1, nr))) { \
+ Notify(\_SB.PCI0.S##nr, 3) \
+ }
+
Method(_L01) {
- Return(0x01)
+ gen_pci_hotplug(1)
+ gen_pci_hotplug(2)
+ gen_pci_hotplug(3)
+ gen_pci_hotplug(4)
+ gen_pci_hotplug(5)
+ gen_pci_hotplug(6)
+ gen_pci_hotplug(7)
+ gen_pci_hotplug(8)
+ gen_pci_hotplug(9)
+ gen_pci_hotplug(10)
+ gen_pci_hotplug(11)
+ gen_pci_hotplug(12)
+ gen_pci_hotplug(13)
+ gen_pci_hotplug(14)
+ gen_pci_hotplug(15)
+ gen_pci_hotplug(16)
+ gen_pci_hotplug(17)
+ gen_pci_hotplug(18)
+ gen_pci_hotplug(19)
+ gen_pci_hotplug(20)
+ gen_pci_hotplug(21)
+ gen_pci_hotplug(22)
+ gen_pci_hotplug(23)
+ gen_pci_hotplug(24)
+ gen_pci_hotplug(25)
+ gen_pci_hotplug(26)
+ gen_pci_hotplug(27)
+ gen_pci_hotplug(28)
+ gen_pci_hotplug(29)
+ gen_pci_hotplug(30)
+ gen_pci_hotplug(31)
+
+ Return (0x01)
+
}
Method(_L02) {
Return(0x01)
--
1.6.3.3
next prev parent reply other threads:[~2009-10-08 15:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-08 15:59 [Qemu-devel] [PATCH 00/21] Bring seabios and qemu pcbios closer together Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH v2 01/21] Add support for passing additional acpi tables from qemu Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH v2 02/21] Load SMBIOS entries and files " Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 03/21] Always create PCI interrupt override acpi tables Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 04/21] Correct default pci irq links Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 05/21] irq0override provided by qemu Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 06/21] Check at runtime if VM is KVM Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 07/21] Remove CONFIG_KVM compile option Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 08/21] Add rule to compile DSDT to make file Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 09/21] Use preprocessor for pci link routing Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 10/21] Advertise pci irqs as active high in DSDT Gleb Natapov
2009-10-09 10:56 ` Jamie Lokier
2009-10-09 11:37 ` Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 11/21] Restrict pci interrupts to irq 5/9/10/11 Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 12/21] Use extended interrupt descriptor for pci irqs Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 13/21] Remove irq 9 from the pci interrupt link resources Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 14/21] Provide gpe _L0x methods Gleb Natapov
2009-10-08 15:59 ` Gleb Natapov [this message]
2009-10-08 15:59 ` [Qemu-devel] [PATCH 16/21] HPET support Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 17/21] Add 26 pci slots, bringing the total to 32 Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 18/21] Add SRAT ACPI table support Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 19/21] Read max number of cpus from VM Gleb Natapov
2009-10-08 15:59 ` [Qemu-devel] [PATCH 20/21] Move qemu cfg init before smp init Gleb Natapov
2009-10-09 2:18 ` [Qemu-devel] " Kevin O'Connor
2009-10-08 15:59 ` [Qemu-devel] [PATCH 21/21] Use MaxCountCPUs during building of per cpu tables Gleb Natapov
2009-10-09 2:22 ` [Qemu-devel] " Kevin O'Connor
2009-10-09 6:37 ` Gleb Natapov
2009-10-09 13:44 ` Kevin O'Connor
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=1255017566-26220-16-git-send-email-gleb@redhat.com \
--to=gleb@redhat.com \
--cc=kevin@koconnor.net \
--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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).