diff -r 2a084f8943da -r 076ae38747b7 src/dev/arm/gic_pl390.hh --- a/src/dev/arm/gic_pl390.hh Tue Mar 15 16:54:44 2016 +0000 +++ b/src/dev/arm/gic_pl390.hh Tue Mar 15 16:54:44 2016 +0000 @@ -68,6 +68,8 @@ static const int ICDDCR = 0x000; // control register static const int ICDICTR = 0x004; // controller type static const int ICDIIDR = 0x008; // implementer id + static const int ICDISR_ST = 0x080; // interrupt security registers + static const int ICDISR_ED = 0x0fc; static const int ICDISER_ST = 0x100; // interrupt set enable static const int ICDISER_ED = 0x17c; static const int ICDICER_ST = 0x180; // interrupt clear enable @@ -151,6 +153,9 @@ uint32_t itLinesLog2; + /** (dummy) Interrupt Security Registers. */ + uint32_t securityRegs[INT_BITS_MAX]; + /** interrupt enable bits for all possible 1020 interupts. * one bit per interrupt, 32 bit per word = 32 words */ uint32_t intEnabled[INT_BITS_MAX]; diff -r 2a084f8943da -r 076ae38747b7 src/dev/arm/gic_pl390.cc --- a/src/dev/arm/gic_pl390.cc Tue Mar 15 16:54:44 2016 +0000 +++ b/src/dev/arm/gic_pl390.cc Tue Mar 15 16:54:44 2016 +0000 @@ -72,6 +72,7 @@ cpuEnabled[1]); for (int x = 0; x < INT_BITS_MAX; x++) { + securityRegs[x] = 0; intEnabled[x] = 0; pendingInt[x] = 0; activeInt[x] = 0; @@ -144,6 +145,13 @@ DPRINTF(GIC, "gic distributor read register %#x\n", daddr); + // XXX for now uncondiotionally; should be if (haveSecurity). + if (daddr >= ICDISR_ST && daddr < ICDISR_ED + 4) { + assert((daddr-ICDISR_ST) >> 2 < 32); + pkt->set(securityRegs[(daddr-ICDISR_ST)>>2]); + goto done; + } + if (daddr >= ICDISER_ST && daddr < ICDISER_ED + 4) { assert((daddr-ICDISER_ST) >> 2 < 32); pkt->set(intEnabled[(daddr-ICDISER_ST)>>2]); @@ -399,6 +407,7 @@ DPRINTF(GIC, "gic distributor write register %#x size %#x value %#x \n", daddr, pkt->getSize(), pkt_data); + // XXX for now uncondiotionally; should be if (haveSecurity). if (daddr >= ICDISER_ST && daddr < ICDISER_ED + 4) { assert((daddr-ICDISER_ST) >> 2 < 32); intEnabled[(daddr-ICDISER_ST) >> 2] |= pkt->get(); @@ -826,6 +835,7 @@ SERIALIZE_SCALAR(enabled); SERIALIZE_SCALAR(itLines); SERIALIZE_SCALAR(itLinesLog2); + SERIALIZE_ARRAY(securityRegs, INT_BITS_MAX); SERIALIZE_ARRAY(intEnabled, INT_BITS_MAX); SERIALIZE_ARRAY(pendingInt, INT_BITS_MAX); SERIALIZE_ARRAY(activeInt, INT_BITS_MAX); @@ -868,6 +878,7 @@ UNSERIALIZE_SCALAR(enabled); UNSERIALIZE_SCALAR(itLines); UNSERIALIZE_SCALAR(itLinesLog2); + UNSERIALIZE_ARRAY(securityRegs, INT_BITS_MAX); UNSERIALIZE_ARRAY(intEnabled, INT_BITS_MAX); UNSERIALIZE_ARRAY(pendingInt, INT_BITS_MAX); UNSERIALIZE_ARRAY(activeInt, INT_BITS_MAX);