Commit 6d2550ea5002feac408ed252f45066aaa0af8b19
1 parent
7217e124
Add BIOS patches necessary for hotplug (Marcelo Tosatti)
See each patch for appropriate Signed-off-by's. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6590 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
7 changed files
with
373 additions
and
0 deletions
pc-bios/bios-pq/0006_qemu-bios-use-preprocessor-for-pci-link-routing.patch
0 โ 100644
1 | +qemu: bios: use preprocessor for pci link routing (Avi Kivity) | |
2 | + | |
3 | +Signed-off-by: Avi Kivity <avi@qumranet.com> | |
4 | +Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> | |
5 | + | |
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 ( | |
11 | + section 6.2.8.1 */ | |
12 | + /* Note: we provide the same info as the PCI routing | |
13 | + table of the Bochs BIOS */ | |
14 | +- | |
15 | +- // PCI Slot 0 | |
16 | +- Package() {0x0000ffff, 0, LNKD, 0}, | |
17 | +- Package() {0x0000ffff, 1, LNKA, 0}, | |
18 | +- Package() {0x0000ffff, 2, LNKB, 0}, | |
19 | +- Package() {0x0000ffff, 3, LNKC, 0}, | |
20 | +- | |
21 | +- // PCI Slot 1 | |
22 | +- Package() {0x0001ffff, 0, LNKA, 0}, | |
23 | +- Package() {0x0001ffff, 1, LNKB, 0}, | |
24 | +- Package() {0x0001ffff, 2, LNKC, 0}, | |
25 | +- Package() {0x0001ffff, 3, LNKD, 0}, | |
26 | +- | |
27 | +- // PCI Slot 2 | |
28 | +- Package() {0x0002ffff, 0, LNKB, 0}, | |
29 | +- Package() {0x0002ffff, 1, LNKC, 0}, | |
30 | +- Package() {0x0002ffff, 2, LNKD, 0}, | |
31 | +- Package() {0x0002ffff, 3, LNKA, 0}, | |
32 | +- | |
33 | +- // PCI Slot 3 | |
34 | +- Package() {0x0003ffff, 0, LNKC, 0}, | |
35 | +- Package() {0x0003ffff, 1, LNKD, 0}, | |
36 | +- Package() {0x0003ffff, 2, LNKA, 0}, | |
37 | +- Package() {0x0003ffff, 3, LNKB, 0}, | |
38 | +- | |
39 | +- // PCI Slot 4 | |
40 | +- Package() {0x0004ffff, 0, LNKD, 0}, | |
41 | +- Package() {0x0004ffff, 1, LNKA, 0}, | |
42 | +- Package() {0x0004ffff, 2, LNKB, 0}, | |
43 | +- Package() {0x0004ffff, 3, LNKC, 0}, | |
44 | +- | |
45 | +- // PCI Slot 5 | |
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 } | |
55 | ++ | |
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) | |
60 | ++ prt_slot0(0x0000), | |
61 | ++ prt_slot1(0x0001), | |
62 | ++ prt_slot2(0x0002), | |
63 | ++ prt_slot3(0x0003), | |
64 | ++ prt_slot0(0x0004), | |
65 | ++ prt_slot1(0x0005), | |
66 | + }) | |
67 | + | |
68 | + Name (_CRS, ResourceTemplate () | |
69 | + | |
70 | +-- | |
71 | + | |
72 | + | |
73 | + | ... | ... |
pc-bios/bios-pq/0007_bios-add-26-pci-slots,-bringing-the-total-to-32.patch
0 โ 100644
1 | +bios: add 26 pci slots, bringing the total to 32 (Avi Kivity) | |
2 | + | |
3 | +lack of pci slots causes Windows to complain when installing too many devices. | |
4 | + | |
5 | +Signed-off-by: Avi Kivity <avi@qumranet.com> | |
6 | +Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> | |
7 | + | |
8 | +Index: bochs/bios/acpi-dsdt.dsl | |
9 | +=================================================================== | |
10 | +--- bochs.orig/bios/acpi-dsdt.dsl | |
11 | ++++ bochs/bios/acpi-dsdt.dsl | |
12 | +@@ -63,6 +63,32 @@ DefinitionBlock ( | |
13 | + prt_slot3(0x0003), | |
14 | + prt_slot0(0x0004), | |
15 | + prt_slot1(0x0005), | |
16 | ++ prt_slot2(0x0006), | |
17 | ++ prt_slot3(0x0007), | |
18 | ++ prt_slot0(0x0008), | |
19 | ++ prt_slot1(0x0009), | |
20 | ++ prt_slot2(0x000a), | |
21 | ++ prt_slot3(0x000b), | |
22 | ++ prt_slot0(0x000c), | |
23 | ++ prt_slot1(0x000d), | |
24 | ++ prt_slot2(0x000e), | |
25 | ++ prt_slot3(0x000f), | |
26 | ++ prt_slot0(0x0010), | |
27 | ++ prt_slot1(0x0011), | |
28 | ++ prt_slot2(0x0012), | |
29 | ++ prt_slot3(0x0013), | |
30 | ++ prt_slot0(0x0014), | |
31 | ++ prt_slot1(0x0015), | |
32 | ++ prt_slot2(0x0016), | |
33 | ++ prt_slot3(0x0017), | |
34 | ++ prt_slot0(0x0018), | |
35 | ++ prt_slot1(0x0019), | |
36 | ++ prt_slot2(0x001a), | |
37 | ++ prt_slot3(0x001b), | |
38 | ++ prt_slot0(0x001c), | |
39 | ++ prt_slot1(0x001d), | |
40 | ++ prt_slot2(0x001e), | |
41 | ++ prt_slot3(0x001f), | |
42 | + }) | |
43 | + | |
44 | + Name (_CRS, ResourceTemplate () | |
45 | + | |
46 | +-- | |
47 | + | |
48 | + | |
49 | + | ... | ... |
pc-bios/bios-pq/0008_qemu-bios-provide-gpe-_l0x-methods.patch
0 โ 100644
1 | +qemu: bios: provide gpe _L0x methods (Glauber Costa) | |
2 | + | |
3 | +provide methods for gpe blk 0, even though they do nothing atm | |
4 | + | |
5 | +Signed-off-by: Glauber Costa <gcosta@redhat.com> | |
6 | +Signed-off-by: Avi Kivity <avi@qumranet.com> | |
7 | +Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> | |
8 | + | |
9 | +Index: bochs/bios/acpi-dsdt.dsl | |
10 | +=================================================================== | |
11 | +--- bochs.orig/bios/acpi-dsdt.dsl | |
12 | ++++ bochs/bios/acpi-dsdt.dsl | |
13 | +@@ -597,4 +597,59 @@ DefinitionBlock ( | |
14 | + Zero, /* reserved */ | |
15 | + Zero /* reserved */ | |
16 | + }) | |
17 | ++ | |
18 | ++ Scope (\_GPE) | |
19 | ++ { | |
20 | ++ Name(_HID, "ACPI0006") | |
21 | ++ | |
22 | ++ Method(_L00) { | |
23 | ++ Return(0x01) | |
24 | ++ } | |
25 | ++ Method(_L01) { | |
26 | ++ Return(0x01) | |
27 | ++ } | |
28 | ++ Method(_L02) { | |
29 | ++ Return(0x01) | |
30 | ++ } | |
31 | ++ Method(_L03) { | |
32 | ++ Return(0x01) | |
33 | ++ } | |
34 | ++ Method(_L04) { | |
35 | ++ Return(0x01) | |
36 | ++ } | |
37 | ++ Method(_L05) { | |
38 | ++ Return(0x01) | |
39 | ++ } | |
40 | ++ Method(_L06) { | |
41 | ++ Return(0x01) | |
42 | ++ } | |
43 | ++ Method(_L07) { | |
44 | ++ Return(0x01) | |
45 | ++ } | |
46 | ++ Method(_L08) { | |
47 | ++ Return(0x01) | |
48 | ++ } | |
49 | ++ Method(_L09) { | |
50 | ++ Return(0x01) | |
51 | ++ } | |
52 | ++ Method(_L0A) { | |
53 | ++ Return(0x01) | |
54 | ++ } | |
55 | ++ Method(_L0B) { | |
56 | ++ Return(0x01) | |
57 | ++ } | |
58 | ++ Method(_L0C) { | |
59 | ++ Return(0x01) | |
60 | ++ } | |
61 | ++ Method(_L0D) { | |
62 | ++ Return(0x01) | |
63 | ++ } | |
64 | ++ Method(_L0E) { | |
65 | ++ Return(0x01) | |
66 | ++ } | |
67 | ++ Method(_L0F) { | |
68 | ++ Return(0x01) | |
69 | ++ } | |
70 | ++ } | |
71 | ++ | |
72 | + } | |
73 | +Index: bochs/bios/rombios32.c | |
74 | +=================================================================== | |
75 | +--- bochs.orig/bios/rombios32.c | |
76 | ++++ bochs/bios/rombios32.c | |
77 | +@@ -1647,6 +1647,8 @@ void acpi_bios_init(void) | |
78 | + fadt->pm_tmr_len = 4; | |
79 | + fadt->plvl2_lat = cpu_to_le16(0xfff); // C2 state not supported | |
80 | + fadt->plvl3_lat = cpu_to_le16(0xfff); // C3 state not supported | |
81 | ++ fadt->gpe0_blk = cpu_to_le32(0xafe0); | |
82 | ++ fadt->gpe0_blk_len = 4; | |
83 | + /* WBINVD + PROC_C1 + PWR_BUTTON + SLP_BUTTON + FIX_RTC */ | |
84 | + fadt->flags = cpu_to_le32((1 << 0) | (1 << 2) | (1 << 4) | (1 << 5) | (1 << 6)); | |
85 | + acpi_build_table_header((struct acpi_table_header *)fadt, "FACP", | |
86 | + | |
87 | +-- | |
88 | + | |
89 | + | |
90 | + | |
91 | + | |
92 | + | ... | ... |
pc-bios/bios-pq/0009_qemu-bios-pci-hotplug-support.patch
0 โ 100644
1 | +qemu: bios: pci hotplug support (Marcelo Tosatti) | |
2 | + | |
3 | +Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> | |
4 | +Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> | |
5 | + | |
6 | +Index: bochs/bios/acpi-dsdt.dsl | |
7 | +=================================================================== | |
8 | +--- bochs.orig/bios/acpi-dsdt.dsl | |
9 | ++++ bochs/bios/acpi-dsdt.dsl | |
10 | +@@ -91,6 +91,61 @@ DefinitionBlock ( | |
11 | + prt_slot3(0x001f), | |
12 | + }) | |
13 | + | |
14 | ++ OperationRegion(PCST, SystemIO, 0xae00, 0x08) | |
15 | ++ Field (PCST, DWordAcc, NoLock, WriteAsZeros) | |
16 | ++ { | |
17 | ++ PCIU, 32, | |
18 | ++ PCID, 32, | |
19 | ++ } | |
20 | ++ | |
21 | ++ OperationRegion(SEJ, SystemIO, 0xae08, 0x04) | |
22 | ++ Field (SEJ, DWordAcc, NoLock, WriteAsZeros) | |
23 | ++ { | |
24 | ++ B0EJ, 32, | |
25 | ++ } | |
26 | ++ | |
27 | ++#define hotplug_slot(name, nr) \ | |
28 | ++ Device (S##name) { \ | |
29 | ++ Name (_ADR, nr##0000) \ | |
30 | ++ Method (_EJ0,1) { \ | |
31 | ++ Store(ShiftLeft(1, nr), B0EJ) \ | |
32 | ++ Return (0x0) \ | |
33 | ++ } \ | |
34 | ++ Name (_SUN, name) \ | |
35 | ++ } | |
36 | ++ | |
37 | ++ hotplug_slot(1, 0x0001) | |
38 | ++ hotplug_slot(2, 0x0002) | |
39 | ++ hotplug_slot(3, 0x0003) | |
40 | ++ hotplug_slot(4, 0x0004) | |
41 | ++ hotplug_slot(5, 0x0005) | |
42 | ++ hotplug_slot(6, 0x0006) | |
43 | ++ hotplug_slot(7, 0x0007) | |
44 | ++ hotplug_slot(8, 0x0008) | |
45 | ++ hotplug_slot(9, 0x0009) | |
46 | ++ hotplug_slot(10, 0x000a) | |
47 | ++ hotplug_slot(11, 0x000b) | |
48 | ++ hotplug_slot(12, 0x000c) | |
49 | ++ hotplug_slot(13, 0x000d) | |
50 | ++ hotplug_slot(14, 0x000e) | |
51 | ++ hotplug_slot(15, 0x000f) | |
52 | ++ hotplug_slot(16, 0x0010) | |
53 | ++ hotplug_slot(17, 0x0011) | |
54 | ++ hotplug_slot(18, 0x0012) | |
55 | ++ hotplug_slot(19, 0x0013) | |
56 | ++ hotplug_slot(20, 0x0014) | |
57 | ++ hotplug_slot(21, 0x0015) | |
58 | ++ hotplug_slot(22, 0x0016) | |
59 | ++ hotplug_slot(23, 0x0017) | |
60 | ++ hotplug_slot(24, 0x0018) | |
61 | ++ hotplug_slot(25, 0x0019) | |
62 | ++ hotplug_slot(26, 0x001a) | |
63 | ++ hotplug_slot(27, 0x001b) | |
64 | ++ hotplug_slot(28, 0x001c) | |
65 | ++ hotplug_slot(29, 0x001d) | |
66 | ++ hotplug_slot(30, 0x001e) | |
67 | ++ hotplug_slot(31, 0x001f) | |
68 | ++ | |
69 | + Name (_CRS, ResourceTemplate () | |
70 | + { | |
71 | + WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, | |
72 | +@@ -605,8 +660,50 @@ DefinitionBlock ( | |
73 | + Method(_L00) { | |
74 | + Return(0x01) | |
75 | + } | |
76 | ++ | |
77 | ++#define gen_pci_hotplug(nr) \ | |
78 | ++ If (And(\_SB.PCI0.PCIU, ShiftLeft(1, nr))) { \ | |
79 | ++ Notify(\_SB.PCI0.S##nr, 1) \ | |
80 | ++ } \ | |
81 | ++ If (And(\_SB.PCI0.PCID, ShiftLeft(1, nr))) { \ | |
82 | ++ Notify(\_SB.PCI0.S##nr, 3) \ | |
83 | ++ } | |
84 | ++ | |
85 | + Method(_L01) { | |
86 | +- Return(0x01) | |
87 | ++ gen_pci_hotplug(1) | |
88 | ++ gen_pci_hotplug(2) | |
89 | ++ gen_pci_hotplug(3) | |
90 | ++ gen_pci_hotplug(4) | |
91 | ++ gen_pci_hotplug(5) | |
92 | ++ gen_pci_hotplug(6) | |
93 | ++ gen_pci_hotplug(7) | |
94 | ++ gen_pci_hotplug(8) | |
95 | ++ gen_pci_hotplug(9) | |
96 | ++ gen_pci_hotplug(10) | |
97 | ++ gen_pci_hotplug(11) | |
98 | ++ gen_pci_hotplug(12) | |
99 | ++ gen_pci_hotplug(13) | |
100 | ++ gen_pci_hotplug(14) | |
101 | ++ gen_pci_hotplug(15) | |
102 | ++ gen_pci_hotplug(16) | |
103 | ++ gen_pci_hotplug(17) | |
104 | ++ gen_pci_hotplug(18) | |
105 | ++ gen_pci_hotplug(19) | |
106 | ++ gen_pci_hotplug(20) | |
107 | ++ gen_pci_hotplug(21) | |
108 | ++ gen_pci_hotplug(22) | |
109 | ++ gen_pci_hotplug(23) | |
110 | ++ gen_pci_hotplug(24) | |
111 | ++ gen_pci_hotplug(25) | |
112 | ++ gen_pci_hotplug(26) | |
113 | ++ gen_pci_hotplug(27) | |
114 | ++ gen_pci_hotplug(28) | |
115 | ++ gen_pci_hotplug(29) | |
116 | ++ gen_pci_hotplug(30) | |
117 | ++ gen_pci_hotplug(31) | |
118 | ++ | |
119 | ++ Return (0x01) | |
120 | ++ | |
121 | + } | |
122 | + Method(_L02) { | |
123 | + Return(0x01) | |
124 | + | |
125 | +-- | |
126 | + | |
127 | + | |
128 | + | ... | ... |
pc-bios/bios-pq/0010_bios-mark-the-acpi-sci-interrupt-as-connected-to-irq-9.patch
0 โ 100644
1 | +bios: mark the acpi sci interrupt as connected to irq 9 (Avi Kivity) | |
2 | + | |
3 | +Due to a chipset bug, the sci interrupt is hardwired to irq 9. Set the | |
4 | +pci interrupt line register accordingly. | |
5 | + | |
6 | +Signed-off-by: Avi Kivity <avi@qumranet.com> | |
7 | +Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> | |
8 | + | |
9 | +Index: bochs/bios/rombios32.c | |
10 | +=================================================================== | |
11 | +--- bochs.orig/bios/rombios32.c | |
12 | ++++ bochs/bios/rombios32.c | |
13 | +@@ -981,6 +981,8 @@ static void pci_bios_init_device(PCIDevi | |
14 | + /* PIIX4 Power Management device (for ACPI) */ | |
15 | + pm_io_base = PM_IO_BASE; | |
16 | + smb_io_base = SMB_IO_BASE; | |
17 | ++ // acpi sci is hardwired to 9 | |
18 | ++ pci_config_writeb(d, PCI_INTERRUPT_LINE, 9); | |
19 | + pm_sci_int = pci_config_readb(d, PCI_INTERRUPT_LINE); | |
20 | + piix4_pm_enable(d); | |
21 | + acpi_enabled = 1; | |
22 | + | |
23 | +-- | |
24 | + | |
25 | + | |
26 | + | ... | ... |
pc-bios/bios-pq/series
... | ... | @@ -3,3 +3,8 @@ |
3 | 3 | 0003_kvm-bios-generate-mptable-unconditionally.patch |
4 | 4 | 0004_kvm-bios-resolve-memory-device-roll-over-reporting--issues-with-32g-guests.patch |
5 | 5 | 0005_kvm-bios-fix-smbios-memory-device-length-boundary--condition.patch |
6 | +0006_qemu-bios-use-preprocessor-for-pci-link-routing.patch | |
7 | +0007_bios-add-26-pci-slots,-bringing-the-total-to-32.patch | |
8 | +0008_qemu-bios-provide-gpe-_l0x-methods.patch | |
9 | +0009_qemu-bios-pci-hotplug-support.patch | |
10 | +0010_bios-mark-the-acpi-sci-interrupt-as-connected-to-irq-9.patch | ... | ... |
pc-bios/bios.bin
No preview for this file type