isa_fake.cc (4918:3214e3694fb2) isa_fake.cc (4986:b7c82ad6b3ef)
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;

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

51 retData32 = p->ret_data32;
52 retData64 = p->ret_data64;
53}
54
55Tick
56IsaFake::read(PacketPtr pkt)
57{
58
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;

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

51 retData32 = p->ret_data32;
52 retData64 = p->ret_data64;
53}
54
55Tick
56IsaFake::read(PacketPtr pkt)
57{
58
59 pkt->makeAtomicResponse();
59 if (params()->warn_access != "")
60 warn("Device %s accessed by read to address %#x size=%d\n",
61 name(), pkt->getAddr(), pkt->getSize());
62 if (params()->ret_bad_addr) {
63 DPRINTF(Tsunami, "read to bad address va=%#x size=%d\n",
64 pkt->getAddr(), pkt->getSize());
65 pkt->setBadAddress();
66 } else {

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

78 pkt->set(retData16);
79 break;
80 case sizeof(uint8_t):
81 pkt->set(retData8);
82 break;
83 default:
84 panic("invalid access size!\n");
85 }
60 if (params()->warn_access != "")
61 warn("Device %s accessed by read to address %#x size=%d\n",
62 name(), pkt->getAddr(), pkt->getSize());
63 if (params()->ret_bad_addr) {
64 DPRINTF(Tsunami, "read to bad address va=%#x size=%d\n",
65 pkt->getAddr(), pkt->getSize());
66 pkt->setBadAddress();
67 } else {

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

79 pkt->set(retData16);
80 break;
81 case sizeof(uint8_t):
82 pkt->set(retData8);
83 break;
84 default:
85 panic("invalid access size!\n");
86 }
86 pkt->makeAtomicResponse();
87 }
88 return pioDelay;
89}
90
91Tick
92IsaFake::write(PacketPtr pkt)
93{
87 }
88 return pioDelay;
89}
90
91Tick
92IsaFake::write(PacketPtr pkt)
93{
94 pkt->makeAtomicResponse();
94 if (params()->warn_access != "") {
95 uint64_t data;
96 switch (pkt->getSize()) {
97 case sizeof(uint64_t):
98 data = pkt->get<uint64_t>();
99 break;
100 case sizeof(uint32_t):
101 data = pkt->get<uint32_t>();

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

133 break;
134 case sizeof(uint8_t):
135 retData8 = pkt->get<uint8_t>();
136 break;
137 default:
138 panic("invalid access size!\n");
139 }
140 }
95 if (params()->warn_access != "") {
96 uint64_t data;
97 switch (pkt->getSize()) {
98 case sizeof(uint64_t):
99 data = pkt->get<uint64_t>();
100 break;
101 case sizeof(uint32_t):
102 data = pkt->get<uint32_t>();

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

134 break;
135 case sizeof(uint8_t):
136 retData8 = pkt->get<uint8_t>();
137 break;
138 default:
139 panic("invalid access size!\n");
140 }
141 }
141 pkt->makeAtomicResponse();
142 }
143 return pioDelay;
144}
145
146IsaFake *
147IsaFakeParams::create()
148{
149 return new IsaFake(this);
150}
142 }
143 return pioDelay;
144}
145
146IsaFake *
147IsaFakeParams::create()
148{
149 return new IsaFake(this);
150}