system.cc (2684:71f3cabf891f) system.cc (2716:b9114064d77a)
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;

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

132 idleStartEvent = addKernelFuncEvent<IdleStartEvent>("cpu_idle");
133
134 if (kernelSymtab->findAddress("alpha_switch_to", addr) && DTRACE(Thread)) {
135 printThreadEvent = new PrintThreadInfo(&pcEventQueue, "threadinfo",
136 addr + sizeof(MachInst) * 6);
137 } else {
138 printThreadEvent = NULL;
139 }
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;

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

132 idleStartEvent = addKernelFuncEvent<IdleStartEvent>("cpu_idle");
133
134 if (kernelSymtab->findAddress("alpha_switch_to", addr) && DTRACE(Thread)) {
135 printThreadEvent = new PrintThreadInfo(&pcEventQueue, "threadinfo",
136 addr + sizeof(MachInst) * 6);
137 } else {
138 printThreadEvent = NULL;
139 }
140
141 if (params()->bin_int) {
142 intStartEvent = addPalFuncEvent<InterruptStartEvent>("sys_int_21");
143 if (!intStartEvent)
144 panic("could not find symbol: sys_int_21\n");
145
146 intEndEvent = addPalFuncEvent<InterruptEndEvent>("rti_to_kern");
147 if (!intEndEvent)
148 panic("could not find symbol: rti_to_kern\n");
149
150 intEndEvent2 = addPalFuncEvent<InterruptEndEvent>("rti_to_user");
151 if (!intEndEvent2)
152 panic("could not find symbol: rti_to_user\n");
153
154 intEndEvent3 = addKernelFuncEvent<InterruptEndEvent>("do_softirq");
155 if (!intEndEvent3)
156 panic("could not find symbol: do_softirq\n");
157 }
158}
159
160LinuxAlphaSystem::~LinuxAlphaSystem()
161{
162#ifndef NDEBUG
163 delete kernelPanicEvent;
164#endif
165 delete skipIdeDelay50msEvent;

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

219
220 Param<string> boot_osflags;
221 Param<string> readfile;
222 Param<unsigned int> init_param;
223
224 Param<uint64_t> system_type;
225 Param<uint64_t> system_rev;
226
140}
141
142LinuxAlphaSystem::~LinuxAlphaSystem()
143{
144#ifndef NDEBUG
145 delete kernelPanicEvent;
146#endif
147 delete skipIdeDelay50msEvent;

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

201
202 Param<string> boot_osflags;
203 Param<string> readfile;
204 Param<unsigned int> init_param;
205
206 Param<uint64_t> system_type;
207 Param<uint64_t> system_rev;
208
227 Param<bool> bin;
228 VectorParam<string> binned_fns;
229 Param<bool> bin_int;
230
231END_DECLARE_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
232
233BEGIN_INIT_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
234
235 INIT_PARAM(boot_cpu_frequency, "Frequency of the boot CPU"),
236 INIT_PARAM(physmem, "phsyical memory"),
237 INIT_PARAM(kernel, "file that contains the kernel code"),
238 INIT_PARAM(console, "file that contains the console code"),
239 INIT_PARAM(pal, "file that contains palcode"),
240 INIT_PARAM_DFLT(boot_osflags, "flags to pass to the kernel during boot",
241 "a"),
242 INIT_PARAM_DFLT(readfile, "file to read startup script from", ""),
243 INIT_PARAM_DFLT(init_param, "numerical value to pass into simulator", 0),
244 INIT_PARAM_DFLT(system_type, "Type of system we are emulating", 34),
209END_DECLARE_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
210
211BEGIN_INIT_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
212
213 INIT_PARAM(boot_cpu_frequency, "Frequency of the boot CPU"),
214 INIT_PARAM(physmem, "phsyical memory"),
215 INIT_PARAM(kernel, "file that contains the kernel code"),
216 INIT_PARAM(console, "file that contains the console code"),
217 INIT_PARAM(pal, "file that contains palcode"),
218 INIT_PARAM_DFLT(boot_osflags, "flags to pass to the kernel during boot",
219 "a"),
220 INIT_PARAM_DFLT(readfile, "file to read startup script from", ""),
221 INIT_PARAM_DFLT(init_param, "numerical value to pass into simulator", 0),
222 INIT_PARAM_DFLT(system_type, "Type of system we are emulating", 34),
245 INIT_PARAM_DFLT(system_rev, "Revision of system we are emulating", 1<<10),
246 INIT_PARAM_DFLT(bin, "is this system to be binned", false),
247 INIT_PARAM(binned_fns, "functions to be broken down and binned"),
248 INIT_PARAM_DFLT(bin_int, "is interrupt code binned seperately?", true)
223 INIT_PARAM_DFLT(system_rev, "Revision of system we are emulating", 1<<10)
249
250END_INIT_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
251
252CREATE_SIM_OBJECT(LinuxAlphaSystem)
253{
254 AlphaSystem::Params *p = new AlphaSystem::Params;
255 p->name = getInstanceName();
256 p->boot_cpu_frequency = boot_cpu_frequency;
257 p->physmem = physmem;
258 p->kernel_path = kernel;
259 p->console_path = console;
260 p->palcode = pal;
261 p->boot_osflags = boot_osflags;
262 p->init_param = init_param;
263 p->readfile = readfile;
264 p->system_type = system_type;
265 p->system_rev = system_rev;
224
225END_INIT_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
226
227CREATE_SIM_OBJECT(LinuxAlphaSystem)
228{
229 AlphaSystem::Params *p = new AlphaSystem::Params;
230 p->name = getInstanceName();
231 p->boot_cpu_frequency = boot_cpu_frequency;
232 p->physmem = physmem;
233 p->kernel_path = kernel;
234 p->console_path = console;
235 p->palcode = pal;
236 p->boot_osflags = boot_osflags;
237 p->init_param = init_param;
238 p->readfile = readfile;
239 p->system_type = system_type;
240 p->system_rev = system_rev;
266 p->bin = bin;
267 p->binned_fns = binned_fns;
268 p->bin_int = bin_int;
269 return new LinuxAlphaSystem(p);
270}
271
272REGISTER_SIM_OBJECT("LinuxAlphaSystem", LinuxAlphaSystem)
273
241 return new LinuxAlphaSystem(p);
242}
243
244REGISTER_SIM_OBJECT("LinuxAlphaSystem", LinuxAlphaSystem)
245