arm/gic: Get rid of READ/WRITE_SYSREG32
authorMichal Orzel <michal.orzel@arm.com>
Wed, 5 May 2021 07:43:03 +0000 (09:43 +0200)
committerJulien Grall <jgrall@amazon.com>
Mon, 10 May 2021 17:16:34 +0000 (18:16 +0100)
commit78e67c99eb3f90c22c8c6ee282ec3a43d2ddccb5
treeb065de3f7d2b2bc066e490cd287bb59dba927570
parentd55afb1acaffc6047af3cabc3ef4442f313bee2c
arm/gic: Get rid of READ/WRITE_SYSREG32

AArch64 registers are 64bit whereas AArch32 registers
are 32bit or 64bit. MSR/MRS are expecting 64bit values thus
we should get rid of helpers READ/WRITE_SYSREG32
in favour of using READ/WRITE_SYSREG.
We should also use register_t type when reading sysregs
which can correspond to uint64_t or uint32_t.
Even though many AArch64 registers have upper 32bit reserved
it does not mean that they can't be widen in the future.

Modify types of following members of struct gic_v3 to register_t:
-vmcr
-sre_el1
-apr0
-apr1

Add new macro GICC_IAR_INTID_MASK containing the mask
for INTID field of ICC_IAR0/1_EL1 register as only the first 23-bits
of IAR contains the interrupt number. The rest are RES0.
Therefore, take the opportunity to mask the bits [23:31] as
they should be used for an IRQ number (we don't know how the top bits
will be used).

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/gic-v3-lpi.c
xen/arch/arm/gic-v3.c
xen/include/asm-arm/gic.h
xen/include/asm-arm/gic_v3_defs.h