From: Marcelo Tosatti <mtosatti@redhat.com>
To: qemu-devel@nongnu.org
Cc: Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] [patch 1/5] qemu: bios: use preprocessor for pci link routing
Date: Wed, 04 Feb 2009 11:44:16 -0200 [thread overview]
Message-ID: <20090204134435.424373940@localhost.localdomain> (raw)
In-Reply-To: 20090204134415.511485602@localhost.localdomain
[-- Attachment #1: use-preprocessor-for-pci-link-int --]
[-- Type: text/plain, Size: 2622 bytes --]
Signed-off-by: Avi Kivity <avi@qumranet.com>
Index: bochs/bios/acpi-dsdt.dsl
===================================================================
--- bochs.orig/bios/acpi-dsdt.dsl
+++ bochs/bios/acpi-dsdt.dsl
@@ -47,42 +47,22 @@ DefinitionBlock (
section 6.2.8.1 */
/* Note: we provide the same info as the PCI routing
table of the Bochs BIOS */
-
- // PCI Slot 0
- Package() {0x0000ffff, 0, LNKD, 0},
- Package() {0x0000ffff, 1, LNKA, 0},
- Package() {0x0000ffff, 2, LNKB, 0},
- Package() {0x0000ffff, 3, LNKC, 0},
-
- // PCI Slot 1
- Package() {0x0001ffff, 0, LNKA, 0},
- Package() {0x0001ffff, 1, LNKB, 0},
- Package() {0x0001ffff, 2, LNKC, 0},
- Package() {0x0001ffff, 3, LNKD, 0},
-
- // PCI Slot 2
- Package() {0x0002ffff, 0, LNKB, 0},
- Package() {0x0002ffff, 1, LNKC, 0},
- Package() {0x0002ffff, 2, LNKD, 0},
- Package() {0x0002ffff, 3, LNKA, 0},
-
- // PCI Slot 3
- Package() {0x0003ffff, 0, LNKC, 0},
- Package() {0x0003ffff, 1, LNKD, 0},
- Package() {0x0003ffff, 2, LNKA, 0},
- Package() {0x0003ffff, 3, LNKB, 0},
-
- // PCI Slot 4
- Package() {0x0004ffff, 0, LNKD, 0},
- Package() {0x0004ffff, 1, LNKA, 0},
- Package() {0x0004ffff, 2, LNKB, 0},
- Package() {0x0004ffff, 3, LNKC, 0},
-
- // PCI Slot 5
- Package() {0x0005ffff, 0, LNKA, 0},
- Package() {0x0005ffff, 1, LNKB, 0},
- Package() {0x0005ffff, 2, LNKC, 0},
- Package() {0x0005ffff, 3, LNKD, 0},
+#define prt_slot(nr, lnk0, lnk1, lnk2, lnk3) \
+ Package() { nr##ffff, 0, lnk0, 0 }, \
+ Package() { nr##ffff, 1, lnk1, 0 }, \
+ Package() { nr##ffff, 2, lnk2, 0 }, \
+ Package() { nr##ffff, 3, lnk3, 0 }
+
+#define prt_slot0(nr) prt_slot(nr, LNKD, LNKA, LNKB, LNKC)
+#define prt_slot1(nr) prt_slot(nr, LNKA, LNKB, LNKC, LNKD)
+#define prt_slot2(nr) prt_slot(nr, LNKB, LNKC, LNKD, LNKA)
+#define prt_slot3(nr) prt_slot(nr, LNKC, LNKD, LNKA, LNKB)
+ prt_slot0(0x0000),
+ prt_slot1(0x0001),
+ prt_slot2(0x0002),
+ prt_slot3(0x0003),
+ prt_slot0(0x0004),
+ prt_slot1(0x0005),
})
Name (_CRS, ResourceTemplate ()
--
next prev parent reply other threads:[~2009-02-04 13:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-04 13:44 [Qemu-devel] [patch 0/5] BIOS changes for ACPI PCI hotplug Marcelo Tosatti
2009-02-04 13:44 ` Marcelo Tosatti [this message]
2009-02-04 13:44 ` [Qemu-devel] [patch 2/5] bios: add 26 pci slots, bringing the total to 32 Marcelo Tosatti
2009-02-04 13:44 ` [Qemu-devel] [patch 3/5] qemu: bios: provide gpe _L0x methods Marcelo Tosatti
2009-02-04 13:44 ` [Qemu-devel] [patch 4/5] qemu: bios: pci hotplug support Marcelo Tosatti
2009-02-04 13:44 ` [Qemu-devel] [patch 5/5] bios: mark the acpi sci interrupt as connected to irq 9 Marcelo Tosatti
2009-02-11 15:11 ` [Qemu-devel] [patch 0/5] BIOS changes for ACPI PCI hotplug Anthony Liguori
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=20090204134435.424373940@localhost.localdomain \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--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).