1 # Blackfin testcase for multiple pending IVGs vs masked state
3 # sim: --environment operating
6 .include "testutils.inc"
8 # This test keeps P5 as the base of the EVT table
10 .macro set_evt lvl:req, sym:req
12 [P5 + 4 * \lvl\()] = R1;
15 .macro check_cec mmr:req, valid:req
29 LSETUP (1f, 1f) LC1 = P2;
35 # First mark all EVTs as fails (they shouldn't be activated)
40 LSETUP (1f, 1f) LC0 = P2;
43 # Lower ourselves to EVT15
57 # We shouldn't come back here
60 # Activate interrupt nesting early
63 # Raise some higher levels, but they should be masked and so
64 # they should never be activated ...
70 # Only IVG15 should be pending
71 check_cec IPEND, (1<<15);
73 # But all should be latched
74 check_cec ILAT, (1<<5) | (1<<6) | (1<<9) | (1<<12);
76 # Delay a little in case a higher level wrongly activates
79 # If we're still here, things are still good. So let's
80 # transition up *slightly*, but not to the highest latched.
86 # Let CEC raise us to IVG12
88 # CEC should have been faster than this ...
92 # We shouldn't come back here
95 # Raise some higher levels, but they should be masked and so
96 # they should never be activated ...
99 # Both IVG15 and IVG12 should be pending
100 check_cec IPEND, (1<<15) | (1<<12);
102 # But all should be latched
103 check_cec ILAT, (1<<5) | (1<<6) | (1<<9) | (1<<11);
105 # Activate interrupt nesting a little later
108 # Still here, so unmask a higher IVG again to move up
115 # CEC should have been faster than this ...
119 # We shouldn't come back here
122 # IVG9 should also be pending now
123 check_cec IPEND, (1<<15) | (1<<12) | (1<<9);
125 # But all should be latched
126 check_cec ILAT, (1<<5) | (1<<6) | (1<<11);
128 # Unmask the next level, but IPEND[4] is set, so we should stay here
134 # Delay a little in case a higher level wrongly activates
137 # Good, now unmask things globally
141 # CEC should have been faster than this ...
145 # We shouldn't come back here
148 # IVG6 should also be pending now
149 check_cec IPEND, (1<<15) | (1<<12) | (1<<9) | (1<<6);
151 # But all should be latched
152 check_cec ILAT, (1<<5) | (1<<11);
154 # Activate interrupt nesting a little later
157 # Unmask the next level, but do it via IMASK
165 # CEC should have been faster than this ...
169 # We shouldn't come back here
172 # IVG5 should also be pending now
173 check_cec IPEND, (1<<15) | (1<<12) | (1<<9) | (1<<6) | (1<<5);
175 # But all should be latched
176 check_cec ILAT, (1<<11);