All of lore.kernel.org
 help / color / mirror / Atom feed
* HVM PIC/APIC confusion in ACPI firmware?
@ 2006-09-26 18:20 David Lively
  0 siblings, 0 replies; 2+ messages in thread
From: David Lively @ 2006-09-26 18:20 UTC (permalink / raw)
  To: xen-devel

Hi Folks -

  I'm pretty new to ACPI (don't know my ASL from a hole in the ground :-),
but I think the _PRT method has the PIC/APIC cases reversed.  I'm looking
at tools/firmware/acpi/acpi_dsdt.asl.  The ACPI spec says a _PIC method (if
defined) will be called with an argument of 1 if the host is using APIC 
interrupts.
If the host is using PIC interrupts instead, it will either not call the 
_PIC method,
or will call it with an argument of 0.

  The current _PIC method simply stores its argument into the PICD variable:
   Name(PICD, 0)
   Method(_PIC, 1) {
      Store(Arg0, PICD)
   }

So PICD will contain 0 for PIC mode, and 1 for APIC mode.  The _PRT
method then returns a PCI routing table appropriate for the current
interrupt mode:

   Method(_PRT, 0) {
      If (PICD) { Return(PRTA) }
      Return (PRTP)
   }

But PRTA is a simple routing table, dealing only with PCI INTA,
while PRTP is a more complex one dealing with PCI INTs A-D.

  It looks to me like the _PRT method is backwards, and should be
returning PRTA when PICD is zero, and PRTP otherwise.  Right?

Dave

P.S. I made this change locally, but haven't seen much of a difference so
far.  It seems to work as well as the original version does.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: HVM PIC/APIC confusion in ACPI firmware?
@ 2006-09-27 12:10 Yu, Ke
  0 siblings, 0 replies; 2+ messages in thread
From: Yu, Ke @ 2006-09-27 12:10 UTC (permalink / raw)
  To: David Lively, xen-devel

Hi David, 

Good description of the logic. From your decription, you can actually
see current code is correct.  PRTP consists of "link device" and is for
PIC mode. PRTA is for APIC mode.  PRTA currently only contain entries
for existed device. If qemu introduces new device in the future, new
entry can be added to PRTA accordingly.   

Best Regards
Ke

David Lively wrote:
> Hi Folks -
> 
>   I'm pretty new to ACPI (don't know my ASL from a hole in the ground
> :-), but I think the _PRT method has the PIC/APIC cases reversed. 
> I'm looking at tools/firmware/acpi/acpi_dsdt.asl.  The ACPI spec says
> a _PIC method (if defined) will be called with an argument of 1 if
> the host is using APIC interrupts.
> If the host is using PIC interrupts instead, it will either not call
> the _PIC method,
> or will call it with an argument of 0.
> 
>   The current _PIC method simply stores its argument into the PICD
>    variable: Name(PICD, 0)
>    Method(_PIC, 1) {
>       Store(Arg0, PICD)
>    }
> 
> So PICD will contain 0 for PIC mode, and 1 for APIC mode.  The _PRT
> method then returns a PCI routing table appropriate for the current
> interrupt mode:
> 
>    Method(_PRT, 0) {
>       If (PICD) { Return(PRTA) }
>       Return (PRTP)
>    }
> 
> But PRTA is a simple routing table, dealing only with PCI INTA,
> while PRTP is a more complex one dealing with PCI INTs A-D.
> 
>   It looks to me like the _PRT method is backwards, and should be
> returning PRTA when PICD is zero, and PRTP otherwise.  Right?
> 
> Dave
> 
> P.S. I made this change locally, but haven't seen much of a
> difference so far.  It seems to work as well as the original version
> does. 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-27 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-26 18:20 HVM PIC/APIC confusion in ACPI firmware? David Lively
  -- strict thread matches above, loose matches on Subject: below --
2006-09-27 12:10 Yu, Ke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.