Hardware reference
Interrupt controller
On this page
A 32-source controller at 0x0a88_0000 with one IRQ and one FIQ output. Each source has one bit in the enable, pending and acknowledge registers; the source table below says who owns each one.
Registers
| Offset | Address | Register | Type | Description |
|---|---|---|---|---|
+0x00 |
0x0a88_0000 |
CONTROL |
u32 WO | Controller enable. Written 1 at reset. |
+0x04 |
0x0a88_0004 |
ACKNOWLEDGE |
u32 WO | Write one bits to acknowledge pending sources. |
+0x08 |
0x0a88_0008 |
VECTOR_BASE |
u32 WO | Written BASE << 9: an encoded word, not a CPU address. |
+0x0c |
0x0a88_000c |
ENABLE |
u32 RW | Bit n lets source n reach the CPU. |
+0x14 |
0x0a88_0014 |
CLEAR_14 |
u32 WO | Written all-ones at reset, together with an all-ones acknowledge. Function unknown. |
+0x18 |
0x0a88_0018 |
CONFIGURATION |
u32 WO | The top byte selects the FIQ source: 22 (0x16), the MAC. |
+0x20 |
0x0a88_0020 |
PENDING |
u32 RO | Pending sources among the enabled ones. |
+0x24 |
0x0a88_0024 |
RAW_STATE |
u32 RO | Raw state of the sources, before the enable mask: the only way to see a source that is pending but disabled. Source 22, routed to FIQ, does not appear. The firmware does not read it. |
Source: InterruptController · 40 bytes
ACKNOWLEDGE, ENABLE, PENDING, RAW_STATE
Source 22 is drawn for completeness: it is routed to FIQ and never appears in these registers.
One bit per source in ACKNOWLEDGE, ENABLE, PENDING and RAW_STATE. Names of the form IRQn mark sources whose owner is not known. Unlisted sources were never seen and are never enabled.
| Bits | Field | Description |
|---|---|---|
| 28 | MAC_EVENTS |
Set while the MAC event FIFO holds events inferred: a level view of the same events the FIQ line signals. Acknowledging it stopped reception, so it is never enabled; the main loop drains the FIFO. |
| 27 | TX_ERROR |
TX error events. Not enabled. |
| 26 | TSF |
TSF adjustment inferred. Enabled; its handler writes back TSF_CONTROL masked with 0x1f00_0003. Never seen pending, because the firmware never adjusts the TSF. |
| 24 | IRQ24 |
Owner unknown; pending as soon as it is enabled. Not enabled. |
| 22 | MAC_FIQ |
The MAC event line, routed to FIQ by CONFIGURATION. It ends a wait for interrupt but never shows in PENDING or RAW_STATE, and enabling it as an IRQ changes nothing. |
| 21 | IRQ21 |
Owner unknown. Not enabled. |
| 20 | AES_20 |
AES engine completion, second line. |
| 18 | AES_18 |
AES engine completion. Which direction uses which of the two lines is not established. |
| 13 | HIF |
Host interface, level. The causes are in HIF STATUS; the source is re-armed only after every cause is acknowledged. |
| 9 | IRQ9 |
Owner unknown; pending as soon as it is enabled. Not enabled. |
| 6 | TIMER1 |
Timer 1 one-shot expiry. Acknowledged after every sleep. |
| 4 | IRQ4 |
Owner unknown. Not enabled. |
| 2 | UART_RX |
Debug UART receive. Not enabled. |
| 0 | UART_TX |
Debug UART transmit-empty. Level, and pending whenever nothing is being sent: an image that enables it and prints nothing never sleeps. Not enabled; the UART is not wired out. |
Source: InterruptSources · 4 bytes
CONFIGURATION
The firmware writes 0x1600_a037; the low 24 bits are not described.
| Bits | Field | Description |
|---|---|---|
| 31:24 | FIQ_SOURCE |
Source routed to the FIQ output.22 MAC: The MAC event line. |
Source: InterruptConfiguration · 4 bytes
The FIQ line
CONFIGURATION routes source 22, the MAC’s event line, to the CPU’s FIQ; see MAC_FIQ and MAC_EVENTS in the source table. The firmware keeps FIQ masked and drains the MAC event FIFO from its main loop.
How the firmware takes interrupts
The IRQ handler only takes note:
pending = PENDING
ENABLE &= ~pending mask every pending source
ACKNOWLEDGE = pending clear it
raised |= pending record it for its owner
In the main loop each owner takes its bit from raised, clears the cause in its own device, and only then re-arms its source. A level source such as the HIF therefore cannot re-enter the handler before its owner has run, and a latched source such as the AES engine or timer 1 is not lost while its owner is busy. The handler never touches main-loop state.
The handler runs in IRQ mode, entered from the firmware’s own vector with IRQ and FIQ masked. A handler that unmasked FIQ would take it at once, because the MAC asserts the line whenever events wait.
Firmware reset sequence
The firmware resets the controller during platform preparation, in this order: CONFIGURATION = 0x1600_a037, CLEAR_14 = 0xffff_ffff, ACKNOWLEDGE = 0xffff_ffff, VECTOR_BASE = 0x1000_0000 (the controller base shifted left by 9, truncated), ENABLE = 0, CONTROL = 1.