diff options
author | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2019-04-30 17:16:19 +0100 |
---|---|---|
committer | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2019-05-02 14:42:42 +0000 |
commit | 3762721456700d721ec5dbbc09c74d89e3377537 (patch) | |
tree | af6f0ab5dac47184f0e3a75795ffe692f0652f50 /src | |
parent | 5c891178b9e96df79bf03ccd758747b20dc2654e (diff) | |
download | gem5-3762721456700d721ec5dbbc09c74d89e3377537.tar.xz |
dev-arm: Add named variable for GICD_TYPER.IDBits
This could be used by other GICv3 components to query the maximum
number of implemented interrupt identifiers
Change-Id: I132e50de331aea22523260bcefba7e961b53eccd
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18599
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/dev/arm/gic_v3_distributor.cc | 2 | ||||
-rw-r--r-- | src/dev/arm/gic_v3_distributor.hh | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/dev/arm/gic_v3_distributor.cc b/src/dev/arm/gic_v3_distributor.cc index f261b295b..a048d18f1 100644 --- a/src/dev/arm/gic_v3_distributor.cc +++ b/src/dev/arm/gic_v3_distributor.cc @@ -472,7 +472,7 @@ Gicv3Distributor::read(Addr addr, size_t size, bool is_secure_access) { int max_spi_int_id = itLines - 1; int it_lines_number = ceil((max_spi_int_id + 1) / 32.0) - 1; - return (1 << 26) | (1 << 25) | (1 << 24) | (0xf << 19) | + return (1 << 26) | (1 << 25) | (1 << 24) | (IDBITS << 19) | (1 << 17) | (gic->getSystem()->haveSecurity() << 10) | (it_lines_number << 0); } diff --git a/src/dev/arm/gic_v3_distributor.hh b/src/dev/arm/gic_v3_distributor.hh index 86e53a3b6..c2314389b 100644 --- a/src/dev/arm/gic_v3_distributor.hh +++ b/src/dev/arm/gic_v3_distributor.hh @@ -140,6 +140,7 @@ class Gicv3Distributor : public Serializable public: static const uint32_t ADDR_RANGE_SIZE = 0x10000; + static const uint32_t IDBITS = 0xf; protected: |