From: Giacomo Travaglini Date: Mon, 2 Sep 2019 09:28:12 +0000 (+0100) Subject: dev-arm: Add read/writeBanked helpers to GICv3 X-Git-Tag: v19.0.0.0~576 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96fdb20871b16782ed405e58e9d9cc005d661b21;p=gem5.git dev-arm: Add read/writeBanked helpers to GICv3 These will be used by AA64 security banked registers in GICv3. Change-Id: Ia980c4f5c14187ab9c18da1d1d596562644111ae Signed-off-by: Giacomo Travaglini Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20624 Maintainer: Andreas Sandberg Tested-by: kokoro --- diff --git a/src/dev/arm/gic_v3_cpu_interface.cc b/src/dev/arm/gic_v3_cpu_interface.cc index cc630b4d2..d3d73a32f 100644 --- a/src/dev/arm/gic_v3_cpu_interface.cc +++ b/src/dev/arm/gic_v3_cpu_interface.cc @@ -1623,6 +1623,20 @@ Gicv3CPUInterface::setMiscReg(int misc_reg, RegVal val) } } +RegVal +Gicv3CPUInterface::readBankedMiscReg(MiscRegIndex misc_reg) const +{ + return isa->readMiscRegNoEffect( + isa->snsBankedIndex64(misc_reg, !isSecureBelowEL3())); +} + +void +Gicv3CPUInterface::setBankedMiscReg(MiscRegIndex misc_reg, RegVal val) const +{ + isa->setMiscRegNoEffect( + isa->snsBankedIndex64(misc_reg, !isSecureBelowEL3()), val); +} + int Gicv3CPUInterface::virtualFindActive(uint32_t int_id) const { diff --git a/src/dev/arm/gic_v3_cpu_interface.hh b/src/dev/arm/gic_v3_cpu_interface.hh index 56a66952c..9e1c9a09f 100644 --- a/src/dev/arm/gic_v3_cpu_interface.hh +++ b/src/dev/arm/gic_v3_cpu_interface.hh @@ -338,6 +338,8 @@ class Gicv3CPUInterface : public ArmISA::BaseISADevice, public Serializable void virtualUpdate(); RegVal bpr1(Gicv3::GroupId group); + RegVal readBankedMiscReg(MiscRegIndex misc_reg) const; + void setBankedMiscReg(MiscRegIndex misc_reg, RegVal val) const; public: Gicv3CPUInterface(Gicv3 * gic, uint32_t cpu_id);