1/* 2 * Copyright (c) 2006 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; --- 76 unchanged lines hidden (view full) --- 85 pkt->makeAtomicResponse(); 86 return pioDelay; 87} 88 89void 90Iob::readIob(PacketPtr pkt) 91{ 92 Addr accessAddr = pkt->getAddr() - iobManAddr; |
93 94 if (accessAddr >= IntManAddr && accessAddr < IntManAddr + IntManSize) { |
95 int index = (accessAddr - IntManAddr) >> 3; 96 uint64_t data = intMan[index].cpu << 8 | intMan[index].vector << 0; |
97 pkt->set(data); 98 return; 99 } 100 101 if (accessAddr >= IntCtlAddr && accessAddr < IntCtlAddr + IntCtlSize) { |
102 int index = (accessAddr - IntCtlAddr) >> 3; 103 uint64_t data = intCtl[index].mask ? 1 << 2 : 0 | 104 intCtl[index].pend ? 1 << 0 : 0; |
105 pkt->set(data); 106 return; 107 } 108 109 if (accessAddr == JIntVecAddr) { 110 pkt->set(jIntVec); 111 return; 112 } --- 79 unchanged lines hidden (view full) --- 192 intMan[index].cpu = bits(data,12,8); 193 intMan[index].vector = bits(data,5,0); 194 DPRINTF(Iob, "Wrote IntMan %d cpu %d, vec %d\n", index, 195 intMan[index].cpu, intMan[index].vector); 196 return; 197 } 198 199 if (accessAddr >= IntCtlAddr && accessAddr < IntCtlAddr + IntCtlSize) { |
200 index = (accessAddr - IntCtlAddr) >> 3; |
201 data = pkt->get<uint64_t>(); 202 intCtl[index].mask = bits(data,2,2); 203 if (bits(data,1,1)) 204 intCtl[index].pend = false; 205 DPRINTF(Iob, "Wrote IntCtl %d pend %d cleared %d\n", index, 206 intCtl[index].pend, bits(data,2,2)); 207 return; 208 } --- 170 unchanged lines hidden --- |