aboutsummaryrefslogtreecommitdiff
path: root/src/acpi-dsdt.dsl
AgeCommit message (Collapse)AuthorFilesLines
2012-05-12Revert "Fix 64bit PCI issues on Windows"Kevin O'Connor1-7/+0
This reverts commit 482a020ec25f4cec655ddcb16b67c6f38b0844c0. The commit causes WinXP guests to BSOD.
2012-04-26Fix 64bit PCI issues on WindowsAlexey Korolev1-0/+7
This patch solves issues on Windows guests, when 64bit BAR's are present. It is also helpful on Linux guests when use_crs kernel boot option is set. Signed-off-by: Alexey Korolev <alexey.korolev@endace.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2012-04-05Replace level gpe event with edge gpe event for hot-plug handlersIgor Mammedov1-2/+2
in current code, pci hot-plug gpe event handler is defined as a level one "_L01" 1. hw adds device, sets GPE.1 bit and sends SCI 2. OSPM gets SCI, reads GPE00.sts and masks GPE.1 bit in GPE00.en 3. OSPM executes _L01 4. hw adds second device and sets GPE.1 bit but SCI is not asserted since GPE00.en masks event 5. OSPM resets GPE.1 bit in GPE00.sts and umasks it in GPE00.en as result event for step 4 is lost because step 5 clears it and OS will not see added second device. ACPI 50 spec: 5.6.4 General-Purpose Event Handling defines GPE event handling as following: 1. Disables the interrupt source (GPEx_BLK EN bit). 2. If an edge event, clears the status bit. 3. Performs one of the following: * Dispatches to an ACPI-aware device driver. * Queues the matching control method for execution. * Manages a wake event using device _PRW objects. 4. If a level event, clears the status bit. 5. Enables the interrupt source. Switching from level to edge event handler reduces chances to hit race window. Same applies to cpu-hotplug, so switch it to edge handler as well. Tested with RHEL6, 3.3.+ kernel, winxp, and w2008r2, and I wasn't able to trigger race after using edge event handler. Signed-off-by: Igor Mammedov <imammedo@redhat.com>
2012-03-16if HPET is not present do not report it in DSDTGleb Natapov1-1/+15
Replicate the check that detects if HPET table should be created in AML too. Signed-off-by: Gleb Natapov <gleb@redhat.com>
2011-12-17Fix broken _DIS and _SRS methods in ACPI AML irq routing.Kevin O'Connor1-18/+16
The RefOf() operator doesn't do what was expected (at least on Linux) - issuing "Store(1, RefOf(PRQ0))" doesn't write to the PRQ0 Field defined on the OperationRegion. Instead, it seems to redefine PRQ0 to be an integer. Fix this by defining the _DIS and _SRS methods as pre-processor macros. This way the RefOf() operator isn't needed.
2011-11-22acpi: remove _RMVMichael S. Tsirkin1-15/+0
The macro gen_pci_device is used to add _RMV method to a slot device so it is no longer needed: presence of _EJ0 now indicates that the slot is ejectable. It is also placing two devices with the same _ADR on the same bus, which isn't defined by the ACPI spec. So let's remove it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-11-22acpi: add ssdt for pci hotplugMichael S. Tsirkin1-114/+3
The point of this split is to make runtime patching easier. DSDT is required to supply: PCI0 - PCI root device object; PCEJ - Method object to eject a PCI slot. Additionally, SSDT is required to supply PCNT - Method object to notify OSPM of a PCI slot event. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-10-30acpi: extract aml from .lstMichael S. Tsirkin1-0/+3
Add ACPI_EXTRACT_ALL_CODE directive, to support extracting AML code from listing into a named array. Use that instead including C file generated by iasl, this makes it possible to include multiple AML tables without resorting to preprocessor tricks. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-10-12Consolidate DSDT copy-and-paste PCI IRQ code into method calls.Kevin O'Connor1-227/+93
Use method calls in LNK[ABCDS] object methods - this reduces the cut-and-paste code. It also makes it simpler and the object size smaller. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-10-12Move code from PCI hotplug DSDT macros to methods.Kevin O'Connor1-24/+40
Simplify the hotplug code by moving the bulk of the logic out of the macros and into static method definitions. This also reduces the ACPI DSDT code size. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-10-12Simplify PCI hotplug acpi macros.Kevin O'Connor1-101/+100
Change the macros to pass the slot number via hex, and then remove passing of duplicate information. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-10-12Consolidate PCI hotplug definitions together in DSL file.Kevin O'Connor1-85/+89
Move the PCI hotplug definitions next to each other. This introduces a notify method (\_SB.PCI0.PCNF) to help consolidate the code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-10-12Delineate ACSP DSL code into sections.Kevin O'Connor1-7/+73
Add comments around major sections of the DSL file. Also, add scope declarations where needed so that each section only contains one scope. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2011-05-24fix resume from S3 with QXL deviceKevin O'Connor1-1/+9
From: Gleb Natapov <gleb@redhat.com> QXL device is powered down during S3, so tell this to a guest OS in AML code. Signed-off-by: Gleb Natapov <gleb@redhat.com>
2011-01-05seabios: acpi: add _RMV control method for PCI devicesKevin O'Connor1-0/+52
Use _RMV method to indicate whether device can be removed. Data is retrieved from QEMU via I/O port 0xae0c. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: Gleb Natapov <gleb@redhat.com>
2010-10-20mark irq9 active high in DSDTKevin O'Connor1-1/+41
In PIIX4 SCI (irq9) is active high. Seabios marks it so in interrupt override table, but some OSes (FreeBSD) require the same information to be present in DSDT too. Make it so. Signed-off-by: Gleb Natapov <gleb@redhat.com>
2010-09-25Add a debug method to AML code.Kevin O'Connor1-4/+18
Add DBUG() method to AML - it can write output to the standard qemu bios debug port (port 0x402).
2010-08-03Add ACPI SSDT/DSDT support for CPU hotplug.Kevin O'Connor1-1/+74
Move the SSDT defined processors from _PR to _SB namespace. Extend the dynamically generated SSDT to include per cpu hotplug methods. These methods just call methods defined in the DSDT. Also dynamically generate a NTFY method and a CPON array of the online/available CPUs. Add file src/ssdt-proc.dsl with directions for generating the per-cpu processor object AML code. Extend the DSDT to include methods for handling cpu hotplug notifications and methods for handling cpu status requests originating from the SSDT methods.
2009-12-30Commit compiled dsdt file; misc comment updates.Kevin O'Connor1-0/+1
Commit new dsdt with recent changes. Add some misc comments. Also, fix uninitialized warning in mptable code.
2009-12-30prevent acpi from rerouting SCI interruptGleb Natapov1-1/+4
SCI interrupt in piix4 chipset is hardwired to gsi 9, but we allow it to be reconfigured by acpi. Fix this by providing fixed gsi for PCI device 1 pin 0. Signed-off-by: Gleb Natapov <gleb@redhat.com>
2009-10-08Add 26 pci slots, bringing the total to 32.Kevin O'Connor1-0/+26
Lack of pci slots causes Windows to complain when installing too many device. Qemu pcbios commit 001fd46e3b551de05c62590ba5ed4cbf6cbe3510 Signed-off-by: Gleb Natapov <gleb@redhat.com>
2009-10-08HPET support.Kevin O'Connor1-0/+19
Part of qemu pcbios commit e04da91178f0e11febbbd61d9795e49cc27e9ad4 Signed-off-by: Gleb Natapov <gleb@redhat.com>
2009-10-08Pci hotplug support.Kevin O'Connor1-1/+98
Qemy pcbios commit e88ec0d97b464915281d27d5714784d2215cbdef Signed-off-by: Gleb Natapov <gleb@redhat.com>
2009-10-08Provide gpe _L0x methods.Kevin O'Connor1-0/+55
Provide methods for gpe blk 0, even though they do nothing atm. Qemu pcbios commit 37c3845e38cb8ee4a98960bf1fc31563d071838d Signed-off-by: Gleb Natapov <gleb@redhat.com>
2009-10-08Remove irq 9 from the pci interrupt link resources.Kevin O'Connor1-4/+4
qemu can't share isa irqs (which is how the acpi sci interrupt is implemente with the pci irqs, so remove the sci interrupt from the pci link interrupt candidate list. Qemu pcbios commit 713939c93b9caa1a31c49211fe83525bcbee5948 Signed-off-by: Gleb Natapov <gleb@redhat.com>
2009-10-08Use extended interrupt descriptor for pci irqs.Kevin O'Connor1-32/+24
This is necessary to allow freebsd to boot; freebsd chokes if a regular interrupt descriptor specifies an active high pic irq. Qemu pcbios commit aaff1cc0ce8de3c45eec49b9b0e7624576058eda Signed-off-by: Gleb Natapov <gleb@redhat.com>
2009-10-08Restrict pci interrupts to irq 5/9/10/11Kevin O'Connor1-4/+4
we need to specify the pci interrupts as active high; this reduces the number of override entries we have to add. Qemu pcbios commit 0f79abf26ff3e61dab712dbccdbc08a04619e7c0 Signed-off-by: Gleb Natapov <gleb@redhat.com>
2009-10-08Advertise pci irqs as active high in DSDTKevin O'Connor1-8/+8
Now that kvm emulates the ioapic polarity correctly, we must describe the polarity correctly in the acpi tables. Otherwise pci interrupts won't be delivered correctly. Qemu pcbios commit 0c8d4b40a1eec2369c016b9be1c9175607e64a4b Signed-off-by: Gleb Natapov <gleb@redhat.com>
2009-10-08Use preprocessor for pci link routing.Kevin O'Connor1-35/+15
Qemu pcbios commit 297a5cd68d2883215571634b2f8c627364c87f2c Signed-off-by: Gleb Natapov <gleb@redhat.com>
2008-12-18Add initial S3 resume support.Kevin O'Connor1-6/+39
Update ACPI DSDT tables with S3 info. Change acpi table signatures to use integers. Save location of rsdp table (so that S3 resume can easily find it later).
2008-10-25Synch ACPI DSDT with latest bochs bios.Kevin O'Connor1-34/+5
2008-03-08Port rombios32 code from bochs-bios.Kevin O'Connor1-0/+570
This adds acpi, smbios, pci init, etc. Changes from original rombios32.c code: * Header file translation. * Use common functions already in code (eg, outb, memset, bios_printf, usleep) * Implement trampoline for disabling bios shadowing (rombios32 code actually runs in the 0xf0000 area). * Copy asm code from rombios32start.S to an asm() statement in C code.
2008-03-08Revert "Commit missing files from last commit."Kevin O'Connor1-570/+0
This reverts commit a75284dbd70acc7ec4a832045c8a2fbec2d773d8.
2008-03-05Commit missing files from last commit.Kevin O'Connor1-0/+570