backdoor.cc (8789:a8b63a0ee14c) | backdoor.cc (8806:669e93d79ed9) |
---|---|
1/* 2 * Copyright (c) 2001-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; --- 49 unchanged lines hidden (view full) --- 58#include "params/AlphaBackdoor.hh" 59#include "sim/sim_object.hh" 60 61using namespace std; 62using namespace AlphaISA; 63 64AlphaBackdoor::AlphaBackdoor(const Params *p) 65 : BasicPioDevice(p), disk(p->disk), terminal(p->terminal), | 1/* 2 * Copyright (c) 2001-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; --- 49 unchanged lines hidden (view full) --- 58#include "params/AlphaBackdoor.hh" 59#include "sim/sim_object.hh" 60 61using namespace std; 62using namespace AlphaISA; 63 64AlphaBackdoor::AlphaBackdoor(const Params *p) 65 : BasicPioDevice(p), disk(p->disk), terminal(p->terminal), |
66 system(p->system), 67 cpu(p->cpu) | 66 system(p->system), cpu(p->cpu) |
68{ 69 70 pioSize = sizeof(struct AlphaAccess); 71 72 alphaAccess = new Access(); 73 alphaAccess->last_offset = pioSize - 1; 74 75 alphaAccess->version = ALPHA_ACCESS_VERSION; --- 15 unchanged lines hidden (view full) --- 91 system->setAlphaAccess(pioAddr); 92 alphaAccess->numCPUs = system->numContexts(); 93 alphaAccess->kernStart = system->getKernelStart(); 94 alphaAccess->kernEnd = system->getKernelEnd(); 95 alphaAccess->entryPoint = system->getKernelEntry(); 96 alphaAccess->mem_size = system->physmem->size(); 97 alphaAccess->cpuClock = cpu->frequency() / 1000000; // In MHz 98 Tsunami *tsunami = dynamic_cast<Tsunami *>(params()->platform); | 67{ 68 69 pioSize = sizeof(struct AlphaAccess); 70 71 alphaAccess = new Access(); 72 alphaAccess->last_offset = pioSize - 1; 73 74 alphaAccess->version = ALPHA_ACCESS_VERSION; --- 15 unchanged lines hidden (view full) --- 90 system->setAlphaAccess(pioAddr); 91 alphaAccess->numCPUs = system->numContexts(); 92 alphaAccess->kernStart = system->getKernelStart(); 93 alphaAccess->kernEnd = system->getKernelEnd(); 94 alphaAccess->entryPoint = system->getKernelEntry(); 95 alphaAccess->mem_size = system->physmem->size(); 96 alphaAccess->cpuClock = cpu->frequency() / 1000000; // In MHz 97 Tsunami *tsunami = dynamic_cast<Tsunami *>(params()->platform); |
99 assert(tsunami); | 98 if (!tsunami) 99 fatal("Platform is not Tsunami.\n"); |
100 alphaAccess->intrClockFrequency = tsunami->io->frequency(); 101} 102 103Tick 104AlphaBackdoor::read(PacketPtr pkt) 105{ 106 107 /** XXX Do we want to push the addr munging to a bus brige or something? So --- 210 unchanged lines hidden --- | 100 alphaAccess->intrClockFrequency = tsunami->io->frequency(); 101} 102 103Tick 104AlphaBackdoor::read(PacketPtr pkt) 105{ 106 107 /** XXX Do we want to push the addr munging to a bus brige or something? So --- 210 unchanged lines hidden --- |