system.cc (4741:bf24c2d97ae1) | system.cc (4762:c94e103c83ad) |
---|---|
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; --- 40 unchanged lines hidden (view full) --- 49#include "base/loader/symtab.hh" 50#include "cpu/thread_context.hh" 51#include "cpu/base.hh" 52#include "dev/platform.hh" 53#include "kern/linux/printk.hh" 54#include "kern/linux/events.hh" 55#include "mem/physical.hh" 56#include "mem/port.hh" | 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; --- 40 unchanged lines hidden (view full) --- 49#include "base/loader/symtab.hh" 50#include "cpu/thread_context.hh" 51#include "cpu/base.hh" 52#include "dev/platform.hh" 53#include "kern/linux/printk.hh" 54#include "kern/linux/events.hh" 55#include "mem/physical.hh" 56#include "mem/port.hh" |
57#include "sim/builder.hh" | |
58#include "sim/byteswap.hh" 59 60using namespace std; 61using namespace AlphaISA; 62using namespace Linux; 63 64LinuxAlphaSystem::LinuxAlphaSystem(Params *p) 65 : AlphaSystem(p) --- 121 unchanged lines hidden (view full) --- 187LinuxAlphaSystem::PrintThreadInfo::process(ThreadContext *tc) 188{ 189 Linux::ThreadInfo ti(tc); 190 191 DPRINTF(Thread, "Currently Executing Thread %s, pid %d, started at: %d\n", 192 ti.curTaskName(), ti.curTaskPID(), ti.curTaskStart()); 193} 194 | 57#include "sim/byteswap.hh" 58 59using namespace std; 60using namespace AlphaISA; 61using namespace Linux; 62 63LinuxAlphaSystem::LinuxAlphaSystem(Params *p) 64 : AlphaSystem(p) --- 121 unchanged lines hidden (view full) --- 186LinuxAlphaSystem::PrintThreadInfo::process(ThreadContext *tc) 187{ 188 Linux::ThreadInfo ti(tc); 189 190 DPRINTF(Thread, "Currently Executing Thread %s, pid %d, started at: %d\n", 191 ti.curTaskName(), ti.curTaskPID(), ti.curTaskStart()); 192} 193 |
195 196BEGIN_DECLARE_SIM_OBJECT_PARAMS(LinuxAlphaSystem) 197 198 Param<Tick> boot_cpu_frequency; 199 SimObjectParam<PhysicalMemory *> physmem; 200 SimpleEnumParam<System::MemoryMode> mem_mode; 201 202 Param<string> kernel; 203 Param<string> console; 204 Param<string> pal; 205 206 Param<string> boot_osflags; 207 Param<string> readfile; 208 Param<string> symbolfile; 209 Param<unsigned int> init_param; 210 211 Param<uint64_t> system_type; 212 Param<uint64_t> system_rev; 213 214END_DECLARE_SIM_OBJECT_PARAMS(LinuxAlphaSystem) 215 216BEGIN_INIT_SIM_OBJECT_PARAMS(LinuxAlphaSystem) 217 218 INIT_PARAM(boot_cpu_frequency, "Frequency of the boot CPU"), 219 INIT_PARAM(physmem, "phsyical memory"), 220 INIT_ENUM_PARAM(mem_mode, "Memory Mode, (1=atomic, 2=timing)", 221 System::MemoryModeStrings), 222 INIT_PARAM(kernel, "file that contains the kernel code"), 223 INIT_PARAM(console, "file that contains the console code"), 224 INIT_PARAM(pal, "file that contains palcode"), 225 INIT_PARAM_DFLT(boot_osflags, "flags to pass to the kernel during boot", 226 "a"), 227 INIT_PARAM_DFLT(readfile, "file to read startup script from", ""), 228 INIT_PARAM_DFLT(symbolfile, "file to read symbols from", ""), 229 INIT_PARAM_DFLT(init_param, "numerical value to pass into simulator", 0), 230 INIT_PARAM_DFLT(system_type, "Type of system we are emulating", 34), 231 INIT_PARAM_DFLT(system_rev, "Revision of system we are emulating", 1<<10) 232 233END_INIT_SIM_OBJECT_PARAMS(LinuxAlphaSystem) 234 235CREATE_SIM_OBJECT(LinuxAlphaSystem) | 194LinuxAlphaSystem * 195LinuxAlphaSystemParams::create() |
236{ | 196{ |
237 AlphaSystem::Params *p = new AlphaSystem::Params; 238 p->name = getInstanceName(); 239 p->boot_cpu_frequency = boot_cpu_frequency; 240 p->physmem = physmem; 241 p->mem_mode = mem_mode; 242 p->kernel_path = kernel; 243 p->console_path = console; 244 p->palcode = pal; 245 p->boot_osflags = boot_osflags; 246 p->init_param = init_param; 247 p->readfile = readfile; 248 p->symbolfile = symbolfile; 249 p->system_type = system_type; 250 p->system_rev = system_rev; 251 return new LinuxAlphaSystem(p); | 197 return new LinuxAlphaSystem(this); |
252} | 198} |
253 254REGISTER_SIM_OBJECT("LinuxAlphaSystem", LinuxAlphaSystem) 255 | |