From: Guido Guenther <agx-wGvLLbajjwFAfugRpC6u6w@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: acpi sci polarity
Date: Fri, 4 Jan 2008 19:31:58 +0100 [thread overview]
Message-ID: <20080104183158.GA14002@bogon.ms20.nix> (raw)
In-Reply-To: <477D50FE.4040104-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Hi Avi,
On Thu, Jan 03, 2008 at 11:17:50PM +0200, Avi Kivity wrote:
> While pci interrupts are documented as active high, the documentation for
> the piix4 pic elcr registers suggests piix4 level-triggered interrupts are
> active high. So there is some inconsistency somewhere involving qemu
> interrupt generation (which IIRC treats all interrupts as active high), the
> ioapic (qemu doesn't implement polarity), bios setup, and the acpi dsdt.
We currently specify INT10 as active high in the dsl so I added an
override entry to the madt an now the OS knows about it and things work
as expected - we this be o.k. until all the IRQ setup gets a revamp:
>From 7950892de473d42ce57e0727594190b4bfafab14 Mon Sep 17 00:00:00 2001
From: Guido Guenther <agx-wGvLLbajjwFAfugRpC6u6w@public.gmane.org>
Date: Fri, 4 Jan 2008 19:26:33 +0100
Subject: [PATCH] int 10 is currently active high
so add a proper interrupt override entry to the MADT so the OS knows about it.
Fixes the ACPI powerbutton and should also fix the PM timer.
diff --git a/bios/rombios32.c b/bios/rombios32.c
index 7a96ece..99f7d23 100755
--- a/bios/rombios32.c
+++ b/bios/rombios32.c
@@ -1181,6 +1181,14 @@ struct madt_io_apic
* lines start */
};
+struct madt_intsrcovr {
+ APIC_HEADER_DEF
+ uint8_t bus;
+ uint8_t source;
+ uint32_t gsi;
+ uint16_t flags;
+};
+
#include "acpi-dsdt.hex"
static inline uint16_t cpu_to_le16(uint16_t x)
@@ -1271,9 +1279,10 @@ void acpi_bios_init(void)
addr = (addr + 7) & ~7;
madt_addr = addr;
- madt_size = sizeof(*madt) +
+ madt_size = sizeof(*madt) +
sizeof(struct madt_processor_apic) * smp_cpus +
- sizeof(struct madt_io_apic);
+ sizeof(struct madt_io_apic) +
+ sizeof(struct madt_intsrcovr);
madt = (void *)(addr);
addr += madt_size;
@@ -1335,6 +1344,7 @@ void acpi_bios_init(void)
{
struct madt_processor_apic *apic;
struct madt_io_apic *io_apic;
+ struct madt_intsrcovr *intsrcovr;
memset(madt, 0, madt_size);
madt->local_apic_address = cpu_to_le32(0xfee00000);
@@ -1355,6 +1365,15 @@ void acpi_bios_init(void)
io_apic->address = cpu_to_le32(0xfec00000);
io_apic->interrupt = cpu_to_le32(0);
+ /* int 10 (SCI) is active high atm */
+ intsrcovr = (struct madt_intsrcovr*)(io_apic + 1);
+ memset(intsrcovr, 0, sizeof(*intsrcovr));
+ intsrcovr->type = APIC_XRUPT_OVERRIDE;
+ intsrcovr->length = sizeof(*intsrcovr);
+ intsrcovr->source = 10;
+ intsrcovr->gsi = 10;
+ intsrcovr->flags = 0xd;
+
acpi_build_table_header((struct acpi_table_header *)madt,
"APIC", madt_size);
}
Cheers,
-- Guido
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-01-04 18:31 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-03 18:11 [PATCH] system_powerdown via acpi power button Guido Guenther
[not found] ` <20080103181132.GA1077-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org>
2008-01-03 18:14 ` acpi sci polarity Guido Guenther
[not found] ` <20080103181415.GB1077-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org>
2008-01-03 21:17 ` Avi Kivity
[not found] ` <477D50FE.4040104-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-04 18:31 ` Guido Guenther [this message]
[not found] ` <20080104183158.GA14002-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org>
2008-01-06 9:08 ` Avi Kivity
[not found] ` <47809A8F.5090803-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-07 11:59 ` Guido Guenther
[not found] ` <20080107115916.GA24050-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org>
2008-01-07 12:02 ` [PATCH] add acpi powerbutton support Guido Guenther
[not found] ` <20080107120223.GB24050-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org>
2008-01-07 12:44 ` Avi Kivity
[not found] ` <47821EC8.4020308-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-08 4:34 ` Jun Koi
[not found] ` <fdaac4d50801072034p7f047495jd4be276c20623be3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-01-08 8:09 ` Guido Guenther
[not found] ` <20080108080928.GA9823-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org>
2008-01-19 15:40 ` Jan Kiszka
[not found] ` <479219D6.1000707-S0/GAf8tV78@public.gmane.org>
2008-01-20 11:56 ` Guido Guenther
[not found] ` <20080120115617.GA31618-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org>
2008-01-21 10:00 ` Jan Kiszka
[not found] ` <47946D4A.5000808-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2008-01-21 10:47 ` Avi Kivity
[not found] ` <47947857.4020004-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-21 11:35 ` Jan Kiszka
[not found] ` <47948376.9000105-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2008-01-21 12:52 ` Avi Kivity
2008-01-22 9:48 ` Gerd Hoffmann
[not found] ` <4795BBE3.5060609-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-22 10:06 ` Jan Kiszka
2008-01-08 8:50 ` Avi Kivity
[not found] ` <47833938.1020609-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-09 18:00 ` Guido Guenther
[not found] ` <20080109180001.GA11240-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org>
2008-01-13 9:35 ` Avi Kivity
[not found] ` <4789DB74.5070901-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-13 13:48 ` Avi Kivity
[not found] ` <478A1694.1010307-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-14 10:23 ` Guido Guenther
[not found] ` <20080114102326.GB8987-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org>
2008-01-14 17:34 ` Avi Kivity
2008-01-18 22:20 ` Avi Kivity
[not found] ` <47912648.4030101-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-19 14:04 ` Guido Guenther
2008-01-14 10:21 ` Guido Guenther
2008-01-14 12:41 ` Alexey Eremenko
[not found] ` <64F9B87B6B770947A9F8391472E032160C95C641-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2008-01-14 13:30 ` Guido Guenther
2008-01-22 10:11 ` [PATCH] system_powerdown via acpi power button Jan Kiszka
[not found] ` <4795C134.7030400-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2008-01-22 11:49 ` Guido Guenther
[not found] ` <20080122114955.GA28335-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org>
2008-01-22 12:12 ` Jan Kiszka
[not found] ` <4795DD9C.3040804-kv7WeFo6aLtBDgjK7y7TUQ@public.gmane.org>
2008-01-24 12:37 ` Guido Guenther
[not found] ` <20080124123730.GA4527-DVvpyRRQz99DDGxTMhc9XQ@public.gmane.org>
2008-01-24 12:41 ` Avi Kivity
[not found] ` <47988797.8040208-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-24 12:50 ` Gerd Hoffmann
[not found] ` <479889B1.6030403-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-24 12:54 ` Avi Kivity
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=20080104183158.GA14002@bogon.ms20.nix \
--to=agx-wgvllbajjwfafugrpc6u6w@public.gmane.org \
--cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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