backdoor.cc (8741:491297d019f3) backdoor.cc (8789:a8b63a0ee14c)
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.
44#include "arch/alpha/system.hh"
41#include "arch/alpha/system.hh"
45#endif
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/alpha/tsunami.hh"

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

62#include "params/AlphaBackdoor.hh"
63#include "sim/sim_object.hh"
64
65using namespace std;
66using namespace AlphaISA;
67
68AlphaBackdoor::AlphaBackdoor(const Params *p)
69 : BasicPioDevice(p), disk(p->disk), terminal(p->terminal),
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),
70#if FULL_SYSTEM //XXX No system pointer in SE mode.
71 system(p->system),
66 system(p->system),
72#endif
73 cpu(p->cpu)
74{
75
76 pioSize = sizeof(struct AlphaAccess);
77
78 alphaAccess = new Access();
79 alphaAccess->last_offset = pioSize - 1;
80

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

89 alphaAccess->inputChar = 0;
90 std::memset(alphaAccess->cpuStack, 0, sizeof(alphaAccess->cpuStack));
91
92}
93
94void
95AlphaBackdoor::startup()
96{
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{
97#if FULL_SYSTEM //XXX No system pointer in SE mode.
98 system->setAlphaAccess(pioAddr);
99 alphaAccess->numCPUs = system->numContexts();
100 alphaAccess->kernStart = system->getKernelStart();
101 alphaAccess->kernEnd = system->getKernelEnd();
102 alphaAccess->entryPoint = system->getKernelEntry();
103 alphaAccess->mem_size = system->physmem->size();
104 alphaAccess->cpuClock = cpu->frequency() / 1000000; // In MHz
105 Tsunami *tsunami = dynamic_cast<Tsunami *>(params()->platform);
106 assert(tsunami);
107 alphaAccess->intrClockFrequency = tsunami->io->frequency();
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();
108#endif
109}
110
111Tick
112AlphaBackdoor::read(PacketPtr pkt)
113{
114
115 /** XXX Do we want to push the addr munging to a bus brige or something? So
116 * the device has it's physical address and then the bridge adds on whatever

--- 209 unchanged lines hidden ---
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 ---