iob.cc (5719:c9056088f151) iob.cc (6712:b95abe00dd9d)
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;
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 int index;
94 uint64_t data;
95
96 if (accessAddr >= IntManAddr && accessAddr < IntManAddr + IntManSize) {
93
94 if (accessAddr >= IntManAddr && accessAddr < IntManAddr + IntManSize) {
97 index = (accessAddr - IntManAddr) >> 3;
98 data = intMan[index].cpu << 8 | intMan[index].vector << 0;
95 int index = (accessAddr - IntManAddr) >> 3;
96 uint64_t data = intMan[index].cpu << 8 | intMan[index].vector << 0;
99 pkt->set(data);
100 return;
101 }
102
103 if (accessAddr >= IntCtlAddr && accessAddr < IntCtlAddr + IntCtlSize) {
97 pkt->set(data);
98 return;
99 }
100
101 if (accessAddr >= IntCtlAddr && accessAddr < IntCtlAddr + IntCtlSize) {
104 index = (accessAddr - IntManAddr) >> 3;
105 data = intCtl[index].mask ? 1 << 2 : 0 |
106 intCtl[index].pend ? 1 << 0 : 0;
102 int index = (accessAddr - IntCtlAddr) >> 3;
103 uint64_t data = intCtl[index].mask ? 1 << 2 : 0 |
104 intCtl[index].pend ? 1 << 0 : 0;
107 pkt->set(data);
108 return;
109 }
110
111 if (accessAddr == JIntVecAddr) {
112 pkt->set(jIntVec);
113 return;
114 }

--- 79 unchanged lines hidden (view full) ---

194 intMan[index].cpu = bits(data,12,8);
195 intMan[index].vector = bits(data,5,0);
196 DPRINTF(Iob, "Wrote IntMan %d cpu %d, vec %d\n", index,
197 intMan[index].cpu, intMan[index].vector);
198 return;
199 }
200
201 if (accessAddr >= IntCtlAddr && accessAddr < IntCtlAddr + IntCtlSize) {
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) {
202 index = (accessAddr - IntManAddr) >> 3;
200 index = (accessAddr - IntCtlAddr) >> 3;
203 data = pkt->get<uint64_t>();
204 intCtl[index].mask = bits(data,2,2);
205 if (bits(data,1,1))
206 intCtl[index].pend = false;
207 DPRINTF(Iob, "Wrote IntCtl %d pend %d cleared %d\n", index,
208 intCtl[index].pend, bits(data,2,2));
209 return;
210 }

--- 170 unchanged lines hidden ---
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 ---