backdoor.cc (8232:b28d06a175be) | backdoor.cc (8739:925f15f96322) |
---|---|
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 | 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 "config/full_system.hh" 42 43#if FULL_SYSTEM //XXX No AlphaSystem in SE mode. |
|
41#include "arch/alpha/system.hh" | 44#include "arch/alpha/system.hh" |
45#endif |
|
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/platform.hh" --- 5 unchanged lines hidden (view full) --- 55#include "params/AlphaBackdoor.hh" 56#include "sim/sim_object.hh" 57 58using namespace std; 59using namespace AlphaISA; 60 61AlphaBackdoor::AlphaBackdoor(const Params *p) 62 : BasicPioDevice(p), disk(p->disk), terminal(p->terminal), | 46#include "base/inifile.hh" 47#include "base/str.hh" 48#include "base/trace.hh" 49#include "cpu/base.hh" 50#include "cpu/thread_context.hh" 51#include "debug/AlphaBackdoor.hh" 52#include "dev/alpha/backdoor.hh" 53#include "dev/platform.hh" --- 5 unchanged lines hidden (view full) --- 59#include "params/AlphaBackdoor.hh" 60#include "sim/sim_object.hh" 61 62using namespace std; 63using namespace AlphaISA; 64 65AlphaBackdoor::AlphaBackdoor(const Params *p) 66 : BasicPioDevice(p), disk(p->disk), terminal(p->terminal), |
63 system(p->system), cpu(p->cpu) | 67#if FULL_SYSTEM //XXX No system pointer in SE mode. 68 system(p->system), 69#endif 70 cpu(p->cpu) |
64{ 65 66 pioSize = sizeof(struct AlphaAccess); 67 68 alphaAccess = new Access(); 69 alphaAccess->last_offset = pioSize - 1; 70 71 alphaAccess->version = ALPHA_ACCESS_VERSION; --- 7 unchanged lines hidden (view full) --- 79 alphaAccess->inputChar = 0; 80 std::memset(alphaAccess->cpuStack, 0, sizeof(alphaAccess->cpuStack)); 81 82} 83 84void 85AlphaBackdoor::startup() 86{ | 71{ 72 73 pioSize = sizeof(struct AlphaAccess); 74 75 alphaAccess = new Access(); 76 alphaAccess->last_offset = pioSize - 1; 77 78 alphaAccess->version = ALPHA_ACCESS_VERSION; --- 7 unchanged lines hidden (view full) --- 86 alphaAccess->inputChar = 0; 87 std::memset(alphaAccess->cpuStack, 0, sizeof(alphaAccess->cpuStack)); 88 89} 90 91void 92AlphaBackdoor::startup() 93{ |
94#if FULL_SYSTEM //XXX No system pointer in SE mode. |
|
87 system->setAlphaAccess(pioAddr); 88 alphaAccess->numCPUs = system->numContexts(); 89 alphaAccess->kernStart = system->getKernelStart(); 90 alphaAccess->kernEnd = system->getKernelEnd(); 91 alphaAccess->entryPoint = system->getKernelEntry(); 92 alphaAccess->mem_size = system->physmem->size(); 93 alphaAccess->cpuClock = cpu->frequency() / 1000000; // In MHz 94 alphaAccess->intrClockFrequency = params()->platform->intrFrequency(); | 95 system->setAlphaAccess(pioAddr); 96 alphaAccess->numCPUs = system->numContexts(); 97 alphaAccess->kernStart = system->getKernelStart(); 98 alphaAccess->kernEnd = system->getKernelEnd(); 99 alphaAccess->entryPoint = system->getKernelEntry(); 100 alphaAccess->mem_size = system->physmem->size(); 101 alphaAccess->cpuClock = cpu->frequency() / 1000000; // In MHz 102 alphaAccess->intrClockFrequency = params()->platform->intrFrequency(); |
103#endif |
|
95} 96 97Tick 98AlphaBackdoor::read(PacketPtr pkt) 99{ 100 101 /** XXX Do we want to push the addr munging to a bus brige or something? So 102 * the device has it's physical address and then the bridge adds on whatever --- 209 unchanged lines hidden --- | 104} 105 106Tick 107AlphaBackdoor::read(PacketPtr pkt) 108{ 109 110 /** XXX Do we want to push the addr munging to a bus brige or something? So 111 * the device has it's physical address and then the bridge adds on whatever --- 209 unchanged lines hidden --- |