ARM GIC-400 Registers

1. Introduction

GIC-400 is used for interrupt control. The A20 chip on the Cubieboard2 uses this controller.

The GIC controller address on Cubieboard2 is 0x01C80000—0x01C87FFF, with a length equal to the GIC-400 register length.

The specific details are shown below.

With 0x01C80000 as the starting address, the following offsets are provided:

Offset AddressDescription
0x0000-0x0FFFReserved, unused
0x1000-0x1FFFDistributor, useful
0x2000-0x3FFFCPU interfaces, useful
0x4000-0x4FFFVirtual interface control block, for the processor that is performing the accessVirtualization-related, unused
0x5000-0x5FFFVirtual interface control block, for the processor selected by address bits [11:9]Virtualization-related, unused
0x5000-0x51FF0x5200-0x53FF…0x5E00-0x5FFFAlias for Processor 0Alias for Processor 1…Alias for Processor 7
0x6000-0x7FFFVirtual CPU interfacesVirtualization-related, unused

The commonly used parts are the second and third blocks in the diagram, the 0x1000~0x3fff configuration.

2. Distributor

The address of this distributor register block = GIC controller address + 0x1000. Remember this offset when using it. Starting from here, the following registers are available:

OffsetNameAccessReset ValueFunction
0x000GICD_CTLRRW0x00000000[c]Distributor Control RegisterWrite 1 to enable the controller, required
0x004GICD_TYPERROConfiguration-dependent[d]Interrupt Controller Type RegisterUsed to check the total number of interrupt lines
0x008GICD_IIDRRO0x0200143BDistributor Implementer Identification Register, GICD_IIDRContains version information, not particularly useful
0x080-0x0BCGICD_IGROUPRnRW0x00000000Interrupt Group Registers[e]A bitmap that controls whether interrupts belong to Group A or B
0x100GICD_ISENABLERnRW[f]SGIs and PPIs:0x0000FFFF[g]Interrupt Set-Enable RegistersA bitmap for enabling individual interrupts, write 1 to enable. Useful
0x104-0x13CSPIs: 0x00000000
0x180GICD_ICENABLERnRW[f]0x0000FFFF[g]Interrupt Clear-Enable RegistersSimilar to the previous register, but opposite function, write 1 to disable
0x184-0x1BC0x00000000
0x200-0x23CGICD_ISPENDRnRW0x00000000Interrupt Set-Pending RegistersPending bitmap, write 1 to enter pending state
0x280-0x2BCGICD_ICPENDRnRW0x00000000Interrupt Clear-Pending RegistersSimilar to above, write 1 for opposite effect, prevents pending state
0x300-0x33CGICD_ISACTIVERnRW0x00000000Interrupt Set-Active RegistersBitmap, write 1 to activate an interrupt
0x380-0x3BCGICD_ICACTIVERnRW0x00000000Interrupt Clear-Active RegistersWrite 1 to deactivate an interrupt
0x400-0x5FCGICD_IPRIORITYRnRW0x00000000Interrupt Priority RegistersStores priority levels for each interrupt, 8 bits per interrupt
0x800-0x81CGICD_ITARGETSRnRO[h]-Interrupt Processor Targets Registers[i]Determines which processor an interrupt should be sent to for handling
0x820-0x9FCRW0x00000000
0xC00GICD_ICFGRnROSGIs: 0xAAAAAAAAInterrupt Configuration Registers, GICD_ICFGRnConfigures whether interrupts are level-triggered or falling-edge triggered
0xC04ROPPIs: 0x55540000
0xC08-0xC7CRW[j]SPIs: 0x55555555
0xD00GICD_PPISRRO0x00000000Private Peripheral Interrupt Status Register, GICD_PPISRGenerally not used
0xD04-0xD3CGICD_SPISRnRO0x00000000Shared Peripheral Interrupt Status Registers, GICD_SPISRnNot used
0xF00GICD_SGIRWO-Software Generated Interrupt RegisterControls software interrupts
0xF10-0xF1CGICD_CPENDSGIRnRW0x00000000SGI Clear-Pending RegistersPending bits for software interrupts
0xF20-0xF2CGICD_SPENDSGIRnRW0x00000000SGI Set-Pending RegistersSimilar to above, but writing 1 stops pending
0xFD0GICD_PIDR4RO0x00000004Peripheral ID 4 Register
0xFD4GICD_PIDR5RO0x00000000Peripheral ID 5 Register
0xFD8GICD_PIDR6RO0x00000000Peripheral ID 6 Register
0xFDCGICD_PIDR7RO0x00000000Peripheral ID 7 Register
0xFE0GICD_PIDR0RO0x00000090Peripheral ID 0 Register
0xFE4GICD_PIDR1RO0x000000B4Peripheral ID 1 Register
0xFE8GICD_PIDR2RO0x0000002BPeripheral ID 2 Register
0xFECGICD_PIDR3RO0x00000000Peripheral ID 3 Register
0xFF0GICD_CIDR0RO0x0000000DComponent ID 0 Register
0xFF4GICD_CIDR1RO0x000000F0Component ID 1 Register
0xFF8GICD_CIDR2RO0x00000005Component ID 2 Register
0xFFCGICD_CIDR3RO0x000000B1Component ID 3 Register

3. CPU Interface

Starting address offset is 0x2000

OffsetNameTypeResetDescription[a]
0x0000GICC_CTLRRW0x00000000CPU Interface Control RegisterEnable bit. Write 1 to enable
0x0004GICC_PMRRW0x00000000Interrupt Priority Mask RegisterLimits minimum interrupt priority, interrupts with values above this cannot trigger. Best to set this high
0x0008GICC_BPRRW0x00000002[b]Binary Point RegisterThe minimum value of the Binary Point Register depends on which security-banked copy is considered:0x2 Secure copy0x3 Non-secure copyPriority grouping
0x000CGICC_IARRO0x000003FFInterrupt Acknowledge RegisterRead-only, interrupt ID
0x0010GICC_EOIRWO-End of Interrupt RegisterWrite to inform the CPU that interrupt processing is complete
0x0014GICC_RPRRO0x000000FFRunning Priority RegisterCurrent interrupt priority
0x0018GICC_HPPIRRO0x000003FFHighest Priority Pending Interrupt Register [c]Highest priority interrupt number and its pending value
0x001CGICC_ABPRRW0x00000003Aliased Binary Point Register[d]The minimum value of the Aliased Binary Point Register is 0x3.Alias register
0x0020GICC_AIARRO0x000003FFAliased Interrupt Acknowledge Register[d]Alias register
0x0024GICC_AEOIRWO-Aliased End of Interrupt Register[d]Alias register
0x0028GICC_AHPPIRRO0x000003FFAliased Highest Priority Pending Interrupt Register[c][d]Alias register
0x00D0GICC_APR0RW0x00000000Active Priority RegisterUsed for saving and restoring
0x00E0GICC_NSAPR0RW0x00000000Non-Secure Active Priority Register[d]Used for saving and restoring
0x00FCGICC_IIDRRO0x0202143BCPU Interface Identification Register, GICC_IIDRContains version information
0x1000GICC_DIRWO-Deactivate Interrupt Register
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy