1 qemu: bios: use preprocessor for pci link routing (Avi Kivity)
3 Signed-off-by: Avi Kivity <avi@qumranet.com>
4 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
6 Index: bochs/bios/acpi-dsdt.dsl
7 ===================================================================
8 --- bochs.orig/bios/acpi-dsdt.dsl
9 +++ bochs/bios/acpi-dsdt.dsl
10 @@ -47,42 +47,22 @@ DefinitionBlock (
12 /* Note: we provide the same info as the PCI routing
13 table of the Bochs BIOS */
16 - Package() {0x0000ffff, 0, LNKD, 0},
17 - Package() {0x0000ffff, 1, LNKA, 0},
18 - Package() {0x0000ffff, 2, LNKB, 0},
19 - Package() {0x0000ffff, 3, LNKC, 0},
22 - Package() {0x0001ffff, 0, LNKA, 0},
23 - Package() {0x0001ffff, 1, LNKB, 0},
24 - Package() {0x0001ffff, 2, LNKC, 0},
25 - Package() {0x0001ffff, 3, LNKD, 0},
28 - Package() {0x0002ffff, 0, LNKB, 0},
29 - Package() {0x0002ffff, 1, LNKC, 0},
30 - Package() {0x0002ffff, 2, LNKD, 0},
31 - Package() {0x0002ffff, 3, LNKA, 0},
34 - Package() {0x0003ffff, 0, LNKC, 0},
35 - Package() {0x0003ffff, 1, LNKD, 0},
36 - Package() {0x0003ffff, 2, LNKA, 0},
37 - Package() {0x0003ffff, 3, LNKB, 0},
40 - Package() {0x0004ffff, 0, LNKD, 0},
41 - Package() {0x0004ffff, 1, LNKA, 0},
42 - Package() {0x0004ffff, 2, LNKB, 0},
43 - Package() {0x0004ffff, 3, LNKC, 0},
46 - Package() {0x0005ffff, 0, LNKA, 0},
47 - Package() {0x0005ffff, 1, LNKB, 0},
48 - Package() {0x0005ffff, 2, LNKC, 0},
49 - Package() {0x0005ffff, 3, LNKD, 0},
50 +#define prt_slot(nr, lnk0, lnk1, lnk2, lnk3) \
51 + Package() { nr##ffff, 0, lnk0, 0 }, \
52 + Package() { nr##ffff, 1, lnk1, 0 }, \
53 + Package() { nr##ffff, 2, lnk2, 0 }, \
54 + Package() { nr##ffff, 3, lnk3, 0 }
56 +#define prt_slot0(nr) prt_slot(nr, LNKD, LNKA, LNKB, LNKC)
57 +#define prt_slot1(nr) prt_slot(nr, LNKA, LNKB, LNKC, LNKD)
58 +#define prt_slot2(nr) prt_slot(nr, LNKB, LNKC, LNKD, LNKA)
59 +#define prt_slot3(nr) prt_slot(nr, LNKC, LNKD, LNKA, LNKB)
68 Name (_CRS, ResourceTemplate ()