dev-arm: Implement GICv4.1 GICD_TYPER2 as RES0
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Fri, 18 Sep 2020 08:01:34 +0000 (09:01 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 22 Sep 2020 13:19:43 +0000 (13:19 +0000)
If GICv4.1 is not implemented (our case) the register should be
treated as RES0

Change-Id: Ia60f6dce9741c34bf167805f60c3fc8bf0897510
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34875
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/arm/gic_v3_distributor.cc
src/dev/arm/gic_v3_distributor.hh

index 27f404b2bf4a1bf2482c32f922b8704a6cb0b81c..27fbe9c5585fdabbd1cdd56d062f730a4d9f9367 100644 (file)
@@ -472,6 +472,9 @@ Gicv3Distributor::read(Addr addr, size_t size, bool is_secure_access)
         //return 0x43b; // ARM JEP106 code (r0p0 GIC-500)
         return 0;
 
+      case GICD_TYPER2: // Interrupt Controller Type Register 2
+        return 0; // RES0
+
       case GICD_STATUSR: // Error Reporting Status Register
         // Optional register, RAZ/WI
         return 0x0;
index 99b65ed9a85e0f77a10ddbfc39c85c4a8bcc3aa1..5e17e2af01470f44338c839eb562b165e1e6eafc 100644 (file)
@@ -65,6 +65,8 @@ class Gicv3Distributor : public Serializable
         GICD_TYPER = 0x0004,
         // Implementer Identification Register
         GICD_IIDR = 0x0008,
+        // Interrupt Controller Type Register 2
+        GICD_TYPER2 = 0x000C,
         // Error Reporting Status Register
         GICD_STATUSR = 0x0010,
         // Set Non-secure SPI Pending Register