summaryrefslogtreecommitdiff
path: root/src/arch/mips/linux
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-07-21 01:08:53 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-07-21 01:08:53 -0700
commit7548082d3baf578fe984c79f414dbefd96091359 (patch)
tree2992c954757b4116244ce612dd0d7c63a3893f02 /src/arch/mips/linux
parentdc0a017ed0ce192b2959ae0cc08522d04a4281a1 (diff)
downloadgem5-7548082d3baf578fe984c79f414dbefd96091359.tar.xz
MIPS: Many style fixes.
White space, commented out code, some other minor fixes.
Diffstat (limited to 'src/arch/mips/linux')
-rw-r--r--src/arch/mips/linux/linux.cc4
-rw-r--r--src/arch/mips/linux/linux.hh14
-rw-r--r--src/arch/mips/linux/process.cc48
-rw-r--r--src/arch/mips/linux/system.cc7
4 files changed, 31 insertions, 42 deletions
diff --git a/src/arch/mips/linux/linux.cc b/src/arch/mips/linux/linux.cc
index 8745731dc..6cfc93585 100644
--- a/src/arch/mips/linux/linux.cc
+++ b/src/arch/mips/linux/linux.cc
@@ -69,7 +69,3 @@ OpenFlagTransTable MipsLinux::openFlagTable[] = {
const int MipsLinux::NUM_OPEN_FLAGS =
(sizeof(MipsLinux::openFlagTable)/sizeof(MipsLinux::openFlagTable[0]));
-
-
-
-
diff --git a/src/arch/mips/linux/linux.hh b/src/arch/mips/linux/linux.hh
index aaeba0a42..ee81fa18f 100644
--- a/src/arch/mips/linux/linux.hh
+++ b/src/arch/mips/linux/linux.hh
@@ -68,13 +68,13 @@ class MipsLinux : public Linux
//@{
/// For getsysinfo().
- static const unsigned GSI_PLATFORM_NAME = 103; //!< platform name as string
- static const unsigned GSI_CPU_INFO = 59; //!< CPU information
- static const unsigned GSI_PROC_TYPE = 60; //!< get proc_type
- static const unsigned GSI_MAX_CPU = 30; //!< max # cpu's on this machine
- static const unsigned GSI_CPUS_IN_BOX = 55; //!< number of CPUs in system
- static const unsigned GSI_PHYSMEM = 19; //!< Physical memory in KB
- static const unsigned GSI_CLK_TCK = 42; //!< clock freq in Hz
+ static const unsigned GSI_PLATFORM_NAME = 103; //!< platform name as string
+ static const unsigned GSI_CPU_INFO = 59; //!< CPU information
+ static const unsigned GSI_PROC_TYPE = 60; //!< get proc_type
+ static const unsigned GSI_MAX_CPU = 30; //!< max # cpu's on this machine
+ static const unsigned GSI_CPUS_IN_BOX = 55; //!< number of CPUs in system
+ static const unsigned GSI_PHYSMEM = 19; //!< Physical memory in KB
+ static const unsigned GSI_CLK_TCK = 42; //!< clock freq in Hz
//@}
//@{
diff --git a/src/arch/mips/linux/process.cc b/src/arch/mips/linux/process.cc
index 24e71305a..53a24487f 100644
--- a/src/arch/mips/linux/process.cc
+++ b/src/arch/mips/linux/process.cc
@@ -74,15 +74,15 @@ sys_getsysinfoFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
// unsigned nbytes = process->getSyscallArg(tc, 2);
switch (op) {
-
- case 45: { // GSI_IEEE_FP_CONTROL
- TypedBufferArg<uint64_t> fpcr(process->getSyscallArg(tc, 1));
- // I don't think this exactly matches the HW FPCR
- *fpcr = 0;
- fpcr.copyOut(tc->getMemPort());
- return 0;
- }
-
+ case 45:
+ {
+ // GSI_IEEE_FP_CONTROL
+ TypedBufferArg<uint64_t> fpcr(process->getSyscallArg(tc, 1));
+ // I don't think this exactly matches the HW FPCR
+ *fpcr = 0;
+ fpcr.copyOut(tc->getMemPort());
+ return 0;
+ }
default:
cerr << "sys_getsysinfo: unknown op " << op << endl;
abort();
@@ -102,15 +102,16 @@ sys_setsysinfoFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
switch (op) {
- case 14: { // SSI_IEEE_FP_CONTROL
- TypedBufferArg<uint64_t> fpcr(process->getSyscallArg(tc, 1));
- // I don't think this exactly matches the HW FPCR
- fpcr.copyIn(tc->getMemPort());
- DPRINTFR(SyscallVerbose, "sys_setsysinfo(SSI_IEEE_FP_CONTROL): "
+ case 14:
+ {
+ // SSI_IEEE_FP_CONTROL
+ TypedBufferArg<uint64_t> fpcr(process->getSyscallArg(tc, 1));
+ // I don't think this exactly matches the HW FPCR
+ fpcr.copyIn(tc->getMemPort());
+ DPRINTFR(SyscallVerbose, "sys_setsysinfo(SSI_IEEE_FP_CONTROL): "
" setting FPCR to 0x%x\n", gtoh(*(uint64_t*)fpcr));
- return 0;
- }
-
+ return 0;
+ }
default:
cerr << "sys_setsysinfo: unknown op " << op << endl;
abort();
@@ -196,8 +197,8 @@ SyscallDesc MipsLinuxProcess::syscallDescs[] = {
/* 72 */ SyscallDesc("sigsuspend", unimplementedFunc),
/* 73 */ SyscallDesc("sigpending", unimplementedFunc),
/* 74 */ SyscallDesc("sethostname", ignoreFunc),
- /* 75 */ SyscallDesc("setrlimit", unimplementedFunc/*setrlimitFunc<MipsLinux>*/),
- /* 76 */ SyscallDesc("getrlimit", unimplementedFunc/*getrlimitFunc<MipsLinux>*/),
+ /* 75 */ SyscallDesc("setrlimit", unimplementedFunc),
+ /* 76 */ SyscallDesc("getrlimit", unimplementedFunc),
/* 77 */ SyscallDesc("getrusage", getrusageFunc<MipsLinux>),
/* 78 */ SyscallDesc("gettimeofday", unimplementedFunc),
/* 79 */ SyscallDesc("settimeofday", unimplementedFunc),
@@ -241,7 +242,7 @@ SyscallDesc MipsLinuxProcess::syscallDescs[] = {
/* 117 */ SyscallDesc("ipc", unimplementedFunc),
/* 118 */ SyscallDesc("fsync", unimplementedFunc),
/* 119 */ SyscallDesc("sigreturn", unimplementedFunc),
- /* 120 */ SyscallDesc("clone", unimplementedFunc/*cloneFunc<MipsLinux>*/),
+ /* 120 */ SyscallDesc("clone", unimplementedFunc),
/* 121 */ SyscallDesc("setdomainname", unimplementedFunc),
/* 122 */ SyscallDesc("uname", unameFunc),
/* 123 */ SyscallDesc("modify_ldt", unimplementedFunc),
@@ -315,12 +316,12 @@ SyscallDesc MipsLinuxProcess::syscallDescs[] = {
/* 191 */ SyscallDesc("getresgid", unimplementedFunc),
/* 192 */ SyscallDesc("prctl", unimplementedFunc),
/* 193 */ SyscallDesc("rt_sigreturn", unimplementedFunc),
- /* 194 */ SyscallDesc("rt_sigaction", unimplementedFunc/*rt_sigactionFunc<MipsLinux>*/),
- /* 195 */ SyscallDesc("rt_sigprocmask", unimplementedFunc/*rt_sigprocmaskFunc<MipsLinux>*/),
+ /* 194 */ SyscallDesc("rt_sigaction", unimplementedFunc),
+ /* 195 */ SyscallDesc("rt_sigprocmask", unimplementedFunc),
/* 196 */ SyscallDesc("rt_sigpending", unimplementedFunc),
/* 197 */ SyscallDesc("rt_sigtimedwait", unimplementedFunc),
/* 198 */ SyscallDesc("rt_sigqueueinfo", ignoreFunc),
- /* 199 */ SyscallDesc("rt_sigsuspend", unimplementedFunc/*rt_sigsuspendFunc<MipsLinux>*/),
+ /* 199 */ SyscallDesc("rt_sigsuspend", unimplementedFunc),
/* 200 */ SyscallDesc("pread64", unimplementedFunc),
/* 201 */ SyscallDesc("pwrite64", unimplementedFunc),
/* 202 */ SyscallDesc("chown", unimplementedFunc),
@@ -406,7 +407,6 @@ SyscallDesc MipsLinuxProcess::syscallDescs[] = {
/* 282 */ SyscallDesc("keyctl", unimplementedFunc)
};
-
MipsLinuxProcess::MipsLinuxProcess(LiveProcessParams * params,
ObjectFile *objFile)
: MipsLiveProcess(params, objFile),
diff --git a/src/arch/mips/linux/system.cc b/src/arch/mips/linux/system.cc
index 23062c96b..295e22a61 100644
--- a/src/arch/mips/linux/system.cc
+++ b/src/arch/mips/linux/system.cc
@@ -88,7 +88,6 @@ LinuxMipsSystem::LinuxMipsSystem(Params *p)
virtPort.write(addr, (uint64_t)(Clock::Frequency /
p->boot_cpu_frequency));
-
/**
* EV5 only supports 127 ASNs so we are going to tell the kernel that the
* paritiuclar EV6 we have only supports 127 asns.
@@ -105,12 +104,6 @@ LinuxMipsSystem::LinuxMipsSystem(Params *p)
if (!kernelPanicEvent)
panic("could not find kernel symbol \'panic\'");
-#if 0
- kernelDieEvent = addKernelFuncEvent<BreakPCEvent>("die_if_kernel");
- if (!kernelDieEvent)
- panic("could not find kernel symbol \'die_if_kernel\'");
-#endif
-
#endif
/**