system.cc (2902:695d4683916e) system.cc (3125:febd811bccc6)
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;

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

100 SimpleEnumParam<System::MemoryMode> mem_mode;
101
102 Param<string> kernel;
103 Param<string> console;
104 Param<string> pal;
105
106 Param<string> boot_osflags;
107 Param<string> readfile;
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;

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

100 SimpleEnumParam<System::MemoryMode> mem_mode;
101
102 Param<string> kernel;
103 Param<string> console;
104 Param<string> pal;
105
106 Param<string> boot_osflags;
107 Param<string> readfile;
108 Param<string> symbolfile;
108 Param<unsigned int> init_param;
109
110 Param<uint64_t> system_type;
111 Param<uint64_t> system_rev;
112
113END_DECLARE_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
114
115BEGIN_INIT_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
116
117 INIT_PARAM(boot_cpu_frequency, "Frequency of the boot CPU"),
118 INIT_PARAM(physmem, "phsyical memory"),
119 INIT_ENUM_PARAM(mem_mode, "Memory Mode, (1=atomic, 2=timing)",
120 System::MemoryModeStrings),
121 INIT_PARAM(kernel, "file that contains the kernel code"),
122 INIT_PARAM(console, "file that contains the console code"),
123 INIT_PARAM(pal, "file that contains palcode"),
124 INIT_PARAM_DFLT(boot_osflags, "flags to pass to the kernel during boot",
125 "a"),
126 INIT_PARAM_DFLT(readfile, "file to read startup script from", ""),
109 Param<unsigned int> init_param;
110
111 Param<uint64_t> system_type;
112 Param<uint64_t> system_rev;
113
114END_DECLARE_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
115
116BEGIN_INIT_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
117
118 INIT_PARAM(boot_cpu_frequency, "Frequency of the boot CPU"),
119 INIT_PARAM(physmem, "phsyical memory"),
120 INIT_ENUM_PARAM(mem_mode, "Memory Mode, (1=atomic, 2=timing)",
121 System::MemoryModeStrings),
122 INIT_PARAM(kernel, "file that contains the kernel code"),
123 INIT_PARAM(console, "file that contains the console code"),
124 INIT_PARAM(pal, "file that contains palcode"),
125 INIT_PARAM_DFLT(boot_osflags, "flags to pass to the kernel during boot",
126 "a"),
127 INIT_PARAM_DFLT(readfile, "file to read startup script from", ""),
128 INIT_PARAM_DFLT(symbolfile, "file to read symbols from", ""),
127 INIT_PARAM_DFLT(init_param, "numerical value to pass into simulator", 0),
128 INIT_PARAM_DFLT(system_type, "Type of system we are emulating", 34),
129 INIT_PARAM_DFLT(system_rev, "Revision of system we are emulating", 1<<10)
130
131END_INIT_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
132
133CREATE_SIM_OBJECT(FreebsdAlphaSystem)
134{
135 AlphaSystem::Params *p = new AlphaSystem::Params;
136 p->name = getInstanceName();
137 p->boot_cpu_frequency = boot_cpu_frequency;
138 p->physmem = physmem;
139 p->mem_mode = mem_mode;
140 p->kernel_path = kernel;
141 p->console_path = console;
142 p->palcode = pal;
143 p->boot_osflags = boot_osflags;
144 p->init_param = init_param;
145 p->readfile = readfile;
129 INIT_PARAM_DFLT(init_param, "numerical value to pass into simulator", 0),
130 INIT_PARAM_DFLT(system_type, "Type of system we are emulating", 34),
131 INIT_PARAM_DFLT(system_rev, "Revision of system we are emulating", 1<<10)
132
133END_INIT_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
134
135CREATE_SIM_OBJECT(FreebsdAlphaSystem)
136{
137 AlphaSystem::Params *p = new AlphaSystem::Params;
138 p->name = getInstanceName();
139 p->boot_cpu_frequency = boot_cpu_frequency;
140 p->physmem = physmem;
141 p->mem_mode = mem_mode;
142 p->kernel_path = kernel;
143 p->console_path = console;
144 p->palcode = pal;
145 p->boot_osflags = boot_osflags;
146 p->init_param = init_param;
147 p->readfile = readfile;
148 p->symbolfile = symbolfile;
146 p->system_type = system_type;
147 p->system_rev = system_rev;
148 return new FreebsdAlphaSystem(p);
149}
150
151REGISTER_SIM_OBJECT("FreebsdAlphaSystem", FreebsdAlphaSystem)
152
149 p->system_type = system_type;
150 p->system_rev = system_rev;
151 return new FreebsdAlphaSystem(p);
152}
153
154REGISTER_SIM_OBJECT("FreebsdAlphaSystem", FreebsdAlphaSystem)
155