1/* 2 * Copyright (c) 2004-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 119 unchanged lines hidden (view full) --- 128 break; 129 case 0x1: 130 DPRINTF(I8259, "Received initialization command word 2.\n"); 131 DPRINTF(I8259, "Responsible for vectors %#x-%#x.\n", 132 val & ~mask(3), val | mask(3)); 133 if (cascadeMode) { 134 initControlWord++; 135 } else { |
136 cascadeBits = 0; |
137 initControlWord = 0; 138 } 139 break; 140 case 0x2: 141 DPRINTF(I8259, "Received initialization command word 3.\n"); |
142 if (master == NULL) { |
143 DPRINTF(I8259, "Slaves attached to IRQs:%s%s%s%s%s%s%s%s\n", 144 bits(val, 0) ? " 0" : "", 145 bits(val, 1) ? " 1" : "", 146 bits(val, 2) ? " 2" : "", 147 bits(val, 3) ? " 3" : "", 148 bits(val, 4) ? " 4" : "", 149 bits(val, 5) ? " 5" : "", 150 bits(val, 6) ? " 6" : "", 151 bits(val, 7) ? " 7" : ""); |
152 cascadeBits = val; |
153 } else { 154 DPRINTF(I8259, "Slave ID is %d.\n", val & mask(3)); |
155 cascadeBits = val & mask(3); |
156 } 157 if (expectICW4) 158 initControlWord++; 159 else 160 initControlWord = 0; 161 break; 162 case 0x3: 163 DPRINTF(I8259, "Received initialization command word 4.\n"); --- 15 unchanged lines hidden (view full) --- 179 initControlWord = 0; 180 break; 181 } 182 break; 183 } 184 return latency; 185} 186 |
187void 188X86ISA::I8259::signalInterrupt(int line) 189{ 190 DPRINTF(I8259, "Interrupt raised on line %d.\n", line); 191 if (line > 7) 192 fatal("Line number %d doesn't exist. The max is 7.\n"); 193 if (bits(IMR, line)) { 194 DPRINTF(I8259, "Interrupt %d was masked.\n", line); 195 } else if (master != NULL) { 196 DPRINTF(I8259, "Propogating interrupt to master.\n"); 197 master->signalInterrupt(cascadeBits); 198 } 199} 200 |
201X86ISA::I8259 * 202I8259Params::create() 203{ 204 return new X86ISA::I8259(this); 205} |