dev-arm: GICD_PIDR2.ArchRev value depends on GIC version
The GIC architecture specification states the GICD_PIDR2.ArchRev field is set to 3 for GICv3 and to 4 for GICv4. We bind this value to the gicv4 parameter Change-Id: I3ba34bc0b4538b4d5170915a4ee042e534f2590f Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59391 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
@@ -88,7 +88,7 @@ Gicv3Distributor::Gicv3Distributor(Gicv3 * gic, uint32_t it_lines)
|
||||
gicdTyper(0),
|
||||
gicdPidr0(0x92),
|
||||
gicdPidr1(0xb4),
|
||||
gicdPidr2(0x3b),
|
||||
gicdPidr2(gic->params().gicv4 ? 0x4b : 0x3b),
|
||||
gicdPidr3(0),
|
||||
gicdPidr4(0x44)
|
||||
{
|
||||
|
||||
@@ -193,10 +193,7 @@ Gicv3Redistributor::read(Addr addr, size_t size, bool is_secure_access)
|
||||
}
|
||||
|
||||
case GICR_PIDR2: { // Peripheral ID2 Register
|
||||
uint8_t arch_rev = 0x3; // 0x3 GICv3
|
||||
uint8_t jedec = 0x1; // JEP code
|
||||
uint8_t des_1 = 0x3; // JEP106 identification code, bits[6:4]
|
||||
return (arch_rev << 4) | (jedec << 3) | (des_1 << 0);
|
||||
return gic->getDistributor()->gicdPidr2;
|
||||
}
|
||||
|
||||
case GICR_PIDR3: // Peripheral ID3 Register
|
||||
|
||||
Reference in New Issue
Block a user