OpenSolaris

Printable Version Enter a New Search
Bug ID 6311025
Synopsis build_reserved_irqlist ignores irq15 information from ELCR register
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:arch-x86
Keywords opensolaris | oss-request
Sponsor
Submitter jk
Responsible Engineer Dan Mick
Reported Against
Duplicate Of
Introduced In solaris_10
Commit to Fix snv_35
Fixed In snv_35
Release Fixed solaris_nevada(snv_35) , solaris_10u2(s10u2_08) (Bug ID:2136527)
Related Bugs
Submit Date 15-August-2005
Last Update Date 16-January-2007
Description
Category
   kernel
Sub-Category
   arch-x86
Description
   Minor nit:
When building the reserved_irqs_table in usr/src/uts/i86pc/io/psm/psm_common.c,
function build_reserved_irqlist(), the entry for IRQ15 is ignored when
using the ELCR register.
   301          if (acpi_irq_check_elcr) {
   302
   303                  elcrval = (inb(ELCR_PORT2) << 8) | (inb(ELCR_PORT1));
   304                  if (ELCR_EDGE(elcrval, 0) && ELCR_EDGE(elcrval, 1) &&
   305                      ELCR_EDGE(elcrval, 2) && ELCR_EDGE(elcrval, 8) &&
   306                      ELCR_EDGE(elcrval, 13)) {
   307                          /* valid ELCR */
   308                          for (i = 0; i < MAX_ISA_IRQ; i++)
   309                                  if (!ELCR_LEVEL(elcrval, i))
   310                                          reserved_irqs_table[i] = 1;
   311                  }
   312          }
The loop at line 308 should run until "i <= MAX_ISA_IRQ", not "i < MAX_ISA_IRQ".
MAX_ISA_IRQ is defined in psm_common.h:
usr/src/uts/i86pc/sys/psm_common.h:#define        MAX_ISA_IRQ 15
Fixing the test for the loop at line 308 doesn't break anything, because
later on the entries for IRQ14&15 are reserved anyway, for legacy-mode ata:
   350          /*
   351           * Reserve IRQ14 & IRQ15 for IDE.  It shouldn't be hard-coded
   352           * here but there's no other way to find the irqs for
   353           * legacy-mode ata (since it's hard-coded in pci-ide also).
   354           */
   355          reserved_irqs_table[14] = 1;
   356          reserved_irqs_table[15] = 1;
Frequency
   Always
Regression
   Solaris 10
Steps to Reproduce
   Look at the source for build_reserved_irqlist():
http://cvs.opensolaris.org/source/xref/usr/src/uts/i86pc/io/psm/psm_common.c#build_reserved_irqlist
Expected Result
   System should use ELCR information for all ISA interrupts 0 .. 15
Actual Result
   Information for irqs 0 .. 14 is used;  edge/level information for irq 15 is
ignored.
Error Message(s)
   
Test Case
   
Workaround
   Change psm_common.c line 308 to:
   308                          for (i = 0; i <= MAX_ISA_IRQ; i++)
Submitter wants to work on bug
   No
Additional configuration information
Work Around
Change psm_common.c line 308 to:
   308                          for (i = 0; i <= MAX_ISA_IRQ; i++)
Comments
N/A