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; --- 24 unchanged lines hidden (view full) --- 33 34/** @file 35 * Alpha Console Backdoor Definition 36 */ 37 38#include <cstddef> 39#include <string> 40 |
41#include "arch/alpha/system.hh" |
42#include "base/inifile.hh" 43#include "base/str.hh" 44#include "base/trace.hh" 45#include "cpu/base.hh" 46#include "cpu/thread_context.hh" 47#include "debug/AlphaBackdoor.hh" 48#include "dev/alpha/backdoor.hh" 49#include "dev/alpha/tsunami.hh" --- 8 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) 68{ 69 70 pioSize = sizeof(struct AlphaAccess); 71 72 alphaAccess = new Access(); 73 alphaAccess->last_offset = pioSize - 1; 74 --- 8 unchanged lines hidden (view full) --- 83 alphaAccess->inputChar = 0; 84 std::memset(alphaAccess->cpuStack, 0, sizeof(alphaAccess->cpuStack)); 85 86} 87 88void 89AlphaBackdoor::startup() 90{ |
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); 99 assert(tsunami); 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 108 * the device has it's physical address and then the bridge adds on whatever --- 209 unchanged lines hidden --- |