isa_fake.cc (5012:c0a28154d002) | isa_fake.cc (5192:582e583f8e7e) |
---|---|
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; --- 47 unchanged lines hidden (view full) --- 56IsaFake::read(PacketPtr pkt) 57{ 58 59 pkt->makeAtomicResponse(); 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) { | 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; --- 47 unchanged lines hidden (view full) --- 56IsaFake::read(PacketPtr pkt) 57{ 58 59 pkt->makeAtomicResponse(); 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", | 64 DPRINTF(IsaFake, "read to bad address va=%#x size=%d\n", |
65 pkt->getAddr(), pkt->getSize()); 66 pkt->setBadAddress(); 67 } else { 68 assert(pkt->getAddr() >= pioAddr && pkt->getAddr() < pioAddr + pioSize); | 65 pkt->getAddr(), pkt->getSize()); 66 pkt->setBadAddress(); 67 } else { 68 assert(pkt->getAddr() >= pioAddr && pkt->getAddr() < pioAddr + pioSize); |
69 DPRINTF(Tsunami, "read va=%#x size=%d\n", | 69 DPRINTF(IsaFake, "read va=%#x size=%d\n", |
70 pkt->getAddr(), pkt->getSize()); 71 switch (pkt->getSize()) { 72 case sizeof(uint64_t): 73 pkt->set(retData64); 74 break; 75 case sizeof(uint32_t): 76 pkt->set(retData32); 77 break; --- 31 unchanged lines hidden (view full) --- 109 break; 110 default: 111 panic("invalid access size!\n"); 112 } 113 warn("Device %s accessed by write to address %#x size=%d data=%#x\n", 114 name(), pkt->getAddr(), pkt->getSize(), data); 115 } 116 if (params()->ret_bad_addr) { | 70 pkt->getAddr(), pkt->getSize()); 71 switch (pkt->getSize()) { 72 case sizeof(uint64_t): 73 pkt->set(retData64); 74 break; 75 case sizeof(uint32_t): 76 pkt->set(retData32); 77 break; --- 31 unchanged lines hidden (view full) --- 109 break; 110 default: 111 panic("invalid access size!\n"); 112 } 113 warn("Device %s accessed by write to address %#x size=%d data=%#x\n", 114 name(), pkt->getAddr(), pkt->getSize(), data); 115 } 116 if (params()->ret_bad_addr) { |
117 DPRINTF(Tsunami, "write to bad address va=%#x size=%d \n", | 117 DPRINTF(IsaFake, "write to bad address va=%#x size=%d \n", |
118 pkt->getAddr(), pkt->getSize()); 119 pkt->setBadAddress(); 120 } else { | 118 pkt->getAddr(), pkt->getSize()); 119 pkt->setBadAddress(); 120 } else { |
121 DPRINTF(Tsunami, "write - va=%#x size=%d \n", | 121 DPRINTF(IsaFake, "write - va=%#x size=%d \n", |
122 pkt->getAddr(), pkt->getSize()); 123 124 if (params()->update_data) { 125 switch (pkt->getSize()) { 126 case sizeof(uint64_t): 127 retData64 = pkt->get<uint64_t>(); 128 break; 129 case sizeof(uint32_t): --- 21 unchanged lines hidden --- | 122 pkt->getAddr(), pkt->getSize()); 123 124 if (params()->update_data) { 125 switch (pkt->getSize()) { 126 case sizeof(uint64_t): 127 retData64 = pkt->get<uint64_t>(); 128 break; 129 case sizeof(uint32_t): --- 21 unchanged lines hidden --- |