summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2016-07-26 17:46:56 +0100
committerSoby Mathew <soby.mathew@arm.com>2016-07-27 10:46:09 +0100
commit61e30277199e5457483bef791cb5bc026c402a1f (patch)
tree0ac84a44f665d3ededfaeb5a6785315f29869809 /drivers
parent3dd9835f8ab3c2e7f57ddc92505d6c800bbacd47 (diff)
GICv3: Fix the GICD_IROUTER offset
This patch fixes the offset of GICD_IROUTER register defined in gicv3.h. Although the GICv3 documention mentions that the offset for this register is 0x6100-0x7FD8, the offset calculation for an interrupt id `n` is : 0x6000 + 8n, where n >= 32 This requires the offset for GICD_IROUTER to be defined as 0x6000. Fixes ARM-software/tf-issues#410 Change-Id: If9e91e30d946afe7f1f60fea4f065c7567093fa8
Diffstat (limited to 'drivers')
-rw-r--r--drivers/arm/gic/v3/gicv3_private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/arm/gic/v3/gicv3_private.h b/drivers/arm/gic/v3/gicv3_private.h
index 5e2409fc..9aa83382 100644
--- a/drivers/arm/gic/v3/gicv3_private.h
+++ b/drivers/arm/gic/v3/gicv3_private.h
@@ -141,6 +141,7 @@ static inline unsigned int gicd_read_pidr2(uintptr_t base)
static inline unsigned long long gicd_read_irouter(uintptr_t base, unsigned int id)
{
+ assert(id >= MIN_SPI_ID);
return mmio_read_64(base + GICD_IROUTER + (id << 3));
}
@@ -148,6 +149,7 @@ static inline void gicd_write_irouter(uintptr_t base,
unsigned int id,
unsigned long long affinity)
{
+ assert(id >= MIN_SPI_ID);
mmio_write_64(base + GICD_IROUTER + (id << 3), affinity);
}