mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-31 12:16:25 +00:00
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> |
||
---|---|---|
.. | ||
adc | ||
audio | ||
bbram | ||
bluetooth | ||
cache | ||
can | ||
clock_control | ||
console | ||
coredump | ||
counter | ||
crypto | ||
dac | ||
dai | ||
debug | ||
disk | ||
display | ||
dma | ||
ec_host_cmd_periph | ||
edac | ||
eeprom | ||
entropy | ||
espi | ||
ethernet | ||
flash | ||
fpga | ||
gpio | ||
hwinfo | ||
i2c | ||
i2s | ||
i3c | ||
ieee802154 | ||
interrupt_controller | ||
ipm | ||
kscan | ||
led | ||
led_strip | ||
lora | ||
mbox | ||
mdio | ||
memc | ||
mipi_dsi | ||
misc | ||
mm | ||
modem | ||
net | ||
neural_net | ||
pcie | ||
peci | ||
pinctrl | ||
pinmux | ||
pm_cpu_ops | ||
power_domain | ||
ps2 | ||
ptp_clock | ||
pwm | ||
regulator | ||
reset | ||
sdhc | ||
sensor | ||
serial | ||
spi | ||
syscon | ||
timer | ||
usb | ||
usb_c | ||
video | ||
virtualization | ||
w1 | ||
watchdog | ||
wifi | ||
xen | ||
CMakeLists.txt | ||
Kconfig |