arm-trusted-firmware/drivers
James kung acc2985268 Prevent pending G1S interrupt become G0 interrupt
According to Arm GIC spec(IHI0069E, section 4.6.1),
when GICD_CTLR.DS == 0, Secure Group 1 interrupts
are treated as Group 0 by a CPU interface if:
- The PE does not implement EL3.
- ICC_SRE_EL1(S).SRE == 0

When a cpu enter suspend or deep idle, it might be
powered off. When the cpu resume, according to
the GIC spec(IHI0069E, section 9.2.15, 9.2.16 and
9.2.22) the ICC_SRE_EL1.SRE reset value is 0 (if
write is allowed) and G0/G1S/G1NS interrupt of the
GIC cpu interface are all disabled.

If a G1S SPI interrupt occurred and the target cpu
of the SPI is assigned to a specific cpu which is
in suspend and is powered off, when the cpu resume
and start to initial the GIC cpu interface, the
initial sequence might affect the interrupt group
type of the pending interrupt on the cpu interface.

Current initial sequence on the cpu interface is:
1. Enable G0 interrupt
2. Enable G1S interrupt
3. Enable ICC_SRE_EL1(S).SRE

It is possible to treat the pending G1S interrupt
as G0 interrupt on the cpu interface if the G1S
SPI interrupt occurred between step2 and step3.

To prevent the above situation happend, the initial
sequence should be changed as follows:
1. Enable ICC_SRE_EL1(S).SRE
2. Enable G0 interrupt
3. Enable G1S interrupt

Change-Id: Ie34f6e0b32eb9a1677ff72571fd4bfdb5cae25b0
Signed-off-by: James Kung <kong1191@gmail.com>
2019-06-05 11:05:05 +08:00
..
allwinner Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
arm Prevent pending G1S interrupt become G0 interrupt 2019-06-05 11:05:05 +08:00
auth Mbed TLS: Remove weak heap implementation 2019-04-12 09:52:52 +01:00
cadence/uart/aarch64 Console: remove deprecated finish_console_register 2019-04-03 14:55:18 +01:00
cfi/v2m Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
console Console: Allow to register multiple times 2019-04-24 10:50:16 +01:00
coreboot/cbmem_console/aarch64 Console: remove deprecated finish_console_register 2019-04-03 14:55:18 +01:00
delay_timer drivers: generic_delay_timer: Assert presence of Generic Timer 2019-02-06 09:54:42 +00:00
gpio Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
imx imx: warp7: Migrate to MULTI_CONSOLE_API 2019-02-12 18:56:29 +08:00
intel/soc/stratix10/io intel: QSPI boot enablement 2019-03-13 10:17:14 +08:00
io Remove several warnings reported with W=1 2019-04-01 10:43:42 +01:00
marvell Console: remove deprecated finish_console_register 2019-04-03 14:55:18 +01:00
mentor/i2c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
meson Console: remove deprecated finish_console_register 2019-04-03 14:55:18 +01:00
mmc drivers: mmc: Fix some issues with MMC stack 2019-03-07 11:34:20 +08:00
partition drivers: partition: Add simple MBR partition entries support 2019-02-13 14:26:15 +08:00
renesas/rcar rcar_gen3: drivers: Change to restore timer counter value at resume 2019-04-11 12:57:03 +02:00
rpi3 rpi3: sdhost: SDHost driver improvement 2019-02-27 01:06:57 +08:00
st Console: remove deprecated finish_console_register 2019-04-03 14:55:18 +01:00
staging/renesas/rcar rcar_gen3: drivers: qos: update QoS setting 2019-05-22 01:06:38 +02:00
synopsys driver: synosys: Fix SD MMC not initializing correctly 2019-03-22 12:54:31 +08:00
ti/uart drivers: ti: uart: add a aarch32 variant 2019-04-25 13:37:56 +02:00
ufs drivers: ufs: Extend the delay after reset to wait for some slower chips 2019-05-13 17:11:07 -07:00