Trial Version Price Buy now Policies Subscribe

Sample of ACPIScope usage

Description
One of our customers reported problem with ATA cards on a platform VIA chipset. Those cards did not work on that platform both with Microsoft PCMCIA driver and CardWare 7.0.

Brief analysis of support data showed that

  1. BIOS do not assign PCI interrupt for PCMCIA sockets
  2. NTDETECT is not able to find list of ISA interrupts available to use for PC cards
  3. System works in standard mode (ACPI is not used)

Since neither PCI nor ISA interrupts are available, PCMCIA driver is not able to assign IRQ for ATA card.

We have used ACPIScope and PCIScope to find out IRQ number we can use for PC cards.

Procedure
  1. From PCIScope data we have determined location of CardBus adapter sockets (Bus 0, device 9, function 0 and 1) and interrupt pin value (INT-A for both sockets)

  2. PCI routing table for devices on Bus 0 informs that interrupt for all functions of device 9 which have pin A is controlling by device \_SB.LNKB

  3. From analysis of _SRS (Set resource settings) of \_SB.LNKB device:
    1. IRQ assigned to sockets of CardBus adapter is stored in bits 4-11 of register 0x55 of ISA bridge
      Method(_SRS, 0x01, NotSerialized)
      {
            // Create field IRA.
            // Initialize it by reference to
            // WORD field with IRQ mask in resource
            // descriptor passed as argument
            CreateWordField(Arg0, 0x01, IRA)
      
            // Store IRQ number in Local variable
            FindSetRightBit(IRA, Local0)
            Decrement(Local0)
      
            // Write IRQ number to bits 8-11 of register 0x55
            // in PCI configuration space of ISA bridge
            Store(Local0, PIRB)
      
            // Store IRQ nunmber in global variable
            Store(PIRB, IRQB)
      }
      
    2. PCI device handle of ISA bridge is 0:7:0
      ...
      Device(SBRG)
      {
            Name(_ADR, 0x00070000) // Device 7, function 0
            ..
            OperationRegion(PIX0, PCI_Config, 0x00000055, 0x00000004)
            ...
            Field(PCI0.SBRG.PIX0, ByteAcc, NoLock, Preserve)
            {
                ,     0x00000004,
                PIRA, 0x00000004,
                PIRB, 0x00000004,
                PIRC, 0x00000004,
                ,     0x00000004,
                PIRD, 0x00000004,
                ,     0x00000004,
            }
      ...
      
  4. According to PCIScope data, bits 8-11 of register 0x55 contain value 5. So IRQ 5 is assigned to sockets of CardBus adapter.

Conclusion
PCI IRQ 5 was forced for use via options of CardWare 7.0. It solved the problem with ATA cards on the customer platform.