All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] HVM: Expand the number of PCI interrupts from 16 to 32
@ 2009-03-08 23:48 Simon Horman
  2009-03-09  9:17 ` Keir Fraser
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2009-03-08 23:48 UTC (permalink / raw)
  To: Xen-devel; +Cc: Yuji Shimada, Keir Fraser

I'm not sure what the reason for this, but the tables relating
to PCI interrupts seem to be truncated to 15 entries. I am
guessing that they are just incomplete and that this has never
been an issue. This patch extends these tables to the full 32 entries.

Tested by giving an ioemu rtl8139 device pci device 24,
which is unable to communicate with the network without this change.

Signed-off-by: Simon Horman <horms@verge.net.au>

Index: xen-unstable.hg/tools/firmware/hvmloader/acpi/dsdt.asl
===================================================================
--- xen-unstable.hg.orig/tools/firmware/hvmloader/acpi/dsdt.asl	2009-03-09 09:31:33.000000000 +1100
+++ xen-unstable.hg/tools/firmware/hvmloader/acpi/dsdt.asl	2009-03-09 09:47:33.000000000 +1100
@@ -470,6 +470,102 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
                 Package(){0x000fffff, 1, \_SB.PCI0.LNKA, 0},
                 Package(){0x000fffff, 2, \_SB.PCI0.LNKB, 0},
                 Package(){0x000fffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 16, INTA - INTD */
+                Package(){0x0010ffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x0010ffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x0010ffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x0010ffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 17, INTA - INTD */
+                Package(){0x0011ffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x0011ffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x0011ffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x0011ffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 18, INTA - INTD */
+                Package(){0x0012ffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x0012ffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x0012ffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x0012ffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 19, INTA - INTD */
+                Package(){0x0013ffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x0013ffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x0013ffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x0013ffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 20, INTA - INTD */
+                Package(){0x0014ffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x0014ffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x0014ffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x0014ffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 21, INTA - INTD */
+                Package(){0x0015ffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x0015ffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x0015ffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x0015ffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 22, INTA - INTD */
+                Package(){0x0016ffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x0016ffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x0016ffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x0016ffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 23, INTA - INTD */
+                Package(){0x0017ffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x0017ffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x0017ffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x0017ffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 24, INTA - INTD */
+                Package(){0x0018ffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x0018ffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x0018ffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x0018ffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 25, INTA - INTD */
+                Package(){0x0019ffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x0019ffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x0019ffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x0019ffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 26, INTA - INTD */
+                Package(){0x001affff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x001affff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x001affff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x001affff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 27, INTA - INTD */
+                Package(){0x001bffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x001bffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x001bffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x001bffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 28, INTA - INTD */
+                Package(){0x001cffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x001cffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x001cffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x001cffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 29, INTA - INTD */
+                Package(){0x001dffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x001dffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x001dffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x001dffff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 30, INTA - INTD */
+                Package(){0x001effff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x001effff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x001effff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x001effff, 3, \_SB.PCI0.LNKC, 0},
+
+                /* Device 31, INTA - INTD */
+                Package(){0x001fffff, 0, \_SB.PCI0.LNKD, 0},
+                Package(){0x001fffff, 1, \_SB.PCI0.LNKA, 0},
+                Package(){0x001fffff, 2, \_SB.PCI0.LNKB, 0},
+                Package(){0x001fffff, 3, \_SB.PCI0.LNKC, 0},
             })
 
             Name(PRTA, Package() {
@@ -562,6 +658,102 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, 
                 Package(){0x000fffff, 1, 0, 46},
                 Package(){0x000fffff, 2, 0, 47},
                 Package(){0x000fffff, 3, 0, 16},
+
+                /* Device 16, INTA - INTD */
+                Package(){0x0010ffff, 0, 0, 18},
+                Package(){0x0010ffff, 1, 0, 19},
+                Package(){0x0010ffff, 2, 0, 20},
+                Package(){0x0010ffff, 3, 0, 21},
+
+                /* Device 17, INTA - INTD */
+                Package(){0x0011ffff, 0, 0, 22},
+                Package(){0x0011ffff, 1, 0, 23},
+                Package(){0x0011ffff, 2, 0, 24},
+                Package(){0x0011ffff, 3, 0, 25},
+
+                /* Device 18, INTA - INTD */
+                Package(){0x0012ffff, 0, 0, 26},
+                Package(){0x0012ffff, 1, 0, 27},
+                Package(){0x0012ffff, 2, 0, 28},
+                Package(){0x0012ffff, 3, 0, 29},
+
+                /* Device 19, INTA - INTD */
+                Package(){0x0013ffff, 0, 0, 30},
+                Package(){0x0013ffff, 1, 0, 31},
+                Package(){0x0013ffff, 2, 0, 32},
+                Package(){0x0013ffff, 3, 0, 33},
+
+                /* Device 20, INTA - INTD */
+                Package(){0x0014ffff, 0, 0, 34},
+                Package(){0x0014ffff, 1, 0, 35},
+                Package(){0x0014ffff, 2, 0, 36},
+                Package(){0x0014ffff, 3, 0, 37},
+
+                /* Device 21, INTA - INTD */
+                Package(){0x0015ffff, 0, 0, 38},
+                Package(){0x0015ffff, 1, 0, 39},
+                Package(){0x0015ffff, 2, 0, 40},
+                Package(){0x0015ffff, 3, 0, 41},
+
+                /* Device 22, INTA - INTD */
+                Package(){0x0016ffff, 0, 0, 42},
+                Package(){0x0016ffff, 1, 0, 43},
+                Package(){0x0016ffff, 2, 0, 44},
+                Package(){0x0016ffff, 3, 0, 45},
+
+                /* Device 23, INTA - INTD */
+                Package(){0x0017ffff, 0, 0, 46},
+                Package(){0x0017ffff, 1, 0, 47},
+                Package(){0x0017ffff, 2, 0, 17},
+                Package(){0x0017ffff, 3, 0, 18},
+
+                /* Device 24, INTA - INTD */
+                Package(){0x0018ffff, 0, 0, 19},
+                Package(){0x0018ffff, 1, 0, 20},
+                Package(){0x0018ffff, 2, 0, 21},
+                Package(){0x0018ffff, 3, 0, 22},
+
+                /* Device 25, INTA - INTD */
+                Package(){0x0019ffff, 0, 0, 23},
+                Package(){0x0019ffff, 1, 0, 24},
+                Package(){0x0019ffff, 2, 0, 25},
+                Package(){0x0019ffff, 3, 0, 26},
+
+                /* Device 26, INTA - INTD */
+                Package(){0x001affff, 0, 0, 27},
+                Package(){0x001affff, 1, 0, 28},
+                Package(){0x001affff, 2, 0, 29},
+                Package(){0x001affff, 3, 0, 30},
+
+                /* Device 27, INTA - INTD */
+                Package(){0x001bffff, 0, 0, 31},
+                Package(){0x001bffff, 1, 0, 32},
+                Package(){0x001bffff, 2, 0, 33},
+                Package(){0x001bffff, 3, 0, 34},
+
+                /* Device 28, INTA - INTD */
+                Package(){0x001cffff, 0, 0, 35},
+                Package(){0x001cffff, 1, 0, 36},
+                Package(){0x001cffff, 2, 0, 37},
+                Package(){0x001cffff, 3, 0, 38},
+
+                /* Device 29, INTA - INTD */
+                Package(){0x001dffff, 0, 0, 39},
+                Package(){0x001dffff, 1, 0, 40},
+                Package(){0x001dffff, 2, 0, 41},
+                Package(){0x001dffff, 3, 0, 42},
+
+                /* Device 30, INTA - INTD */
+                Package(){0x001effff, 0, 0, 43},
+                Package(){0x001effff, 1, 0, 44},
+                Package(){0x001effff, 2, 0, 45},
+                Package(){0x001effff, 3, 0, 46},
+
+                /* Device 31, INTA - INTD */
+                Package(){0x001fffff, 0, 0, 47},
+                Package(){0x001fffff, 1, 0, 16},
+                Package(){0x001fffff, 2, 0, 17},
+                Package(){0x001fffff, 3, 0, 18},
             })
             
             Device (ISA)
Index: xen-unstable.hg/tools/firmware/rombios/rombios.c
===================================================================
--- xen-unstable.hg.orig/tools/firmware/rombios/rombios.c	2009-03-09 09:29:12.000000000 +1100
+++ xen-unstable.hg/tools/firmware/rombios/rombios.c	2009-03-09 09:30:25.000000000 +1100
@@ -9931,7 +9931,7 @@ pci_real_select_reg:
 pci_routing_table_structure:
   db 0x24, 0x50, 0x49, 0x52  ;; "$PIR" signature
   db 0, 1 ;; version
-  dw 32 + (6 * 16) ;; table size
+  dw 32 + (6 * 32) ;; table size
   db 0 ;; PCI interrupt router bus
   db 0x08 ;; PCI interrupt router DevFunc
   dw 0x0000 ;; PCI exclusive IRQs

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

* Re: [patch] HVM: Expand the number of PCI interrupts from 16 to 32
  2009-03-08 23:48 [patch] HVM: Expand the number of PCI interrupts from 16 to 32 Simon Horman
@ 2009-03-09  9:17 ` Keir Fraser
  2009-03-09  9:20   ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2009-03-09  9:17 UTC (permalink / raw)
  To: Simon Horman, Xen-devel; +Cc: Yuji Shimada

On 08/03/2009 23:48, "Simon Horman" <horms@verge.net.au> wrote:

> I'm not sure what the reason for this, but the tables relating
> to PCI interrupts seem to be truncated to 15 entries. I am
> guessing that they are just incomplete and that this has never
> been an issue. This patch extends these tables to the full 32 entries.
> 
> Tested by giving an ioemu rtl8139 device pci device 24,
> which is unable to communicate with the network without this change.

The rombios.c change was optimistic (you changed the bytes-per-device value,
rather than the number-of-devices value). The rombios table actually already
only describes 6 PCI devices, and expanding it further may risk overflowing
the available space in the ROM image. Any OS we pass devices to is going to
be ACPI-enabled anyway, so it doesn't matter.

The DSDT changes had some bugs -- the LNK[ABCD] values were mostly wrong,
and the GSI values for Device 23 Links C&D were wrong.

I fixed it all up and checked it in.

 -- Keir

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

* Re: [patch] HVM: Expand the number of PCI interrupts from 16 to 32
  2009-03-09  9:17 ` Keir Fraser
@ 2009-03-09  9:20   ` Simon Horman
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Horman @ 2009-03-09  9:20 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Yuji Shimada, Xen-devel

On Mon, Mar 09, 2009 at 09:17:30AM +0000, Keir Fraser wrote:
> On 08/03/2009 23:48, "Simon Horman" <horms@verge.net.au> wrote:
> 
> > I'm not sure what the reason for this, but the tables relating
> > to PCI interrupts seem to be truncated to 15 entries. I am
> > guessing that they are just incomplete and that this has never
> > been an issue. This patch extends these tables to the full 32 entries.
> > 
> > Tested by giving an ioemu rtl8139 device pci device 24,
> > which is unable to communicate with the network without this change.
> 
> The rombios.c change was optimistic (you changed the bytes-per-device value,
> rather than the number-of-devices value). The rombios table actually already
> only describes 6 PCI devices, and expanding it further may risk overflowing
> the available space in the ROM image. Any OS we pass devices to is going to
> be ACPI-enabled anyway, so it doesn't matter.
> 
> The DSDT changes had some bugs -- the LNK[ABCD] values were mostly wrong,
> and the GSI values for Device 23 Links C&D were wrong.

Thanks, sorry for the misses.

-- 
Simon Horman
  VA Linux Systems Japan K.K., Sydney, Australia Satellite Office
  H: www.vergenet.net/~horms/             W: www.valinux.co.jp/en

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

end of thread, other threads:[~2009-03-09  9:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-08 23:48 [patch] HVM: Expand the number of PCI interrupts from 16 to 32 Simon Horman
2009-03-09  9:17 ` Keir Fraser
2009-03-09  9:20   ` Simon Horman

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.