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;
--- 93 unchanged lines hidden (view full) ---
102 break;
103 case 0x1:
104 DPRINTF(I8259, "Subcommand: Nonspecific EOI.\n");
105 break;
106 case 0x2:
107 DPRINTF(I8259, "Subcommand: No operation.\n");
108 break;
109 case 0x3:
110 DPRINTF(I8259, "Subcommand: Specific EIO.");
111 DPRINTF(I8259, "Reset In-Service bit %d.\n", bits(val, 2, 0));
112 break;
113 case 0x4:
114 DPRINTF(I8259, "Subcommand: Rotate in auto-EOI mode (set).\n");
115 break;
116 case 0x5:
117 DPRINTF(I8259, "Subcommand: Rotate on nonspecific EOI.\n");
118 break;
119 case 0x6:
--- 81 unchanged lines hidden (view full) ---
201 break;
202 }
203 break;
204 }
205 return latency;
206}
207
208void
209X86ISA::I8259::signalInterrupt(int line)
210{
211 DPRINTF(I8259, "Interrupt raised on line %d.\n", line);
212 if (line >= NumLines)
213 fatal("Line number %d doesn't exist. The max is %d.\n",
214 line, NumLines - 1);
215 if (bits(IMR, line)) {
216 DPRINTF(I8259, "Interrupt %d was masked.\n", line);
217 } else {
218 IRR |= 1 << line;
219 if (bits(ISR, 7, line) == 0) {
220 if (output) {
221 DPRINTF(I8259, "Propogating interrupt.\n");
222 output->signalInterrupt();
223 } else {
224 warn("Received interrupt but didn't have "
225 "anyone to tell about it.\n");
226 }
227 }
228 }
229}
230
231int
232X86ISA::I8259::getVector()
233{
234 /*
235 * This code only handles one slave. Since that's how the PC platform
--- 21 unchanged lines hidden ---
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;
--- 93 unchanged lines hidden (view full) ---
102 break;
103 case 0x1:
104 DPRINTF(I8259, "Subcommand: Nonspecific EOI.\n");
105 break;
106 case 0x2:
107 DPRINTF(I8259, "Subcommand: No operation.\n");
108 break;
109 case 0x3:
110 DPRINTF(I8259, "Subcommand: Specific EIO.");
111 DPRINTF(I8259, "Reset In-Service bit %d.\n", bits(val, 2, 0));
112 break;
113 case 0x4:
114 DPRINTF(I8259, "Subcommand: Rotate in auto-EOI mode (set).\n");
115 break;
116 case 0x5:
117 DPRINTF(I8259, "Subcommand: Rotate on nonspecific EOI.\n");
118 break;
119 case 0x6:
--- 81 unchanged lines hidden (view full) ---
201 break;
202 }
203 break;
204 }
205 return latency;
206}
207
208void
209X86ISA::I8259::signalInterrupt(int line)
210{
211 DPRINTF(I8259, "Interrupt raised on line %d.\n", line);
212 if (line >= NumLines)
213 fatal("Line number %d doesn't exist. The max is %d.\n",
214 line, NumLines - 1);
215 if (bits(IMR, line)) {
216 DPRINTF(I8259, "Interrupt %d was masked.\n", line);
217 } else {
218 IRR |= 1 << line;
219 if (bits(ISR, 7, line) == 0) {
220 if (output) {
221 DPRINTF(I8259, "Propogating interrupt.\n");
222 output->signalInterrupt();
223 } else {
224 warn("Received interrupt but didn't have "
225 "anyone to tell about it.\n");
226 }
227 }
228 }
229}
230
231int
232X86ISA::I8259::getVector()
233{
234 /*
235 * This code only handles one slave. Since that's how the PC platform
--- 21 unchanged lines hidden ---