SlideShare a Scribd company logo
1 of 14
Message Signaled Interrupts
A look at our network controller’s
optional capability to utilize
Message Signaled Interrupts
The ‘old’ way
• In order to appreciate the benefits of using
Message Signaled Interrupts, let’s first see
how devices do interrupts in a legacy PC
Interrupt
Controller
I/O Device
I/O Device
I/O Device
I/O Device
IRR
IMR
ISR
CPU
INTR
INTA
system bus
main
memory
EFLAGS
ESP
EIP
IVT
ISR
APP
stack
IRQ0
IRQ1
IRQ2
Multi-step communication
• A device signals that it needs CPU service
• The Interrupt Controller signals the CPU
• The CPU responds with two INTA cycles
– First INTA causes bit-changes in IRR and ISR
– Second INTA puts ID-number on system bus
• CPU uses ID-number to lookup IVT entry
• CPU saves minimum context on its stack,
adjusts eflags, and jumps to specified ISR
Faster, cheaper, and more
• Faster response to interrupts is possible if
the old multi-step communication scheme
can be replaced by a single-step protocol
• Less expensive PCs can be manufactured
if their total number of signal pins and the
physical interconnections can be reduced
• More devices can have their own ‘private’
interrupt(s) if signal lines aren’t required
The ‘new’ way
• Message Signaling allows all the needed
information to arrive in a single package,
and go directly from a device to the CPU
I/O Device
system bus
CPU
main
memory
EFLAGS
ESP
EIP
IVT
ISR
APP
stack
I/O Device
I/O Device
Implementation
• The customary PCI Configuration Space is
modified to accommodate three additional
registers, which collectively are known as
the MSI Capability Register Set:
• An MSI Control Register (16 bits)
• An MSI Address Register (32 bits/64 bits)
• An MSI Data Register (32 bits)
• (In fact these additions fit within a broader
scheme of so-called “new capabilities”)
PCI Command Register
15 10 9 8 7 6 5 4 3 2 1 0
Interrupt Disable
Fast Back-to-Back Enable
SERR# Enable
Stepping Control
Parity Error Response
VGA Palette Snoop Enable
Memory Write and Invalidate Enable
Special Cycles
Bus Master Enable
Memory Space Enable
I/O Space Enable
PCI Status Register
15 14 13 12 11 10 9 8 7 6 5 4 3 0
Interrupt Status
Capabilities List
Reserved
Reserved
Fast Back-to-Back Capable
Master Data Parity Error
DEVSEL Timing
Signaled Target-Abort
Received Target-Abort
Received Master-Abort
Signaled System Error
Detected Parity-Error
MSI Control Register
reserved 1 0 0 0 0 0 0 0
15 8 7 6 4 3 1 0
64-bit address capable (1=yes, 0=no)
multiple messages enable
multiple messages capable
000 = 1 message
001 = 2 messages
010 = 4 messages
011 = 8 messages
100 = 16 messages
101 = 32 messages
110 = reserved
111 = reserved
MSI Enable (1=yes, 0=no)
MSI Address Register
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
reserved
63 32
1 1 1 1 1 1 1 0 1 1 1 0
Destination
ID
0 0
D
M
R
H
31 20 19 12 3 2 1 0
DM = Destination Mode (0=Physical,1=Logical)
Specifies how Destination ID will be interpreted
0xFEE
Specifies which processor in the system will be
the recipient the Message Signaled Interrupt
RH = Redirection Hint (0=No redirection, 1=Utilize
destination mode to determine message recipient)
MSI Data Register
reserved
reserved
31 16
15 14 11 8 7 0
vector
Delivery
Mode
T
M
T
L
Trigger Mode (0=Edge, 1=Level)
Trigger Level (1=Assert, 0=Deassert)
Delivery Mode
000=Fixed 001=Lowest Priority
010=SMI 011=Reserved
100=NMI 101=INIT
110=Reserved 111=ExtINT
Recall NIC’s interrupt registers
enum {
E1000_ICR = 0x00C0, // Interrupt Cause Read
E1000_ICS = 0x00C8, // Interrupt Cause Set
E1000_IMS = 0x00D0, // Interrupt Mask Set
E1000_IMC = 0x00D8, // Interrupt Mask Clear
};
Registers’ usage
You use Interrupt Mask Set to selectively enable the NIC’s various interrupts;
You use Interrupt Mask Clear to selectively disable any of the NIC’s interrupts;
You use Interrupt Cause Read to find out which events have caused the NIC
to generate an interrupt (and then you can ‘clear’ those bits by writing to ICR);
You can write to the Interrupt Cause Set register to selectively trigger the NIC
to generate any of its various interrupts -- provided they have been ‘enabled’
by bits being previously set in the NIC’s Interrupt Mask Register.
Demo module: ‘msidemo.c’
• This module installs an interrupt-handler
for an otherwise unused interrupt-vector
• It initializes the MSI Capability Registers
residing in our Intel Pro1000 controller’s
PCI Configuration Space, to enable the
NIC to issue Message Signaled Interrupts
• It creates a pseudo-file (‘/proc/msidemo’)
that triggers an interrupt when it’s read
Tools
• The ‘unused’ interrupt-number is selected
by examining the settings in the IOAPIC’s
Redirection Table (e.g., for serial-UART)
• Our NIC’s PCI Configuration Space can be
viewed by installing our ‘82573.c’ module
and reading its pseudo-file (‘/proc/82573’)
• We can watch interrupts being generated
with our ‘smpwatch’ application-program

More Related Content

Similar to lesson24.ppt

AAME ARM Techcon2013 002v02 Advanced Features
AAME ARM Techcon2013 002v02 Advanced FeaturesAAME ARM Techcon2013 002v02 Advanced Features
AAME ARM Techcon2013 002v02 Advanced FeaturesAnh Dung NGUYEN
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiUnmesh Baile
 
Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085Bisrat Girma
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interruptsIsha Negi
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interruptsIsha Negi
 
Message Signaled Interrupts
Message Signaled InterruptsMessage Signaled Interrupts
Message Signaled InterruptsAnshuman Biswal
 
Assembly programming
Assembly programmingAssembly programming
Assembly programmingOmar Sanchez
 
INTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORINTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORGurudev joshi
 
AVR Fundamentals
AVR FundamentalsAVR Fundamentals
AVR FundamentalsVinit Vyas
 
Interrupts of 8085
Interrupts of 8085Interrupts of 8085
Interrupts of 8085ShivamSood22
 
Interrupt11
Interrupt11Interrupt11
Interrupt11Aisu
 
Social services and human rights to know.ppt
Social services and human rights to know.pptSocial services and human rights to know.ppt
Social services and human rights to know.pptBharathR164555
 
63071507 interrupts-up
63071507 interrupts-up63071507 interrupts-up
63071507 interrupts-uptt_aljobory
 

Similar to lesson24.ppt (20)

AAME ARM Techcon2013 002v02 Advanced Features
AAME ARM Techcon2013 002v02 Advanced FeaturesAAME ARM Techcon2013 002v02 Advanced Features
AAME ARM Techcon2013 002v02 Advanced Features
 
Best-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbaiBest-embedded-corporate-training-in-mumbai
Best-embedded-corporate-training-in-mumbai
 
Interrupts.ppt
Interrupts.pptInterrupts.ppt
Interrupts.ppt
 
Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085Chapter 4 - Interrupts of 8085
Chapter 4 - Interrupts of 8085
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interrupts
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interrupts
 
Interrupts
InterruptsInterrupts
Interrupts
 
Ch12 microprocessor interrupts
Ch12 microprocessor interruptsCh12 microprocessor interrupts
Ch12 microprocessor interrupts
 
Message Signaled Interrupts
Message Signaled InterruptsMessage Signaled Interrupts
Message Signaled Interrupts
 
Assembly programming
Assembly programmingAssembly programming
Assembly programming
 
Class8
Class8Class8
Class8
 
INTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSORINTERRUPTS OF 8086 MICROPROCESSOR
INTERRUPTS OF 8086 MICROPROCESSOR
 
AVR Fundamentals
AVR FundamentalsAVR Fundamentals
AVR Fundamentals
 
Interrupts of 8085
Interrupts of 8085Interrupts of 8085
Interrupts of 8085
 
Interrupt11
Interrupt11Interrupt11
Interrupt11
 
Atmega 128 datasheet
Atmega 128   datasheetAtmega 128   datasheet
Atmega 128 datasheet
 
Social services and human rights to know.ppt
Social services and human rights to know.pptSocial services and human rights to know.ppt
Social services and human rights to know.ppt
 
63071507 interrupts-up
63071507 interrupts-up63071507 interrupts-up
63071507 interrupts-up
 
I/O System
I/O SystemI/O System
I/O System
 
Introduction to embedded systems
Introduction to embedded systemsIntroduction to embedded systems
Introduction to embedded systems
 

More from KalimuthuVelappan (8)

rdma-intro-module.ppt
rdma-intro-module.pptrdma-intro-module.ppt
rdma-intro-module.ppt
 
kerch04.ppt
kerch04.pptkerch04.ppt
kerch04.ppt
 
Netlink-Optimization.pptx
Netlink-Optimization.pptxNetlink-Optimization.pptx
Netlink-Optimization.pptx
 
memory_mapping.ppt
memory_mapping.pptmemory_mapping.ppt
memory_mapping.ppt
 
DPKG caching framework-latest .pptx
DPKG caching framework-latest .pptxDPKG caching framework-latest .pptx
DPKG caching framework-latest .pptx
 
memory.ppt
memory.pptmemory.ppt
memory.ppt
 
stack.pptx
stack.pptxstack.pptx
stack.pptx
 
lesson05.ppt
lesson05.pptlesson05.ppt
lesson05.ppt
 

Recently uploaded

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Recently uploaded (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

lesson24.ppt

  • 1. Message Signaled Interrupts A look at our network controller’s optional capability to utilize Message Signaled Interrupts
  • 2. The ‘old’ way • In order to appreciate the benefits of using Message Signaled Interrupts, let’s first see how devices do interrupts in a legacy PC Interrupt Controller I/O Device I/O Device I/O Device I/O Device IRR IMR ISR CPU INTR INTA system bus main memory EFLAGS ESP EIP IVT ISR APP stack IRQ0 IRQ1 IRQ2
  • 3. Multi-step communication • A device signals that it needs CPU service • The Interrupt Controller signals the CPU • The CPU responds with two INTA cycles – First INTA causes bit-changes in IRR and ISR – Second INTA puts ID-number on system bus • CPU uses ID-number to lookup IVT entry • CPU saves minimum context on its stack, adjusts eflags, and jumps to specified ISR
  • 4. Faster, cheaper, and more • Faster response to interrupts is possible if the old multi-step communication scheme can be replaced by a single-step protocol • Less expensive PCs can be manufactured if their total number of signal pins and the physical interconnections can be reduced • More devices can have their own ‘private’ interrupt(s) if signal lines aren’t required
  • 5. The ‘new’ way • Message Signaling allows all the needed information to arrive in a single package, and go directly from a device to the CPU I/O Device system bus CPU main memory EFLAGS ESP EIP IVT ISR APP stack I/O Device I/O Device
  • 6. Implementation • The customary PCI Configuration Space is modified to accommodate three additional registers, which collectively are known as the MSI Capability Register Set: • An MSI Control Register (16 bits) • An MSI Address Register (32 bits/64 bits) • An MSI Data Register (32 bits) • (In fact these additions fit within a broader scheme of so-called “new capabilities”)
  • 7. PCI Command Register 15 10 9 8 7 6 5 4 3 2 1 0 Interrupt Disable Fast Back-to-Back Enable SERR# Enable Stepping Control Parity Error Response VGA Palette Snoop Enable Memory Write and Invalidate Enable Special Cycles Bus Master Enable Memory Space Enable I/O Space Enable
  • 8. PCI Status Register 15 14 13 12 11 10 9 8 7 6 5 4 3 0 Interrupt Status Capabilities List Reserved Reserved Fast Back-to-Back Capable Master Data Parity Error DEVSEL Timing Signaled Target-Abort Received Target-Abort Received Master-Abort Signaled System Error Detected Parity-Error
  • 9. MSI Control Register reserved 1 0 0 0 0 0 0 0 15 8 7 6 4 3 1 0 64-bit address capable (1=yes, 0=no) multiple messages enable multiple messages capable 000 = 1 message 001 = 2 messages 010 = 4 messages 011 = 8 messages 100 = 16 messages 101 = 32 messages 110 = reserved 111 = reserved MSI Enable (1=yes, 0=no)
  • 10. MSI Address Register 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 reserved 63 32 1 1 1 1 1 1 1 0 1 1 1 0 Destination ID 0 0 D M R H 31 20 19 12 3 2 1 0 DM = Destination Mode (0=Physical,1=Logical) Specifies how Destination ID will be interpreted 0xFEE Specifies which processor in the system will be the recipient the Message Signaled Interrupt RH = Redirection Hint (0=No redirection, 1=Utilize destination mode to determine message recipient)
  • 11. MSI Data Register reserved reserved 31 16 15 14 11 8 7 0 vector Delivery Mode T M T L Trigger Mode (0=Edge, 1=Level) Trigger Level (1=Assert, 0=Deassert) Delivery Mode 000=Fixed 001=Lowest Priority 010=SMI 011=Reserved 100=NMI 101=INIT 110=Reserved 111=ExtINT
  • 12. Recall NIC’s interrupt registers enum { E1000_ICR = 0x00C0, // Interrupt Cause Read E1000_ICS = 0x00C8, // Interrupt Cause Set E1000_IMS = 0x00D0, // Interrupt Mask Set E1000_IMC = 0x00D8, // Interrupt Mask Clear }; Registers’ usage You use Interrupt Mask Set to selectively enable the NIC’s various interrupts; You use Interrupt Mask Clear to selectively disable any of the NIC’s interrupts; You use Interrupt Cause Read to find out which events have caused the NIC to generate an interrupt (and then you can ‘clear’ those bits by writing to ICR); You can write to the Interrupt Cause Set register to selectively trigger the NIC to generate any of its various interrupts -- provided they have been ‘enabled’ by bits being previously set in the NIC’s Interrupt Mask Register.
  • 13. Demo module: ‘msidemo.c’ • This module installs an interrupt-handler for an otherwise unused interrupt-vector • It initializes the MSI Capability Registers residing in our Intel Pro1000 controller’s PCI Configuration Space, to enable the NIC to issue Message Signaled Interrupts • It creates a pseudo-file (‘/proc/msidemo’) that triggers an interrupt when it’s read
  • 14. Tools • The ‘unused’ interrupt-number is selected by examining the settings in the IOAPIC’s Redirection Table (e.g., for serial-UART) • Our NIC’s PCI Configuration Space can be viewed by installing our ‘82573.c’ module and reading its pseudo-file (‘/proc/82573’) • We can watch interrupts being generated with our ‘smpwatch’ application-program