Template Version: @(#)sac_nextcase 1.70 03/30/10 SMI This information is Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 1. Introduction 1.1. Project/Component Working Name: PCITool Output Improvement 1.2. Name of Document Author/Supplier: Author: Andy Sang 1.3 Date of This Document: 02 June, 2010 4. Technical Description 4.1 Project Summary PCITool is a low-level tool which provides a facility for getting and setting interrupt routing information. It is first introduced by PSARC/2005/232 and then made public by PSARC/2009/215. It's enhanced to support retargeting MSI/X interrupts by PSARC/2009/340 and improved to support multi-CPU x86 system by PSARC/2009/665. Currently PCITool output doesn't provide enough interrupt information to the customer. To improve PCITool more efficient and friendly, this project will define the changes to PCITool to retrieve more interrupt information from kernel, and also will propose some output changes. These changes are expected to be backported to S10 after the changes of PSARC/2009/340 and PSARC/2009/665 are backported, so micro/patch binding is requested. 4.2 PCITool syntax changes Current syntax: pcitool pci@ -i | all [ -r [ -c ] | -w [ -g ] ] [ -v ] [ -q ] pcitool pci@ -m | all [ -r [ -c ] | -w [ -g ] ] [ -v ] [ -q ] Proposed syntax: pcitool pci@ -i | [ all [ -s cpu | driver ][ -h | -d ] ] [ -r [ -c ] | -w [ -g ] ] [ -v ] [ -q ] pcitool pci@ -m | [ all [ -s cpu | driver ][ -h | -d ] ] [ -r [ -c ] | -w [ -g ] ] [ -v ] [ -q ] 4.3 PCITool feature changes - A new function to make the "all" in "-i all" optional. - A new option, "-s cpu | driver" to sort by cpu or driver name. - A new option switch, "-d" and "-h" control displaying all numbers in decimal or hexadecimal. No "0x" prefix is used in the output when the -h option is used. The numbers are by default display in decimal. 4.4 PCITool output changes This project adds some fields to improve the PCITool output, include: IRQ/MSG, Type, PIL, APIC/Mondo, Share, inum. In the output, the Driver field displays driver information for the interrupts from the real device as below, while it displays ISR name. drivername # instance number [inum] Current output: Show all interrupt information on /pci@0,0 # pcitool /pci@0,0 -i all 0x0,0x21: pcieb 3 /pci@0,0/pci8086,3607@4 0x0,0x22: mpt 0 /pci@0,0/pci8086,3607@4/pci1000,3150@0 0x0,0x24: asy 0 /pci@0,0/isa@1f/asy@1,3f8 Proposed output: Show all interrupt information on /pci@0,0 # pcitool /pci@0,0 -i CPU Vect IRQ Type PIL APIC/INT# Share Driver Path 0 32 9 FIXED 9 - 1 acpi_sci_vect - 0 33 - MSI 7 - 1 pcieb#3[0] /pci@0,0/pci8086,3607@4 0 34 - MSI 5 - 1 mpt#0[0] /pci@0,0/pci8086,3607@4/pci1000,3150@0 0 35 - MSI 5 - 1 mpt#0[1] /pci@0,0/pci8086,3607@4/pci1000,3150@0 0 36 4 FIXED 12 1/12 1 asy#1[0] /pci@0,0/isa@1f/asy@1,3f8 Show all interrupt information on /pci@0,0, sort by driver name, display numbers in hexadecimal # pcitool /pci@0,0 -i all -s driver -h CPU Vect IRQ Type PIL APIC/INT# Share Driver Path 0 20 9 FIXED 9 - 1 acpi_sci_vect - 0 24 4 FIXED c 1/c 1 asy#1[0] /pci@0,0/isa@1f/asy@1,3f8 0 22 - MSI 5 - 1 mpt#0[0] /pci@0,0/pci8086,3607@4/pci1000,3150@0 0 23 - MSI 5 - 1 mpt#0[1] /pci@0,0/pci8086,3607@4/pci1000,3150@0 0 21 - MSI 7 - 1 pcieb#3[0] /pci@0,0/pci8086,3607@4 Note that the header is different on between x86 platforms and sparc platforms since the some item meaning is different. The detail is that "Vector" vs "INO", "IRQ" vs "MSG" and "APIC/INT#" vs "Mondo" as below example: Show all interrupt information on /pci@400 on sparc platform # pcitool /pci@400 -i all CPU INO MSG Type PIL Mondo Share Driver Path 81 21 - Fixed 9 1045 1 ohci#0[0] /pci@400/pci@0/pci@1/pci@0/usb@0 44 25 254 MSI-X 6 1049 1 nxge#0[0] /pci@500/pci@0/pci@8/network@0 75 56 48 PCIe 9 1110 1 px#1[0] /pci@500 4.5 Data structure changes pcitool_intr_get_t This is the argument data structure for PCITOOL_DEVICE_GET_INTR ioctl, which retrieve a given interrupt information. This project adds some new fields to get more information, including IRQ/MSG, Type, PIL, APIC/Mondo, Share, inum, State, Bus, Triger. 4.6 Bug/RFE Number(s) The changes described in this case will be done as a follow on work to the following RFE: CR 6669984 Solaris x86 need to provide large number of interrupt vectors 4.7 Interfaces Imported Interfaces Interface Stability Comments ----------------------------+---------------+-------------------------- pcitool Project Some syntax changes. Added Private Some new fields (IRQ/MSG, Type,PIL,APIC/Mondo,Share, inum) changed output format PCITOOL_DEVICE_GET_INTR Consolidation Ioctl to retrieve more intr Private information pcitool_intr_get_t Consolidation PCITOOL_DEVICE_GET_INTR arg Private data structure ----------------------------------------------------------------------- 4.8 References [1] PCITool and its nexus ioctl support - PSARC/2005/232 http://sac.sfbay.sun.com/PSARC/2005/232 [2] PCITool Public Interrupts - PSARC/2009/215 http://sac.sfbay.sun.com/PSARC/2009/215 [3] Interrupt Affinity Interfaces and PCITool Enhancements - PSARC/2009/340 http://sac.sfbay.sun.com/PSARC/2009/340 [4] PCITool Extensions - PSARC/2009/665 http://sac.sfbay.sun.com/PSARC/2009/665 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: ON 6.5. ARC review type: FastTrack 6.6. ARC Exposure: open