summaryrefslogtreecommitdiff
path: root/src/dev/arm
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/arm')
-rw-r--r--src/dev/arm/gic.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dev/arm/gic.cc b/src/dev/arm/gic.cc
index f686c2a13..94719f86f 100644
--- a/src/dev/arm/gic.cc
+++ b/src/dev/arm/gic.cc
@@ -193,10 +193,12 @@ Gic::readDistributor(PacketPtr pkt)
pkt->set<uint8_t>(int_p[int_num]);
break;
case 2:
+ assert((int_num + 1) < (SGI_MAX + PPI_MAX));
pkt->set<uint16_t>(int_p[int_num] |
int_p[int_num+1] << 8);
break;
case 4:
+ assert((int_num + 3) < (SGI_MAX + PPI_MAX));
pkt->set<uint32_t>(int_p[int_num] |
int_p[int_num+1] << 8 |
int_p[int_num+2] << 16 |