Age | Commit message (Collapse) | Author | Files | Lines |
|
This reverts commit 482a020ec25f4cec655ddcb16b67c6f38b0844c0.
The commit causes WinXP guests to BSOD.
|
|
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>
|
|
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>
|
|
Replicate the check that detects if HPET table should be created
in AML too.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
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.
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Add DBUG() method to AML - it can write output to the standard qemu
bios debug port (port 0x402).
|
|
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.
|
|
Commit new dsdt with recent changes.
Add some misc comments.
Also, fix uninitialized warning in mptable code.
|
|
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>
|
|
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>
|
|
Part of qemu pcbios commit e04da91178f0e11febbbd61d9795e49cc27e9ad4
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
Qemy pcbios commit e88ec0d97b464915281d27d5714784d2215cbdef
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
Provide methods for gpe blk 0, even though they do nothing atm.
Qemu pcbios commit 37c3845e38cb8ee4a98960bf1fc31563d071838d
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Qemu pcbios commit 297a5cd68d2883215571634b2f8c627364c87f2c
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
|
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).
|
|
|
|
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.
|
|
This reverts commit a75284dbd70acc7ec4a832045c8a2fbec2d773d8.
|
|
|