summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-03-09 19:21:35 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-03-09 19:21:35 -0500
commitf102365bfe14d25e40fb6d5cbd184138c0593c55 (patch)
tree3a67165ddff1b7341be44e5c8886eec7392490e7 /arch
parent872bbdfc33cb82bf32576db3a57d3055a04acbac (diff)
downloadgem5-f102365bfe14d25e40fb6d5cbd184138c0593c55.tar.xz
SimpleCPU compiles with merge.
arch/alpha/isa_traits.hh: arch/alpha/linux/process.cc: arch/alpha/process.cc: arch/alpha/process.hh: arch/alpha/tru64/process.cc: base/chunk_generator.hh: base/loader/elf_object.cc: cpu/cpu_exec_context.cc: cpu/cpu_exec_context.hh: cpu/exec_context.hh: cpu/simple/cpu.cc: kern/linux/linux.hh: kern/tru64/tru64.hh: mem/packet.hh: mem/page_table.cc: mem/page_table.hh: mem/physical.cc: mem/request.hh: mem/translating_port.cc: sim/process.hh: sim/system.cc: Fixing merged changes. --HG-- extra : convert_revision : 2e94f21009395db654880fcb94ec806b6f5772c3
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/isa_traits.hh2
-rw-r--r--arch/alpha/linux/process.cc13
-rw-r--r--arch/alpha/process.cc6
-rw-r--r--arch/alpha/process.hh2
-rw-r--r--arch/alpha/tru64/process.cc21
5 files changed, 24 insertions, 20 deletions
diff --git a/arch/alpha/isa_traits.hh b/arch/alpha/isa_traits.hh
index 0cf31cb50..878193881 100644
--- a/arch/alpha/isa_traits.hh
+++ b/arch/alpha/isa_traits.hh
@@ -344,6 +344,7 @@ extern const int reg_redir[NumIntRegs];
const Addr MaxAddr = (Addr)-1;
+#if !FULL_SYSTEM
static inline void setSyscallReturn(SyscallReturn return_value, RegFile *regs)
{
// check for error condition. Alpha syscall convention is to
@@ -359,6 +360,7 @@ extern const int reg_redir[NumIntRegs];
regs->intRegFile[ReturnValueReg] = -return_value.value();
}
}
+#endif
};
static inline AlphaISA::ExtMachInst
diff --git a/arch/alpha/linux/process.cc b/arch/alpha/linux/process.cc
index 1c911bc50..d40895921 100644
--- a/arch/alpha/linux/process.cc
+++ b/arch/alpha/linux/process.cc
@@ -32,7 +32,6 @@
#include "base/trace.hh"
#include "cpu/exec_context.hh"
#include "kern/linux/linux.hh"
-#include "mem/functional/functional.hh"
#include "sim/process.hh"
#include "sim/syscall_emul.hh"
@@ -55,7 +54,7 @@ unameFunc(SyscallDesc *desc, int callnum, Process *process,
strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
strcpy(name->machine, "alpha");
- name.copyOut(xc->getMemPtr());
+ name.copyOut(xc->port);
return 0;
}
@@ -75,7 +74,7 @@ osf_getsysinfoFunc(SyscallDesc *desc, int callnum, Process *process,
TypedBufferArg<uint64_t> fpcr(xc->getSyscallArg(1));
// I don't think this exactly matches the HW FPCR
*fpcr = 0;
- fpcr.copyOut(xc->getMemPtr());
+ fpcr.copyOut(xc->port);
return 0;
}
@@ -101,7 +100,7 @@ osf_setsysinfoFunc(SyscallDesc *desc, int callnum, Process *process,
case 14: { // SSI_IEEE_FP_CONTROL
TypedBufferArg<uint64_t> fpcr(xc->getSyscallArg(1));
// I don't think this exactly matches the HW FPCR
- fpcr.copyIn(xc->getMemPtr());
+ fpcr.copyIn(xc->port);
DPRINTFR(SyscallVerbose, "osf_setsysinfo(SSI_IEEE_FP_CONTROL): "
" setting FPCR to 0x%x\n", gtoh(*(uint64_t*)fpcr));
return 0;
@@ -567,15 +566,17 @@ SyscallDesc AlphaLinuxProcess::syscallDescs[] = {
AlphaLinuxProcess::AlphaLinuxProcess(const std::string &name,
ObjectFile *objFile,
+ System *system,
int stdin_fd,
int stdout_fd,
int stderr_fd,
std::vector<std::string> &argv,
std::vector<std::string> &envp)
- : LiveProcess(name, objFile, stdin_fd, stdout_fd, stderr_fd, argv, envp),
+ : LiveProcess(name, objFile, system, stdin_fd, stdout_fd,
+ stderr_fd, argv, envp),
Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc))
{
- init_regs->intRegFile[0] = 0;
+ //init_regs->intRegFile[0] = 0;
}
diff --git a/arch/alpha/process.cc b/arch/alpha/process.cc
index b2dbe7ad1..dc4b92861 100644
--- a/arch/alpha/process.cc
+++ b/arch/alpha/process.cc
@@ -32,7 +32,7 @@ namespace AlphaISA
{
LiveProcess *
-createProcess(const std::string &nm, ObjectFile * objFile,
+createProcess(const std::string &nm, ObjectFile * objFile, System *system,
int stdin_fd, int stdout_fd, int stderr_fd,
std::vector<std::string> &argv, std::vector<std::string> &envp)
{
@@ -41,13 +41,13 @@ createProcess(const std::string &nm, ObjectFile * objFile,
fatal("Object file does not match architecture.");
switch (objFile->getOpSys()) {
case ObjectFile::Tru64:
- process = new AlphaTru64Process(nm, objFile,
+ process = new AlphaTru64Process(nm, objFile, system,
stdin_fd, stdout_fd, stderr_fd,
argv, envp);
break;
case ObjectFile::Linux:
- process = new AlphaLinuxProcess(nm, objFile,
+ process = new AlphaLinuxProcess(nm, objFile, system,
stdin_fd, stdout_fd, stderr_fd,
argv, envp);
break;
diff --git a/arch/alpha/process.hh b/arch/alpha/process.hh
index 4a2a4212e..a2eb65890 100644
--- a/arch/alpha/process.hh
+++ b/arch/alpha/process.hh
@@ -39,7 +39,7 @@ namespace AlphaISA
{
LiveProcess *
-createProcess(const std::string &nm, ObjectFile * objFile,
+createProcess(const std::string &nm, ObjectFile * objFile, System * system,
int stdin_fd, int stdout_fd, int stderr_fd,
std::vector<std::string> &argv, std::vector<std::string> &envp);
diff --git a/arch/alpha/tru64/process.cc b/arch/alpha/tru64/process.cc
index c3a203587..55de67ace 100644
--- a/arch/alpha/tru64/process.cc
+++ b/arch/alpha/tru64/process.cc
@@ -30,7 +30,6 @@
#include "arch/alpha/tru64/process.hh"
#include "cpu/exec_context.hh"
#include "kern/tru64/tru64.hh"
-#include "mem/functional/functional.hh"
#include "sim/fake_syscall.hh"
#include "sim/process.hh"
#include "sim/syscall_emul.hh"
@@ -51,7 +50,7 @@ unameFunc(SyscallDesc *desc, int callnum, Process *process,
strcpy(name->version, "732");
strcpy(name->machine, "alpha");
- name.copyOut(xc->getMemPtr());
+ name.copyOut(xc->port);
return 0;
}
@@ -68,21 +67,21 @@ getsysinfoFunc(SyscallDesc *desc, int callnum, Process *process,
case Tru64::GSI_MAX_CPU: {
TypedBufferArg<uint32_t> max_cpu(xc->getSyscallArg(1));
*max_cpu = htog((uint32_t)process->numCpus());
- max_cpu.copyOut(xc->getMemPtr());
+ max_cpu.copyOut(xc->port);
return 1;
}
case Tru64::GSI_CPUS_IN_BOX: {
TypedBufferArg<uint32_t> cpus_in_box(xc->getSyscallArg(1));
*cpus_in_box = htog((uint32_t)process->numCpus());
- cpus_in_box.copyOut(xc->getMemPtr());
+ cpus_in_box.copyOut(xc->port);
return 1;
}
case Tru64::GSI_PHYSMEM: {
TypedBufferArg<uint64_t> physmem(xc->getSyscallArg(1));
*physmem = htog((uint64_t)1024 * 1024); // physical memory in KB
- physmem.copyOut(xc->getMemPtr());
+ physmem.copyOut(xc->port);
return 1;
}
@@ -99,14 +98,14 @@ getsysinfoFunc(SyscallDesc *desc, int callnum, Process *process,
infop->cpu_ex_binding = htog(0);
infop->mhz = htog(667);
- infop.copyOut(xc->getMemPtr());
+ infop.copyOut(xc->port);
return 1;
}
case Tru64::GSI_PROC_TYPE: {
TypedBufferArg<uint64_t> proc_type(xc->getSyscallArg(1));
*proc_type = htog((uint64_t)11);
- proc_type.copyOut(xc->getMemPtr());
+ proc_type.copyOut(xc->port);
return 1;
}
@@ -115,14 +114,14 @@ getsysinfoFunc(SyscallDesc *desc, int callnum, Process *process,
strncpy((char *)bufArg.bufferPtr(),
"COMPAQ Professional Workstation XP1000",
nbytes);
- bufArg.copyOut(xc->getMemPtr());
+ bufArg.copyOut(xc->port);
return 1;
}
case Tru64::GSI_CLK_TCK: {
TypedBufferArg<uint64_t> clk_hz(xc->getSyscallArg(1));
*clk_hz = htog((uint64_t)1024);
- clk_hz.copyOut(xc->getMemPtr());
+ clk_hz.copyOut(xc->port);
return 1;
}
@@ -531,12 +530,14 @@ AlphaTru64Process::getDesc(int callnum)
AlphaTru64Process::AlphaTru64Process(const std::string &name,
ObjectFile *objFile,
+ System *system,
int stdin_fd,
int stdout_fd,
int stderr_fd,
std::vector<std::string> &argv,
std::vector<std::string> &envp)
- : LiveProcess(name, objFile, stdin_fd, stdout_fd, stderr_fd, argv, envp),
+ : LiveProcess(name, objFile, system, stdin_fd, stdout_fd,
+ stderr_fd, argv, envp),
Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc)),
Num_Mach_Syscall_Descs(sizeof(machSyscallDescs) / sizeof(SyscallDesc))
{