zephyr/drivers/interrupt_controller
Ayan Kumar Halder 2174501a10 Arm: GICv3: Enable reading GICR_TYPER via two sys_read32() on AArch32
GICR_TYPER is a 64 bit register. On AArch32 when one uses sys_read64(),
this results in ldrd instruction. When Zephyr runs as a VM, 'LDRD'
instruction on an emulated MMIO region gets trapped to the hypervisor as
data abort.

Refer the following paragraph from ARM DDI 0487G.b ID072021 :-

Section - "ISS encoding for an exception from a Data Abort",
"For other faults reported in ESR_EL2, ISV is 0 except for the following
stage 2 aborts:

AArch32 instructions where the instruction:
— Is an LDR, LDA, LDRT, LDRSH, LDRSHT, LDRH, LDAH, LDRHT, LDRSB, LDRSBT,
LDRB, LDAB, LDRBT, STR, STL, STRT, STRH, STLH, STRHT, STRB, STLB, or STRBT
instruction."

As 'LDRD' is not in the list, so ISV==0. This implies that Arm could not
decode the instruction for the hypervisor (in EL2) to execute it.

Thus, we have abstracted this read into arm_gic_get_typer().
For AArch64, we use sys_read64() as before.
For AArch32, we use sys_read32() twice to read the lower and upper 32 bits
of GICR_TYPER.

Thus, we ensure that when the access is trapped for AArch32, Arm generates
a valid ISS so that hypervisor can execute it.

Signed-off-by: Ayan Kumar Halder <ayankuma@amd.com>
2022-10-28 10:36:36 +02:00
..
CMakeLists.txt
Kconfig
Kconfig.cavs
Kconfig.clic
Kconfig.dw
Kconfig.esp32
Kconfig.esp32c3
Kconfig.gd32_exti
Kconfig.gic
Kconfig.intel_vtd
Kconfig.it8xxx2
Kconfig.loapic
Kconfig.multilevel
Kconfig.multilevel.aggregator_template
Kconfig.npcx
Kconfig.plic
Kconfig.rv32m1
Kconfig.sam0
Kconfig.shared_irq
Kconfig.stm32
Kconfig.xec
intc_arcv2_irq_unit.c
intc_cavs.c smp: Convert #if to use CONFIG_MP_MAX_NUM_CPUS 2022-10-20 22:04:10 +09:00
intc_cavs.h
intc_dw.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
intc_dw.h drivers: intc_dw: fixed misnumbered value of reserved slots in structure 2022-10-17 13:37:09 -04:00
intc_dw_ace.c smp: Move for loops to use arch_num_cpus instead of CONFIG_MP_NUM_CPUS 2022-10-21 13:14:58 +02:00
intc_esp32.c interrupt_controller: intc_esp32: Convert CONFIG_MP_NUM_CPUS handling 2022-10-26 12:00:45 +02:00
intc_esp32c3.c
intc_exti_stm32.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
intc_gd32_exti.c
intc_gic.c interrupt_controller: gic: Rework usage of CONFIG_MP_NUM_CPUS 2022-10-25 10:52:17 +02:00
intc_gic_common_priv.h
intc_gicv3.c Arm: GICv3: Enable reading GICR_TYPER via two sys_read32() on AArch32 2022-10-28 10:36:36 +02:00
intc_gicv3_its.c interrupt_controller: gic: Rework usage of CONFIG_MP_NUM_CPUS 2022-10-25 10:52:17 +02:00
intc_gicv3_priv.h
intc_intel_vtd.c
intc_intel_vtd.h
intc_ioapic.c
intc_ioapic_priv.h
intc_irqmp.c
intc_ite_it8xxx2.c
intc_ite_it8xxx2.h it8xxx2: generalize ILM support 2022-10-21 20:31:47 +02:00
intc_loapic.c
intc_loapic_spurious.S
intc_mchp_ecia_xec.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
intc_miwu.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
intc_nuclei_eclic.c
intc_plic.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
intc_rv32m1_intmux.c
intc_sam0_eic.c
intc_sam0_eic_priv.h
intc_shared_irq.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
intc_swerv_pic.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
intc_system_apic.c
intc_vexriscv_litex.c
wuc_ite_it8xxx2.c