Professional Documents
Culture Documents
GIC v3 Architecture
GIC v3 Architecture
GIC v3 Architecture
Speakers:
Moderator:
Housekeeping
Presentation
Questions and Answers
Wrap-up
A tour of the new GICv3
architecture
GICv3/GICv4 Webinar
Introducing ourselves
GICv3/GICv4 Webinar
GICv3/GICv4 Webinar
Where to find ARM documentation
ARM’s documentation can be found at http://infocenter.arm.com/
Useful sections:
ARM architecture – ARM and GIC architecture reference manuals
ARM Technical Support Knowledge Articles – FAQs
Cortex-A/R/M series processors – Technical Reference Manuals
Developer Guides and Articles – Detailed discussions of TrustZone, barriers…
GICv3/GICv4 Webinar
Global ARM support
GICv3/GICv4 Webinar
Active Assist
GICv3/GICv4 Webinar
ARM training
GICv3/GICv4 Webinar
Training options from ARM
GICv3/GICv4 Webinar
…and now available online
GICv3/GICv4 Webinar
A tour of the new GICv3
architecture
GICv3/GICv4 Webinar
Generic Interrupt Controller
ARM’s GIC architecture provides an efficient and standardized approach
for handling interrupts in multi-core ARM based systems
IRQ FIQ IRQ FIQ IRQ FIQ IRQ FIQ IRQ FIQ IRQ FIQ
ARM has recently released the first public beta of the GICv3 and GICv4
specification
GICv3/GICv4 Webinar
GIC versions
GICv2 GICv3 GICv4
GICv3/GICv4 Webinar
Agenda
Legacy operation
GICv4 virtualization
GICv3/GICv4 Webinar
System register interface
CPU interface registers In GICv1/v2, all registers are memory
ICC_IGRPENn_EL1 mapped
ICC_PMR_EL1
In GICv3, the CPU Interface registers can
ICC_BPRn_EL1 be accessed as ARM system registers
ICC_IARn_EL1 These are the GIC registers used when
handling interrupts
ICC_EOIRn_EL1
ICC_DIR_EL1 System register access requires the
ICC_RPR_EL1 processor implement to support
GICv3/GICv4
ICC_SGInR_EL1 ARM’s Cortex®-A53, Cortex-A57 and
Cortex-A72 all have the required support
GICv3/GICv4 Webinar
Security & group
GICv3 supports three group/security settings
Configured individually for each interrupt
Provides better match with ARMv8-A security and exception model
Group 0
Group 0 interrupts are always secure
Signalled as FIQ, regardless of current Security state
Typically used for interrupts for the firmware running at EL3
Secure Group 1
Signalled as FIQ if core is in Non-secure state
Signalled as IRQ if core is in Secure state
Typically used for interrupts for the trusted OS
Non-secure Group 1
Signalled as FIQ if core is in Secure state
Signalled as IRQ if core is in Non-secure state
Typically used for interrupts for the rich OS or Hypervisor
GICv3/GICv4 Webinar
Routing example
Non-secure Secure
Non-secure Group 1 Secure Group 1
Trusted
Rich OS
OS
EL1
Secure Monitor
EL3
FIQ Vector
SCR_EL3.FIQ=1 SCR_EL3.IRQ=0
GICv3/GICv4 Webinar
Agenda
Legacy operation
GICv4 virtualization
GICv3/GICv4 Webinar
Redistributors
GICv3 introduces Redistributors
GICv3/GICv4
Distributor
GICv3/GICv4 Webinar
Affinity levels and routing
There is increasingly demand for systems with higher core counts
Interrupt Distributor
Level 3 0.x.x.x
0.0.x.x 0.255.x.x
Level 2
0.0.0.x … 0.255.255.x
Level 1
IRQ
Interrupt Interconnect
message
Why?
Can reduce the number of wires needed and ease routing
Increasingly important as systems become larger, and number of interrupt sources increase
Matches model used by PCIe
GICv3/GICv4 Webinar
LPIs
GICv3 adds a new interrupt type – Locality-specific Peripheral Interrupt
GICv3/GICv4 Webinar
What is an ITS?
An Interrupt Translation Service maps
interrupts to INTIDs and Redistributors
GICv3/GICv4 Webinar
Controlling the ITS
The ITS is controlled by a command queue (circular buffer) in memory
Software maps/remaps interrupts by adding commands to the queue
Example:
A timer has DeviceID 5 and sends EventID 0
We decide to map the interrupt to INTID 8725 and deliver it to Redistributor 6
The per-device translation table for the timer is at physical address 0x84500000
We decide to use collection number 3
GICv3/GICv4 Webinar
Agenda
Legacy operation
GICv4 virtualization
GICv3/GICv4 Webinar
Legacy operation
GICv3 optionally supports legacy operation, for compatibility with GICv2
Can be configured separately for each Security state
But only certain combinations are permitted
GICv3/GICv4 Webinar
Agenda
Legacy operation
GICv4 virtualization
GICv3/GICv4 Webinar
Virtualization in GICv4
GICv4 adds support for direct injection of virtual interrupts
Reduces the need to enter the Hypervisor, and so can reduce run-time overhead
Only supported for LPIs
Requires an ITS, and inclusion of at least one ITS is mandatory in GICv4
Hypervisor tells the ITS in advance about mappings between virtual and
physical interrupts
Mapping includes:
EventID/Device of physical interrupt
Virtual INTID
Which virtual core the virtual interrupt belongs to
Which physical core the virtual core is expected to be running on
If the virtual core is running when the interrupt occurs, the hardware
generates a virtual interrupt
If not, a physical door-bell interrupt can optionally be sent instead
GICv3/GICv4 Webinar
GICv4 example (1)
Hypervisor issues ITS commands to map interrupts
VMAPI and VMAPTI used to map EventID/DeviceID to virtual INTID and virtual core
Can optionally specify a physical doorbell interrupt
VMAPP used to map virtual core to a physical core
GICv3/GICv4 Webinar
GICv4 example (2)
When interrupt occurs, ITS uses EventID/DeviceID to retrieve translation
Returns virtual INTID and virtual core
Physical INTID of doorbell interrupt (if applicable)
Redistributor where the virtual core is scheduled
GICv3/GICv4 Webinar
GICv4 example (3)
Redistributor checks whether the target virtual PE is currently scheduled
GICv3/GICv4 Webinar
GICv4 example (4)
If virtual core not currently scheduled, physical doorbell interrupt
forwarded instead
Physical interrupt handled by Hypervisor running at EL2
Translation
Virtual
Tables PE
table
GICv3/GICv4 Webinar
Any Questions?
GICv3/GICv4 Webinar
Back-up
GICv3/GICv4 Webinar
CoreLink™GIC-500
Number of PPIs 16
GICv3/GICv4 Webinar
Audience Q & A
Chris Shore,
Training Manager,
ARM
Martin Weidmann,
Principal Applications Engineer,
ARM
Thanks for joining us
http://ecast.opensystemsmedia.com/